Skip to content

createTonemap

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

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

Creates simple linear mapper with gamma correction

createTonemap(gamma: number): Tonemap | null;
2 available overloads
createTonemap(): Tonemap | null;
createTonemap(gamma: number): Tonemap | null;
gamma

positive value for gamma correction. Gamma value of 1.0 implies no correction, gamma equal to 2.2f is suitable for most displays. Generally gamma > 1 brightens the image and gamma < 1 darkens it.

Returns

The Tonemap | null result.

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.