@@ -104,8 +104,12 @@ void rotateKeyPoints(const vector<KeyPoint>& src, const Mat& H, float angle, vec
104
104
void scaleKeyPoints (const vector<KeyPoint>& src, vector<KeyPoint>& dst, float scale)
105
105
{
106
106
dst.resize (src.size ());
107
- for (size_t i = 0 ; i < src.size (); i++)
108
- dst[i] = KeyPoint (src[i].pt .x * scale, src[i].pt .y * scale, src[i].size * scale, src[i].angle );
107
+ for (size_t i = 0 ; i < src.size (); i++) {
108
+ dst[i] = src[i];
109
+ dst[i].pt .x *= scale;
110
+ dst[i].pt .y *= scale;
111
+ dst[i].size *= scale;
112
+ }
109
113
}
110
114
111
115
static
@@ -630,6 +634,22 @@ TEST(Features2d_RotationInvariance_Detector_ORB, regression)
630
634
test.safe_run ();
631
635
}
632
636
637
+ TEST (Features2d_RotationInvariance_Detector_AKAZE, regression)
638
+ {
639
+ DetectorRotationInvarianceTest test (AKAZE::create (),
640
+ 0 .5f ,
641
+ 0 .76f );
642
+ test.safe_run ();
643
+ }
644
+
645
+ TEST (Features2d_RotationInvariance_Detector_AKAZE_DESCRIPTOR_KAZE, regression)
646
+ {
647
+ DetectorRotationInvarianceTest test (AKAZE::create (AKAZE::DESCRIPTOR_KAZE),
648
+ 0 .5f ,
649
+ 0 .76f );
650
+ test.safe_run ();
651
+ }
652
+
633
653
/*
634
654
* Descriptors's rotation invariance check
635
655
*/
@@ -648,6 +668,20 @@ TEST(Features2d_RotationInvariance_Descriptor_ORB, regression)
648
668
test.safe_run ();
649
669
}
650
670
671
+ TEST (Features2d_RotationInvariance_Descriptor_AKAZE, regression)
672
+ {
673
+ Ptr<Feature2D> f2d = AKAZE::create ();
674
+ DescriptorRotationInvarianceTest test (f2d, f2d, f2d->defaultNorm (), 0 .99f );
675
+ test.safe_run ();
676
+ }
677
+
678
+ TEST (Features2d_RotationInvariance_Descriptor_AKAZE_DESCRIPTOR_KAZE, regression)
679
+ {
680
+ Ptr<Feature2D> f2d = AKAZE::create (AKAZE::DESCRIPTOR_KAZE);
681
+ DescriptorRotationInvarianceTest test (f2d, f2d, f2d->defaultNorm (), 0 .99f );
682
+ test.safe_run ();
683
+ }
684
+
651
685
// TEST(Features2d_RotationInvariance_Descriptor_FREAK, regression)
652
686
// {
653
687
// DescriptorRotationInvarianceTest test(Algorithm::create<FeatureDetector>("Feature2D.ORB"),
@@ -679,6 +713,12 @@ TEST(Features2d_ScaleInvariance_Detector_AKAZE, regression)
679
713
test.safe_run ();
680
714
}
681
715
716
+ TEST (Features2d_ScaleInvariance_Detector_AKAZE_DESCRIPTOR_KAZE, regression)
717
+ {
718
+ DetectorScaleInvarianceTest test (AKAZE::create (AKAZE::DESCRIPTOR_KAZE), 0 .08f , 0 .49f );
719
+ test.safe_run ();
720
+ }
721
+
682
722
TEST (Features2d_ScaleInvariance_Detector_ORB, regression)
683
723
{
684
724
DetectorScaleInvarianceTest test (ORB::create (), 0 .08f , 0 .49f );
@@ -689,6 +729,20 @@ TEST(Features2d_ScaleInvariance_Detector_ORB, regression)
689
729
* Descriptor's scale invariance check
690
730
*/
691
731
732
+ TEST (Features2d_ScaleInvariance_Descriptor_AKAZE, regression)
733
+ {
734
+ Ptr<Feature2D> akaze = AKAZE::create ();
735
+ DescriptorScaleInvarianceTest test (akaze, akaze, akaze->defaultNorm (), 0 .01f );
736
+ test.safe_run ();
737
+ }
738
+
739
+ TEST (Features2d_ScaleInvariance_Descriptor_AKAZE_DESCRIPTOR_KAZE, regression)
740
+ {
741
+ Ptr<Feature2D> akaze = AKAZE::create (AKAZE::DESCRIPTOR_KAZE);
742
+ DescriptorScaleInvarianceTest test (akaze, akaze, akaze->defaultNorm (), 0 .01f );
743
+ test.safe_run ();
744
+ }
745
+
692
746
// TEST(Features2d_ScaleInvariance_Descriptor_BRISK, regression)
693
747
// {
694
748
// DescriptorScaleInvarianceTest test(Algorithm::create<FeatureDetector>("Feature2D.BRISK"),
0 commit comments