1 #include "perf_precomp.hpp"
6 using std::tr1::make_tuple;
9 enum { TYPE_5_8 =FastFeatureDetector::TYPE_5_8, TYPE_7_12 = FastFeatureDetector::TYPE_7_12, TYPE_9_16 = FastFeatureDetector::TYPE_9_16 };
10 CV_ENUM(FastType, TYPE_5_8, TYPE_7_12, TYPE_9_16)
12 typedef std::tr1::tuple<String, FastType> File_Type_t;
13 typedef perf::TestBaseWithParam<File_Type_t> fast;
16 "cv/detectors_descriptors_evaluation/images_datasets/leuven/img1.png",\
19 PERF_TEST_P(fast, detect, testing::Combine(
20 testing::Values(FAST_IMAGES),
21 testing::ValuesIn(FastType::all())
24 String filename = getDataPath(get<0>(GetParam()));
25 int type = get<1>(GetParam());
26 Mat frame = imread(filename, IMREAD_GRAYSCALE);
29 FAIL() << "Unable to load source image " << filename;
33 Ptr<FeatureDetector> fd = Algorithm::create<FeatureDetector>("Feature2D.FASTX");
34 ASSERT_FALSE( fd == 0 );
35 fd->set("threshold", 20);
36 fd->set("nonmaxSuppression", true);
37 fd->set("type", type);
38 vector<KeyPoint> points;
40 TEST_CYCLE() fd->detect(frame, points);
42 SANITY_CHECK_KEYPOINTS(points);