1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 23:33:05 +04:00

Fix missing angles in AKAZE keypoints

This commit is contained in:
Vladislav Sovrasov
2016-12-12 12:25:57 +03:00
parent beea04cc89
commit 4a3da1c4ed
4 changed files with 34 additions and 0 deletions
@@ -301,3 +301,23 @@ TEST( Features2d_Detector_AKAZE, regression )
CV_FeatureDetectorTest test( "detector-akaze", AKAZE::create() );
test.safe_run();
}
TEST( Features2d_Detector_AKAZE, detect_and_compute_split )
{
Mat testImg(100, 100, CV_8U);
RNG rng(101);
rng.fill(testImg, RNG::UNIFORM, Scalar(0), Scalar(255), true);
Ptr<Feature2D> ext = AKAZE::create(AKAZE::DESCRIPTOR_MLDB, 0, 3, 0.001f, 1, 1, KAZE::DIFF_PM_G2);
vector<KeyPoint> detAndCompKps;
Mat desc;
ext->detectAndCompute(testImg, noArray(), detAndCompKps, desc);
vector<KeyPoint> detKps;
ext->detect(testImg, detKps);
ASSERT_EQ(detKps.size(), detAndCompKps.size());
for(size_t i = 0; i < detKps.size(); i++)
ASSERT_EQ(detKps[i].hash(), detAndCompKps[i].hash());
}