mirror of
https://github.com/opencv/opencv.git
synced 2025-01-18 06:03:15 +08:00
add rotation tests for the descriptors
This commit is contained in:
parent
b325b2f9a4
commit
92da6d381b
@ -530,6 +530,9 @@ BRISK::operator()( InputArray _image, InputArray _mask, vector<KeyPoint>& keypoi
|
|||||||
OutputArray _descriptors, bool useProvidedKeypoints) const
|
OutputArray _descriptors, bool useProvidedKeypoints) const
|
||||||
{
|
{
|
||||||
Mat image = _image.getMat(), mask = _mask.getMat();
|
Mat image = _image.getMat(), mask = _mask.getMat();
|
||||||
|
if( image.type() != CV_8UC1 )
|
||||||
|
cvtColor(image, image, CV_BGR2GRAY);
|
||||||
|
|
||||||
if (!useProvidedKeypoints)
|
if (!useProvidedKeypoints)
|
||||||
detectImpl(image, keypoints, mask);
|
detectImpl(image, keypoints, mask);
|
||||||
|
|
||||||
|
@ -592,6 +592,15 @@ protected:
|
|||||||
/*
|
/*
|
||||||
* Detector's rotation invariance check
|
* Detector's rotation invariance check
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
TEST(Features2d_RotationInvariance_Detector_BRISK, regression)
|
||||||
|
{
|
||||||
|
DetectorRotationInvarianceTest test(Algorithm::create<FeatureDetector>("Feature2D.BRISK"),
|
||||||
|
0.32f,
|
||||||
|
0.81f);
|
||||||
|
test.safe_run();
|
||||||
|
}
|
||||||
|
|
||||||
TEST(Features2d_RotationInvariance_Detector_ORB, regression)
|
TEST(Features2d_RotationInvariance_Detector_ORB, regression)
|
||||||
{
|
{
|
||||||
DetectorRotationInvarianceTest test(Algorithm::create<FeatureDetector>("Feature2D.ORB"),
|
DetectorRotationInvarianceTest test(Algorithm::create<FeatureDetector>("Feature2D.ORB"),
|
||||||
@ -603,6 +612,16 @@ TEST(Features2d_RotationInvariance_Detector_ORB, regression)
|
|||||||
/*
|
/*
|
||||||
* Descriptors's rotation invariance check
|
* Descriptors's rotation invariance check
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
TEST(Features2d_RotationInvariance_Descriptor_BRISK, regression)
|
||||||
|
{
|
||||||
|
DescriptorRotationInvarianceTest test(Algorithm::create<FeatureDetector>("Feature2D.BRISK"),
|
||||||
|
Algorithm::create<DescriptorExtractor>("Feature2D.BRISK"),
|
||||||
|
NORM_HAMMING,
|
||||||
|
0.99f);
|
||||||
|
test.safe_run();
|
||||||
|
}
|
||||||
|
|
||||||
TEST(Features2d_RotationInvariance_Descriptor_ORB, regression)
|
TEST(Features2d_RotationInvariance_Descriptor_ORB, regression)
|
||||||
{
|
{
|
||||||
DescriptorRotationInvarianceTest test(Algorithm::create<FeatureDetector>("Feature2D.ORB"),
|
DescriptorRotationInvarianceTest test(Algorithm::create<FeatureDetector>("Feature2D.ORB"),
|
||||||
@ -625,6 +644,14 @@ TEST(Features2d_RotationInvariance_Descriptor_ORB, regression)
|
|||||||
* Detector's scale invariance check
|
* Detector's scale invariance check
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
//TEST(Features2d_ScaleInvariance_Detector_BRISK, regression)
|
||||||
|
//{
|
||||||
|
// DetectorScaleInvarianceTest test(Algorithm::create<FeatureDetector>("Feature2D.BRISK"),
|
||||||
|
// 0.09f,
|
||||||
|
// 0.52f);
|
||||||
|
// test.safe_run();
|
||||||
|
//}
|
||||||
|
|
||||||
//TEST(Features2d_ScaleInvariance_Detector_ORB, regression)
|
//TEST(Features2d_ScaleInvariance_Detector_ORB, regression)
|
||||||
//{
|
//{
|
||||||
// DetectorScaleInvarianceTest test(Algorithm::create<FeatureDetector>("Feature2D.ORB"),
|
// DetectorScaleInvarianceTest test(Algorithm::create<FeatureDetector>("Feature2D.ORB"),
|
||||||
@ -637,6 +664,15 @@ TEST(Features2d_RotationInvariance_Descriptor_ORB, regression)
|
|||||||
* Descriptor's scale invariance check
|
* Descriptor's scale invariance check
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
//TEST(Features2d_ScaleInvariance_Descriptor_BRISK, regression)
|
||||||
|
//{
|
||||||
|
// DescriptorScaleInvarianceTest test(Algorithm::create<FeatureDetector>("Feature2D.BRISK"),
|
||||||
|
// Algorithm::create<DescriptorExtractor>("Feature2D.BRISK"),
|
||||||
|
// NORM_HAMMING,
|
||||||
|
// 0.99f);
|
||||||
|
// test.safe_run();
|
||||||
|
//}
|
||||||
|
|
||||||
//TEST(Features2d_ScaleInvariance_Descriptor_ORB, regression)
|
//TEST(Features2d_ScaleInvariance_Descriptor_ORB, regression)
|
||||||
//{
|
//{
|
||||||
// DescriptorScaleInvarianceTest test(Algorithm::create<FeatureDetector>("Feature2D.ORB"),
|
// DescriptorScaleInvarianceTest test(Algorithm::create<FeatureDetector>("Feature2D.ORB"),
|
||||||
|
Loading…
Reference in New Issue
Block a user