Skip to content

ximgproc_StructuredEdgeDetection

Extended image processingclassOpenCV 5.0.0
import { ximgproc_StructuredEdgeDetection } from '@banou/opencv-wasm'

Use after await initOpenCV(). See the initialization and named imports guide.

ARGUMENTSConstructor or factory
CLASSximgproc_StructuredEdgeDetection
RETURN TYPEOwned native handle
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

Native object: release it with using or delete(). Factories can return null; check before calling methods. Inherits Algorithm.

Class implementing edge detection algorithm from [Dollar2013] :

Constructors and members

clone

Create another handle to the same native object. This retains the object without copying its pixels or algorithm state; dispose both handles separately.

clone(): this;
Returns

The this result.

detectEdges

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

See: Sobel, Canny
detectEdges(src: Mat, dst: Mat): void;
src

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

dst

Output destination, filled by the native operation. destination image (grayscale, float, in [0;1]) where edges are drawn

computeOrientation

The function computes orientation from edge image.

computeOrientation(src: Mat, dst: Mat): void;
src

edge image.

dst

Output destination, filled by the native operation. orientation image.

edgesNms

The function edgenms in edge image and suppress edges where edge is stronger in orthogonal direction.

edgesNms(edge_image: Mat, orientation_image: Mat, dst: Mat, r: number, s: number, m: number, isParallel: boolean): void;
5 available overloads
edgesNms(edge_image: Mat, orientation_image: Mat, dst: Mat): void;
edgesNms(edge_image: Mat, orientation_image: Mat, dst: Mat, r: number): void;
edgesNms(edge_image: Mat, orientation_image: Mat, dst: Mat, r: number, s: number): void;
edgesNms(edge_image: Mat, orientation_image: Mat, dst: Mat, r: number, s: number, m: number): void;
edgesNms(edge_image: Mat, orientation_image: Mat, dst: Mat, r: number, s: number, m: number, isParallel: boolean): void;
edge_image

edge image from detectEdges function.

orientation_image

orientation image from computeOrientation function.

dst

Output destination, filled by the native operation. suppressed image (grayscale, float, in [0;1])

r

radius for NMS suppression.

s

radius for boundary suppression.

m

multiplier for conservative suppression.

isParallel

enables/disables parallel computing.

These signatures describe this package. Upstream documentation can mention optional backends that are absent from this build. Check runtime compatibility before choosing a backend or file format.