Class StructuredEdgeDetection
Class implementing edge detection algorithm from Piotr Dollar and C Lawrence Zitnick. Structured forests for fast edge detection. In Computer Vision (ICCV), 2013 IEEE International Conference on, pages 1841-1848. IEEE, 2013.
public class StructuredEdgeDetection : UnmanagedObject, IDisposable
- Inheritance
-
StructuredEdgeDetection
- Implements
- Inherited Members
Constructors
StructuredEdgeDetection(string, RFFeatureGetter)
Create an edge detection algorithm.
public StructuredEdgeDetection(string model, RFFeatureGetter howToGetFeatures)
Parameters
model
stringname of the file where the model is stored
howToGetFeatures
RFFeatureGetteroptional object inheriting from RFFeatureGetter. You need it only if you would like to train your own forest, pass NULL otherwise
Methods
ComputeOrientation(IInputArray, IOutputArray)
The function computes orientation from edge image.
public void ComputeOrientation(IInputArray src, IOutputArray dst)
Parameters
src
IInputArrayEdge image.
dst
IOutputArrayOrientation image.
DetectEdges(IInputArray, IOutputArray)
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 void DetectEdges(IInputArray src, IOutputArray dst)
Parameters
src
IInputArraysource image (RGB, float, in [0;1]) to detect edges
dst
IOutputArraydestination image (grayscale, float, in [0;1]) where edges are drawn
DisposeObject()
Release the unmanaged memory associated with this object.
protected override void DisposeObject()
EdgesNms(IInputArray, IInputArray, IOutputArray, int, int, float, bool)
The function edgenms in edge image and suppress edges where edge is stronger in orthogonal direction.
public void EdgesNms(IInputArray edgeImage, IInputArray orientationImage, IOutputArray dst, int r = 2, int s = 0, float m = 1, bool isParallel = true)
Parameters
edgeImage
IInputArrayedge image from DetectEdges function.
orientationImage
IInputArrayorientation image from ComputeOrientation function.
dst
IOutputArraySuppressed image (grayscale, float, in [0;1])
r
intRadius for NMS suppression.
s
intRadius for boundary suppression.
m
floatMultiplier for conservative suppression.
isParallel
boolEnables/disables parallel computing.