C# Класс OpenCvSharp.LineSegmentDetector

Line segment detector class
Наследование: Algorithm
Показать файл Открыть проект

Открытые методы

Метод Описание
CompareSegments ( Size size, InputArray lines1, InputArray lines2, OpenCvSharp.InputOutputArray image = null ) : int

Draws two groups of lines in blue and red, counting the non overlapping (mismatching) pixels.

Create ( LineSegmentDetectorModes refine = LineSegmentDetectorModes.RefineNone, double scale = 0.8, double sigmaScale = 0.6, double quant = 2.0, double angTh = 22.5, double logEps, double densityTh = 0.7, int nBins = 1024 ) : LineSegmentDetector

Creates a smart pointer to a LineSegmentDetector object and initializes it.

Detect ( InputArray image, OutputArray lines, OutputArray width = null, OutputArray prec = null, OutputArray nfa = null ) : void

Finds lines in the input image. This is the output of the default parameters of the algorithm on the above shown image.

Detect ( InputArray image, Vec4f &lines, double &width, double &prec, double &nfa ) : void

Finds lines in the input image. This is the output of the default parameters of the algorithm on the above shown image.

DrawSegments ( OpenCvSharp.InputOutputArray image, InputArray lines ) : void

Draws the line segments on a given image.

Защищенные методы

Метод Описание
Dispose ( bool disposing ) : void

Releases the resources

LineSegmentDetector ( IntPtr p ) : System

Описание методов

CompareSegments() публичный Метод

Draws two groups of lines in blue and red, counting the non overlapping (mismatching) pixels.
public CompareSegments ( Size size, InputArray lines1, InputArray lines2, OpenCvSharp.InputOutputArray image = null ) : int
size Size The size of the image, where lines1 and lines2 were found.
lines1 InputArray The first group of lines that needs to be drawn. It is visualized in blue color.
lines2 InputArray The second group of lines. They visualized in red color.
image OpenCvSharp.InputOutputArray Optional image, where the lines will be drawn. /// The image should be color(3-channel) in order for lines1 and lines2 to be drawn /// in the above mentioned colors.
Результат int

Create() публичный статический Метод

Creates a smart pointer to a LineSegmentDetector object and initializes it.
public static Create ( LineSegmentDetectorModes refine = LineSegmentDetectorModes.RefineNone, double scale = 0.8, double sigmaScale = 0.6, double quant = 2.0, double angTh = 22.5, double logEps, double densityTh = 0.7, int nBins = 1024 ) : LineSegmentDetector
refine LineSegmentDetectorModes The way found lines will be refined, see cv::LineSegmentDetectorModes
scale double The scale of the image that will be used to find the lines. Range (0..1].
sigmaScale double Sigma for Gaussian filter. It is computed as sigma = _sigma_scale/_scale.
quant double Bound to the quantization error on the gradient norm.
angTh double Gradient angle tolerance in degrees.
logEps double Detection threshold: -log10(NFA) \> log_eps. /// Used only when advancent refinement is chosen.
densityTh double Minimal density of aligned region points in the enclosing rectangle.
nBins int Number of bins in pseudo-ordering of gradient modulus.
Результат LineSegmentDetector

Detect() публичный Метод

Finds lines in the input image. This is the output of the default parameters of the algorithm on the above shown image.
public Detect ( InputArray image, OutputArray lines, OutputArray width = null, OutputArray prec = null, OutputArray nfa = null ) : void
image InputArray A grayscale (CV_8UC1) input image.
lines OutputArray A vector of Vec4i or Vec4f elements specifying the beginning and ending point of a line. /// Where Vec4i/Vec4f is (x1, y1, x2, y2), point 1 is the start, point 2 - end. Returned lines are strictly oriented depending on the gradient.
width OutputArray Vector of widths of the regions, where the lines are found. E.g. Width of line.
prec OutputArray Vector of precisions with which the lines are found.
nfa OutputArray Vector containing number of false alarms in the line region, /// with precision of 10%. The bigger the value, logarithmically better the detection.
Результат void

Detect() публичный Метод

Finds lines in the input image. This is the output of the default parameters of the algorithm on the above shown image.
public Detect ( InputArray image, Vec4f &lines, double &width, double &prec, double &nfa ) : void
image InputArray A grayscale (CV_8UC1) input image.
lines Vec4f A vector of Vec4i or Vec4f elements specifying the beginning and ending point of a line. /// Where Vec4i/Vec4f is (x1, y1, x2, y2), point 1 is the start, point 2 - end. Returned lines are strictly oriented depending on the gradient.
width double Vector of widths of the regions, where the lines are found. E.g. Width of line.
prec double Vector of precisions with which the lines are found.
nfa double Vector containing number of false alarms in the line region, /// with precision of 10%. The bigger the value, logarithmically better the detection.
Результат void

Dispose() защищенный Метод

Releases the resources
protected Dispose ( bool disposing ) : void
disposing bool /// If disposing equals true, the method has been called directly or indirectly by a user's code. Managed and unmanaged resources can be disposed. /// If false, the method has been called by the runtime from inside the finalizer and you should not reference other objects. Only unmanaged resources can be disposed. ///
Результат void

DrawSegments() публичный Метод

Draws the line segments on a given image.
public DrawSegments ( OpenCvSharp.InputOutputArray image, InputArray lines ) : void
image OpenCvSharp.InputOutputArray The image, where the liens will be drawn. /// Should be bigger or equal to the image, where the lines were found.
lines InputArray A vector of the lines that needed to be drawn.
Результат void

LineSegmentDetector() защищенный Метод

protected LineSegmentDetector ( IntPtr p ) : System
p System.IntPtr
Результат System