TAPI: stitching: improve warpers

This commit is contained in:
Alexander Alekhin
2014-03-12 14:54:22 +04:00
committed by Andrey Pavlenko
parent 89e3e448f5
commit c1ea6f3c42
11 changed files with 149 additions and 325 deletions

View File

@@ -63,24 +63,12 @@ public:
explicit WarperBase(int type, Size srcSize)
{
Ptr<WarperCreator> creator;
if (cv::ocl::useOpenCL())
{
if (type == SphericalWarperType)
creator = makePtr<SphericalWarperOcl>();
else if (type == CylindricalWarperType)
creator = makePtr<CylindricalWarperOcl>();
else if (type == PlaneWarperType)
creator = makePtr<PlaneWarperOcl>();
}
else
{
if (type == SphericalWarperType)
creator = makePtr<SphericalWarper>();
else if (type == CylindricalWarperType)
creator = makePtr<CylindricalWarper>();
else if (type == PlaneWarperType)
creator = makePtr<PlaneWarper>();
}
if (type == SphericalWarperType)
creator = makePtr<SphericalWarper>();
else if (type == CylindricalWarperType)
creator = makePtr<CylindricalWarper>();
else if (type == PlaneWarperType)
creator = makePtr<PlaneWarper>();
CV_Assert(!creator.empty());
K = Mat::eye(3, 3, CV_32FC1);