Move C API of opencv_calib3d to separate file
This commit is contained in:
@@ -55,7 +55,7 @@ Ptr<Blender> Blender::createDefault(int type, bool try_gpu)
|
||||
return new FeatherBlender();
|
||||
if (type == MULTI_BAND)
|
||||
return new MultiBandBlender(try_gpu);
|
||||
CV_Error(CV_StsBadArg, "unsupported blending method");
|
||||
CV_Error(Error::StsBadArg, "unsupported blending method");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@@ -53,7 +53,7 @@ Ptr<ExposureCompensator> ExposureCompensator::createDefault(int type)
|
||||
return new GainCompensator();
|
||||
if (type == GAIN_BLOCKS)
|
||||
return new BlocksGainCompensator();
|
||||
CV_Error(CV_StsBadArg, "unsupported exposure compensation method");
|
||||
CV_Error(Error::StsBadArg, "unsupported exposure compensation method");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@@ -322,7 +322,7 @@ SurfFeaturesFinder::SurfFeaturesFinder(double hess_thresh, int num_octaves, int
|
||||
{
|
||||
surf = Algorithm::create<Feature2D>("Feature2D.SURF");
|
||||
if( surf.empty() )
|
||||
CV_Error( CV_StsNotImplemented, "OpenCV was built without SURF support" );
|
||||
CV_Error( Error::StsNotImplemented, "OpenCV was built without SURF support" );
|
||||
surf->set("hessianThreshold", hess_thresh);
|
||||
surf->set("nOctaves", num_octaves);
|
||||
surf->set("nOctaveLayers", num_layers);
|
||||
@@ -333,7 +333,7 @@ SurfFeaturesFinder::SurfFeaturesFinder(double hess_thresh, int num_octaves, int
|
||||
extractor_ = Algorithm::create<DescriptorExtractor>("Feature2D.SURF");
|
||||
|
||||
if( detector_.empty() || extractor_.empty() )
|
||||
CV_Error( CV_StsNotImplemented, "OpenCV was built without SURF support" );
|
||||
CV_Error( Error::StsNotImplemented, "OpenCV was built without SURF support" );
|
||||
|
||||
detector_->set("hessianThreshold", hess_thresh);
|
||||
detector_->set("nOctaves", num_octaves);
|
||||
@@ -388,7 +388,7 @@ void OrbFeaturesFinder::find(const Mat &image, ImageFeatures &features)
|
||||
} else if (image.type() == CV_8UC1) {
|
||||
gray_image=image;
|
||||
} else {
|
||||
CV_Error(CV_StsUnsupportedFormat, "");
|
||||
CV_Error(Error::StsUnsupportedFormat, "");
|
||||
}
|
||||
|
||||
if (grid_size.area() == 1)
|
||||
@@ -579,7 +579,7 @@ void BestOf2NearestMatcher::match(const ImageFeatures &features1, const ImageFea
|
||||
}
|
||||
|
||||
// Find pair-wise motion
|
||||
matches_info.H = findHomography(src_points, dst_points, matches_info.inliers_mask, CV_RANSAC);
|
||||
matches_info.H = findHomography(src_points, dst_points, matches_info.inliers_mask, RANSAC);
|
||||
if (matches_info.H.empty() || std::abs(determinant(matches_info.H)) < std::numeric_limits<double>::epsilon())
|
||||
return;
|
||||
|
||||
@@ -626,7 +626,7 @@ void BestOf2NearestMatcher::match(const ImageFeatures &features1, const ImageFea
|
||||
}
|
||||
|
||||
// Rerun motion estimation on inliers only
|
||||
matches_info.H = findHomography(src_points, dst_points, CV_RANSAC);
|
||||
matches_info.H = findHomography(src_points, dst_points, RANSAC);
|
||||
}
|
||||
|
||||
void BestOf2NearestMatcher::collectGarbage()
|
||||
|
@@ -41,6 +41,7 @@
|
||||
//M*/
|
||||
|
||||
#include "precomp.hpp"
|
||||
#include "opencv2/calib3d/calib3d_c.h"
|
||||
|
||||
using namespace cv;
|
||||
using namespace cv::detail;
|
||||
|
@@ -716,7 +716,7 @@ void DpSeamFinder::computeCosts(
|
||||
else if (image1.type() == CV_8UC4 && image2.type() == CV_8UC4)
|
||||
diff = diffL2Square4<uchar>;
|
||||
else
|
||||
CV_Error(CV_StsBadArg, "both images must have CV_32FC3(4) or CV_8UC3(4) type");
|
||||
CV_Error(Error::StsBadArg, "both images must have CV_32FC3(4) or CV_8UC3(4) type");
|
||||
|
||||
int l = comp+1;
|
||||
Rect roi(tls_[comp], brs_[comp]);
|
||||
@@ -1279,7 +1279,7 @@ void GraphCutSeamFinder::Impl::findInPair(size_t first, size_t second, Rect roi)
|
||||
submask1, submask2, graph);
|
||||
break;
|
||||
default:
|
||||
CV_Error(CV_StsBadArg, "unsupported pixel similarity measure");
|
||||
CV_Error(Error::StsBadArg, "unsupported pixel similarity measure");
|
||||
}
|
||||
|
||||
graph.maxFlow();
|
||||
@@ -1420,7 +1420,7 @@ void GraphCutSeamFinderGpu::findInPair(size_t first, size_t second, Rect roi)
|
||||
submask1, submask2, terminals, leftT, rightT, top, bottom);
|
||||
break;
|
||||
default:
|
||||
CV_Error(CV_StsBadArg, "unsupported pixel similarity measure");
|
||||
CV_Error(Error::StsBadArg, "unsupported pixel similarity measure");
|
||||
}
|
||||
|
||||
gpu::GpuMat terminals_d(terminals);
|
||||
|
Reference in New Issue
Block a user