Skip to content

calcHist

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

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

this variant supports only uniform histograms.

ranges argument is either empty vector or a flattened vector of histSize.size()*2 elements (histSize.size() element pairs). The first and second elements of each pair specify the lower and upper boundaries.

calcHist(images: MatVector, channels: IntVector, mask: Mat, hist: Mat, histSize: IntVector, ranges: FloatVector, accumulate: boolean): void;
2 available overloads
calcHist(images: MatVector, channels: IntVector, mask: Mat, hist: Mat, histSize: IntVector, ranges: FloatVector): void;
calcHist(images: MatVector, channels: IntVector, mask: Mat, hist: Mat, histSize: IntVector, ranges: FloatVector, accumulate: boolean): void;
images

images argument (MatVector).

channels

channels argument (IntVector).

mask

mask argument (Mat).

hist

Output destination, filled by the native operation. hist argument (Mat).

histSize

hist size argument (IntVector).

ranges

ranges argument (FloatVector).

accumulate

accumulate argument (boolean).

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.