Class StructuredEdgeDetection
- Namespace
- OpenCvSharp.XImgProc
- Assembly
- OpenCvSharp.dll
Class implementing edge detection algorithm from @cite Dollar2013 :
public class StructuredEdgeDetection : Algorithm, IDisposable, ICvPtrHolder
- Inheritance
-
StructuredEdgeDetection
- Implements
- Inherited Members
Constructors
StructuredEdgeDetection(nint)
Creates instance by raw pointer
protected StructuredEdgeDetection(nint p)
Parameters
pnint
Methods
ComputeOrientation(InputArray, OutputArray)
The function computes orientation from edge image.
public virtual void ComputeOrientation(InputArray src, OutputArray dst)
Parameters
srcInputArrayedge image.
dstOutputArrayorientation image.
Create(string, RFFeatureGetter?)
Creates a StructuredEdgeDetection
public static StructuredEdgeDetection Create(string model, RFFeatureGetter? howToGetFeatures = null)
Parameters
modelstringname of the file where the model is stored
howToGetFeaturesRFFeatureGetteroptional object inheriting from RFFeatureGetter. You need it only if you would like to train your own forest, pass null otherwise
Returns
DetectEdges(InputArray, OutputArray)
The function detects edges in src and draw them to dst. The algorithm underlies this function is much more robust to texture presence, than common approaches, e.g.Sobel
public virtual void DetectEdges(InputArray src, OutputArray dst)
Parameters
srcInputArraysource image (RGB, float, in [0;1]) to detect edges
dstOutputArraydestination image (grayscale, float, in [0;1]) where edges are drawn
DisposeManaged()
Releases managed resources
protected override void DisposeManaged()
EdgesNms(InputArray, InputArray, OutputArray, int, int, float, bool)
The function edgenms in edge image and suppress edges where edge is stronger in orthogonal direction.
public virtual void EdgesNms(InputArray edgeImage, InputArray orientationImage, OutputArray dst, int r = 2, int s = 0, float m = 1, bool isParallel = true)
Parameters
edgeImageInputArrayedge image from detectEdges function.
orientationImageInputArrayorientation image from computeOrientation function.
dstOutputArraysuppressed image (grayscale, float, in [0;1])
rintradius for NMS suppression.
sintradius for boundary suppression.
mfloatmultiplier for conservative suppression.
isParallelboolenables/disables parallel computing.
GetBoundingBoxes(InputArray, InputArray, out Rect[])
Returns array containing proposal boxes.
public virtual void GetBoundingBoxes(InputArray edgeMap, InputArray orientationMap, out Rect[] boxes)
Parameters
edgeMapInputArrayedge image.
orientationMapInputArrayorientation map.
boxesRect[]proposal boxes.