ComplexFft
Computes the Fast Fourier Transform of an image.
Access to parameter description
For an introduction: see section Frequency Domain.
This algorithm computes the FFT of an image. The result is two floating point images, respectively: the real and imaginary parts of the transform.
Remarks
Access to parameter description
For an introduction: see section Frequency Domain.
This algorithm computes the FFT of an image. The result is two floating point images, respectively: the real and imaginary parts of the transform.
Remarks
- To compute the module and phase of the FFT, the CartesianToPolar2d algorithm can be used.
- The output images are centered in the upper left corner.
- The SwapQuadrants algorithm can be used to move low frequencies in the image center.
- The ComplexCenteredFft algorithm can be used to directly get a centered FFT.
Function Syntax
This function returns a ComplexFftOutput structure containing outputRealImage and outputImaginaryImage.
// Output structure of the complexFft function. struct ComplexFftOutput { /// The output real part image. Its dimensions are forced to the same values as the input. Its data type is forced to floating point. std::shared_ptr< iolink::ImageView > outputRealImage; /// The output imaginary part image. Its dimensions are forced to the same values as the input. Its data type is forced to floating point. std::shared_ptr< iolink::ImageView > outputImaginaryImage; }; // Function prototype
ComplexFftOutput complexFft( std::shared_ptr< iolink::ImageView > inputImage, std::shared_ptr< iolink::ImageView > outputRealImage = nullptr, std::shared_ptr< iolink::ImageView > outputImaginaryImage = nullptr );
Class Syntax
Parameters
Parameter Name | Description | Type | Supported Values | Default Value | |
---|---|---|---|---|---|
![]() |
inputImage |
The input image. | Image | Binary, Label, Grayscale or Multispectral | nullptr |
![]() |
outputRealImage |
The output real part image. Its dimensions are forced to the same values as the input. Its data type is forced to floating point. | Image | nullptr | |
![]() |
outputImaginaryImage |
The output imaginary part image. Its dimensions are forced to the same values as the input. Its data type is forced to floating point. | Image | nullptr |
Object Examples
auto polystyrene_float = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "polystyrene_float.vip" ); ComplexFft complexFftAlgo; complexFftAlgo.setInputImage( polystyrene_float ); complexFftAlgo.execute(); std::cout << "outputRealImage:" << complexFftAlgo.outputRealImage()->toString(); std::cout << "outputImaginaryImage:" << complexFftAlgo.outputImaginaryImage()->toString();
Function Examples
auto polystyrene_float = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "polystyrene_float.vip" ); auto result = complexFft( polystyrene_float ); std::cout << "outputRealImage:" << result.outputRealImage->toString(); std::cout << "outputImaginaryImage:" << result.outputImaginaryImage->toString();