Fixed documentation: corrected parameter names
This commit is contained in:
@@ -51,15 +51,15 @@
|
||||
|
||||
namespace cv
|
||||
{
|
||||
|
||||
|
||||
CV_EXPORTS bool initModule_features2d();
|
||||
|
||||
/*!
|
||||
The Keypoint Class
|
||||
|
||||
|
||||
The class instance stores a keypoint, i.e. a point feature found by one of many available keypoint detectors, such as
|
||||
Harris corner detector, cv::FAST, cv::StarDetector, cv::SURF, cv::SIFT, cv::LDetector etc.
|
||||
|
||||
|
||||
The keypoint is characterized by the 2D position, scale
|
||||
(proportional to the diameter of the neighborhood that needs to be taken into account),
|
||||
orientation and some other parameters. The keypoint neighborhood is then analyzed by another algorithm that builds a descriptor
|
||||
@@ -81,9 +81,9 @@ public:
|
||||
float _response=0, int _octave=0, int _class_id=-1)
|
||||
: pt(x, y), size(_size), angle(_angle),
|
||||
response(_response), octave(_octave), class_id(_class_id) {}
|
||||
|
||||
|
||||
size_t hash() const;
|
||||
|
||||
|
||||
//! converts vector of keypoints to vector of points
|
||||
static void convert(const vector<KeyPoint>& keypoints,
|
||||
CV_OUT vector<Point2f>& points2f,
|
||||
@@ -103,13 +103,13 @@ public:
|
||||
CV_PROP_RW float angle; //!< computed orientation of the keypoint (-1 if not applicable)
|
||||
CV_PROP_RW float response; //!< the response by which the most strong keypoints have been selected. Can be used for the further sorting or subsampling
|
||||
CV_PROP_RW int octave; //!< octave (pyramid layer) from which the keypoint has been extracted
|
||||
CV_PROP_RW int class_id; //!< object class (if the keypoints need to be clustered by an object they belong to)
|
||||
CV_PROP_RW int class_id; //!< object class (if the keypoints need to be clustered by an object they belong to)
|
||||
};
|
||||
|
||||
|
||||
//! writes vector of keypoints to the file storage
|
||||
CV_EXPORTS void write(FileStorage& fs, const string& name, const vector<KeyPoint>& keypoints);
|
||||
//! reads vector of keypoints from the specified file storage node
|
||||
CV_EXPORTS void read(const FileNode& node, CV_OUT vector<KeyPoint>& keypoints);
|
||||
CV_EXPORTS void read(const FileNode& node, CV_OUT vector<KeyPoint>& keypoints);
|
||||
|
||||
/*
|
||||
* A class filters a vector of keypoints.
|
||||
@@ -138,14 +138,14 @@ public:
|
||||
* Remove duplicated keypoints.
|
||||
*/
|
||||
static void removeDuplicated( vector<KeyPoint>& keypoints );
|
||||
|
||||
|
||||
/*
|
||||
* Retain the specified number of the best keypoints (according to the response)
|
||||
*/
|
||||
static void retainBest(vector<KeyPoint>& keypoints, int npoints);
|
||||
};
|
||||
|
||||
|
||||
|
||||
/************************************ Base Classes ************************************/
|
||||
|
||||
/*
|
||||
@@ -155,7 +155,7 @@ class CV_EXPORTS_W FeatureDetector : public virtual Algorithm
|
||||
{
|
||||
public:
|
||||
virtual ~FeatureDetector();
|
||||
|
||||
|
||||
/*
|
||||
* Detect keypoints in an image.
|
||||
* image The image.
|
||||
@@ -164,7 +164,7 @@ public:
|
||||
* matrix with non-zero values in the region of interest.
|
||||
*/
|
||||
CV_WRAP void detect( const Mat& image, CV_OUT vector<KeyPoint>& keypoints, const Mat& mask=Mat() ) const;
|
||||
|
||||
|
||||
/*
|
||||
* Detect keypoints in an image set.
|
||||
* images Image collection.
|
||||
@@ -172,16 +172,16 @@ public:
|
||||
* masks Masks for image set. masks[i] is a mask for images[i].
|
||||
*/
|
||||
void detect( const vector<Mat>& images, vector<vector<KeyPoint> >& keypoints, const vector<Mat>& masks=vector<Mat>() ) const;
|
||||
|
||||
|
||||
// Return true if detector object is empty
|
||||
CV_WRAP virtual bool empty() const;
|
||||
|
||||
|
||||
// Create feature detector by detector name.
|
||||
CV_WRAP static Ptr<FeatureDetector> create( const string& detectorType );
|
||||
|
||||
|
||||
protected:
|
||||
virtual void detectImpl( const Mat& image, vector<KeyPoint>& keypoints, const Mat& mask=Mat() ) const = 0;
|
||||
|
||||
|
||||
/*
|
||||
* Remove keypoints that are not in the mask.
|
||||
* Helper function, useful when wrapping a library call for keypoint detection that
|
||||
@@ -189,8 +189,8 @@ protected:
|
||||
*/
|
||||
static void removeInvalidPoints( const Mat& mask, vector<KeyPoint>& keypoints );
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Abstract base class for computing descriptors for image keypoints.
|
||||
*
|
||||
@@ -204,7 +204,7 @@ class CV_EXPORTS_W DescriptorExtractor : public virtual Algorithm
|
||||
{
|
||||
public:
|
||||
virtual ~DescriptorExtractor();
|
||||
|
||||
|
||||
/*
|
||||
* Compute the descriptors for a set of keypoints in an image.
|
||||
* image The image.
|
||||
@@ -212,7 +212,7 @@ public:
|
||||
* descriptors Copmputed descriptors. Row i is the descriptor for keypoint i.
|
||||
*/
|
||||
CV_WRAP void compute( const Mat& image, CV_OUT CV_IN_OUT vector<KeyPoint>& keypoints, CV_OUT Mat& descriptors ) const;
|
||||
|
||||
|
||||
/*
|
||||
* Compute the descriptors for a keypoints collection detected in image collection.
|
||||
* images Image collection.
|
||||
@@ -221,26 +221,26 @@ public:
|
||||
* descriptors Descriptor collection. descriptors[i] are descriptors computed for set keypoints[i].
|
||||
*/
|
||||
void compute( const vector<Mat>& images, vector<vector<KeyPoint> >& keypoints, vector<Mat>& descriptors ) const;
|
||||
|
||||
|
||||
CV_WRAP virtual int descriptorSize() const = 0;
|
||||
CV_WRAP virtual int descriptorType() const = 0;
|
||||
|
||||
|
||||
CV_WRAP virtual bool empty() const;
|
||||
|
||||
|
||||
CV_WRAP static Ptr<DescriptorExtractor> create( const string& descriptorExtractorType );
|
||||
|
||||
|
||||
protected:
|
||||
virtual void computeImpl( const Mat& image, vector<KeyPoint>& keypoints, Mat& descriptors ) const = 0;
|
||||
|
||||
|
||||
/*
|
||||
* Remove keypoints within borderPixels of an image edge.
|
||||
*/
|
||||
static void removeBorderKeypoints( vector<KeyPoint>& keypoints,
|
||||
Size imageSize, int borderSize );
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Abstract base class for simultaneous 2D feature detection descriptor extraction.
|
||||
*/
|
||||
@@ -254,18 +254,18 @@ public:
|
||||
* mask Mask specifying where to look for keypoints (optional). Must be a char
|
||||
* matrix with non-zero values in the region of interest.
|
||||
* useProvidedKeypoints If true, the method will skip the detection phase and will compute
|
||||
* descriptors for the provided keypoints
|
||||
* descriptors for the provided keypoints
|
||||
*/
|
||||
CV_WRAP_AS(detectAndCompute) virtual void operator()( InputArray image, InputArray mask,
|
||||
CV_OUT vector<KeyPoint>& keypoints,
|
||||
OutputArray descriptors,
|
||||
bool useProvidedKeypoints=false ) const = 0;
|
||||
|
||||
|
||||
// Create feature detector and descriptor extractor by name.
|
||||
static Ptr<Feature2D> create( const string& name );
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
/*!
|
||||
ORB implementation.
|
||||
*/
|
||||
@@ -289,14 +289,14 @@ public:
|
||||
// Compute the ORB features and descriptors on an image
|
||||
void operator()( InputArray image, InputArray mask, vector<KeyPoint>& keypoints,
|
||||
OutputArray descriptors, bool useProvidedKeypoints=false ) const;
|
||||
|
||||
|
||||
AlgorithmInfo* info() const;
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
void computeImpl( const Mat& image, vector<KeyPoint>& keypoints, Mat& descriptors ) const;
|
||||
void detectImpl( const Mat& image, vector<KeyPoint>& keypoints, const Mat& mask=Mat() ) const;
|
||||
|
||||
|
||||
CV_PROP_RW int nfeatures;
|
||||
CV_PROP_RW double scaleFactor;
|
||||
CV_PROP_RW int nlevels;
|
||||
@@ -306,18 +306,18 @@ protected:
|
||||
CV_PROP_RW int scoreType;
|
||||
CV_PROP_RW int patchSize;
|
||||
};
|
||||
|
||||
|
||||
typedef ORB OrbFeatureDetector;
|
||||
typedef ORB OrbDescriptorExtractor;
|
||||
|
||||
|
||||
/*!
|
||||
Maximal Stable Extremal Regions class.
|
||||
|
||||
|
||||
The class implements MSER algorithm introduced by J. Matas.
|
||||
Unlike SIFT, SURF and many other detectors in OpenCV, this is salient region detector,
|
||||
not the salient point detector.
|
||||
|
||||
|
||||
It returns the regions, each of those is encoded as a contour.
|
||||
*/
|
||||
class CV_EXPORTS_W MSER : public FeatureDetector
|
||||
@@ -328,15 +328,15 @@ public:
|
||||
double _max_variation=0.25, double _min_diversity=.2,
|
||||
int _max_evolution=200, double _area_threshold=1.01,
|
||||
double _min_margin=0.003, int _edge_blur_size=5 );
|
||||
|
||||
|
||||
//! the operator that extracts the MSERs from the image or the specific part of it
|
||||
CV_WRAP_AS(detect) void operator()( const Mat& image, CV_OUT vector<vector<Point> >& msers,
|
||||
const Mat& mask=Mat() ) const;
|
||||
const Mat& mask=Mat() ) const;
|
||||
AlgorithmInfo* info() const;
|
||||
|
||||
|
||||
protected:
|
||||
void detectImpl( const Mat& image, vector<KeyPoint>& keypoints, const Mat& mask=Mat() ) const;
|
||||
|
||||
|
||||
int delta;
|
||||
int minArea;
|
||||
int maxArea;
|
||||
@@ -347,12 +347,12 @@ protected:
|
||||
double minMargin;
|
||||
int edgeBlurSize;
|
||||
};
|
||||
|
||||
|
||||
typedef MSER MserFeatureDetector;
|
||||
|
||||
/*!
|
||||
The "Star" Detector.
|
||||
|
||||
|
||||
The class implements the keypoint detector introduced by K. Konolige.
|
||||
*/
|
||||
class CV_EXPORTS_W StarDetector : public FeatureDetector
|
||||
@@ -363,16 +363,16 @@ public:
|
||||
int _lineThresholdProjected=10,
|
||||
int _lineThresholdBinarized=8,
|
||||
int _suppressNonmaxSize=5);
|
||||
|
||||
|
||||
//! finds the keypoints in the image
|
||||
CV_WRAP_AS(detect) void operator()(const Mat& image,
|
||||
CV_OUT vector<KeyPoint>& keypoints) const;
|
||||
|
||||
|
||||
AlgorithmInfo* info() const;
|
||||
|
||||
|
||||
protected:
|
||||
void detectImpl( const Mat& image, vector<KeyPoint>& keypoints, const Mat& mask=Mat() ) const;
|
||||
|
||||
|
||||
int maxSize;
|
||||
int responseThreshold;
|
||||
int lineThresholdProjected;
|
||||
@@ -389,7 +389,7 @@ class CV_EXPORTS_W FastFeatureDetector : public FeatureDetector
|
||||
public:
|
||||
CV_WRAP FastFeatureDetector( int threshold=10, bool nonmaxSuppression=true );
|
||||
AlgorithmInfo* info() const;
|
||||
|
||||
|
||||
protected:
|
||||
virtual void detectImpl( const Mat& image, vector<KeyPoint>& keypoints, const Mat& mask=Mat() ) const;
|
||||
|
||||
@@ -469,7 +469,7 @@ protected:
|
||||
Params params;
|
||||
};
|
||||
|
||||
|
||||
|
||||
class CV_EXPORTS DenseFeatureDetector : public FeatureDetector
|
||||
{
|
||||
public:
|
||||
@@ -486,10 +486,10 @@ protected:
|
||||
double initFeatureScale;
|
||||
int featureScaleLevels;
|
||||
double featureScaleMul;
|
||||
|
||||
|
||||
int initXyStep;
|
||||
int initImgBound;
|
||||
|
||||
|
||||
bool varyXyStepWithScale;
|
||||
bool varyImgBoundWithScale;
|
||||
};
|
||||
@@ -511,7 +511,7 @@ public:
|
||||
CV_WRAP GridAdaptedFeatureDetector( const Ptr<FeatureDetector>& detector,
|
||||
int maxTotalKeypoints=1000,
|
||||
int gridRows=4, int gridCols=4 );
|
||||
|
||||
|
||||
// TODO implement read/write
|
||||
virtual bool empty() const;
|
||||
|
||||
@@ -533,7 +533,7 @@ class CV_EXPORTS_W PyramidAdaptedFeatureDetector : public FeatureDetector
|
||||
public:
|
||||
// maxLevel - The 0-based index of the last pyramid layer
|
||||
CV_WRAP PyramidAdaptedFeatureDetector( const Ptr<FeatureDetector>& detector, int maxLevel=2 );
|
||||
|
||||
|
||||
// TODO implement read/write
|
||||
virtual bool empty() const;
|
||||
|
||||
@@ -549,7 +549,7 @@ protected:
|
||||
*/
|
||||
class CV_EXPORTS AdjusterAdapter: public FeatureDetector
|
||||
{
|
||||
public:
|
||||
public:
|
||||
/** pure virtual interface
|
||||
*/
|
||||
virtual ~AdjusterAdapter() {}
|
||||
@@ -588,13 +588,13 @@ class CV_EXPORTS DynamicAdaptedFeatureDetector: public FeatureDetector
|
||||
{
|
||||
public:
|
||||
|
||||
/** \param adjaster an AdjusterAdapter that will do the detection and parameter adjustment
|
||||
/** \param adjuster an AdjusterAdapter that will do the detection and parameter adjustment
|
||||
* \param max_features the maximum desired number of features
|
||||
* \param max_iters the maximum number of times to try to adjust the feature detector params
|
||||
* for the FastAdjuster this can be high, but with Star or Surf this can get time consuming
|
||||
* \param min_features the minimum desired features
|
||||
*/
|
||||
DynamicAdaptedFeatureDetector( const Ptr<AdjusterAdapter>& adjaster, int min_features=400, int max_features=500, int max_iters=5 );
|
||||
DynamicAdaptedFeatureDetector( const Ptr<AdjusterAdapter>& adjuster, int min_features=400, int max_features=500, int max_iters=5 );
|
||||
|
||||
virtual bool empty() const;
|
||||
|
||||
@@ -741,7 +741,7 @@ protected:
|
||||
/****************************************************************************************\
|
||||
* Distance *
|
||||
\****************************************************************************************/
|
||||
|
||||
|
||||
template<typename T>
|
||||
struct CV_EXPORTS Accumulator
|
||||
{
|
||||
@@ -762,7 +762,7 @@ struct CV_EXPORTS SL2
|
||||
enum { normType = NORM_L2SQR };
|
||||
typedef T ValueType;
|
||||
typedef typename Accumulator<T>::Type ResultType;
|
||||
|
||||
|
||||
ResultType operator()( const T* a, const T* b, int size ) const
|
||||
{
|
||||
return normL2Sqr<ValueType, ResultType>(a, b, size);
|
||||
@@ -778,7 +778,7 @@ struct CV_EXPORTS L2
|
||||
enum { normType = NORM_L2 };
|
||||
typedef T ValueType;
|
||||
typedef typename Accumulator<T>::Type ResultType;
|
||||
|
||||
|
||||
ResultType operator()( const T* a, const T* b, int size ) const
|
||||
{
|
||||
return (ResultType)sqrt((double)normL2Sqr<ValueType, ResultType>(a, b, size));
|
||||
@@ -794,7 +794,7 @@ struct CV_EXPORTS L1
|
||||
enum { normType = NORM_L1 };
|
||||
typedef T ValueType;
|
||||
typedef typename Accumulator<T>::Type ResultType;
|
||||
|
||||
|
||||
ResultType operator()( const T* a, const T* b, int size ) const
|
||||
{
|
||||
return normL1<ValueType, ResultType>(a, b, size);
|
||||
@@ -810,7 +810,7 @@ struct CV_EXPORTS Hamming
|
||||
enum { normType = NORM_HAMMING };
|
||||
typedef unsigned char ValueType;
|
||||
typedef int ResultType;
|
||||
|
||||
|
||||
/** this will count the bits in a ^ b
|
||||
*/
|
||||
ResultType operator()( const unsigned char* a, const unsigned char* b, int size ) const
|
||||
@@ -826,13 +826,13 @@ template<int cellsize> struct CV_EXPORTS HammingMultilevel
|
||||
enum { normType = NORM_HAMMING + (cellsize>1) };
|
||||
typedef unsigned char ValueType;
|
||||
typedef int ResultType;
|
||||
|
||||
|
||||
ResultType operator()( const unsigned char* a, const unsigned char* b, int size ) const
|
||||
{
|
||||
return normHamming(a, b, size, cellsize);
|
||||
}
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
/****************************************************************************************\
|
||||
* DMatch *
|
||||
\****************************************************************************************/
|
||||
@@ -1042,7 +1042,7 @@ public:
|
||||
|
||||
virtual void train();
|
||||
virtual bool isMaskSupported() const;
|
||||
|
||||
|
||||
virtual Ptr<DescriptorMatcher> clone( bool emptyTrainData=false ) const;
|
||||
|
||||
protected:
|
||||
|
Reference in New Issue
Block a user