1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 00:03:03 +04:00

Merge pull request #785 from taka-no-me:split_c_cpp2

This commit is contained in:
Andrey Kamaev
2013-04-09 08:53:49 +04:00
committed by OpenCV Buildbot
222 changed files with 2387 additions and 1986 deletions
+5 -5
View File
@@ -113,10 +113,10 @@ void showOrig(const Mat& img, const vector<KeyPoint>& orig_pts)
{
Mat img_color;
cvtColor(img, img_color, CV_GRAY2BGR);
cvtColor(img, img_color, COLOR_GRAY2BGR);
for(size_t i = 0; i < orig_pts.size(); ++i)
circle(img_color, orig_pts[i].pt, (int)orig_pts[i].size/2, CV_RGB(0, 255, 0));
circle(img_color, orig_pts[i].pt, (int)orig_pts[i].size/2, Scalar(0, 255, 0));
namedWindow("O"); imshow("O", img_color);
}
@@ -125,13 +125,13 @@ void show(const string& name, const Mat& new_img, const vector<KeyPoint>& new_pt
{
Mat new_img_color;
cvtColor(new_img, new_img_color, CV_GRAY2BGR);
cvtColor(new_img, new_img_color, COLOR_GRAY2BGR);
for(size_t i = 0; i < transf_pts.size(); ++i)
circle(new_img_color, transf_pts[i].pt, (int)transf_pts[i].size/2, CV_RGB(255, 0, 0));
circle(new_img_color, transf_pts[i].pt, (int)transf_pts[i].size/2, Scalar(255, 0, 0));
for(size_t i = 0; i < new_pts.size(); ++i)
circle(new_img_color, new_pts[i].pt, (int)new_pts[i].size/2, CV_RGB(0, 0, 255));
circle(new_img_color, new_pts[i].pt, (int)new_pts[i].size/2, Scalar(0, 0, 255));
namedWindow(name + "_T"); imshow(name + "_T", new_img_color);
}
@@ -232,7 +232,7 @@ protected:
featureDetector->detect(image0, keypoints0);
removeVerySmallKeypoints(keypoints0);
if(keypoints0.size() < 15)
CV_Error(CV_StsAssert, "Detector gives too few points in a test image\n");
CV_Error(Error::StsAssert, "Detector gives too few points in a test image\n");
const int maxAngle = 360, angleStep = 15;
for(int angle = 0; angle < maxAngle; angle += angleStep)
@@ -262,7 +262,7 @@ protected:
float angle0 = keypoints0[matches[m].queryIdx].angle;
float angle1 = keypoints1[matches[m].trainIdx].angle;
if(angle0 == -1 || angle1 == -1)
CV_Error(CV_StsBadArg, "Given FeatureDetector is not rotation invariant, it can not be tested here.\n");
CV_Error(Error::StsBadArg, "Given FeatureDetector is not rotation invariant, it can not be tested here.\n");
CV_Assert(angle0 >= 0.f && angle0 < 360.f);
CV_Assert(angle1 >= 0.f && angle1 < 360.f);
@@ -347,7 +347,7 @@ protected:
featureDetector->detect(image0, keypoints0);
removeVerySmallKeypoints(keypoints0);
if(keypoints0.size() < 15)
CV_Error(CV_StsAssert, "Detector gives too few points in a test image\n");
CV_Error(Error::StsAssert, "Detector gives too few points in a test image\n");
descriptorExtractor->compute(image0, keypoints0, descriptors0);
BFMatcher bfmatcher(normType);
@@ -432,7 +432,7 @@ protected:
featureDetector->detect(image0, keypoints0);
removeVerySmallKeypoints(keypoints0);
if(keypoints0.size() < 15)
CV_Error(CV_StsAssert, "Detector gives too few points in a test image\n");
CV_Error(Error::StsAssert, "Detector gives too few points in a test image\n");
for(int scaleIdx = 1; scaleIdx <= 3; scaleIdx++)
{
@@ -444,7 +444,7 @@ protected:
featureDetector->detect(image1, keypoints1);
removeVerySmallKeypoints(keypoints1);
if(keypoints1.size() < 15)
CV_Error(CV_StsAssert, "Detector gives too few points in a test image\n");
CV_Error(Error::StsAssert, "Detector gives too few points in a test image\n");
if(keypoints1.size() > keypoints0.size())
{
@@ -553,7 +553,7 @@ protected:
featureDetector->detect(image0, keypoints0);
removeVerySmallKeypoints(keypoints0);
if(keypoints0.size() < 15)
CV_Error(CV_StsAssert, "Detector gives too few points in a test image\n");
CV_Error(Error::StsAssert, "Detector gives too few points in a test image\n");
Mat descriptors0;
descriptorExtractor->compute(image0, keypoints0, descriptors0);