Skip to content

ximgproc_thinning

Extended image processingfunctionOpenCV 5.0.0
import { ximgproc_thinning } from '@banou/opencv-wasm'

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

Applies a binary blob thinning operation, to achieve a skeletization of the input image.

The function transforms a binary blob image into a skeletized form using the technique of Zhang-Suen.

ximgproc_thinning(src: Mat, dst: Mat, thinningType: number): void;
2 available overloads
ximgproc_thinning(src: Mat, dst: Mat): void;
ximgproc_thinning(src: Mat, dst: Mat, thinningType: number): void;
src

Source 8-bit single-channel image, containing binary blobs, with blobs having 255 pixel values.

dst

Output destination, filled by the native operation. Destination image of the same size and the same type as src. The function can work in-place.

thinningType

Value that defines which thinning algorithm should be used. See cv::ximgproc::ThinningTypes

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.