Class EdgeDrawing
- Namespace
- OpenCvSharp.XImgProc
- Assembly
- OpenCvSharp.dll
Class implementing the ED (EdgeDrawing), EDLines, EDPF, EDCircles and ColorED algorithms.
public class EdgeDrawing : Algorithm, IDisposable
- Inheritance
-
EdgeDrawing
- Implements
- Inherited Members
Methods
Create()
Creates a smart pointer to an EdgeDrawing object and initializes it.
public static EdgeDrawing Create()
Returns
- EdgeDrawing
EdgeDrawing instance
DetectEdges(InputArray)
Detects edges in a grayscale or color image and prepares them to detect lines and ellipses.
public virtual void DetectEdges(InputArray src)
Parameters
srcInputArray8-bit, single-channel (CV_8UC1) or color (CV_8UC3, CV_8UC4) input image.
DetectEllipses()
Detects circles and ellipses and returns them as a managed array. Call DetectEdges(InputArray) before calling this function.
public virtual Vec6d[] DetectEllipses()
Returns
- Vec6d[]
Vec6d array: center point and perimeter for circles; center point, axes and angle for ellipses.
DetectEllipses(OutputArray)
Detects circles and ellipses and writes them into an OutputArray. Call DetectEdges(InputArray) before calling this function.
public virtual void DetectEllipses(OutputArray ellipses)
Parameters
ellipsesOutputArrayOutput Vec6d array: center point and perimeter for circles; center point, axes and angle for ellipses.
DetectLines()
Detects lines and returns them as a managed array. Call DetectEdges(InputArray) before calling this function.
public virtual Vec4f[] DetectLines()
Returns
- Vec4f[]
Vec4f array: start point (x1,y1) and end point (x2,y2) of each line.
DetectLines(OutputArray)
Detects lines and writes them into an OutputArray. Call DetectEdges(InputArray) before calling this function.
public virtual void DetectLines(OutputArray lines)
Parameters
linesOutputArrayOutput Vec4f array: start point (x1,y1) and end point (x2,y2) of each line.
GetEdgeImage(OutputArray)
Returns the edge image prepared by DetectEdges(InputArray).
public virtual void GetEdgeImage(OutputArray dst)
Parameters
dstOutputArray8-bit, single-channel output image.
GetGradientImage(OutputArray)
Returns the gradient image prepared by DetectEdges(InputArray).
public virtual void GetGradientImage(OutputArray dst)
Parameters
dstOutputArray16-bit, single-channel output image.
GetParams()
Returns the current algorithm parameters.
public virtual EdgeDrawingParams GetParams()
Returns
GetSegmentIndicesOfLines()
Returns for each line found in DetectLines(OutputArray) its edge segment index in GetSegments().
public virtual int[] GetSegmentIndicesOfLines()
Returns
- int[]
Edge segment indices of detected lines.
GetSegments()
Returns detected edge segments. Call DetectEdges(InputArray) first.
public virtual Point[][] GetSegments()
Returns
- Point[][]
Jagged array of edge segment points.
SetParams(EdgeDrawingParams)
Sets algorithm parameters.
public virtual void SetParams(EdgeDrawingParams parameters)
Parameters
parametersEdgeDrawingParamsParameters to apply.