Skip to content

applyColorMap

Image processingfunctionOpenCV 5.0.0
import { applyColorMap } from '@banou/opencv-wasm'

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

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

example: samples/cpp/snippets/falsecolor.cpp An example using applyColorMap function Applies a GNU Octave/MATLAB equivalent colormap on a given image.

applyColorMap(src: Mat, dst: Mat, colormap: number): void;
src

The source image, grayscale or colored of type CV_8UC1 or CV_8UC3. If CV_8UC3, then the CV_8UC1 image is generated internally using cv::COLOR_BGR2GRAY.

dst

Output destination, filled by the native operation. The result is the colormapped source image. Note: Mat::create is called on dst.

colormap

The colormap to apply, see #ColormapTypes

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.