Difference between revisions of "Function:HaarFwd"
From CUVI Wiki
Line 5: | Line 5: | ||
|style="font-size:150%;"| | |style="font-size:150%;"| | ||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
CuviStatus haarFwd(CuviImage | CuviStatus haarFwd(const CuviImage& src, | ||
CuviImage | CuviImage& dstApprox, | ||
CuviImage | CuviImage& dstDetailX, | ||
CuviImage | CuviImage& dstDetailY, | ||
CuviImage | CuviImage& dstDetailXY, | ||
CuviStream | const CuviStream& stream = CuviStream()); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} | ||
Line 21: | Line 21: | ||
! Description | ! Description | ||
|- | |- | ||
| | | src | ||
| CuviImage | | const CuviImage& | ||
| Input image | | Input image | ||
|- | |- | ||
| dstApprox | | dstApprox | ||
| CuviImage | | CuviImage& | ||
| Output approximation image | | Output approximation image | ||
|- | |- | ||
| dstDetailX | | dstDetailX | ||
| CuviImage | | CuviImage& | ||
| Output horizontal detail image | | Output horizontal detail image | ||
|- | |- | ||
| dstDetailY | | dstDetailY | ||
| CuviImage | | CuviImage& | ||
| Output vertical detail image | | Output vertical detail image | ||
|- | |- | ||
| dstDetailXY | | dstDetailXY | ||
| CuviImage | | CuviImage& | ||
| Output diagonal detail image | | Output diagonal detail image | ||
|- | |- | ||
| stream | | stream | ||
| CuviStream | | const CuviStream& | ||
| GPU stream ID for execution | | GPU stream ID for execution | ||
Line 55: | Line 55: | ||
|- | |- | ||
| 8uC1 | | 8uC1 | ||
| | | 8uC1 x 4 | ||
|- | |||
| 8uC3 | |||
| 8uC3 x 4 | |||
|} | |} | ||
Line 72: | Line 75: | ||
//Input Image | //Input Image | ||
CuviImage | CuviImage gimg = cuvi::io::loadImage(path); | ||
//Four output images | //Four output images | ||
CuviImage | CuviImage a, x, y, xy; | ||
//compute one-level haar wavelet decomposition | //compute one-level haar wavelet decomposition |
Revision as of 20:07, 18 April 2013
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 |
---|---|---|
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
File:Haar.jpg |
Example
|