Function:CalcHist

From CUVI Wiki
Revision as of 12:59, 13 June 2014 by Ghazanfar (talk | contribs) (Created page with "__NOTOC__ Computes the histogram of input image. ===Function=== {| |style="font-size:150%;"| <syntaxhighlight lang="cpp"> CuviStatus calcHist(const CuviImage& src, ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Computes the histogram of input image.

Function

CuviStatus calcHist(const CuviImage& src, 
                    CuviHistogram& hist, 
                    const CuviStream& stream = CuviStream());

Parameters

Name Type Description
src const CuviImage& Input Image
hist CuviHistogram& Computed histogram of input image
stream const CuviStream& GPU stream ID for execution

Image Type Support

Input Output
8uC1 CuviHistogram
8uC3 CuviHistogram

Sample

Example

CuviImage input = cuvi::io::loadImage(path);

//Create histogram according to image type
CuviHistogram hist(input.type());

//Calculate the histogram
cuvi::imageStatistics::calcHist(input, hist);