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
//A single color image
CuviImage *gimg = new CuviImage(_size,img->depth,img->nChannels);
//Three single channel images for storing output
CuviImage *gr = new CuviImage(_size,img->depth,1);
CuviImage *gg = new CuviImage(_size,img->depth,1);
CuviImage *gb = new CuviImage(_size,img->depth,1);
//Populate the GPU image with pixel data
gimg->upload(img->imageData,img->widthStep);
//Split into R, G and B channels
CuviStatus st = cuvi::colorOperations::channelSplit(gimg,gr,gg,gb);
|