Skip to content

Commit 0f38313

Browse files
committed
replaced "const InputArray" with "InputArray" to avoid warnings about "const const _InputArray&"
1 parent e399523 commit 0f38313

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

modules/xfeatures2d/test/test_features2d.cpp

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1240,3 +1240,31 @@ TEST(DISABLED_Features2d_SURF_using_mask, regression)
12401240
FeatureDetectorUsingMaskTest test(SURF::create());
12411241
test.safe_run();
12421242
}
1243+
1244+
TEST( XFeatures2d_DescriptorExtractor, batch )
1245+
{
1246+
string path = string(cvtest::TS::ptr()->get_data_path() + "detectors_descriptors_evaluation/images_datasets/graf");
1247+
vector<Mat> imgs, descriptors;
1248+
vector<vector<KeyPoint> > keypoints;
1249+
int i, n = 6;
1250+
Ptr<SIFT> sift = SIFT::create();
1251+
1252+
for( i = 0; i < n; i++ )
1253+
{
1254+
string imgname = format("%s/img%d.png", path.c_str(), i+1);
1255+
Mat img = imread(imgname, 0);
1256+
imgs.push_back(img);
1257+
}
1258+
1259+
sift->detect(imgs, keypoints);
1260+
sift->compute(imgs, keypoints, descriptors);
1261+
1262+
ASSERT_EQ((int)keypoints.size(), n);
1263+
ASSERT_EQ((int)descriptors.size(), n);
1264+
1265+
for( i = 0; i < n; i++ )
1266+
{
1267+
EXPECT_GT((int)keypoints[i].size(), 100);
1268+
EXPECT_GT(descriptors[i].rows, 100);
1269+
}
1270+
}

0 commit comments

Comments
 (0)