Difference between revisions of "Function:FftShift"

From CUVI Wiki
 
(2 intermediate revisions by the same user not shown)
Line 35: Line 35:


===Image Type Support===
===Image Type Support===
 
{|
|style="font-size:75%;"|
{| class="wikitable"
{| class="wikitable"
|-
|-
Line 44: Line 45:
| 32f
| 32f
|}
|}
 
|}
===Sample===
 
 


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



Latest revision as of 18:26, 19 October 2022

Repositions the quadrants of the fft image, so that the zero frequency components of the fft are at the center of the image. This is useful for visualizing the Fourier transform.

Function

CuviStatus fftShift(const CuviImage& src,
                    CuviImage& dst,
                    const CuviStream& stream = CuviStream());

Parameters

Name Type Description
src const CuviImage& Input image
dst CuviImage& Output image with diagonal quadrants swapped
stream const CuviStream& GPU stream ID for execution

Image Type Support

Input Output
32f 32f

Example

//Creating GPU images
CuviImage input = cuvi:io::loadImage(path), fftImage, fftShifted;

	
//Computing the Fourier Transform
cuvi::imageTransforms::fft2(input,fftImage);

//Shift the fft
cuvi::imageTransforms::fftShift(fftImage, fftShifted);