Function:HistEq

From CUVI Wiki
Revision as of 18:04, 26 April 2012 by Jawad (talk | contribs) (Created page with "__NOTOC__ Performs histogram equalization ===Function=== {| |style="font-size:150%;"| <syntaxhighlight lang="cpp"> CuviStatus histEq(CuviImage* srcImage, Cuv...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Performs histogram equalization

Function

CuviStatus histEq(CuviImage* srcImage,
                  CuviImage* dstImage,
                  CuviStream* stream = NULL);

Parameters

Name Type Description
srcImage CuviImage* Input Image
dstImage CuviImage* Equalized Image
stream CuviStream* GPU stream ID for execution

Image Type Support

Input Output
8uC1 8uC1

Sample

Error creating thumbnail: Unable to save thumbnail to destination
Input Image
Error creating thumbnail: Unable to save thumbnail to destination
Equalized Image


Example

//Input and output image containers on GPU
CuviImage* gimg = new CuviImage(size,img->depth,img->nChannels);
CuviImage* gout = new CuviImage(size,img->depth,img->nChannels);

//Populate image data on gpu
gimg->upload(img->imageData,img->widthStep);

//Histogram equalization
cuvi::colorOperations::histEq(gimg,gout);