You need to enable JavaScript to run this app.Extract Histogram - GammaCV
GammaCV Logo
DocsExamplesGitHub

Histogram

Description

Extract histogram for given image and parameters. Results in [1, histogramRange, 4] float matrix.

Params
tSrcTensorInput image
layers?numberNumber of layers for a parallel reduction (1 by default), impact the performance
min?numberMinimal value in image
max?numberMaximum value in image
step?numberStep between min and max values.
Example
gm.histogram(tSrc);
const op = gm.histogram(tSrc);
// ... init, run, read into tOut, see Get Started for details ...
tOut.get(0, 0, 0); // get n of entires for lowest value in red channel
tOut.get(0, tOut.shape[1] - 1, 4); // get n of entries for highest value in "alpha" channel