feature2d: added regression tests for AKAZE

* test with both MLDB and KAZE keypoints
pull/8869/head
Jiri Horner 8 years ago
parent ffd9ad99f4
commit ca826f24d4
  1. 8
      modules/features2d/test/test_descriptors_regression.cpp
  2. 7
      modules/features2d/test/test_detectors_regression.cpp
  3. 58
      modules/features2d/test/test_rotation_and_scale_invariance.cpp

@ -350,6 +350,14 @@ TEST( Features2d_DescriptorExtractor_AKAZE, regression )
test.safe_run();
}
TEST( Features2d_DescriptorExtractor_AKAZE_DESCRIPTOR_KAZE, regression )
{
CV_DescriptorExtractorTest< L2<float> > test( "descriptor-akaze-with-kaze-desc", 0.03f,
AKAZE::create(AKAZE::DESCRIPTOR_KAZE),
L2<float>(), AKAZE::create(AKAZE::DESCRIPTOR_KAZE));
test.safe_run();
}
TEST( Features2d_DescriptorExtractor, batch )
{
string path = string(cvtest::TS::ptr()->get_data_path() + "detectors_descriptors_evaluation/images_datasets/graf");

@ -302,6 +302,13 @@ TEST( Features2d_Detector_AKAZE, regression )
test.safe_run();
}
TEST( Features2d_Detector_AKAZE_DESCRIPTOR_KAZE, regression )
{
CV_FeatureDetectorTest test( "detector-akaze-with-kaze-desc", AKAZE::create(AKAZE::DESCRIPTOR_KAZE) );
test.safe_run();
}
TEST( Features2d_Detector_AKAZE, detect_and_compute_split )
{
Mat testImg(100, 100, CV_8U);

@ -104,8 +104,12 @@ void rotateKeyPoints(const vector<KeyPoint>& src, const Mat& H, float angle, vec
void scaleKeyPoints(const vector<KeyPoint>& src, vector<KeyPoint>& dst, float scale)
{
dst.resize(src.size());
for(size_t i = 0; i < src.size(); i++)
dst[i] = KeyPoint(src[i].pt.x * scale, src[i].pt.y * scale, src[i].size * scale, src[i].angle);
for (size_t i = 0; i < src.size(); i++) {
dst[i] = src[i];
dst[i].pt.x *= scale;
dst[i].pt.y *= scale;
dst[i].size *= scale;
}
}
static
@ -630,6 +634,22 @@ TEST(Features2d_RotationInvariance_Detector_ORB, regression)
test.safe_run();
}
TEST(Features2d_RotationInvariance_Detector_AKAZE, regression)
{
DetectorRotationInvarianceTest test(AKAZE::create(),
0.5f,
0.76f);
test.safe_run();
}
TEST(Features2d_RotationInvariance_Detector_AKAZE_DESCRIPTOR_KAZE, regression)
{
DetectorRotationInvarianceTest test(AKAZE::create(AKAZE::DESCRIPTOR_KAZE),
0.5f,
0.76f);
test.safe_run();
}
/*
* Descriptors's rotation invariance check
*/
@ -648,6 +668,20 @@ TEST(Features2d_RotationInvariance_Descriptor_ORB, regression)
test.safe_run();
}
TEST(Features2d_RotationInvariance_Descriptor_AKAZE, regression)
{
Ptr<Feature2D> f2d = AKAZE::create();
DescriptorRotationInvarianceTest test(f2d, f2d, f2d->defaultNorm(), 0.99f);
test.safe_run();
}
TEST(Features2d_RotationInvariance_Descriptor_AKAZE_DESCRIPTOR_KAZE, regression)
{
Ptr<Feature2D> f2d = AKAZE::create(AKAZE::DESCRIPTOR_KAZE);
DescriptorRotationInvarianceTest test(f2d, f2d, f2d->defaultNorm(), 0.99f);
test.safe_run();
}
//TEST(Features2d_RotationInvariance_Descriptor_FREAK, regression)
//{
// DescriptorRotationInvarianceTest test(Algorithm::create<FeatureDetector>("Feature2D.ORB"),
@ -679,6 +713,12 @@ TEST(Features2d_ScaleInvariance_Detector_AKAZE, regression)
test.safe_run();
}
TEST(Features2d_ScaleInvariance_Detector_AKAZE_DESCRIPTOR_KAZE, regression)
{
DetectorScaleInvarianceTest test(AKAZE::create(AKAZE::DESCRIPTOR_KAZE), 0.08f, 0.49f);
test.safe_run();
}
TEST(Features2d_ScaleInvariance_Detector_ORB, regression)
{
DetectorScaleInvarianceTest test(ORB::create(), 0.08f, 0.49f);
@ -689,6 +729,20 @@ TEST(Features2d_ScaleInvariance_Detector_ORB, regression)
* Descriptor's scale invariance check
*/
TEST(Features2d_ScaleInvariance_Descriptor_AKAZE, regression)
{
Ptr<Feature2D> akaze = AKAZE::create();
DescriptorScaleInvarianceTest test(akaze, akaze, akaze->defaultNorm(), 0.01f);
test.safe_run();
}
TEST(Features2d_ScaleInvariance_Descriptor_AKAZE_DESCRIPTOR_KAZE, regression)
{
Ptr<Feature2D> akaze = AKAZE::create(AKAZE::DESCRIPTOR_KAZE);
DescriptorScaleInvarianceTest test(akaze, akaze, akaze->defaultNorm(), 0.01f);
test.safe_run();
}
//TEST(Features2d_ScaleInvariance_Descriptor_BRISK, regression)
//{
// DescriptorScaleInvarianceTest test(Algorithm::create<FeatureDetector>("Feature2D.BRISK"),

Loading…
Cancel
Save