Function:HaarInv

From CUVI Wiki
Revision as of 13:16, 8 May 2012 by Jawad (talk | contribs) (Created page with "__NOTOC__ Performs one-level haar wavelet reconstruction of an image ===Function=== {| |style="font-size:150%;"| <syntaxhighlight lang="cpp"> CuviStatus haarInv(CuviImage* src...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Performs one-level haar wavelet reconstruction of an image

Function

CuviStatus haarInv(CuviImage* srcApprox,
                   CuviImage* srcDetailX,
                   CuviImage* srcDetailY,
                   CuviImage* srcDetailXY,
                   CuviImage* dstImage,
                   CuviStream* stream = NULL);

Parameters

Name Type Description
srcApprox CuviImage* Input approximation image
srcDetailX CuviImage* Input horizontal detail image
srcDetailY CuviImage* Input vertical detail image
srcDetailXY CuviImage* Input diagonal detail image
dstImage CuviImage* Reconstructed image
stream CuviStream* GPU stream ID for execution

Image Type Support

Input Output
32fC1 x 4 8uC1

Sample

File:Haar.jpg


Example

//Four input images
CuviImage *a = new CuviImage(sizeHalf,32,1);
CuviImage *x = new CuviImage(sizeHalf,32,1);
CuviImage *y = new CuviImage(sizeHalf,32,1);
CuviImage *xy = new CuviImage(sizeHalf,32,1);

//Destination Image
CuviImage *gout = new CuviImage(size,depth,nChannels);

//Populate the input GPU images with pixel data
a->upload(hostImgA->imageData,hostImgA->widthStep);
x->upload(hostImgX->imageData,hostImgX->widthStep);
y->upload(hostImgY->imageData,hostImgY->widthStep);
xy->upload(hostImgXY->imageData,hostImgXY->widthStep);

//Performs one-level haar wavelet reconstruction of an image
cuvi::imageTransforms::haarInv(a,x,y,xy,gout);