Skip to content

xphoto_applyChannelGains

xphotofunctionOpenCV 5.0.0
import { xphoto_applyChannelGains } from '@banou/opencv-wasm'

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

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

Implements an efficient fixed-point approximation for applying channel gains, which is the last step of multiple white balance algorithms.

xphoto_applyChannelGains(src: Mat, dst: Mat, gainB: number, gainG: number, gainR: number): void;
src

Input three-channel image in the BGR color space (either CV_8UC3 or CV_16UC3)

dst

Output destination, filled by the native operation. Output image of the same size and type as src.

gainB

gain for the B channel

gainG

gain for the G channel

gainR

gain for the R channel

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.