Skip to content

decolor

Computational photographyfunctionOpenCV 5.0.0
import { decolor } from '@banou/opencv-wasm'

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

ARGUMENTSsrc, grayscale, color_boost
FUNCTIONdecolor
RETURN TYPEvoid
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

photo_hdr

Transforms a color image to a grayscale image. It is a basic tool in digital printing, stylized black-and-white photograph rendering, and in many single channel image processing applications [CL12] .

decolor(src: Mat, grayscale: Mat, color_boost: Mat): void;
src

Input 8-bit 3-channel image.

grayscale

Output destination, filled by the native operation. Output 8-bit 1-channel image.

color_boost

Output destination, filled by the native operation. Output 8-bit 3-channel image.

This function is to be applied on color images.

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.