Difference between revisions of "Function:HaarFwd"
From CUVI Wiki
Line 71: | Line 71: | ||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
// | //Input Image | ||
CuviImage *gimg = new CuviImage( | CuviImage *gimg = new CuviImage(size,img->depth,img->nChannels); | ||
// | //Four output images | ||
CuviImage * | CuviImage *a = new CuviImage(sizeHalf,32,1); | ||
CuviImage * | CuviImage *x = new CuviImage(sizeHalf,32,1); | ||
CuviImage * | CuviImage *y = new CuviImage(sizeHalf,32,1); | ||
CuviImage *xy = new CuviImage(sizeHalf,32,1); | |||
//Populate the GPU image with pixel data | //Populate the GPU image with pixel data | ||
gimg->upload(img->imageData,img->widthStep); | gimg->upload(img->imageData,img->widthStep); | ||
// | //compute one-level haar wavelet decomposition | ||
cuvi::imageTransforms::haarFwd(gimg,a,x,y,xy); | |||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} |
Revision as of 13:11, 8 May 2012
Performs one-level wavelet decomposition of an image using haar basis. The four resultant images are half the width and half the height of the original image
Function
|
Parameters
Name | Type | Description |
---|---|---|
srcImage | CuviImage* | Input image |
dstApprox | CuviImage* | Output approximation image |
dstDetailX | CuviImage* | Output horizontal detail image |
dstDetailY | CuviImage* | Output vertical detail image |
dstDetailXY | CuviImage* | Output diagonal detail image |
stream | CuviStream* | GPU stream ID for execution |
Image Type Support
Input | Output |
---|---|
8uC1 | 32fC1 x 4 |
Sample
File:Haar.jpg |
Example
|