Skip to content

intensity_transform_contrastStretching

intensity_transformfunctionOpenCV 5.0.0
import { intensity_transform_contrastStretching } from '@banou/opencv-wasm'

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

ARGUMENTSinput, output, r1, s1
FUNCTIONintensity_transform_contrastStretching
RETURN TYPEvoid
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

Given an input bgr or grayscale image, apply linear contrast stretching on domain [0, 255] and return the resulting image.

intensity_transform_contrastStretching(input: Mat, output: Mat, r1: number, s1: number, r2: number, s2: number): void;
input

input bgr or grayscale image.

output

resulting image of contrast stretching.

r1

x coordinate of first point (r1, s1) in the transformation function.

s1

y coordinate of first point (r1, s1) in the transformation function.

r2

x coordinate of second point (r2, s2) in the transformation function.

s2

y coordinate of second point (r2, s2) in the transformation function.

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.