@@ -99,73 +99,73 @@ Apart from fields inspired to KeyPoint class, KeyLines stores information about
99
99
original image and in octave it was extracted from, about line's length and number of pixels it
100
100
covers.
101
101
*/
102
- struct CV_EXPORTS KeyLine
102
+ struct CV_EXPORTS_W_SIMPLE KeyLine
103
103
{
104
104
public:
105
105
/* * orientation of the line */
106
- float angle;
106
+ CV_PROP_RW float angle;
107
107
108
108
/* * object ID, that can be used to cluster keylines by the line they represent */
109
- int class_id;
109
+ CV_PROP_RW int class_id;
110
110
111
111
/* * octave (pyramid layer), from which the keyline has been extracted */
112
- int octave;
112
+ CV_PROP_RW int octave;
113
113
114
114
/* * coordinates of the middlepoint */
115
- Point2f pt;
115
+ CV_PROP_RW Point2f pt;
116
116
117
117
/* * the response, by which the strongest keylines have been selected.
118
118
It's represented by the ratio between line's length and maximum between
119
119
image's width and height */
120
- float response;
120
+ CV_PROP_RW float response;
121
121
122
122
/* * minimum area containing line */
123
- float size;
123
+ CV_PROP_RW float size;
124
124
125
125
/* * lines's extremes in original image */
126
- float startPointX;
127
- float startPointY;
128
- float endPointX;
129
- float endPointY;
126
+ CV_PROP_RW float startPointX;
127
+ CV_PROP_RW float startPointY;
128
+ CV_PROP_RW float endPointX;
129
+ CV_PROP_RW float endPointY;
130
130
131
131
/* * line's extremes in image it was extracted from */
132
- float sPointInOctaveX ;
133
- float sPointInOctaveY ;
134
- float ePointInOctaveX;
135
- float ePointInOctaveY;
132
+ CV_PROP_RW float sPointInOctaveX ;
133
+ CV_PROP_RW float sPointInOctaveY ;
134
+ CV_PROP_RW float ePointInOctaveX;
135
+ CV_PROP_RW float ePointInOctaveY;
136
136
137
137
/* * the length of line */
138
- float lineLength;
138
+ CV_PROP_RW float lineLength;
139
139
140
140
/* * number of pixels covered by the line */
141
- int numOfPixels;
141
+ CV_PROP_RW int numOfPixels;
142
142
143
143
/* * Returns the start point of the line in the original image */
144
- Point2f getStartPoint () const
144
+ CV_WRAP Point2f getStartPoint () const
145
145
{
146
146
return Point2f (startPointX, startPointY);
147
147
}
148
148
149
149
/* * Returns the end point of the line in the original image */
150
- Point2f getEndPoint () const
150
+ CV_WRAP Point2f getEndPoint () const
151
151
{
152
152
return Point2f (endPointX, endPointY);
153
153
}
154
154
155
155
/* * Returns the start point of the line in the octave it was extracted from */
156
- Point2f getStartPointInOctave () const
156
+ CV_WRAP Point2f getStartPointInOctave () const
157
157
{
158
158
return Point2f (sPointInOctaveX , sPointInOctaveY );
159
159
}
160
160
161
161
/* * Returns the end point of the line in the octave it was extracted from */
162
- Point2f getEndPointInOctave () const
162
+ CV_WRAP Point2f getEndPointInOctave () const
163
163
{
164
164
return Point2f (ePointInOctaveX, ePointInOctaveY);
165
165
}
166
166
167
167
/* * constructor */
168
- KeyLine ()
168
+ CV_WRAP KeyLine ()
169
169
{
170
170
}
171
171
};
@@ -892,7 +892,7 @@ the one used in *BinaryDescriptor* class, data associated to a line's extremes i
892
892
in octave it was extracted from, coincide. KeyLine's field *class_id* is used as an index to
893
893
indicate the order of extraction of a line inside a single octave.
894
894
*/
895
- class CV_EXPORTS LSDDetector : public Algorithm
895
+ class CV_EXPORTS_W LSDDetector : public Algorithm
896
896
{
897
897
public:
898
898
@@ -905,7 +905,7 @@ LSDDetector()
905
905
906
906
/* * @brief Creates ad LSDDetector object, using smart pointers.
907
907
*/
908
- static Ptr<LSDDetector> createLSDDetector ();
908
+ CV_WRAP static Ptr<LSDDetector> createLSDDetector ();
909
909
910
910
/* * @brief Detect lines inside an image.
911
911
@@ -915,7 +915,7 @@ static Ptr<LSDDetector> createLSDDetector();
915
915
@param numOctaves number of octaves inside pyramid
916
916
@param mask mask matrix to detect only KeyLines of interest
917
917
*/
918
- void detect ( const Mat& image, CV_OUT std::vector<KeyLine>& keypoints, int scale, int numOctaves, const Mat& mask = Mat() );
918
+ CV_WRAP void detect ( const Mat& image, CV_OUT std::vector<KeyLine>& keypoints, int scale, int numOctaves, const Mat& mask = Mat() );
919
919
920
920
/* * @overload
921
921
@param images input images
@@ -924,7 +924,7 @@ void detect( const Mat& image, CV_OUT std::vector<KeyLine>& keypoints, int scale
924
924
@param numOctaves number of octaves inside pyramid
925
925
@param masks vector of mask matrices to detect only KeyLines of interest from each input image
926
926
*/
927
- void detect ( const std::vector<Mat>& images, std::vector<std::vector<KeyLine> >& keylines, int scale, int numOctaves,
927
+ CV_WRAP void detect ( const std::vector<Mat>& images, std::vector<std::vector<KeyLine> >& keylines, int scale, int numOctaves,
928
928
const std::vector<Mat>& masks = std::vector<Mat>() ) const ;
929
929
930
930
private:
0 commit comments