|
|
|
@ -65,11 +65,13 @@ public: |
|
|
|
|
virtual Point warp(const Mat &src, const Mat &K, const Mat &R, int interp_mode, int border_mode, |
|
|
|
|
Mat &dst) = 0; |
|
|
|
|
|
|
|
|
|
// TODO add other backward functions for consistency or move this into a separated interface
|
|
|
|
|
virtual void warpBackward(const Mat &src, const Mat &K, const Mat &R, int interp_mode, int border_mode, |
|
|
|
|
Size dst_size, Mat &dst) = 0; |
|
|
|
|
|
|
|
|
|
virtual Rect warpRoi(Size src_size, const Mat &K, const Mat &R) = 0; |
|
|
|
|
|
|
|
|
|
virtual float getScale() const { return 1.f; } |
|
|
|
|
virtual void setScale(float) {} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -104,6 +106,9 @@ public: |
|
|
|
|
|
|
|
|
|
Rect warpRoi(Size src_size, const Mat &K, const Mat &R); |
|
|
|
|
|
|
|
|
|
float getScale() const { return projector_.scale; } |
|
|
|
|
void setScale(float val) { projector_.scale = val; } |
|
|
|
|
|
|
|
|
|
protected: |
|
|
|
|
|
|
|
|
|
// Detects ROI of the destination image. It's correct for any projection.
|
|
|
|
@ -129,8 +134,6 @@ class CV_EXPORTS PlaneWarper : public RotationWarperBase<PlaneProjector> |
|
|
|
|
public: |
|
|
|
|
PlaneWarper(float scale = 1.f) { projector_.scale = scale; } |
|
|
|
|
|
|
|
|
|
void setScale(float scale) { projector_.scale = scale; } |
|
|
|
|
|
|
|
|
|
Point2f warpPoint(const Point2f &pt, const Mat &K, const Mat &R, const Mat &T); |
|
|
|
|
|
|
|
|
|
Rect buildMaps(Size src_size, const Mat &K, const Mat &R, const Mat &T, Mat &xmap, Mat &ymap); |
|
|
|
|