Added warp method into the RotationWarper interface, added find() into VoronoiSeamFinder which uses only source image sizes

This commit is contained in:
Alexey Spizhevoy
2011-10-07 08:17:55 +00:00
parent 9ae8443d37
commit a7fbcad283
5 changed files with 66 additions and 9 deletions

View File

@@ -78,6 +78,15 @@ void ProjectorBase::setCameraParams(const Mat &K, const Mat &R, const Mat &T)
}
Point2f PlaneWarper::warp(const Point2f &pt, const Mat &K, const Mat &R, const Mat &T)
{
projector_.setCameraParams(K, R, T);
Point2f uv;
projector_.mapForward(pt.x, pt.y, uv.x, uv.y);
return uv;
}
Rect PlaneWarper::buildMaps(Size src_size, const Mat &K, const Mat &R, const Mat &T, Mat &xmap, Mat &ymap)
{
projector_.setCameraParams(K, R, T);