ComplexFftInverse
Computes the Fast Fourier inverse Transform of an image.
Access to parameter description
For an introduction: see section Frequency Domain.
This algorithm computes the inverse FFT of an image. The result is two floating point images, respectively the real and imaginary parts of the complex inverse Fourier Transform.
Remarks
Access to parameter description
For an introduction: see section Frequency Domain.
This algorithm computes the inverse FFT of an image. The result is two floating point images, respectively the real and imaginary parts of the complex inverse Fourier Transform.
Remarks
- A classical operation is to first filter the spectrum of an image (especially to suppress high frequencies usually associated with noise), and then reconstruct the input image using ComplexFftInverse with the filtered spectrum and unchanged phase as input images.
- Images are centered in the upper left corner. The ComplexCenteredFft algorithm can be used to directly get a centered FFT.
Function Syntax
This function returns a ComplexFftInverseOutput structure containing outputRealImage and outputImaginaryImage.
// Output structure of the complexFftInverse function. struct ComplexFftInverseOutput { /// 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
ComplexFftInverseOutput complexFftInverse( std::shared_ptr< iolink::ImageView > inputRealImage, std::shared_ptr< iolink::ImageView > inputImaginaryImage, std::shared_ptr< iolink::ImageView > outputRealImage = nullptr, std::shared_ptr< iolink::ImageView > outputImaginaryImage = nullptr );
This function returns a tuple containing output_real_image and output_imaginary_image.
// Function prototype. complex_fft_inverse(input_real_image: idt.ImageType, input_imaginary_image: idt.ImageType, output_real_image: idt.ImageType = None, output_imaginary_image: idt.ImageType = None) -> Tuple[idt.ImageType, idt.ImageType]
This function returns a ComplexFftInverseOutput structure containing outputRealImage and outputImaginaryImage.
/// Output structure of the ComplexFftInverse function. public struct ComplexFftInverseOutput { /// /// The output real part image. Its dimensions are forced to the same values as the input. Its data type is forced to floating point. /// public 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. /// public IOLink.ImageView outputImaginaryImage; }; // Function prototype. public static ComplexFftInverseOutput ComplexFftInverse( IOLink.ImageView inputRealImage, IOLink.ImageView inputImaginaryImage, IOLink.ImageView outputRealImage = null, IOLink.ImageView outputImaginaryImage = null );
Class Syntax
Parameters
Parameter Name | Description | Type | Supported Values | Default Value | |
---|---|---|---|---|---|
inputRealImage |
The real part input image. It must be a floating point image. | Image | Grayscale or Multispectral | nullptr | |
inputImaginaryImage |
The imaginary part input image. This image must have same dimensions and data type as the real input image. | Image | 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 |
Parameter Name | Description | Type | Supported Values | Default Value | |
---|---|---|---|---|---|
input_real_image |
The real part input image. It must be a floating point image. | image | Grayscale or Multispectral | None | |
input_imaginary_image |
The imaginary part input image. This image must have same dimensions and data type as the real input image. | image | Grayscale or Multispectral | None | |
output_real_image |
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 | None | ||
output_imaginary_image |
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 | None |
Parameter Name | Description | Type | Supported Values | Default Value | |
---|---|---|---|---|---|
inputRealImage |
The real part input image. It must be a floating point image. | Image | Grayscale or Multispectral | null | |
inputImaginaryImage |
The imaginary part input image. This image must have same dimensions and data type as the real input image. | Image | Grayscale or Multispectral | null | |
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 | null | ||
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 | null |
Object Examples
auto polystyrene_float = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "polystyrene_float.vip" ); ComplexFftInverse complexFftInverseAlgo; complexFftInverseAlgo.setInputRealImage( polystyrene_float ); complexFftInverseAlgo.setInputImaginaryImage( polystyrene_float ); complexFftInverseAlgo.execute(); std::cout << "outputRealImage:" << complexFftInverseAlgo.outputRealImage()->toString(); std::cout << "outputImaginaryImage:" << complexFftInverseAlgo.outputImaginaryImage()->toString();
polystyrene_float = imagedev.read_vip_image(imagedev_data.get_image_path("polystyrene_float.vip")) complex_fft_inverse_algo = imagedev.ComplexFftInverse() complex_fft_inverse_algo.input_real_image = polystyrene_float complex_fft_inverse_algo.input_imaginary_image = polystyrene_float complex_fft_inverse_algo.execute() print("output_real_image:", str(complex_fft_inverse_algo.output_real_image)) print("output_imaginary_image:", str(complex_fft_inverse_algo.output_imaginary_image))
ImageView polystyrene_float = Data.ReadVipImage( @"Data/images/polystyrene_float.vip" ); ComplexFftInverse complexFftInverseAlgo = new ComplexFftInverse { inputRealImage = polystyrene_float, inputImaginaryImage = polystyrene_float }; complexFftInverseAlgo.Execute(); Console.WriteLine( "outputRealImage:" + complexFftInverseAlgo.outputRealImage.ToString() ); Console.WriteLine( "outputImaginaryImage:" + complexFftInverseAlgo.outputImaginaryImage.ToString() );
Function Examples
auto polystyrene_float = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "polystyrene_float.vip" ); auto result = complexFftInverse( polystyrene_float, polystyrene_float ); std::cout << "outputRealImage:" << result.outputRealImage->toString(); std::cout << "outputImaginaryImage:" << result.outputImaginaryImage->toString();
polystyrene_float = imagedev.read_vip_image(imagedev_data.get_image_path("polystyrene_float.vip")) result_output_real_image, result_output_imaginary_image = imagedev.complex_fft_inverse(polystyrene_float, polystyrene_float) print("output_real_image:", str(result_output_real_image)) print("output_imaginary_image:", str(result_output_imaginary_image))
ImageView polystyrene_float = Data.ReadVipImage( @"Data/images/polystyrene_float.vip" ); Processing.ComplexFftInverseOutput result = Processing.ComplexFftInverse( polystyrene_float, polystyrene_float ); Console.WriteLine( "outputRealImage:" + result.outputRealImage.ToString() ); Console.WriteLine( "outputImaginaryImage:" + result.outputImaginaryImage.ToString() );