Merge pull request #14379 from sturkmen72:upd_GeneralizedHough

This commit is contained in:
Alexander Alekhin 2019-04-22 15:51:46 +00:00
commit 8fac166b66

View File

@ -799,108 +799,108 @@ enum RectanglesIntersectTypes {
/** @brief finds arbitrary template in the grayscale image using Generalized Hough Transform
*/
class CV_EXPORTS GeneralizedHough : public Algorithm
class CV_EXPORTS_W GeneralizedHough : public Algorithm
{
public:
//! set template to search
virtual void setTemplate(InputArray templ, Point templCenter = Point(-1, -1)) = 0;
virtual void setTemplate(InputArray edges, InputArray dx, InputArray dy, Point templCenter = Point(-1, -1)) = 0;
CV_WRAP virtual void setTemplate(InputArray templ, Point templCenter = Point(-1, -1)) = 0;
CV_WRAP virtual void setTemplate(InputArray edges, InputArray dx, InputArray dy, Point templCenter = Point(-1, -1)) = 0;
//! find template on image
virtual void detect(InputArray image, OutputArray positions, OutputArray votes = noArray()) = 0;
virtual void detect(InputArray edges, InputArray dx, InputArray dy, OutputArray positions, OutputArray votes = noArray()) = 0;
CV_WRAP virtual void detect(InputArray image, OutputArray positions, OutputArray votes = noArray()) = 0;
CV_WRAP virtual void detect(InputArray edges, InputArray dx, InputArray dy, OutputArray positions, OutputArray votes = noArray()) = 0;
//! Canny low threshold.
virtual void setCannyLowThresh(int cannyLowThresh) = 0;
virtual int getCannyLowThresh() const = 0;
CV_WRAP virtual void setCannyLowThresh(int cannyLowThresh) = 0;
CV_WRAP virtual int getCannyLowThresh() const = 0;
//! Canny high threshold.
virtual void setCannyHighThresh(int cannyHighThresh) = 0;
virtual int getCannyHighThresh() const = 0;
CV_WRAP virtual void setCannyHighThresh(int cannyHighThresh) = 0;
CV_WRAP virtual int getCannyHighThresh() const = 0;
//! Minimum distance between the centers of the detected objects.
virtual void setMinDist(double minDist) = 0;
virtual double getMinDist() const = 0;
CV_WRAP virtual void setMinDist(double minDist) = 0;
CV_WRAP virtual double getMinDist() const = 0;
//! Inverse ratio of the accumulator resolution to the image resolution.
virtual void setDp(double dp) = 0;
virtual double getDp() const = 0;
CV_WRAP virtual void setDp(double dp) = 0;
CV_WRAP virtual double getDp() const = 0;
//! Maximal size of inner buffers.
virtual void setMaxBufferSize(int maxBufferSize) = 0;
virtual int getMaxBufferSize() const = 0;
CV_WRAP virtual void setMaxBufferSize(int maxBufferSize) = 0;
CV_WRAP virtual int getMaxBufferSize() const = 0;
};
/** @brief finds arbitrary template in the grayscale image using Generalized Hough Transform
Detects position only without translation and rotation @cite Ballard1981 .
*/
class CV_EXPORTS GeneralizedHoughBallard : public GeneralizedHough
class CV_EXPORTS_W GeneralizedHoughBallard : public GeneralizedHough
{
public:
//! R-Table levels.
virtual void setLevels(int levels) = 0;
virtual int getLevels() const = 0;
CV_WRAP virtual void setLevels(int levels) = 0;
CV_WRAP virtual int getLevels() const = 0;
//! The accumulator threshold for the template centers at the detection stage. The smaller it is, the more false positions may be detected.
virtual void setVotesThreshold(int votesThreshold) = 0;
virtual int getVotesThreshold() const = 0;
CV_WRAP virtual void setVotesThreshold(int votesThreshold) = 0;
CV_WRAP virtual int getVotesThreshold() const = 0;
};
/** @brief finds arbitrary template in the grayscale image using Generalized Hough Transform
Detects position, translation and rotation @cite Guil1999 .
*/
class CV_EXPORTS GeneralizedHoughGuil : public GeneralizedHough
class CV_EXPORTS_W GeneralizedHoughGuil : public GeneralizedHough
{
public:
//! Angle difference in degrees between two points in feature.
virtual void setXi(double xi) = 0;
virtual double getXi() const = 0;
CV_WRAP virtual void setXi(double xi) = 0;
CV_WRAP virtual double getXi() const = 0;
//! Feature table levels.
virtual void setLevels(int levels) = 0;
virtual int getLevels() const = 0;
CV_WRAP virtual void setLevels(int levels) = 0;
CV_WRAP virtual int getLevels() const = 0;
//! Maximal difference between angles that treated as equal.
virtual void setAngleEpsilon(double angleEpsilon) = 0;
virtual double getAngleEpsilon() const = 0;
CV_WRAP virtual void setAngleEpsilon(double angleEpsilon) = 0;
CV_WRAP virtual double getAngleEpsilon() const = 0;
//! Minimal rotation angle to detect in degrees.
virtual void setMinAngle(double minAngle) = 0;
virtual double getMinAngle() const = 0;
CV_WRAP virtual void setMinAngle(double minAngle) = 0;
CV_WRAP virtual double getMinAngle() const = 0;
//! Maximal rotation angle to detect in degrees.
virtual void setMaxAngle(double maxAngle) = 0;
virtual double getMaxAngle() const = 0;
CV_WRAP virtual void setMaxAngle(double maxAngle) = 0;
CV_WRAP virtual double getMaxAngle() const = 0;
//! Angle step in degrees.
virtual void setAngleStep(double angleStep) = 0;
virtual double getAngleStep() const = 0;
CV_WRAP virtual void setAngleStep(double angleStep) = 0;
CV_WRAP virtual double getAngleStep() const = 0;
//! Angle votes threshold.
virtual void setAngleThresh(int angleThresh) = 0;
virtual int getAngleThresh() const = 0;
CV_WRAP virtual void setAngleThresh(int angleThresh) = 0;
CV_WRAP virtual int getAngleThresh() const = 0;
//! Minimal scale to detect.
virtual void setMinScale(double minScale) = 0;
virtual double getMinScale() const = 0;
CV_WRAP virtual void setMinScale(double minScale) = 0;
CV_WRAP virtual double getMinScale() const = 0;
//! Maximal scale to detect.
virtual void setMaxScale(double maxScale) = 0;
virtual double getMaxScale() const = 0;
CV_WRAP virtual void setMaxScale(double maxScale) = 0;
CV_WRAP virtual double getMaxScale() const = 0;
//! Scale step.
virtual void setScaleStep(double scaleStep) = 0;
virtual double getScaleStep() const = 0;
CV_WRAP virtual void setScaleStep(double scaleStep) = 0;
CV_WRAP virtual double getScaleStep() const = 0;
//! Scale votes threshold.
virtual void setScaleThresh(int scaleThresh) = 0;
virtual int getScaleThresh() const = 0;
CV_WRAP virtual void setScaleThresh(int scaleThresh) = 0;
CV_WRAP virtual int getScaleThresh() const = 0;
//! Position votes threshold.
virtual void setPosThresh(int posThresh) = 0;
virtual int getPosThresh() const = 0;
CV_WRAP virtual void setPosThresh(int posThresh) = 0;
CV_WRAP virtual int getPosThresh() const = 0;
};
//! @} imgproc_shape
@ -4323,11 +4323,11 @@ CV_EXPORTS_W int rotatedRectangleIntersection( const RotatedRect& rect1, const R
/** @brief Creates a smart pointer to a cv::GeneralizedHoughBallard class and initializes it.
*/
CV_EXPORTS Ptr<GeneralizedHoughBallard> createGeneralizedHoughBallard();
CV_EXPORTS_W Ptr<GeneralizedHoughBallard> createGeneralizedHoughBallard();
/** @brief Creates a smart pointer to a cv::GeneralizedHoughGuil class and initializes it.
*/
CV_EXPORTS Ptr<GeneralizedHoughGuil> createGeneralizedHoughGuil();
CV_EXPORTS_W Ptr<GeneralizedHoughGuil> createGeneralizedHoughGuil();
//! @} imgproc_shape