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(CuviImage* srcImage,
CuviImage* dstApprox,
CuviImage* dstDetailX,
CuviImage* dstDetailY,
CuviImage* dstDetailXY,
CuviStream* stream = NULL);
|
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
Example
//Input Image
CuviImage *gimg = new CuviImage(size,depth,nChannels);
//Four output 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);
//Populate the GPU image with pixel data
gimg->upload(hostImg->imageData,hostImg->widthStep);
//compute one-level haar wavelet decomposition
cuvi::imageTransforms::haarFwd(gimg,a,x,y,xy);
|