@@ -41,35 +41,72 @@ class CV_EXPORTS_W EdgeDrawing : public Algorithm
41
41
LSD = 3
42
42
};
43
43
44
+ struct CV_EXPORTS_W_SIMPLE Params
45
+ {
46
+ CV_WRAP Params ();
47
+ // ! Parameter Free mode will be activated when this value is true.
48
+ CV_PROP_RW bool PFmode;
49
+ // ! indicates the operator used for gradient calculation.The following operation flags are available(cv::ximgproc::EdgeDrawing::GradientOperator)
50
+ CV_PROP_RW int EdgeDetectionOperator;
51
+ // ! threshold value used to create gradient image.
52
+ CV_PROP_RW int GradientThresholdValue;
53
+ // ! threshold value used to create gradient image.
54
+ CV_PROP_RW int AnchorThresholdValue;
55
+ CV_PROP_RW int ScanInterval;
56
+ // ! minimun connected pixels length processed to create an edge segment.
57
+ CV_PROP_RW int MinPathLength;
58
+ // ! sigma value for internal GaussianBlur() function.
59
+ CV_PROP_RW float Sigma;
60
+ CV_PROP_RW bool SumFlag;
61
+ // ! when this value is true NFA (Number of False Alarms) algorithm will be used for line and ellipse validation.
62
+ CV_PROP_RW bool NFAValidation;
63
+ // ! minimun line length to detect.
64
+ CV_PROP_RW int MinLineLength;
65
+ CV_PROP_RW double MaxDistanceBetweenTwoLines;
66
+ CV_PROP_RW double LineFitErrorThreshold;
67
+ CV_PROP_RW double MaxErrorThreshold;
68
+
69
+ void read (const FileNode& fn);
70
+ void write (FileStorage& fs) const ;
71
+ };
72
+
73
+ /* * @brief Detects edges and prepares them to detect lines and ellipses.
74
+
75
+ @param src input image
76
+ */
44
77
CV_WRAP virtual void detectEdges (InputArray src) = 0;
45
78
CV_WRAP virtual void getEdgeImage (OutputArray dst) = 0;
46
79
CV_WRAP virtual void getGradientImage (OutputArray dst) = 0;
47
80
48
81
CV_WRAP virtual std::vector<std::vector<Point > > getSegments () = 0;
49
82
50
- CV_WRAP virtual void detectLines (OutputArray lines, bool validate = true ,
51
- int MinLineLength = -1 , double LineError = 1.0 ,
52
- double MaxDistanceBetweenTwoLines = 6.0 , double MaxError = 1.3 ) = 0;
53
- CV_WRAP virtual void detectEllipses (OutputArray ellipses, bool validate = true ) = 0;
83
+ /* * @brief Detects lines.
84
+
85
+ @param lines output Vec<4f> contains start point and end point of detected lines.
86
+ @note you should call detectEdges() method before call this.
87
+ */
88
+ CV_WRAP virtual void detectLines (OutputArray lines) = 0;
89
+
90
+ /* * @brief Detects circles and ellipses.
54
91
92
+ @param ellipses output Vec<6d> contains center point and perimeter for circles.
93
+ @note you should call detectEdges() method before call this.
94
+ */
95
+ CV_WRAP virtual void detectEllipses (OutputArray ellipses) = 0;
96
+
97
+ CV_WRAP Params params;
98
+
99
+ /* * @brief sets parameters.
100
+
101
+ this function is meant to be used for parameter setting in other languages than c++.
102
+ */
103
+ CV_WRAP void setParams (EdgeDrawing::Params parameters);
55
104
virtual ~EdgeDrawing () { }
56
105
};
57
106
58
107
/* * @brief Creates a smart pointer to a EdgeDrawing object and initializes it
59
-
60
- @param EdgeDetectionOperator The following operation flags are available (cv::ximgproc::EdgeDrawing::GradientOperator)
61
- @param GradientThresholdValue threshold value used to create gradient image. if this value is 0 then
62
- parameter free (EDPF) used internally.
63
- @param AnchorThresholdValue threshold value used to find anchor points.
64
- @param ScanningInterval
65
- @param MinPathLength Segments shorter than this value will be discarded.
66
- @param Sigma sigma value used internal GaussianBlur() function.
67
- @param SumFlag
68
108
*/
69
- CV_EXPORTS_W Ptr <EdgeDrawing> createEdgeDrawing (int EdgeDetectionOperator = EdgeDrawing::SOBEL,
70
- int GradientThresholdValue = 20 , int AnchorThresholdValue = 0 , int ScanningInterval = 1 ,
71
- int MinPathLength = 10 , double Sigma = 1.0 , bool SumFlag = true );
72
-
109
+ CV_EXPORTS_W Ptr <EdgeDrawing> createEdgeDrawing ();
73
110
// ! @}
74
111
75
112
}
0 commit comments