Canny1
import { Canny1 } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Finds edges in an image using the Canny algorithm with custom image gradient.
Canny1(dx: Mat, dy: Mat, edges: Mat, threshold1: number, threshold2: number, L2gradient: boolean): void;2 available overloads
Canny1(dx: Mat, dy: Mat, edges: Mat, threshold1: number, threshold2: number): void;Canny1(dx: Mat, dy: Mat, edges: Mat, threshold1: number, threshold2: number, L2gradient: boolean): void;dx16-bit x derivative of input image (CV_16SC1 or CV_16SC3).
dy16-bit y derivative of input image (same type as dx).
edgesOutput destination, filled by the native operation. output edge map; single channels 8-bit image, which has the same size as image .
threshold1first threshold for the hysteresis procedure.
threshold2second threshold for the hysteresis procedure.
L2gradienta flag, indicating whether a more accurate
L_2norm=\sqrt{(dI/dx)^2 + (dI/dy)^2}should be used to calculate the image gradient magnitude ( L2gradient=true ), or whether the defaultL_1norm=|dI/dx|+|dI/dy|is enough ( L2gradient=false ).
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.