Skip to content

ximgproc_EdgeDrawing

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

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

ARGUMENTSConstructor or factory
CLASSximgproc_EdgeDrawing
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 the ED (EdgeDrawing) [topal2012edge], EDLines [akinlar2011edlines], EDPF [akinlar2012edpf], EDCircles [akinlar2013edcircles] and ColorED [akinlar201782] algorithms.

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

Detects edges in a grayscale or color image and prepares them to detect lines and ellipses.

detectEdges(src: Mat): void;
src

8-bit, single-channel (CV_8UC1) or color (CV_8UC3, CV_8UC4) input image.

getEdgeImage

returns Edge Image prepared by detectEdges() function.

getEdgeImage(dst: Mat): void;
dst

Output destination, filled by the native operation. returns 8-bit, single-channel output image.

getGradientImage

returns Gradient Image prepared by detectEdges() function.

getGradientImage(dst: Mat): void;
dst

Output destination, filled by the native operation. returns 16-bit, single-channel output image.

getSegments

Returns std::vector<std::vector<Point>> of detected edge segments, see detectEdges()

getSegments(): PointVectorVector;
Returns

The PointVectorVector result. Release returned native handles with using or delete(), including handles nested in results.

getSegmentIndicesOfLines

Returns for each line found in detectLines() its edge segment index in getSegments()

getSegmentIndicesOfLines(): IntVector;
Returns

The IntVector result. Release returned native handles with using or delete(), including handles nested in results.

detectLines

Detects lines.

Note: you should call detectEdges() before calling this function.

detectLines(lines: Mat): void;
lines

Output destination, filled by the native operation. output Vec<4f> contains the start point and the end point of detected lines.

detectEllipses

Detects circles and ellipses.

Note: you should call detectEdges() before calling this function.

detectEllipses(ellipses: Mat): void;
ellipses

Output destination, filled by the native operation. output Vec<6d> contains center point and perimeter for circles, center point, axes and angle for ellipses.

setParams

sets parameters.

this function is meant to be used for parameter setting in other languages than c++ like python.
setParams(parameters: ximgproc_EdgeDrawing_Params): void;
parameters

Parameters of the algorithm

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.