gapi_equalizeHist
import { gapi_equalizeHist } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
ARGUMENTSsrc
FUNCTIONgapi_equalizeHist
RETURN TYPEGMat
Equalizes the histogram of a grayscale image.
//! gapi_feature
The function equalizes the histogram of the input image using the following algorithm:
- Calculate the histogram
Hfor src . - Normalize the histogram so that the sum of histogram bins is 255.
- Compute the integral of the histogram:
H'_i = \sum _{0 \le j < i} H(j)
- Transform the image using
H'as a look-up table:\texttt{dst}(x,y) = H'(\texttt{src}(x,y))
The algorithm normalizes the brightness and increases the contrast of the image.
Note: - The returned image is of the same size and type as input.
- Function textual ID is "org.opencv.imgproc.equalizeHist"
gapi_equalizeHist(src: GMat): GMat;srcSource 8-bit single channel image.
Returns
The GMat result. Release returned native handles with using or delete(), including handles nested in results.
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.