[−][src]Trait opencv::prelude::FastLineDetector
@include samples/fld_lines.cpp
Required methods
pub fn as_raw_FastLineDetector(&self) -> *const c_void
[src]
pub fn as_raw_mut_FastLineDetector(&mut self) -> *mut c_void
[src]
Provided methods
pub fn detect(
&mut self,
_image: &dyn ToInputArray,
_lines: &mut dyn ToOutputArray
) -> Result<()>
[src]
&mut self,
_image: &dyn ToInputArray,
_lines: &mut dyn ToOutputArray
) -> Result<()>
@example fld_lines.cpp An example using the FastLineDetector
Finds lines in the input image. This is the output of the default parameters of the algorithm on the above shown image.
![image](https://docs.opencv.org/4.3.0/corridor_fld.jpg)
Parameters
- _image: A grayscale (CV_8UC1) input image. If only a roi needs to be
selected, use:
fld_ptr-\>detect(image(roi), lines, ...); lines += Scalar(roi.x, roi.y, roi.x, roi.y);
- _lines: A vector of Vec4f elements specifying the beginning and ending point of a line. Where Vec4f is (x1, y1, x2, y2), point 1 is the start, point 2 - end. Returned lines are directed so that the brighter side is on their left.
pub fn draw_segments(
&mut self,
_image: &mut dyn ToInputOutputArray,
lines: &dyn ToInputArray,
draw_arrow: bool
) -> Result<()>
[src]
&mut self,
_image: &mut dyn ToInputOutputArray,
lines: &dyn ToInputArray,
draw_arrow: bool
) -> Result<()>
Draws the line segments on a given image.
Parameters
- _image: The image, where the lines will be drawn. Should be bigger or equal to the image, where the lines were found.
- lines: A vector of the lines that needed to be drawn.
- draw_arrow: If true, arrow heads will be drawn.
C++ default parameters
- draw_arrow: false