mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 23:33:05 +04:00
Remove all using directives for STL namespace and members
Made all STL usages explicit to be able automatically find all usages of particular class or function.
This commit is contained in:
@@ -85,12 +85,12 @@ public:
|
||||
size_t hash() const;
|
||||
|
||||
//! converts vector of keypoints to vector of points
|
||||
static void convert(const vector<KeyPoint>& keypoints,
|
||||
CV_OUT vector<Point2f>& points2f,
|
||||
const vector<int>& keypointIndexes=vector<int>());
|
||||
static void convert(const std::vector<KeyPoint>& keypoints,
|
||||
CV_OUT std::vector<Point2f>& points2f,
|
||||
const std::vector<int>& keypointIndexes=std::vector<int>());
|
||||
//! converts vector of points to the vector of keypoints, where each keypoint is assigned the same size and the same orientation
|
||||
static void convert(const vector<Point2f>& points2f,
|
||||
CV_OUT vector<KeyPoint>& keypoints,
|
||||
static void convert(const std::vector<Point2f>& points2f,
|
||||
CV_OUT std::vector<KeyPoint>& keypoints,
|
||||
float size=1, float response=1, int octave=0, int class_id=-1);
|
||||
|
||||
//! computes overlap for pair of keypoints;
|
||||
@@ -109,9 +109,9 @@ public:
|
||||
};
|
||||
|
||||
//! writes vector of keypoints to the file storage
|
||||
CV_EXPORTS void write(FileStorage& fs, const string& name, const vector<KeyPoint>& keypoints);
|
||||
CV_EXPORTS void write(FileStorage& fs, const std::string& name, const std::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 std::vector<KeyPoint>& keypoints);
|
||||
|
||||
/*
|
||||
* A class filters a vector of keypoints.
|
||||
@@ -126,25 +126,25 @@ public:
|
||||
/*
|
||||
* Remove keypoints within borderPixels of an image edge.
|
||||
*/
|
||||
static void runByImageBorder( vector<KeyPoint>& keypoints, Size imageSize, int borderSize );
|
||||
static void runByImageBorder( std::vector<KeyPoint>& keypoints, Size imageSize, int borderSize );
|
||||
/*
|
||||
* Remove keypoints of sizes out of range.
|
||||
*/
|
||||
static void runByKeypointSize( vector<KeyPoint>& keypoints, float minSize,
|
||||
static void runByKeypointSize( std::vector<KeyPoint>& keypoints, float minSize,
|
||||
float maxSize=FLT_MAX );
|
||||
/*
|
||||
* Remove keypoints from some image by mask for pixels of this image.
|
||||
*/
|
||||
static void runByPixelsMask( vector<KeyPoint>& keypoints, const Mat& mask );
|
||||
static void runByPixelsMask( std::vector<KeyPoint>& keypoints, const Mat& mask );
|
||||
/*
|
||||
* Remove duplicated keypoints.
|
||||
*/
|
||||
static void removeDuplicated( vector<KeyPoint>& keypoints );
|
||||
static void removeDuplicated( std::vector<KeyPoint>& keypoints );
|
||||
|
||||
/*
|
||||
* Retain the specified number of the best keypoints (according to the response)
|
||||
*/
|
||||
static void retainBest( vector<KeyPoint>& keypoints, int npoints );
|
||||
static void retainBest( std::vector<KeyPoint>& keypoints, int npoints );
|
||||
};
|
||||
|
||||
|
||||
@@ -165,7 +165,7 @@ public:
|
||||
* mask Mask specifying where to look for keypoints (optional). Must be a char
|
||||
* 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;
|
||||
CV_WRAP void detect( const Mat& image, CV_OUT std::vector<KeyPoint>& keypoints, const Mat& mask=Mat() ) const;
|
||||
|
||||
/*
|
||||
* Detect keypoints in an image set.
|
||||
@@ -173,23 +173,23 @@ public:
|
||||
* keypoints Collection of keypoints detected in an input images. keypoints[i] is a set of keypoints detected in an images[i].
|
||||
* 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;
|
||||
void detect( const std::vector<Mat>& images, std::vector<std::vector<KeyPoint> >& keypoints, const std::vector<Mat>& masks=std::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 );
|
||||
CV_WRAP static Ptr<FeatureDetector> create( const std::string& detectorType );
|
||||
|
||||
protected:
|
||||
virtual void detectImpl( const Mat& image, vector<KeyPoint>& keypoints, const Mat& mask=Mat() ) const = 0;
|
||||
virtual void detectImpl( const Mat& image, std::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
|
||||
* does not support a mask argument.
|
||||
*/
|
||||
static void removeInvalidPoints( const Mat& mask, vector<KeyPoint>& keypoints );
|
||||
static void removeInvalidPoints( const Mat& mask, std::vector<KeyPoint>& keypoints );
|
||||
};
|
||||
|
||||
|
||||
@@ -213,7 +213,7 @@ public:
|
||||
* keypoints The input keypoints. Keypoints for which a descriptor cannot be computed are removed.
|
||||
* 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;
|
||||
CV_WRAP void compute( const Mat& image, CV_OUT CV_IN_OUT std::vector<KeyPoint>& keypoints, CV_OUT Mat& descriptors ) const;
|
||||
|
||||
/*
|
||||
* Compute the descriptors for a keypoints collection detected in image collection.
|
||||
@@ -222,22 +222,22 @@ public:
|
||||
* Keypoints for which a descriptor cannot be computed are removed.
|
||||
* 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;
|
||||
void compute( const std::vector<Mat>& images, std::vector<std::vector<KeyPoint> >& keypoints, std::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 );
|
||||
CV_WRAP static Ptr<DescriptorExtractor> create( const std::string& descriptorExtractorType );
|
||||
|
||||
protected:
|
||||
virtual void computeImpl( const Mat& image, vector<KeyPoint>& keypoints, Mat& descriptors ) const = 0;
|
||||
virtual void computeImpl( const Mat& image, std::vector<KeyPoint>& keypoints, Mat& descriptors ) const = 0;
|
||||
|
||||
/*
|
||||
* Remove keypoints within borderPixels of an image edge.
|
||||
*/
|
||||
static void removeBorderKeypoints( vector<KeyPoint>& keypoints,
|
||||
static void removeBorderKeypoints( std::vector<KeyPoint>& keypoints,
|
||||
Size imageSize, int borderSize );
|
||||
};
|
||||
|
||||
@@ -259,12 +259,12 @@ public:
|
||||
* descriptors for the provided keypoints
|
||||
*/
|
||||
CV_WRAP_AS(detectAndCompute) virtual void operator()( InputArray image, InputArray mask,
|
||||
CV_OUT vector<KeyPoint>& keypoints,
|
||||
CV_OUT std::vector<KeyPoint>& keypoints,
|
||||
OutputArray descriptors,
|
||||
bool useProvidedKeypoints=false ) const = 0;
|
||||
|
||||
// Create feature detector and descriptor extractor by name.
|
||||
CV_WRAP static Ptr<Feature2D> create( const string& name );
|
||||
CV_WRAP static Ptr<Feature2D> create( const std::string& name );
|
||||
};
|
||||
|
||||
/*!
|
||||
@@ -283,10 +283,10 @@ public:
|
||||
int descriptorType() const;
|
||||
|
||||
// Compute the BRISK features on an image
|
||||
void operator()(InputArray image, InputArray mask, vector<KeyPoint>& keypoints) const;
|
||||
void operator()(InputArray image, InputArray mask, std::vector<KeyPoint>& keypoints) const;
|
||||
|
||||
// Compute the BRISK features and descriptors on an image
|
||||
void operator()( InputArray image, InputArray mask, vector<KeyPoint>& keypoints,
|
||||
void operator()( InputArray image, InputArray mask, std::vector<KeyPoint>& keypoints,
|
||||
OutputArray descriptors, bool useProvidedKeypoints=false ) const;
|
||||
|
||||
AlgorithmInfo* info() const;
|
||||
@@ -304,11 +304,11 @@ public:
|
||||
|
||||
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;
|
||||
void computeImpl( const Mat& image, std::vector<KeyPoint>& keypoints, Mat& descriptors ) const;
|
||||
void detectImpl( const Mat& image, std::vector<KeyPoint>& keypoints, const Mat& mask=Mat() ) const;
|
||||
|
||||
void computeKeypointsNoOrientation(InputArray image, InputArray mask, vector<KeyPoint>& keypoints) const;
|
||||
void computeDescriptorsAndOrOrientation(InputArray image, InputArray mask, vector<KeyPoint>& keypoints,
|
||||
void computeKeypointsNoOrientation(InputArray image, InputArray mask, std::vector<KeyPoint>& keypoints) const;
|
||||
void computeDescriptorsAndOrOrientation(InputArray image, InputArray mask, std::vector<KeyPoint>& keypoints,
|
||||
OutputArray descriptors, bool doDescriptors, bool doOrientation,
|
||||
bool useProvidedKeypoints) const;
|
||||
|
||||
@@ -377,18 +377,18 @@ public:
|
||||
int descriptorType() const;
|
||||
|
||||
// Compute the ORB features and descriptors on an image
|
||||
void operator()(InputArray image, InputArray mask, vector<KeyPoint>& keypoints) const;
|
||||
void operator()(InputArray image, InputArray mask, std::vector<KeyPoint>& keypoints) const;
|
||||
|
||||
// Compute the ORB features and descriptors on an image
|
||||
void operator()( InputArray image, InputArray mask, vector<KeyPoint>& keypoints,
|
||||
void operator()( InputArray image, InputArray mask, std::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;
|
||||
void computeImpl( const Mat& image, std::vector<KeyPoint>& keypoints, Mat& descriptors ) const;
|
||||
void detectImpl( const Mat& image, std::vector<KeyPoint>& keypoints, const Mat& mask=Mat() ) const;
|
||||
|
||||
CV_PROP_RW int nfeatures;
|
||||
CV_PROP_RW double scaleFactor;
|
||||
@@ -420,7 +420,7 @@ public:
|
||||
bool scaleNormalized = true,
|
||||
float patternScale = 22.0f,
|
||||
int nOctaves = 4,
|
||||
const vector<int>& selectedPairs = vector<int>());
|
||||
const std::vector<int>& selectedPairs = std::vector<int>());
|
||||
FREAK( const FREAK& rhs );
|
||||
FREAK& operator=( const FREAK& );
|
||||
|
||||
@@ -439,7 +439,7 @@ public:
|
||||
* @param verbose print construction information
|
||||
* @return list of best pair indexes
|
||||
*/
|
||||
vector<int> selectPairs( const vector<Mat>& images, vector<vector<KeyPoint> >& keypoints,
|
||||
std::vector<int> selectPairs( const std::vector<Mat>& images, std::vector<std::vector<KeyPoint> >& keypoints,
|
||||
const double corrThresh = 0.7, bool verbose = true );
|
||||
|
||||
AlgorithmInfo* info() const;
|
||||
@@ -450,7 +450,7 @@ public:
|
||||
};
|
||||
|
||||
protected:
|
||||
virtual void computeImpl( const Mat& image, vector<KeyPoint>& keypoints, Mat& descriptors ) const;
|
||||
virtual void computeImpl( const Mat& image, std::vector<KeyPoint>& keypoints, Mat& descriptors ) const;
|
||||
void buildPattern();
|
||||
uchar meanIntensity( const Mat& image, const Mat& integral, const float kp_x, const float kp_y,
|
||||
const unsigned int scale, const unsigned int rot, const unsigned int point ) const;
|
||||
@@ -463,7 +463,7 @@ protected:
|
||||
|
||||
double patternScale0;
|
||||
int nOctaves0;
|
||||
vector<int> selectedPairs0;
|
||||
std::vector<int> selectedPairs0;
|
||||
|
||||
struct PatternPoint
|
||||
{
|
||||
@@ -486,7 +486,7 @@ protected:
|
||||
int weight_dy; // dy/(norm_sq))*4096
|
||||
};
|
||||
|
||||
vector<PatternPoint> patternLookup; // look-up table for the pattern points (position+sigma of all points at all scales and orientation)
|
||||
std::vector<PatternPoint> patternLookup; // look-up table for the pattern points (position+sigma of all points at all scales and orientation)
|
||||
int patternSizes[NB_SCALES]; // size of the pattern at a specific scale (used to check if a point is within image boundaries)
|
||||
DescriptionPair descriptionPairs[NB_PAIRS];
|
||||
OrientationPair orientationPairs[NB_ORIENPAIRS];
|
||||
@@ -512,12 +512,12 @@ public:
|
||||
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,
|
||||
CV_WRAP_AS(detect) void operator()( const Mat& image, CV_OUT std::vector<std::vector<Point> >& msers,
|
||||
const Mat& mask=Mat() ) const;
|
||||
AlgorithmInfo* info() const;
|
||||
|
||||
protected:
|
||||
void detectImpl( const Mat& image, vector<KeyPoint>& keypoints, const Mat& mask=Mat() ) const;
|
||||
void detectImpl( const Mat& image, std::vector<KeyPoint>& keypoints, const Mat& mask=Mat() ) const;
|
||||
|
||||
int delta;
|
||||
int minArea;
|
||||
@@ -548,12 +548,12 @@ public:
|
||||
|
||||
//! finds the keypoints in the image
|
||||
CV_WRAP_AS(detect) void operator()(const Mat& image,
|
||||
CV_OUT vector<KeyPoint>& keypoints) const;
|
||||
CV_OUT std::vector<KeyPoint>& keypoints) const;
|
||||
|
||||
AlgorithmInfo* info() const;
|
||||
|
||||
protected:
|
||||
void detectImpl( const Mat& image, vector<KeyPoint>& keypoints, const Mat& mask=Mat() ) const;
|
||||
void detectImpl( const Mat& image, std::vector<KeyPoint>& keypoints, const Mat& mask=Mat() ) const;
|
||||
|
||||
int maxSize;
|
||||
int responseThreshold;
|
||||
@@ -563,10 +563,10 @@ protected:
|
||||
};
|
||||
|
||||
//! detects corners using FAST algorithm by E. Rosten
|
||||
CV_EXPORTS void FAST( InputArray image, CV_OUT vector<KeyPoint>& keypoints,
|
||||
CV_EXPORTS void FAST( InputArray image, CV_OUT std::vector<KeyPoint>& keypoints,
|
||||
int threshold, bool nonmaxSupression=true );
|
||||
|
||||
CV_EXPORTS void FAST( InputArray image, CV_OUT vector<KeyPoint>& keypoints,
|
||||
CV_EXPORTS void FAST( InputArray image, CV_OUT std::vector<KeyPoint>& keypoints,
|
||||
int threshold, bool nonmaxSupression, int type );
|
||||
|
||||
class CV_EXPORTS_W FastFeatureDetector : public FeatureDetector
|
||||
@@ -582,7 +582,7 @@ public:
|
||||
AlgorithmInfo* info() const;
|
||||
|
||||
protected:
|
||||
virtual void detectImpl( const Mat& image, vector<KeyPoint>& keypoints, const Mat& mask=Mat() ) const;
|
||||
virtual void detectImpl( const Mat& image, std::vector<KeyPoint>& keypoints, const Mat& mask=Mat() ) const;
|
||||
|
||||
int threshold;
|
||||
bool nonmaxSuppression;
|
||||
@@ -598,7 +598,7 @@ public:
|
||||
AlgorithmInfo* info() const;
|
||||
|
||||
protected:
|
||||
virtual void detectImpl( const Mat& image, vector<KeyPoint>& keypoints, const Mat& mask=Mat() ) const;
|
||||
virtual void detectImpl( const Mat& image, std::vector<KeyPoint>& keypoints, const Mat& mask=Mat() ) const;
|
||||
|
||||
int nfeatures;
|
||||
double qualityLevel;
|
||||
@@ -655,8 +655,8 @@ protected:
|
||||
double confidence;
|
||||
};
|
||||
|
||||
virtual void detectImpl( const Mat& image, vector<KeyPoint>& keypoints, const Mat& mask=Mat() ) const;
|
||||
virtual void findBlobs(const Mat &image, const Mat &binaryImage, vector<Center> ¢ers) const;
|
||||
virtual void detectImpl( const Mat& image, std::vector<KeyPoint>& keypoints, const Mat& mask=Mat() ) const;
|
||||
virtual void findBlobs(const Mat &image, const Mat &binaryImage, std::vector<Center> ¢ers) const;
|
||||
|
||||
Params params;
|
||||
};
|
||||
@@ -673,7 +673,7 @@ public:
|
||||
AlgorithmInfo* info() const;
|
||||
|
||||
protected:
|
||||
virtual void detectImpl( const Mat& image, vector<KeyPoint>& keypoints, const Mat& mask=Mat() ) const;
|
||||
virtual void detectImpl( const Mat& image, std::vector<KeyPoint>& keypoints, const Mat& mask=Mat() ) const;
|
||||
|
||||
double initFeatureScale;
|
||||
int featureScaleLevels;
|
||||
@@ -710,7 +710,7 @@ public:
|
||||
AlgorithmInfo* info() const;
|
||||
|
||||
protected:
|
||||
virtual void detectImpl( const Mat& image, vector<KeyPoint>& keypoints, const Mat& mask=Mat() ) const;
|
||||
virtual void detectImpl( const Mat& image, std::vector<KeyPoint>& keypoints, const Mat& mask=Mat() ) const;
|
||||
|
||||
Ptr<FeatureDetector> detector;
|
||||
int maxTotalKeypoints;
|
||||
@@ -732,7 +732,7 @@ public:
|
||||
virtual bool empty() const;
|
||||
|
||||
protected:
|
||||
virtual void detectImpl( const Mat& image, vector<KeyPoint>& keypoints, const Mat& mask=Mat() ) const;
|
||||
virtual void detectImpl( const Mat& image, std::vector<KeyPoint>& keypoints, const Mat& mask=Mat() ) const;
|
||||
|
||||
Ptr<FeatureDetector> detector;
|
||||
int maxLevel;
|
||||
@@ -764,7 +764,7 @@ public:
|
||||
|
||||
virtual Ptr<AdjusterAdapter> clone() const = 0;
|
||||
|
||||
static Ptr<AdjusterAdapter> create( const string& detectorType );
|
||||
static Ptr<AdjusterAdapter> create( const std::string& detectorType );
|
||||
};
|
||||
/** \brief an adaptively adjusting detector that iteratively detects until the desired number
|
||||
* of features are detected.
|
||||
@@ -793,7 +793,7 @@ public:
|
||||
virtual bool empty() const;
|
||||
|
||||
protected:
|
||||
virtual void detectImpl( const Mat& image, vector<KeyPoint>& keypoints, const Mat& mask=Mat() ) const;
|
||||
virtual void detectImpl( const Mat& image, std::vector<KeyPoint>& keypoints, const Mat& mask=Mat() ) const;
|
||||
|
||||
private:
|
||||
DynamicAdaptedFeatureDetector& operator=(const DynamicAdaptedFeatureDetector&);
|
||||
@@ -822,7 +822,7 @@ public:
|
||||
virtual Ptr<AdjusterAdapter> clone() const;
|
||||
|
||||
protected:
|
||||
virtual void detectImpl( const Mat& image, vector<KeyPoint>& keypoints, const Mat& mask=Mat() ) const;
|
||||
virtual void detectImpl( const Mat& image, std::vector<KeyPoint>& keypoints, const Mat& mask=Mat() ) const;
|
||||
|
||||
int thresh_;
|
||||
bool nonmax_;
|
||||
@@ -845,7 +845,7 @@ public:
|
||||
virtual Ptr<AdjusterAdapter> clone() const;
|
||||
|
||||
protected:
|
||||
virtual void detectImpl( const Mat& image, vector<KeyPoint>& keypoints, const Mat& mask=Mat() ) const;
|
||||
virtual void detectImpl( const Mat& image, std::vector<KeyPoint>& keypoints, const Mat& mask=Mat() ) const;
|
||||
|
||||
double thresh_, init_thresh_, min_thresh_, max_thresh_;
|
||||
};
|
||||
@@ -862,12 +862,12 @@ public:
|
||||
virtual Ptr<AdjusterAdapter> clone() const;
|
||||
|
||||
protected:
|
||||
virtual void detectImpl( const Mat& image, vector<KeyPoint>& keypoints, const Mat& mask=Mat() ) const;
|
||||
virtual void detectImpl( const Mat& image, std::vector<KeyPoint>& keypoints, const Mat& mask=Mat() ) const;
|
||||
|
||||
double thresh_, init_thresh_, min_thresh_, max_thresh_;
|
||||
};
|
||||
|
||||
CV_EXPORTS Mat windowedMatchingMask( const vector<KeyPoint>& keypoints1, const vector<KeyPoint>& keypoints2,
|
||||
CV_EXPORTS Mat windowedMatchingMask( const std::vector<KeyPoint>& keypoints1, const std::vector<KeyPoint>& keypoints2,
|
||||
float maxDeltaX, float maxDeltaY );
|
||||
|
||||
|
||||
@@ -895,7 +895,7 @@ public:
|
||||
virtual bool empty() const;
|
||||
|
||||
protected:
|
||||
virtual void computeImpl( const Mat& image, vector<KeyPoint>& keypoints, Mat& descriptors ) const;
|
||||
virtual void computeImpl( const Mat& image, std::vector<KeyPoint>& keypoints, Mat& descriptors ) const;
|
||||
|
||||
Ptr<DescriptorExtractor> descriptorExtractor;
|
||||
};
|
||||
@@ -923,9 +923,9 @@ public:
|
||||
AlgorithmInfo* info() const;
|
||||
|
||||
protected:
|
||||
virtual void computeImpl(const Mat& image, vector<KeyPoint>& keypoints, Mat& descriptors) const;
|
||||
virtual void computeImpl(const Mat& image, std::vector<KeyPoint>& keypoints, Mat& descriptors) const;
|
||||
|
||||
typedef void(*PixelTestFn)(const Mat&, const vector<KeyPoint>&, Mat&);
|
||||
typedef void(*PixelTestFn)(const Mat&, const std::vector<KeyPoint>&, Mat&);
|
||||
|
||||
int bytes_;
|
||||
PixelTestFn test_fn_;
|
||||
@@ -975,7 +975,7 @@ struct CV_EXPORTS L2
|
||||
|
||||
ResultType operator()( const T* a, const T* b, int size ) const
|
||||
{
|
||||
return (ResultType)sqrt((double)normL2Sqr<ValueType, ResultType>(a, b, size));
|
||||
return (ResultType)std::sqrt((double)normL2Sqr<ValueType, ResultType>(a, b, size));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1069,11 +1069,11 @@ public:
|
||||
* Add descriptors to train descriptor collection.
|
||||
* descriptors Descriptors to add. Each descriptors[i] is a descriptors set from one image.
|
||||
*/
|
||||
CV_WRAP virtual void add( const vector<Mat>& descriptors );
|
||||
CV_WRAP virtual void add( const std::vector<Mat>& descriptors );
|
||||
/*
|
||||
* Get train descriptors collection.
|
||||
*/
|
||||
CV_WRAP const vector<Mat>& getTrainDescriptors() const;
|
||||
CV_WRAP const std::vector<Mat>& getTrainDescriptors() const;
|
||||
/*
|
||||
* Clear train descriptors collection.
|
||||
*/
|
||||
@@ -1106,29 +1106,29 @@ public:
|
||||
*/
|
||||
// Find one best match for each query descriptor (if mask is empty).
|
||||
CV_WRAP void match( const Mat& queryDescriptors, const Mat& trainDescriptors,
|
||||
CV_OUT vector<DMatch>& matches, const Mat& mask=Mat() ) const;
|
||||
CV_OUT std::vector<DMatch>& matches, const Mat& mask=Mat() ) const;
|
||||
// Find k best matches for each query descriptor (in increasing order of distances).
|
||||
// compactResult is used when mask is not empty. If compactResult is false matches
|
||||
// vector will have the same size as queryDescriptors rows. If compactResult is true
|
||||
// matches vector will not contain matches for fully masked out query descriptors.
|
||||
CV_WRAP void knnMatch( const Mat& queryDescriptors, const Mat& trainDescriptors,
|
||||
CV_OUT vector<vector<DMatch> >& matches, int k,
|
||||
CV_OUT std::vector<std::vector<DMatch> >& matches, int k,
|
||||
const Mat& mask=Mat(), bool compactResult=false ) const;
|
||||
// Find best matches for each query descriptor which have distance less than
|
||||
// maxDistance (in increasing order of distances).
|
||||
void radiusMatch( const Mat& queryDescriptors, const Mat& trainDescriptors,
|
||||
vector<vector<DMatch> >& matches, float maxDistance,
|
||||
std::vector<std::vector<DMatch> >& matches, float maxDistance,
|
||||
const Mat& mask=Mat(), bool compactResult=false ) const;
|
||||
/*
|
||||
* Group of methods to match descriptors from one image to image set.
|
||||
* See description of similar methods for matching image pair above.
|
||||
*/
|
||||
CV_WRAP void match( const Mat& queryDescriptors, CV_OUT vector<DMatch>& matches,
|
||||
const vector<Mat>& masks=vector<Mat>() );
|
||||
CV_WRAP void knnMatch( const Mat& queryDescriptors, CV_OUT vector<vector<DMatch> >& matches, int k,
|
||||
const vector<Mat>& masks=vector<Mat>(), bool compactResult=false );
|
||||
void radiusMatch( const Mat& queryDescriptors, vector<vector<DMatch> >& matches, float maxDistance,
|
||||
const vector<Mat>& masks=vector<Mat>(), bool compactResult=false );
|
||||
CV_WRAP void match( const Mat& queryDescriptors, CV_OUT std::vector<DMatch>& matches,
|
||||
const std::vector<Mat>& masks=std::vector<Mat>() );
|
||||
CV_WRAP void knnMatch( const Mat& queryDescriptors, CV_OUT std::vector<std::vector<DMatch> >& matches, int k,
|
||||
const std::vector<Mat>& masks=std::vector<Mat>(), bool compactResult=false );
|
||||
void radiusMatch( const Mat& queryDescriptors, std::vector<std::vector<DMatch> >& matches, float maxDistance,
|
||||
const std::vector<Mat>& masks=std::vector<Mat>(), bool compactResult=false );
|
||||
|
||||
// Reads matcher object from a file node
|
||||
virtual void read( const FileNode& );
|
||||
@@ -1140,7 +1140,7 @@ public:
|
||||
// but with empty train data.
|
||||
virtual Ptr<DescriptorMatcher> clone( bool emptyTrainData=false ) const = 0;
|
||||
|
||||
CV_WRAP static Ptr<DescriptorMatcher> create( const string& descriptorMatcherType );
|
||||
CV_WRAP static Ptr<DescriptorMatcher> create( const std::string& descriptorMatcherType );
|
||||
protected:
|
||||
/*
|
||||
* Class to work with descriptors from several images as with one merged matrix.
|
||||
@@ -1154,7 +1154,7 @@ protected:
|
||||
virtual ~DescriptorCollection();
|
||||
|
||||
// Vector of matrices "descriptors" will be merged to one matrix "mergedDescriptors" here.
|
||||
void set( const vector<Mat>& descriptors );
|
||||
void set( const std::vector<Mat>& descriptors );
|
||||
virtual void clear();
|
||||
|
||||
const Mat& getDescriptors() const;
|
||||
@@ -1166,25 +1166,25 @@ protected:
|
||||
|
||||
protected:
|
||||
Mat mergedDescriptors;
|
||||
vector<int> startIdxs;
|
||||
std::vector<int> startIdxs;
|
||||
};
|
||||
|
||||
// In fact the matching is implemented only by the following two methods. These methods suppose
|
||||
// that the class object has been trained already. Public match methods call these methods
|
||||
// after calling train().
|
||||
virtual void knnMatchImpl( const Mat& queryDescriptors, vector<vector<DMatch> >& matches, int k,
|
||||
const vector<Mat>& masks=vector<Mat>(), bool compactResult=false ) = 0;
|
||||
virtual void radiusMatchImpl( const Mat& queryDescriptors, vector<vector<DMatch> >& matches, float maxDistance,
|
||||
const vector<Mat>& masks=vector<Mat>(), bool compactResult=false ) = 0;
|
||||
virtual void knnMatchImpl( const Mat& queryDescriptors, std::vector<std::vector<DMatch> >& matches, int k,
|
||||
const std::vector<Mat>& masks=std::vector<Mat>(), bool compactResult=false ) = 0;
|
||||
virtual void radiusMatchImpl( const Mat& queryDescriptors, std::vector<std::vector<DMatch> >& matches, float maxDistance,
|
||||
const std::vector<Mat>& masks=std::vector<Mat>(), bool compactResult=false ) = 0;
|
||||
|
||||
static bool isPossibleMatch( const Mat& mask, int queryIdx, int trainIdx );
|
||||
static bool isMaskedOut( const vector<Mat>& masks, int queryIdx );
|
||||
static bool isMaskedOut( const std::vector<Mat>& masks, int queryIdx );
|
||||
|
||||
static Mat clone_op( Mat m ) { return m.clone(); }
|
||||
void checkMasks( const vector<Mat>& masks, int queryDescriptorsCount ) const;
|
||||
void checkMasks( const std::vector<Mat>& masks, int queryDescriptorsCount ) const;
|
||||
|
||||
// Collection of descriptors from train images.
|
||||
vector<Mat> trainDescCollection;
|
||||
std::vector<Mat> trainDescCollection;
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -1208,10 +1208,10 @@ public:
|
||||
|
||||
AlgorithmInfo* info() const;
|
||||
protected:
|
||||
virtual void knnMatchImpl( const Mat& queryDescriptors, vector<vector<DMatch> >& matches, int k,
|
||||
const vector<Mat>& masks=vector<Mat>(), bool compactResult=false );
|
||||
virtual void radiusMatchImpl( const Mat& queryDescriptors, vector<vector<DMatch> >& matches, float maxDistance,
|
||||
const vector<Mat>& masks=vector<Mat>(), bool compactResult=false );
|
||||
virtual void knnMatchImpl( const Mat& queryDescriptors, std::vector<std::vector<DMatch> >& matches, int k,
|
||||
const std::vector<Mat>& masks=std::vector<Mat>(), bool compactResult=false );
|
||||
virtual void radiusMatchImpl( const Mat& queryDescriptors, std::vector<std::vector<DMatch> >& matches, float maxDistance,
|
||||
const std::vector<Mat>& masks=std::vector<Mat>(), bool compactResult=false );
|
||||
|
||||
int normType;
|
||||
bool crossCheck;
|
||||
@@ -1227,7 +1227,7 @@ public:
|
||||
CV_WRAP FlannBasedMatcher( const Ptr<flann::IndexParams>& indexParams=new flann::KDTreeIndexParams(),
|
||||
const Ptr<flann::SearchParams>& searchParams=new flann::SearchParams() );
|
||||
|
||||
virtual void add( const vector<Mat>& descriptors );
|
||||
virtual void add( const std::vector<Mat>& descriptors );
|
||||
virtual void clear();
|
||||
|
||||
// Reads matcher object from a file node
|
||||
@@ -1244,12 +1244,12 @@ public:
|
||||
protected:
|
||||
static void convertToDMatches( const DescriptorCollection& descriptors,
|
||||
const Mat& indices, const Mat& distances,
|
||||
vector<vector<DMatch> >& matches );
|
||||
std::vector<std::vector<DMatch> >& matches );
|
||||
|
||||
virtual void knnMatchImpl( const Mat& queryDescriptors, vector<vector<DMatch> >& matches, int k,
|
||||
const vector<Mat>& masks=vector<Mat>(), bool compactResult=false );
|
||||
virtual void radiusMatchImpl( const Mat& queryDescriptors, vector<vector<DMatch> >& matches, float maxDistance,
|
||||
const vector<Mat>& masks=vector<Mat>(), bool compactResult=false );
|
||||
virtual void knnMatchImpl( const Mat& queryDescriptors, std::vector<std::vector<DMatch> >& matches, int k,
|
||||
const std::vector<Mat>& masks=std::vector<Mat>(), bool compactResult=false );
|
||||
virtual void radiusMatchImpl( const Mat& queryDescriptors, std::vector<std::vector<DMatch> >& matches, float maxDistance,
|
||||
const std::vector<Mat>& masks=std::vector<Mat>(), bool compactResult=false );
|
||||
|
||||
Ptr<flann::IndexParams> indexParams;
|
||||
Ptr<flann::SearchParams> searchParams;
|
||||
@@ -1284,11 +1284,11 @@ public:
|
||||
* If inheritor class need perform such prefiltering the method add() must be overloaded.
|
||||
* In the other class methods programmer has access to the train keypoints by a constant link.
|
||||
*/
|
||||
virtual void add( const vector<Mat>& images,
|
||||
vector<vector<KeyPoint> >& keypoints );
|
||||
virtual void add( const std::vector<Mat>& images,
|
||||
std::vector<std::vector<KeyPoint> >& keypoints );
|
||||
|
||||
const vector<Mat>& getTrainImages() const;
|
||||
const vector<vector<KeyPoint> >& getTrainKeypoints() const;
|
||||
const std::vector<Mat>& getTrainImages() const;
|
||||
const std::vector<std::vector<KeyPoint> >& getTrainKeypoints() const;
|
||||
|
||||
/*
|
||||
* Clear images and keypoints storing in train collection.
|
||||
@@ -1313,10 +1313,10 @@ public:
|
||||
* trainKeypoints Keypoints from the train image
|
||||
*/
|
||||
// Classify keypoints from query image under one train image.
|
||||
void classify( const Mat& queryImage, vector<KeyPoint>& queryKeypoints,
|
||||
const Mat& trainImage, vector<KeyPoint>& trainKeypoints ) const;
|
||||
void classify( const Mat& queryImage, std::vector<KeyPoint>& queryKeypoints,
|
||||
const Mat& trainImage, std::vector<KeyPoint>& trainKeypoints ) const;
|
||||
// Classify keypoints from query image under train image collection.
|
||||
void classify( const Mat& queryImage, vector<KeyPoint>& queryKeypoints );
|
||||
void classify( const Mat& queryImage, std::vector<KeyPoint>& queryKeypoints );
|
||||
|
||||
/*
|
||||
* Group of methods to match keypoints from image pair.
|
||||
@@ -1324,34 +1324,34 @@ public:
|
||||
* train() method is called here.
|
||||
*/
|
||||
// Find one best match for each query descriptor (if mask is empty).
|
||||
void match( const Mat& queryImage, vector<KeyPoint>& queryKeypoints,
|
||||
const Mat& trainImage, vector<KeyPoint>& trainKeypoints,
|
||||
vector<DMatch>& matches, const Mat& mask=Mat() ) const;
|
||||
void match( const Mat& queryImage, std::vector<KeyPoint>& queryKeypoints,
|
||||
const Mat& trainImage, std::vector<KeyPoint>& trainKeypoints,
|
||||
std::vector<DMatch>& matches, const Mat& mask=Mat() ) const;
|
||||
// Find k best matches for each query keypoint (in increasing order of distances).
|
||||
// compactResult is used when mask is not empty. If compactResult is false matches
|
||||
// vector will have the same size as queryDescriptors rows.
|
||||
// If compactResult is true matches vector will not contain matches for fully masked out query descriptors.
|
||||
void knnMatch( const Mat& queryImage, vector<KeyPoint>& queryKeypoints,
|
||||
const Mat& trainImage, vector<KeyPoint>& trainKeypoints,
|
||||
vector<vector<DMatch> >& matches, int k,
|
||||
void knnMatch( const Mat& queryImage, std::vector<KeyPoint>& queryKeypoints,
|
||||
const Mat& trainImage, std::vector<KeyPoint>& trainKeypoints,
|
||||
std::vector<std::vector<DMatch> >& matches, int k,
|
||||
const Mat& mask=Mat(), bool compactResult=false ) const;
|
||||
// Find best matches for each query descriptor which have distance less than maxDistance (in increasing order of distances).
|
||||
void radiusMatch( const Mat& queryImage, vector<KeyPoint>& queryKeypoints,
|
||||
const Mat& trainImage, vector<KeyPoint>& trainKeypoints,
|
||||
vector<vector<DMatch> >& matches, float maxDistance,
|
||||
void radiusMatch( const Mat& queryImage, std::vector<KeyPoint>& queryKeypoints,
|
||||
const Mat& trainImage, std::vector<KeyPoint>& trainKeypoints,
|
||||
std::vector<std::vector<DMatch> >& matches, float maxDistance,
|
||||
const Mat& mask=Mat(), bool compactResult=false ) const;
|
||||
/*
|
||||
* Group of methods to match keypoints from one image to image set.
|
||||
* See description of similar methods for matching image pair above.
|
||||
*/
|
||||
void match( const Mat& queryImage, vector<KeyPoint>& queryKeypoints,
|
||||
vector<DMatch>& matches, const vector<Mat>& masks=vector<Mat>() );
|
||||
void knnMatch( const Mat& queryImage, vector<KeyPoint>& queryKeypoints,
|
||||
vector<vector<DMatch> >& matches, int k,
|
||||
const vector<Mat>& masks=vector<Mat>(), bool compactResult=false );
|
||||
void radiusMatch( const Mat& queryImage, vector<KeyPoint>& queryKeypoints,
|
||||
vector<vector<DMatch> >& matches, float maxDistance,
|
||||
const vector<Mat>& masks=vector<Mat>(), bool compactResult=false );
|
||||
void match( const Mat& queryImage, std::vector<KeyPoint>& queryKeypoints,
|
||||
std::vector<DMatch>& matches, const std::vector<Mat>& masks=std::vector<Mat>() );
|
||||
void knnMatch( const Mat& queryImage, std::vector<KeyPoint>& queryKeypoints,
|
||||
std::vector<std::vector<DMatch> >& matches, int k,
|
||||
const std::vector<Mat>& masks=std::vector<Mat>(), bool compactResult=false );
|
||||
void radiusMatch( const Mat& queryImage, std::vector<KeyPoint>& queryKeypoints,
|
||||
std::vector<std::vector<DMatch> >& matches, float maxDistance,
|
||||
const std::vector<Mat>& masks=std::vector<Mat>(), bool compactResult=false );
|
||||
|
||||
// Reads matcher object from a file node
|
||||
virtual void read( const FileNode& fn );
|
||||
@@ -1366,19 +1366,19 @@ public:
|
||||
// but with empty train data.
|
||||
virtual Ptr<GenericDescriptorMatcher> clone( bool emptyTrainData=false ) const = 0;
|
||||
|
||||
static Ptr<GenericDescriptorMatcher> create( const string& genericDescritptorMatcherType,
|
||||
const string ¶msFilename=string() );
|
||||
static Ptr<GenericDescriptorMatcher> create( const std::string& genericDescritptorMatcherType,
|
||||
const std::string ¶msFilename=std::string() );
|
||||
|
||||
protected:
|
||||
// In fact the matching is implemented only by the following two methods. These methods suppose
|
||||
// that the class object has been trained already. Public match methods call these methods
|
||||
// after calling train().
|
||||
virtual void knnMatchImpl( const Mat& queryImage, vector<KeyPoint>& queryKeypoints,
|
||||
vector<vector<DMatch> >& matches, int k,
|
||||
const vector<Mat>& masks, bool compactResult ) = 0;
|
||||
virtual void radiusMatchImpl( const Mat& queryImage, vector<KeyPoint>& queryKeypoints,
|
||||
vector<vector<DMatch> >& matches, float maxDistance,
|
||||
const vector<Mat>& masks, bool compactResult ) = 0;
|
||||
virtual void knnMatchImpl( const Mat& queryImage, std::vector<KeyPoint>& queryKeypoints,
|
||||
std::vector<std::vector<DMatch> >& matches, int k,
|
||||
const std::vector<Mat>& masks, bool compactResult ) = 0;
|
||||
virtual void radiusMatchImpl( const Mat& queryImage, std::vector<KeyPoint>& queryKeypoints,
|
||||
std::vector<std::vector<DMatch> >& matches, float maxDistance,
|
||||
const std::vector<Mat>& masks, bool compactResult ) = 0;
|
||||
/*
|
||||
* A storage for sets of keypoints together with corresponding images and class IDs
|
||||
*/
|
||||
@@ -1387,29 +1387,29 @@ protected:
|
||||
public:
|
||||
KeyPointCollection();
|
||||
KeyPointCollection( const KeyPointCollection& collection );
|
||||
void add( const vector<Mat>& images, const vector<vector<KeyPoint> >& keypoints );
|
||||
void add( const std::vector<Mat>& images, const std::vector<std::vector<KeyPoint> >& keypoints );
|
||||
void clear();
|
||||
|
||||
// Returns the total number of keypoints in the collection
|
||||
size_t keypointCount() const;
|
||||
size_t imageCount() const;
|
||||
|
||||
const vector<vector<KeyPoint> >& getKeypoints() const;
|
||||
const vector<KeyPoint>& getKeypoints( int imgIdx ) const;
|
||||
const std::vector<std::vector<KeyPoint> >& getKeypoints() const;
|
||||
const std::vector<KeyPoint>& getKeypoints( int imgIdx ) const;
|
||||
const KeyPoint& getKeyPoint( int imgIdx, int localPointIdx ) const;
|
||||
const KeyPoint& getKeyPoint( int globalPointIdx ) const;
|
||||
void getLocalIdx( int globalPointIdx, int& imgIdx, int& localPointIdx ) const;
|
||||
|
||||
const vector<Mat>& getImages() const;
|
||||
const std::vector<Mat>& getImages() const;
|
||||
const Mat& getImage( int imgIdx ) const;
|
||||
|
||||
protected:
|
||||
int pointCount;
|
||||
|
||||
vector<Mat> images;
|
||||
vector<vector<KeyPoint> > keypoints;
|
||||
std::vector<Mat> images;
|
||||
std::vector<std::vector<KeyPoint> > keypoints;
|
||||
// global indices of the first points in each image, startIndices.size() = keypoints.size()
|
||||
vector<int> startIndices;
|
||||
std::vector<int> startIndices;
|
||||
|
||||
private:
|
||||
static Mat clone_op( Mat m ) { return m.clone(); }
|
||||
@@ -1435,8 +1435,8 @@ public:
|
||||
VectorDescriptorMatcher( const Ptr<DescriptorExtractor>& extractor, const Ptr<DescriptorMatcher>& matcher );
|
||||
virtual ~VectorDescriptorMatcher();
|
||||
|
||||
virtual void add( const vector<Mat>& imgCollection,
|
||||
vector<vector<KeyPoint> >& pointCollection );
|
||||
virtual void add( const std::vector<Mat>& imgCollection,
|
||||
std::vector<std::vector<KeyPoint> >& pointCollection );
|
||||
|
||||
virtual void clear();
|
||||
|
||||
@@ -1451,12 +1451,12 @@ public:
|
||||
virtual Ptr<GenericDescriptorMatcher> clone( bool emptyTrainData=false ) const;
|
||||
|
||||
protected:
|
||||
virtual void knnMatchImpl( const Mat& queryImage, vector<KeyPoint>& queryKeypoints,
|
||||
vector<vector<DMatch> >& matches, int k,
|
||||
const vector<Mat>& masks, bool compactResult );
|
||||
virtual void radiusMatchImpl( const Mat& queryImage, vector<KeyPoint>& queryKeypoints,
|
||||
vector<vector<DMatch> >& matches, float maxDistance,
|
||||
const vector<Mat>& masks, bool compactResult );
|
||||
virtual void knnMatchImpl( const Mat& queryImage, std::vector<KeyPoint>& queryKeypoints,
|
||||
std::vector<std::vector<DMatch> >& matches, int k,
|
||||
const std::vector<Mat>& masks, bool compactResult );
|
||||
virtual void radiusMatchImpl( const Mat& queryImage, std::vector<KeyPoint>& queryKeypoints,
|
||||
std::vector<std::vector<DMatch> >& matches, float maxDistance,
|
||||
const std::vector<Mat>& masks, bool compactResult );
|
||||
|
||||
Ptr<DescriptorExtractor> extractor;
|
||||
Ptr<DescriptorMatcher> matcher;
|
||||
@@ -1481,42 +1481,42 @@ struct CV_EXPORTS DrawMatchesFlags
|
||||
};
|
||||
|
||||
// Draw keypoints.
|
||||
CV_EXPORTS_W void drawKeypoints( const Mat& image, const vector<KeyPoint>& keypoints, CV_OUT Mat& outImage,
|
||||
CV_EXPORTS_W void drawKeypoints( const Mat& image, const std::vector<KeyPoint>& keypoints, CV_OUT Mat& outImage,
|
||||
const Scalar& color=Scalar::all(-1), int flags=DrawMatchesFlags::DEFAULT );
|
||||
|
||||
// Draws matches of keypints from two images on output image.
|
||||
CV_EXPORTS void drawMatches( const Mat& img1, const vector<KeyPoint>& keypoints1,
|
||||
const Mat& img2, const vector<KeyPoint>& keypoints2,
|
||||
const vector<DMatch>& matches1to2, Mat& outImg,
|
||||
CV_EXPORTS void drawMatches( const Mat& img1, const std::vector<KeyPoint>& keypoints1,
|
||||
const Mat& img2, const std::vector<KeyPoint>& keypoints2,
|
||||
const std::vector<DMatch>& matches1to2, Mat& outImg,
|
||||
const Scalar& matchColor=Scalar::all(-1), const Scalar& singlePointColor=Scalar::all(-1),
|
||||
const vector<char>& matchesMask=vector<char>(), int flags=DrawMatchesFlags::DEFAULT );
|
||||
const std::vector<char>& matchesMask=std::vector<char>(), int flags=DrawMatchesFlags::DEFAULT );
|
||||
|
||||
CV_EXPORTS void drawMatches( const Mat& img1, const vector<KeyPoint>& keypoints1,
|
||||
const Mat& img2, const vector<KeyPoint>& keypoints2,
|
||||
const vector<vector<DMatch> >& matches1to2, Mat& outImg,
|
||||
CV_EXPORTS void drawMatches( const Mat& img1, const std::vector<KeyPoint>& keypoints1,
|
||||
const Mat& img2, const std::vector<KeyPoint>& keypoints2,
|
||||
const std::vector<std::vector<DMatch> >& matches1to2, Mat& outImg,
|
||||
const Scalar& matchColor=Scalar::all(-1), const Scalar& singlePointColor=Scalar::all(-1),
|
||||
const vector<vector<char> >& matchesMask=vector<vector<char> >(), int flags=DrawMatchesFlags::DEFAULT );
|
||||
const std::vector<std::vector<char> >& matchesMask=std::vector<std::vector<char> >(), int flags=DrawMatchesFlags::DEFAULT );
|
||||
|
||||
/****************************************************************************************\
|
||||
* Functions to evaluate the feature detectors and [generic] descriptor extractors *
|
||||
\****************************************************************************************/
|
||||
|
||||
CV_EXPORTS void evaluateFeatureDetector( const Mat& img1, const Mat& img2, const Mat& H1to2,
|
||||
vector<KeyPoint>* keypoints1, vector<KeyPoint>* keypoints2,
|
||||
std::vector<KeyPoint>* keypoints1, std::vector<KeyPoint>* keypoints2,
|
||||
float& repeatability, int& correspCount,
|
||||
const Ptr<FeatureDetector>& fdetector=Ptr<FeatureDetector>() );
|
||||
|
||||
CV_EXPORTS void computeRecallPrecisionCurve( const vector<vector<DMatch> >& matches1to2,
|
||||
const vector<vector<uchar> >& correctMatches1to2Mask,
|
||||
vector<Point2f>& recallPrecisionCurve );
|
||||
CV_EXPORTS void computeRecallPrecisionCurve( const std::vector<std::vector<DMatch> >& matches1to2,
|
||||
const std::vector<std::vector<uchar> >& correctMatches1to2Mask,
|
||||
std::vector<Point2f>& recallPrecisionCurve );
|
||||
|
||||
CV_EXPORTS float getRecall( const vector<Point2f>& recallPrecisionCurve, float l_precision );
|
||||
CV_EXPORTS int getNearestPoint( const vector<Point2f>& recallPrecisionCurve, float l_precision );
|
||||
CV_EXPORTS float getRecall( const std::vector<Point2f>& recallPrecisionCurve, float l_precision );
|
||||
CV_EXPORTS int getNearestPoint( const std::vector<Point2f>& recallPrecisionCurve, float l_precision );
|
||||
|
||||
CV_EXPORTS void evaluateGenericDescriptorMatcher( const Mat& img1, const Mat& img2, const Mat& H1to2,
|
||||
vector<KeyPoint>& keypoints1, vector<KeyPoint>& keypoints2,
|
||||
vector<vector<DMatch> >* matches1to2, vector<vector<uchar> >* correctMatches1to2Mask,
|
||||
vector<Point2f>& recallPrecisionCurve,
|
||||
std::vector<KeyPoint>& keypoints1, std::vector<KeyPoint>& keypoints2,
|
||||
std::vector<std::vector<DMatch> >* matches1to2, std::vector<std::vector<uchar> >* correctMatches1to2Mask,
|
||||
std::vector<Point2f>& recallPrecisionCurve,
|
||||
const Ptr<GenericDescriptorMatcher>& dmatch=Ptr<GenericDescriptorMatcher>() );
|
||||
|
||||
|
||||
@@ -1533,7 +1533,7 @@ public:
|
||||
virtual ~BOWTrainer();
|
||||
|
||||
void add( const Mat& descriptors );
|
||||
const vector<Mat>& getDescriptors() const;
|
||||
const std::vector<Mat>& getDescriptors() const;
|
||||
int descripotorsCount() const;
|
||||
|
||||
virtual void clear();
|
||||
@@ -1549,7 +1549,7 @@ public:
|
||||
virtual Mat cluster( const Mat& descriptors ) const = 0;
|
||||
|
||||
protected:
|
||||
vector<Mat> descriptors;
|
||||
std::vector<Mat> descriptors;
|
||||
int size;
|
||||
};
|
||||
|
||||
@@ -1587,8 +1587,8 @@ public:
|
||||
|
||||
void setVocabulary( const Mat& vocabulary );
|
||||
const Mat& getVocabulary() const;
|
||||
void compute( const Mat& image, vector<KeyPoint>& keypoints, Mat& imgDescriptor,
|
||||
vector<vector<int> >* pointIdxsOfClusters=0, Mat* descriptors=0 );
|
||||
void compute( const Mat& image, std::vector<KeyPoint>& keypoints, Mat& imgDescriptor,
|
||||
std::vector<std::vector<int> >* pointIdxsOfClusters=0, Mat* descriptors=0 );
|
||||
// compute() is not constant because DescriptorMatcher::match is not constant
|
||||
|
||||
int descriptorSize() const;
|
||||
|
||||
Reference in New Issue
Block a user