Function:HaarFwd

From CUVI Wiki
Jump to: navigation, search

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

CuviStatus haarFwd(const CuviImage& src,
                   CuviImage& dstApprox,
                   CuviImage& dstDetailX,
                   CuviImage& dstDetailY,
                   CuviImage& dstDetailXY,
                   const CuviStream& stream = CuviStream());

Parameters

Name Type Description
src const 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 const CuviStream& GPU stream ID for execution

Image Type Support

Input Output
8uC1 8uC1 x 4
8uC3 8uC3 x 4

Sample

Haar.jpg


Example

//Input Image
CuviImage gimg = cuvi::io::loadImage(path);
 
//Four output images
CuviImage a, x, y, xy;
 
//compute one-level haar wavelet decomposition
cuvi::imageTransforms::haarFwd(gimg,a,x,y,xy);