HALCON Reference Manual 10.0.2
Table of Contents / Filters / FFT ClassesClassesClasses | | | Operators

rft_genericrft_genericrft_genericRftGenericRftGeneric (Operator)

Name

rft_genericrft_genericrft_genericRftGenericRftGeneric — Compute the real-valued fast Fourier transform of an image.

Signature

rft_generic(Image : ImageFFT : Direction, Norm, ResultType, Width : )

Herror rft_generic(const Hobject Image, Hobject* ImageFFT, const char* Direction, const char* Norm, const char* ResultType, const Hlong Width)

Herror T_rft_generic(const Hobject Image, Hobject* ImageFFT, const Htuple Direction, const Htuple Norm, const Htuple ResultType, const Htuple Width)

Herror rft_generic(Hobject Image, Hobject* ImageFFT, const HTuple& Direction, const HTuple& Norm, const HTuple& ResultType, const HTuple& Width)

HImage HImage::RftGeneric(const HTuple& Direction, const HTuple& Norm, const HTuple& ResultType, const HTuple& Width) const

HImageArray HImageArray::RftGeneric(const HTuple& Direction, const HTuple& Norm, const HTuple& ResultType, const HTuple& Width) const

void HOperatorSetX.RftGeneric(
[in] IHUntypedObjectX* Image, [out] IHUntypedObjectX*ImageFFT, [in] VARIANT Direction, [in] VARIANT Norm, [in] VARIANT ResultType, [in] VARIANT Width)

IHImageX* HImageX.RftGeneric(
[in] BSTR Direction, [in] BSTR Norm, [in] BSTR ResultType, [in] Hlong Width)

static void HOperatorSet.RftGeneric(HObject image, out HObject imageFFT, HTuple direction, HTuple norm, HTuple resultType, HTuple width)

HImage HImage.RftGeneric(string direction, string norm, string resultType, int width)

Description

rft_genericrft_genericrft_genericRftGenericRftGeneric computes the fast Fourier transform of the input image ImageImageImageImageimage. In contrast to fft_genericfft_genericfft_genericFftGenericFftGeneric, fft_imagefft_imagefft_imageFftImageFftImage, and fft_image_invfft_image_invfft_image_invFftImageInvFftImageInv, the fact that the input image in the forward transform is a real-valued image (i.e., not a complex image) is used. In this case, the complex output image has a redundancy. The values in the right half of the image are the complex conjugates of the corresponding values in the left half of the image. Consequently, runtime and memory can be saved by only computing and storing the left half of the complex image.

The parameter ResultTypeResultTypeResultTypeResultTyperesultType can be used to specify the result image type of the reverse transform (DirectionDirectionDirectionDirectiondirection = 'from_freq'"from_freq""from_freq""from_freq""from_freq"). In the forward transform (DirectionDirectionDirectionDirectiondirection = 'to_freq'"to_freq""to_freq""to_freq""to_freq"), ResultTypeResultTypeResultTypeResultTyperesultType must be set to 'complex'"complex""complex""complex""complex".

The parameter direction determines whether the transform should be performed to the frequency domain or back into the spatial domain. For DirectionDirectionDirectionDirectiondirection = 'to_freq'"to_freq""to_freq""to_freq""to_freq" the input image must have a real-valued type, i.e., a complex image may not be used as input. All image types that can be converted into an image of type real are supported. In this case, the output is a complex image of dimension (w/2+1)*h, where w and h are the width and height of the input image. In this mode, the exponent -1 is used in the transform (see fft_genericfft_genericfft_genericFftGenericFftGeneric). For DirectionDirectionDirectionDirectiondirection = 'from_freq'"from_freq""from_freq""from_freq""from_freq", the input image must be complex. In this case, the size of the input image is insufficient to determine the size of the output image. This must be done by setting WidthWidthWidthWidthwidth to a valid value, i.e., to 2*w-2 or 2*w-1, where w is the width of the complex image. In this mode, the exponent 1 is used in the transform.

The normalizing factor can be set with NormNormNormNormnorm, and can take on the values 'none'"none""none""none""none", 'sqrt'"sqrt""sqrt""sqrt""sqrt" and 'n'"n""n""n""n". The user must ensure the consistent use of the parameters. This means that the normalizing factors used for the forward and backward transform must yield w*h when multiplied.

Attention

The filtering is always done on the entire image, i.e., the region of the image is ignored.

Parallelization

Parameters

ImageImageImageImageimage (input_object)  image(-array) objectHImageHImageHImageXHobject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real / complex)

Input image.

ImageFFTImageFFTImageFFTImageFFTimageFFT (output_object)  image(-array) objectHImageHImageHImageXHobject * (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real / complex)

Fourier-transformed image.

DirectionDirectionDirectionDirectiondirection (input_control)  string HTupleHTupleVARIANTHtuple (string) (string) (char*) (BSTR) (char*)

Calculate forward or reverse transform.

Default value: 'to_freq' "to_freq" "to_freq" "to_freq" "to_freq"

List of values: 'to_freq'"to_freq""to_freq""to_freq""to_freq", 'from_freq'"from_freq""from_freq""from_freq""from_freq"

NormNormNormNormnorm (input_control)  string HTupleHTupleVARIANTHtuple (string) (string) (char*) (BSTR) (char*)

Normalizing factor of the transform.

Default value: 'sqrt' "sqrt" "sqrt" "sqrt" "sqrt"

List of values: 'none'"none""none""none""none", 'sqrt'"sqrt""sqrt""sqrt""sqrt", 'n'"n""n""n""n"

ResultTypeResultTypeResultTypeResultTyperesultType (input_control)  string HTupleHTupleVARIANTHtuple (string) (string) (char*) (BSTR) (char*)

Image type of the output image.

Default value: 'complex' "complex" "complex" "complex" "complex"

List of values: 'complex'"complex""complex""complex""complex", 'byte'"byte""byte""byte""byte", 'int1'"int1""int1""int1""int1", 'int2'"int2""int2""int2""int2", 'uint2'"uint2""uint2""uint2""uint2", 'int4'"int4""int4""int4""int4", 'real'"real""real""real""real", 'direction'"direction""direction""direction""direction", 'cyclic'"cyclic""cyclic""cyclic""cyclic"

WidthWidthWidthWidthwidth (input_control)  integer HTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong)

Width of the image for which the runtime should be optimized.

Default value: 512

Suggested values: 128, 160, 192, 256, 320, 384, 512, 640, 768, 1024, 2048

Result

rft_genericrft_genericrft_genericRftGenericRftGeneric returns 2 (H_MSG_TRUE) if all parameters are correct. If the input is empty the behavior can be set via set_system(::'no_object_result',<Result>:)set_system("no_object_result",<Result>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>). If necessary, an exception is raised.

Possible Predecessors

optimize_rft_speedoptimize_rft_speedoptimize_rft_speedOptimizeRftSpeedOptimizeRftSpeed, read_fft_optimization_dataread_fft_optimization_dataread_fft_optimization_dataReadFftOptimizationDataReadFftOptimizationData

Possible Successors

convol_fftconvol_fftconvol_fftConvolFftConvolFft, convert_image_typeconvert_image_typeconvert_image_typeConvertImageTypeConvertImageType, power_bytepower_bytepower_bytePowerBytePowerByte, power_realpower_realpower_realPowerRealPowerReal, power_lnpower_lnpower_lnPowerLnPowerLn, phase_degphase_degphase_degPhaseDegPhaseDeg, phase_radphase_radphase_radPhaseRadPhaseRad

Alternatives

fft_genericfft_genericfft_genericFftGenericFftGeneric, fft_imagefft_imagefft_imageFftImageFftImage, fft_image_invfft_image_invfft_image_invFftImageInvFftImageInv

Module

Foundation


Table of Contents / Filters / FFT ClassesClassesClasses | | | Operators
HALCON Reference Manual 10.0.2 Copyright © 1996-2011 MVTec Software GmbH