Table of Contents

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

p nint

Methods

ComputeOrientation(InputArray, OutputArray)

The function computes orientation from edge image.

public virtual void ComputeOrientation(InputArray src, OutputArray dst)

Parameters

src InputArray

edge image.

dst OutputArray

orientation image.

Create(string, RFFeatureGetter?)

Creates a StructuredEdgeDetection

public static StructuredEdgeDetection Create(string model, RFFeatureGetter? howToGetFeatures = null)

Parameters

model string

name of the file where the model is stored

howToGetFeatures RFFeatureGetter

optional object inheriting from RFFeatureGetter. You need it only if you would like to train your own forest, pass null otherwise

Returns

StructuredEdgeDetection

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

src InputArray

source image (RGB, float, in [0;1]) to detect edges

dst OutputArray

destination 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

edgeImage InputArray

edge image from detectEdges function.

orientationImage InputArray

orientation image from computeOrientation function.

dst OutputArray

suppressed image (grayscale, float, in [0;1])

r int

radius for NMS suppression.

s int

radius for boundary suppression.

m float

multiplier for conservative suppression.

isParallel bool

enables/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

edgeMap InputArray

edge image.

orientationMap InputArray

orientation map.

boxes Rect[]

proposal boxes.