fixed doc builder complains and the test failures
This commit is contained in:
parent
31df47b6ea
commit
27d2d3cbac
@ -3056,8 +3056,6 @@ Here is example of SIFT use in your application via Algorithm interface: ::
|
||||
|
||||
...
|
||||
|
||||
initModule_nonfree(); // to load SURF/SIFT etc.
|
||||
|
||||
Ptr<Feature2D> sift = SIFT::create();
|
||||
|
||||
FileStorage fs("sift_params.xml", FileStorage::READ);
|
||||
@ -3068,7 +3066,7 @@ Here is example of SIFT use in your application via Algorithm interface: ::
|
||||
}
|
||||
else // else modify the parameters and store them; user can later edit the file to use different parameters
|
||||
{
|
||||
sift->set("contrastThreshold", 0.01f); // lower the contrast threshold, compared to the default value
|
||||
sift->setContrastThreshold(0.01f); // lower the contrast threshold, compared to the default value
|
||||
|
||||
{
|
||||
WriteStructContext ws(fs, "sift_params", CV_NODE_MAP);
|
||||
@ -3078,7 +3076,7 @@ Here is example of SIFT use in your application via Algorithm interface: ::
|
||||
|
||||
Mat image = imread("myimage.png", 0), descriptors;
|
||||
vector<KeyPoint> keypoints;
|
||||
(*sift)(image, noArray(), keypoints, descriptors);
|
||||
sift->detectAndCompute(image, noArray(), keypoints, descriptors);
|
||||
|
||||
Algorithm::name
|
||||
---------------
|
||||
|
@ -84,13 +84,6 @@ Creates a descriptor extractor by name.
|
||||
|
||||
The current implementation supports the following types of a descriptor extractor:
|
||||
|
||||
* ``"SIFT"`` -- :ocv:class:`SIFT`
|
||||
* ``"SURF"`` -- :ocv:class:`SURF`
|
||||
* ``"BRIEF"`` -- :ocv:class:`BriefDescriptorExtractor`
|
||||
* ``"BRISK"`` -- :ocv:class:`BRISK`
|
||||
* ``"ORB"`` -- :ocv:class:`ORB`
|
||||
* ``"FREAK"`` -- :ocv:class:`FREAK`
|
||||
|
||||
A combined format is also supported: descriptor extractor adapter name ( ``"Opponent"`` --
|
||||
:ocv:class:`OpponentColorDescriptorExtractor` ) + descriptor extractor name (see above),
|
||||
for example: ``"OpponentSIFT"`` .
|
||||
|
@ -72,20 +72,13 @@ Creates a feature detector by its name.
|
||||
The following detector types are supported:
|
||||
|
||||
* ``"FAST"`` -- :ocv:class:`FastFeatureDetector`
|
||||
* ``"STAR"`` -- :ocv:class:`StarFeatureDetector`
|
||||
* ``"ORB"`` -- :ocv:class:`ORB`
|
||||
* ``"BRISK"`` -- :ocv:class:`BRISK`
|
||||
* ``"MSER"`` -- :ocv:class:`MSER`
|
||||
* ``"GFTT"`` -- :ocv:class:`GoodFeaturesToTrackDetector`
|
||||
* ``"HARRIS"`` -- :ocv:class:`GoodFeaturesToTrackDetector` with Harris detector enabled
|
||||
* ``"Dense"`` -- :ocv:class:`DenseFeatureDetector`
|
||||
* ``"SimpleBlob"`` -- :ocv:class:`SimpleBlobDetector`
|
||||
|
||||
Also a combined format is supported: feature detector adapter name ( ``"Grid"`` --
|
||||
:ocv:class:`GridAdaptedFeatureDetector`, ``"Pyramid"`` --
|
||||
:ocv:class:`PyramidAdaptedFeatureDetector` ) + feature detector name (see above),
|
||||
for example: ``"GridFAST"``, ``"PyramidSTAR"`` .
|
||||
|
||||
FastFeatureDetector
|
||||
-------------------
|
||||
.. ocv:class:: FastFeatureDetector : public FeatureDetector
|
||||
|
@ -327,28 +327,6 @@ TEST( Features2d_DescriptorExtractor_ORB, regression )
|
||||
test.safe_run();
|
||||
}
|
||||
|
||||
TEST( Features2d_DescriptorExtractor_FREAK, regression )
|
||||
{
|
||||
// TODO adjust the parameters below
|
||||
CV_DescriptorExtractorTest<Hamming> test( "descriptor-freak", (CV_DescriptorExtractorTest<Hamming>::DistanceType)12.f,
|
||||
DescriptorExtractor::create("FREAK") );
|
||||
test.safe_run();
|
||||
}
|
||||
|
||||
TEST( Features2d_DescriptorExtractor_BRIEF, regression )
|
||||
{
|
||||
CV_DescriptorExtractorTest<Hamming> test( "descriptor-brief", 1,
|
||||
DescriptorExtractor::create("BRIEF") );
|
||||
test.safe_run();
|
||||
}
|
||||
|
||||
TEST( Features2d_DescriptorExtractor_OpponentBRIEF, regression )
|
||||
{
|
||||
CV_DescriptorExtractorTest<Hamming> test( "descriptor-opponent-brief", 1,
|
||||
DescriptorExtractor::create("OpponentBRIEF") );
|
||||
test.safe_run();
|
||||
}
|
||||
|
||||
TEST( Features2d_DescriptorExtractor_KAZE, regression )
|
||||
{
|
||||
CV_DescriptorExtractorTest< L2<float> > test( "descriptor-kaze", 0.03f,
|
||||
|
@ -277,12 +277,6 @@ TEST( Features2d_Detector_MSER, DISABLED_regression )
|
||||
test.safe_run();
|
||||
}
|
||||
|
||||
TEST( Features2d_Detector_STAR, regression )
|
||||
{
|
||||
CV_FeatureDetectorTest test( "detector-star", FeatureDetector::create("STAR") );
|
||||
test.safe_run();
|
||||
}
|
||||
|
||||
TEST( Features2d_Detector_ORB, regression )
|
||||
{
|
||||
CV_FeatureDetectorTest test( "detector-orb", FeatureDetector::create("ORB") );
|
||||
@ -300,15 +294,3 @@ TEST( Features2d_Detector_AKAZE, regression )
|
||||
CV_FeatureDetectorTest test( "detector-akaze", FeatureDetector::create("AKAZE") );
|
||||
test.safe_run();
|
||||
}
|
||||
|
||||
TEST( Features2d_Detector_GridFAST, regression )
|
||||
{
|
||||
CV_FeatureDetectorTest test( "detector-grid-fast", FeatureDetector::create("GridFAST") );
|
||||
test.safe_run();
|
||||
}
|
||||
|
||||
TEST( Features2d_Detector_PyramidFAST, regression )
|
||||
{
|
||||
CV_FeatureDetectorTest test( "detector-pyramid-fast", FeatureDetector::create("PyramidFAST") );
|
||||
test.safe_run();
|
||||
}
|
||||
|
@ -155,18 +155,6 @@ TEST(Features2d_Detector_Keypoints_ORB, validation)
|
||||
test.safe_run();
|
||||
}
|
||||
|
||||
TEST(Features2d_Detector_Keypoints_Star, validation)
|
||||
{
|
||||
CV_FeatureDetectorKeypointsTest test(Algorithm::create<FeatureDetector>("Feature2D.STAR"));
|
||||
test.safe_run();
|
||||
}
|
||||
|
||||
TEST(Features2d_Detector_Keypoints_Dense, validation)
|
||||
{
|
||||
CV_FeatureDetectorKeypointsTest test(Algorithm::create<FeatureDetector>("Feature2D.Dense"));
|
||||
test.safe_run();
|
||||
}
|
||||
|
||||
TEST(Features2d_Detector_Keypoints_KAZE, validation)
|
||||
{
|
||||
CV_FeatureDetectorKeypointsTest test(Algorithm::create<FeatureDetector>("Feature2D.KAZE"));
|
||||
|
@ -390,124 +390,6 @@ private:
|
||||
Ptr<DescriptorExtractor> wrapped;
|
||||
};
|
||||
|
||||
class CV_EXPORTS_AS(GenericDescriptorMatcher) javaGenericDescriptorMatcher
|
||||
{
|
||||
public:
|
||||
CV_WRAP void add( const std::vector<Mat>& images,
|
||||
std::vector<std::vector<KeyPoint> >& keypoints )
|
||||
{ return wrapped->add(images, keypoints); }
|
||||
|
||||
CV_WRAP const std::vector<Mat>& getTrainImages() const
|
||||
{ return wrapped->getTrainImages(); }
|
||||
|
||||
CV_WRAP const std::vector<std::vector<KeyPoint> >& getTrainKeypoints() const
|
||||
{ return wrapped->getTrainKeypoints(); }
|
||||
|
||||
CV_WRAP void clear()
|
||||
{ return wrapped->clear(); }
|
||||
|
||||
CV_WRAP bool isMaskSupported()
|
||||
{ return wrapped->isMaskSupported(); }
|
||||
|
||||
CV_WRAP void train()
|
||||
{ return wrapped->train(); }
|
||||
|
||||
CV_WRAP void classify( const Mat& queryImage, CV_IN_OUT std::vector<KeyPoint>& queryKeypoints,
|
||||
const Mat& trainImage, std::vector<KeyPoint>& trainKeypoints ) const
|
||||
{ return wrapped->classify(queryImage, queryKeypoints, trainImage, trainKeypoints); }
|
||||
|
||||
CV_WRAP void classify( const Mat& queryImage, CV_IN_OUT std::vector<KeyPoint>& queryKeypoints )
|
||||
{ return wrapped->classify(queryImage, queryKeypoints); }
|
||||
|
||||
CV_WRAP void match( const Mat& queryImage, std::vector<KeyPoint>& queryKeypoints,
|
||||
const Mat& trainImage, std::vector<KeyPoint>& trainKeypoints,
|
||||
CV_OUT std::vector<DMatch>& matches, const Mat& mask=Mat() ) const
|
||||
{ return wrapped->match(queryImage, queryKeypoints, trainImage, trainKeypoints, matches, mask); }
|
||||
|
||||
CV_WRAP void knnMatch( const Mat& queryImage, std::vector<KeyPoint>& queryKeypoints,
|
||||
const Mat& trainImage, std::vector<KeyPoint>& trainKeypoints,
|
||||
CV_OUT std::vector<std::vector<DMatch> >& matches, int k,
|
||||
const Mat& mask=Mat(), bool compactResult=false ) const
|
||||
{ return wrapped->knnMatch(queryImage, queryKeypoints, trainImage, trainKeypoints,
|
||||
matches, k, mask, compactResult); }
|
||||
|
||||
CV_WRAP void radiusMatch( const Mat& queryImage, std::vector<KeyPoint>& queryKeypoints,
|
||||
const Mat& trainImage, std::vector<KeyPoint>& trainKeypoints,
|
||||
CV_OUT std::vector<std::vector<DMatch> >& matches, float maxDistance,
|
||||
const Mat& mask=Mat(), bool compactResult=false ) const
|
||||
{ return wrapped->radiusMatch(queryImage, queryKeypoints, trainImage, trainKeypoints,
|
||||
matches, maxDistance, mask, compactResult); }
|
||||
|
||||
CV_WRAP void match( const Mat& queryImage, std::vector<KeyPoint>& queryKeypoints,
|
||||
CV_OUT std::vector<DMatch>& matches, const std::vector<Mat>& masks=std::vector<Mat>() )
|
||||
{ return wrapped->match(queryImage, queryKeypoints, matches, masks); }
|
||||
|
||||
CV_WRAP void knnMatch( const Mat& queryImage, std::vector<KeyPoint>& queryKeypoints,
|
||||
CV_OUT std::vector<std::vector<DMatch> >& matches, int k,
|
||||
const std::vector<Mat>& masks=std::vector<Mat>(), bool compactResult=false )
|
||||
{ return wrapped->knnMatch(queryImage, queryKeypoints, matches, k, masks, compactResult); }
|
||||
|
||||
CV_WRAP void radiusMatch( const Mat& queryImage, std::vector<KeyPoint>& queryKeypoints,
|
||||
CV_OUT std::vector<std::vector<DMatch> >& matches, float maxDistance,
|
||||
const std::vector<Mat>& masks=std::vector<Mat>(), bool compactResult=false )
|
||||
{ return wrapped->radiusMatch(queryImage, queryKeypoints, matches, maxDistance, masks, compactResult); }
|
||||
|
||||
CV_WRAP bool empty() const
|
||||
{ return wrapped->empty(); }
|
||||
|
||||
|
||||
enum
|
||||
{
|
||||
ONEWAY = 1,
|
||||
FERN = 2
|
||||
};
|
||||
|
||||
CV_WRAP_AS(clone) javaGenericDescriptorMatcher* jclone( bool emptyTrainData=false ) const
|
||||
{
|
||||
return new javaGenericDescriptorMatcher(wrapped->clone(emptyTrainData));
|
||||
}
|
||||
|
||||
//supported: OneWay, Fern
|
||||
//unsupported: Vector
|
||||
CV_WRAP static javaGenericDescriptorMatcher* create( int matcherType )
|
||||
{
|
||||
String name;
|
||||
|
||||
switch(matcherType)
|
||||
{
|
||||
case ONEWAY:
|
||||
name = "ONEWAY";
|
||||
break;
|
||||
case FERN:
|
||||
name = "FERN";
|
||||
break;
|
||||
default:
|
||||
CV_Error( Error::StsBadArg, "Specified generic descriptor matcher type is not supported." );
|
||||
break;
|
||||
}
|
||||
|
||||
return new javaGenericDescriptorMatcher(GenericDescriptorMatcher::create(name));
|
||||
}
|
||||
|
||||
CV_WRAP void write( const String& fileName ) const
|
||||
{
|
||||
FileStorage fs(fileName, FileStorage::WRITE);
|
||||
wrapped->write(fs);
|
||||
}
|
||||
|
||||
CV_WRAP void read( const String& fileName )
|
||||
{
|
||||
FileStorage fs(fileName, FileStorage::READ);
|
||||
wrapped->read(fs.root());
|
||||
}
|
||||
|
||||
private:
|
||||
javaGenericDescriptorMatcher(Ptr<GenericDescriptorMatcher> _wrapped) : wrapped(_wrapped)
|
||||
{}
|
||||
|
||||
Ptr<GenericDescriptorMatcher> wrapped;
|
||||
};
|
||||
|
||||
#if 0
|
||||
//DO NOT REMOVE! The block is required for sources parser
|
||||
enum
|
||||
|
@ -88,7 +88,7 @@ SURF features finder. ::
|
||||
/* hidden */
|
||||
};
|
||||
|
||||
.. seealso:: :ocv:class:`detail::FeaturesFinder`, :ocv:class:`SURF`
|
||||
.. seealso:: :ocv:class:`detail::FeaturesFinder`, ``SURF``
|
||||
|
||||
detail::OrbFeaturesFinder
|
||||
-------------------------
|
||||
|
Loading…
x
Reference in New Issue
Block a user