Commit 763954f8 authored by Vadim Pisarevsky's avatar Vadim Pisarevsky

fixed xfeatures2d tests

parent 0cfd7953
......@@ -483,6 +483,11 @@ StarDetectorImpl::StarDetectorImpl(int _maxSize, int _responseThreshold,
void StarDetectorImpl::detect( InputArray _image, std::vector<KeyPoint>& keypoints, InputArray _mask )
{
Mat image = _image.getMat(), mask = _mask.getMat(), grayImage = image;
if( image.empty() )
{
keypoints.clear();
return;
}
if( image.channels() > 1 ) cvtColor( image, grayImage, COLOR_BGR2GRAY );
Mat responses, sizes;
......
......@@ -290,7 +290,7 @@ void CV_DetectorsTest::run( int /*start_from*/ )
if (exp.empty())
return;
if (!testDetector(to_test, SURF::create(1536+512+512, 2), exp))
if (!testDetector(to_test, SURF::create(1536+512+512, 2, 2, true, false), exp))
return;
LoadExpected(string(ts->get_data_path()) + "detectors/star.xml", exp);
......
......@@ -1223,12 +1223,12 @@ protected:
TEST(Features2d_SIFT_using_mask, regression)
{
FeatureDetectorUsingMaskTest test(Algorithm::create<FeatureDetector>("Feature2D.SIFT"));
FeatureDetectorUsingMaskTest test(SIFT::create());
test.safe_run();
}
TEST(DISABLED_Features2d_SURF_using_mask, regression)
{
FeatureDetectorUsingMaskTest test(Algorithm::create<FeatureDetector>("Feature2D.SURF"));
FeatureDetectorUsingMaskTest test(SURF::create());
test.safe_run();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment