replaced "const InputArray" with "InputArray" to avoid warnings about "const const _InputArray&"
pull/233/head
Vadim Pisarevsky 10 years ago
parent e3995236ed
commit 0f38313f36
  1. 28
      modules/xfeatures2d/test/test_features2d.cpp

@ -1240,3 +1240,31 @@ TEST(DISABLED_Features2d_SURF_using_mask, regression)
FeatureDetectorUsingMaskTest test(SURF::create());
test.safe_run();
}
TEST( XFeatures2d_DescriptorExtractor, batch )
{
string path = string(cvtest::TS::ptr()->get_data_path() + "detectors_descriptors_evaluation/images_datasets/graf");
vector<Mat> imgs, descriptors;
vector<vector<KeyPoint> > keypoints;
int i, n = 6;
Ptr<SIFT> sift = SIFT::create();
for( i = 0; i < n; i++ )
{
string imgname = format("%s/img%d.png", path.c_str(), i+1);
Mat img = imread(imgname, 0);
imgs.push_back(img);
}
sift->detect(imgs, keypoints);
sift->compute(imgs, keypoints, descriptors);
ASSERT_EQ((int)keypoints.size(), n);
ASSERT_EQ((int)descriptors.size(), n);
for( i = 0; i < n; i++ )
{
EXPECT_GT((int)keypoints[i].size(), 100);
EXPECT_GT(descriptors[i].rows, 100);
}
}

Loading…
Cancel
Save