Histogram
Description
Extract histogram for given image and parameters. Results in [1, histogramRange, 4] float matrix.
Params
tSrc | Tensor | Input image |
layers? | number | Number of layers for a parallel reduction (1 by default), impact the performance |
min? | number | Minimal value in image |
max? | number | Maximum value in image |
step? | number | Step 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