File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -1240,3 +1240,31 @@ TEST(DISABLED_Features2d_SURF_using_mask, regression)
1240
1240
FeatureDetectorUsingMaskTest test (SURF::create ());
1241
1241
test.safe_run ();
1242
1242
}
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
+ }
You can’t perform that action at this time.
0 commit comments