mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 23:33:05 +04:00
Merge branch 4.x
This commit is contained in:
@@ -107,6 +107,10 @@ public:
|
||||
* Remove keypoints from some image by mask for pixels of this image.
|
||||
*/
|
||||
static void runByPixelsMask( std::vector<KeyPoint>& keypoints, const Mat& mask );
|
||||
/*
|
||||
* Remove objects from some image and a vector of points by mask for pixels of this image
|
||||
*/
|
||||
static void runByPixelsMask2VectorPoint(std::vector<KeyPoint> &keypoints, std::vector<std::vector<Point> > &removeFrom, const Mat &mask);
|
||||
/*
|
||||
* Remove duplicated keypoints.
|
||||
*/
|
||||
@@ -208,7 +212,7 @@ public:
|
||||
CV_WRAP virtual String getDefaultName() const CV_OVERRIDE;
|
||||
|
||||
// see corresponding cv::Algorithm method
|
||||
CV_WRAP inline void write(const Ptr<FileStorage>& fs, const String& name = String()) const { Algorithm::write(fs, name); }
|
||||
CV_WRAP inline void write(FileStorage& fs, const String& name) const { Algorithm::write(fs, name); }
|
||||
};
|
||||
|
||||
/** Feature detectors in OpenCV have wrappers with a common interface that enables you to easily switch
|
||||
@@ -308,6 +312,21 @@ public:
|
||||
double sigma, int descriptorType);
|
||||
|
||||
CV_WRAP virtual String getDefaultName() const CV_OVERRIDE;
|
||||
|
||||
CV_WRAP virtual void setNFeatures(int maxFeatures) = 0;
|
||||
CV_WRAP virtual int getNFeatures() const = 0;
|
||||
|
||||
CV_WRAP virtual void setNOctaveLayers(int nOctaveLayers) = 0;
|
||||
CV_WRAP virtual int getNOctaveLayers() const = 0;
|
||||
|
||||
CV_WRAP virtual void setContrastThreshold(double contrastThreshold) = 0;
|
||||
CV_WRAP virtual double getContrastThreshold() const = 0;
|
||||
|
||||
CV_WRAP virtual void setEdgeThreshold(double edgeThreshold) = 0;
|
||||
CV_WRAP virtual double getEdgeThreshold() const = 0;
|
||||
|
||||
CV_WRAP virtual void setSigma(double sigma) = 0;
|
||||
CV_WRAP virtual double getSigma() const = 0;
|
||||
};
|
||||
|
||||
typedef SIFT SiftFeatureDetector;
|
||||
@@ -363,14 +382,20 @@ public:
|
||||
/** @brief Set detection threshold.
|
||||
@param threshold AGAST detection threshold score.
|
||||
*/
|
||||
CV_WRAP virtual void setThreshold(int threshold) { CV_UNUSED(threshold); return; }
|
||||
CV_WRAP virtual int getThreshold() const { return -1; }
|
||||
CV_WRAP virtual void setThreshold(int threshold) = 0;
|
||||
CV_WRAP virtual int getThreshold() const = 0;
|
||||
|
||||
/** @brief Set detection octaves.
|
||||
@param octaves detection octaves. Use 0 to do single scale.
|
||||
*/
|
||||
CV_WRAP virtual void setOctaves(int octaves) { CV_UNUSED(octaves); return; }
|
||||
CV_WRAP virtual int getOctaves() const { return -1; }
|
||||
CV_WRAP virtual void setOctaves(int octaves) = 0;
|
||||
CV_WRAP virtual int getOctaves() const = 0;
|
||||
/** @brief Set detection patternScale.
|
||||
@param patternScale apply this scale to the pattern used for sampling the neighbourhood of a
|
||||
keypoint.
|
||||
*/
|
||||
CV_WRAP virtual void setPatternScale(float patternScale) = 0;
|
||||
CV_WRAP virtual float getPatternScale() const = 0;
|
||||
};
|
||||
|
||||
/** @brief Class implementing the ORB (*oriented BRIEF*) keypoint detector and descriptor extractor
|
||||
@@ -503,11 +528,27 @@ public:
|
||||
CV_WRAP virtual void setMaxArea(int maxArea) = 0;
|
||||
CV_WRAP virtual int getMaxArea() const = 0;
|
||||
|
||||
CV_WRAP virtual void setMaxVariation(double maxVariation) = 0;
|
||||
CV_WRAP virtual double getMaxVariation() const = 0;
|
||||
|
||||
CV_WRAP virtual void setMinDiversity(double minDiversity) = 0;
|
||||
CV_WRAP virtual double getMinDiversity() const = 0;
|
||||
|
||||
CV_WRAP virtual void setMaxEvolution(int maxEvolution) = 0;
|
||||
CV_WRAP virtual int getMaxEvolution() const = 0;
|
||||
|
||||
CV_WRAP virtual void setAreaThreshold(double areaThreshold) = 0;
|
||||
CV_WRAP virtual double getAreaThreshold() const = 0;
|
||||
|
||||
CV_WRAP virtual void setMinMargin(double min_margin) = 0;
|
||||
CV_WRAP virtual double getMinMargin() const = 0;
|
||||
|
||||
CV_WRAP virtual void setEdgeBlurSize(int edge_blur_size) = 0;
|
||||
CV_WRAP virtual int getEdgeBlurSize() const = 0;
|
||||
|
||||
CV_WRAP virtual void setPass2Only(bool f) = 0;
|
||||
CV_WRAP virtual bool getPass2Only() const = 0;
|
||||
|
||||
CV_WRAP virtual String getDefaultName() const CV_OVERRIDE;
|
||||
};
|
||||
|
||||
@@ -642,6 +683,9 @@ public:
|
||||
CV_WRAP virtual void setBlockSize(int blockSize) = 0;
|
||||
CV_WRAP virtual int getBlockSize() const = 0;
|
||||
|
||||
CV_WRAP virtual void setGradientSize(int gradientSize_) = 0;
|
||||
CV_WRAP virtual int getGradientSize() = 0;
|
||||
|
||||
CV_WRAP virtual void setHarrisDetector(bool val) = 0;
|
||||
CV_WRAP virtual bool getHarrisDetector() const = 0;
|
||||
|
||||
@@ -708,13 +752,20 @@ public:
|
||||
CV_PROP_RW bool filterByConvexity;
|
||||
CV_PROP_RW float minConvexity, maxConvexity;
|
||||
|
||||
CV_PROP_RW bool collectContours;
|
||||
|
||||
void read( const FileNode& fn );
|
||||
void write( FileStorage& fs ) const;
|
||||
};
|
||||
|
||||
CV_WRAP static Ptr<SimpleBlobDetector>
|
||||
create(const SimpleBlobDetector::Params ¶meters = SimpleBlobDetector::Params());
|
||||
|
||||
CV_WRAP virtual void setParams(const SimpleBlobDetector::Params& params ) = 0;
|
||||
CV_WRAP virtual SimpleBlobDetector::Params getParams() const = 0;
|
||||
|
||||
CV_WRAP virtual String getDefaultName() const CV_OVERRIDE;
|
||||
CV_WRAP virtual const std::vector<std::vector<cv::Point> >& getBlobContours() const = 0;
|
||||
};
|
||||
|
||||
//! @} features2d_main
|
||||
@@ -1113,7 +1164,10 @@ public:
|
||||
|
||||
|
||||
// see corresponding cv::Algorithm method
|
||||
CV_WRAP inline void write(const Ptr<FileStorage>& fs, const String& name = String()) const { Algorithm::write(fs, name); }
|
||||
CV_WRAP inline void write(FileStorage& fs, const String& name) const { Algorithm::write(fs, name); }
|
||||
#if CV_VERSION_MAJOR < 5
|
||||
inline void write(const Ptr<FileStorage>& fs, const String& name) const { CV_Assert(fs); Algorithm::write(*fs, name); }
|
||||
#endif
|
||||
|
||||
protected:
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user