Difference between revisions of "Function:HaarFwd"

From CUVI Wiki
 
(10 intermediate revisions by the same user not shown)
Line 50: Line 50:


===Image Type Support===
===Image Type Support===
 
{|
|style="font-size:75%;"|
{| class="wikitable"
{| class="wikitable"
|-
|-
Line 62: Line 63:
| 8uC3 x 4
| 8uC3 x 4
|}
|}
===Sample===
{|
|-
|[[File:Haar.jpg]]
|}
|}


 
====Sample====
[[File:Haarin.jpg|none|frame|Original Image]]
<br/>
[[File:HaarFwdApp.jpg|none|frame|Approx Component]]
<br/>
[[File:HaarFwdDetailX.jpg|none|frame|Detail X Component]]
<br/>
[[File:HaarFwdDetailY.jpg|none|frame|Detail Y Component]]
<br/>
[[File:HaarFwdDetailXY.jpg|none|frame|Detail XY Component]]


===Example===
===Example===
{|
{|
|style="font-size:150%;"|
|style="font-size:100%;"|
<syntaxhighlight lang="cpp">
<syntaxhighlight lang="cpp">



Latest revision as of 19:00, 19 October 2022

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

Error creating thumbnail: Unable to save thumbnail to destination
Original Image


Error creating thumbnail: Unable to save thumbnail to destination
Approx Component


Error creating thumbnail: Unable to save thumbnail to destination
Detail X Component


Error creating thumbnail: Unable to save thumbnail to destination
Detail Y Component


Error creating thumbnail: Unable to save thumbnail to destination
Detail XY Component

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);