---------------------------------
Draws the line segments on a given image.
-.. ocv:function:: void LineSegmentDetector::drawSegments(InputOutputArray _image, const InputArray lines)
+.. ocv:function:: void LineSegmentDetector::drawSegments(InputOutputArray _image, InputArray lines)
:param image: The image, where the liens will be drawn. Should be bigger or equal to the image, where the lines were found.
------------------------------------
Draws two groups of lines in blue and red, counting the non overlapping (mismatching) pixels.
-.. ocv:function:: int LineSegmentDetector::compareSegments(const Size& size, const InputArray lines1, const InputArray lines2, InputOutputArray _image = noArray())
+.. ocv:function:: int LineSegmentDetector::compareSegments(const Size& size, InputArray lines1, InputArray lines2, InputOutputArray _image = noArray())
:param size: The size of the image, where lines1 and lines2 were found.
* Should have the size of the image, where the lines were found
* @param lines The lines that need to be drawn
*/
- virtual void drawSegments(InputOutputArray _image, const InputArray lines) = 0;
+ virtual void drawSegments(InputOutputArray _image, InputArray lines) = 0;
/**
* Draw both vectors on the image canvas. Uses blue for lines 1 and red for lines 2.
* Should have the size of the image, where the lines were found
* @return The number of mismatching pixels between lines1 and lines2.
*/
- virtual int compareSegments(const Size& size, const InputArray lines1, const InputArray lines2, InputOutputArray _image = noArray()) = 0;
+ virtual int compareSegments(const Size& size, InputArray lines1, InputArray lines2, InputOutputArray _image = noArray()) = 0;
virtual ~LineSegmentDetector() {};
};
* Should have the size of the image, where the lines were found
* @param lines The lines that need to be drawn
*/
- void drawSegments(InputOutputArray _image, const InputArray lines);
+ void drawSegments(InputOutputArray _image, InputArray lines);
/**
* Draw both vectors on the image canvas. Uses blue for lines 1 and red for lines 2.
* Should have the size of the image, where the lines were found
* @return The number of mismatching pixels between lines1 and lines2.
*/
- int compareSegments(const Size& size, const InputArray lines1, const InputArray lines2, InputOutputArray _image = noArray());
+ int compareSegments(const Size& size, InputArray lines1, InputArray lines2, InputOutputArray _image = noArray());
private:
Mat image;
* @param rec Return: The generated rectangle.
*/
void region2rect(const std::vector<RegionPoint>& reg, const int reg_size, const double reg_angle,
- const double prec, const double p, rect& rec) const;
+ const double prec, const double p, rect& rec) const;
/**
* Compute region's angle as the principal inertia axis of the region.
_n_bins > 0);
}
-void LineSegmentDetectorImpl::detect(const InputArray _image, OutputArray _lines,
+void LineSegmentDetectorImpl::detect(InputArray _image, OutputArray _lines,
OutputArray _width, OutputArray _prec, OutputArray _nfa)
{
Mat_<double> img = _image.getMat();
}
-void LineSegmentDetectorImpl::drawSegments(InputOutputArray _image, const InputArray lines)
+void LineSegmentDetectorImpl::drawSegments(InputOutputArray _image, InputArray lines)
{
CV_Assert(!_image.empty() && (_image.channels() == 1 || _image.channels() == 3));
}
-int LineSegmentDetectorImpl::compareSegments(const Size& size, const InputArray lines1, const InputArray lines2, InputOutputArray _image)
+int LineSegmentDetectorImpl::compareSegments(const Size& size, InputArray lines1, InputArray lines2, InputOutputArray _image)
{
Size sz = size;
if (_image.needed() && _image.size() != size) sz = _image.size();