提交 a66cd569 编写于 作者: A Andrey Kamaev

Merged the trunk 8892,8894,8898

上级 cf97209f
......@@ -1820,7 +1820,7 @@ Finds the global minimum and maximum in an array
.. note::
When ``minIdx`` is not NULL, it must have at least 2 elements (as well as ``maxIdx``), even if ``src`` is a single-row or single-column matrix. In OpenCV (following MATLAB) each array has at least 2 dimensions, i.e. single-row matrix is ``Mx1`` matrix (and therefore ``minIdx``/``maxIdx`` will be ``(i1,0)``/``(i2,0)``) and single-column matrix is ``1xN`` matrix (and therefore ``minIdx``/``maxIdx`` will be ``(0,j1)``/``(0,j2)``).
When ``minIdx`` is not NULL, it must have at least 2 elements (as well as ``maxIdx``), even if ``src`` is a single-row or single-column matrix. In OpenCV (following MATLAB) each array has at least 2 dimensions, i.e. single-column matrix is ``Mx1`` matrix (and therefore ``minIdx``/``maxIdx`` will be ``(i1,0)``/``(i2,0)``) and single-row matrix is ``1xN`` matrix (and therefore ``minIdx``/``maxIdx`` will be ``(0,j1)``/``(0,j2)``).
:param maxIdx: Pointer to the returned maximum location (in nD case). ``NULL`` is used if not required.
......
......@@ -667,7 +667,7 @@ struct SURFInvoker
besty = sumy;
}
}
descriptor_dir = fastAtan2( besty, bestx );
descriptor_dir = fastAtan2( -besty, bestx );
}
kp.angle = descriptor_dir;
if( !descriptors || !descriptors->data )
......
......@@ -291,9 +291,9 @@ public:
typedef typename Distance::ValueType ValueType;
typedef typename Distance::ResultType DistanceType;
CV_DescriptorExtractorTest( const string _name, DistanceType _maxDist, const Ptr<DescriptorExtractor>& _dextractor, float _prevTime,
CV_DescriptorExtractorTest( const string _name, DistanceType _maxDist, const Ptr<DescriptorExtractor>& _dextractor,
Distance d = Distance() ):
name(_name), maxDist(_maxDist), prevTime(_prevTime), dextractor(_dextractor), distance(d) {}
name(_name), maxDist(_maxDist), dextractor(_dextractor), distance(d) {}
protected:
virtual void createDescriptorExtractor() {}
......@@ -401,7 +401,7 @@ protected:
double t = (double)getTickCount();
dextractor->compute( img, keypoints, calcDescriptors );
t = getTickCount() - t;
ts->printf(cvtest::TS::LOG, "\nAverage time of computing one descriptor = %g ms (previous time = %g ms).\n", t/((double)cvGetTickFrequency()*1000.)/calcDescriptors.rows, prevTime );
ts->printf(cvtest::TS::LOG, "\nAverage time of computing one descriptor = %g ms.\n", t/((double)cvGetTickFrequency()*1000.)/calcDescriptors.rows );
if( calcDescriptors.rows != (int)keypoints.size() )
{
......@@ -486,7 +486,6 @@ protected:
string name;
const DistanceType maxDist;
const float prevTime;
Ptr<DescriptorExtractor> dextractor;
Distance distance;
......@@ -988,28 +987,28 @@ TEST( Features2d_Detector_SURF, regression )
TEST( Features2d_DescriptorExtractor_SIFT, regression )
{
CV_DescriptorExtractorTest<L2<float> > test( "descriptor-sift", 0.03f,
DescriptorExtractor::create("SIFT"), 8.06652f );
DescriptorExtractor::create("SIFT") );
test.safe_run();
}
TEST( Features2d_DescriptorExtractor_SURF, regression )
{
CV_DescriptorExtractorTest<L2<float> > test( "descriptor-surf", 0.05f,
DescriptorExtractor::create("SURF"), 0.147372f );
DescriptorExtractor::create("SURF") );
test.safe_run();
}
TEST( Features2d_DescriptorExtractor_OpponentSIFT, regression )
{
CV_DescriptorExtractorTest<L2<float> > test( "descriptor-opponent-sift", 0.18f,
DescriptorExtractor::create("OpponentSIFT"), 8.06652f );
DescriptorExtractor::create("OpponentSIFT") );
test.safe_run();
}
TEST( Features2d_DescriptorExtractor_OpponentSURF, regression )
{
CV_DescriptorExtractorTest<L2<float> > test( "descriptor-opponent-surf", 0.3f,
DescriptorExtractor::create("OpponentSURF"), 0.147372f );
DescriptorExtractor::create("OpponentSURF") );
test.safe_run();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册