rft_genericrft_genericRftGenericRftGenericrft_generic(算子)
名称
rft_genericrft_genericRftGenericRftGenericrft_generic — 计算图像的实值快速傅里叶变换。
签名
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)
void RftGeneric(const HObject& Image, HObject* ImageFFT, const HTuple& Direction, const HTuple& Norm, const HTuple& ResultType, const HTuple& Width)
HImage HImage::RftGeneric(const HString& Direction, const HString& Norm, const HString& ResultType, Hlong Width) const
HImage HImage::RftGeneric(const char* Direction, const char* Norm, const char* ResultType, Hlong Width) const
HImage HImage::RftGeneric(const wchar_t* Direction, const wchar_t* Norm, const wchar_t* ResultType, Hlong Width) const
(
Windows only)
描述
rft_genericrft_genericRftGenericRftGenericRftGenericrft_generic computes the fast Fourier transform of the input
image ImageImageImageImageimageimage. In contrast to fft_genericfft_genericFftGenericFftGenericFftGenericfft_generic,
fft_imagefft_imageFftImageFftImageFftImagefft_image, and fft_image_invfft_image_invFftImageInvFftImageInvFftImageInvfft_image_inv, 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 ResultTypeResultTypeResultTypeResultTyperesultTyperesult_type can be used to specify the result
image type of the reverse transform (DirectionDirectionDirectionDirectiondirectiondirection =
'from_freq'"from_freq""from_freq""from_freq""from_freq""from_freq"). In the forward transform (DirectionDirectionDirectionDirectiondirectiondirection
= 'to_freq'"to_freq""to_freq""to_freq""to_freq""to_freq"), ResultTypeResultTypeResultTypeResultTyperesultTyperesult_type must be set to
'complex'"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 DirectionDirectionDirectionDirectiondirectiondirection = 'to_freq'"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_genericFftGenericFftGenericFftGenericfft_generic). For
DirectionDirectionDirectionDirectiondirectiondirection = 'from_freq'"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 WidthWidthWidthWidthwidthwidth 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 NormNormNormNormnormnorm, and can take
on the values 'none'"none""none""none""none""none", 'sqrt'"sqrt""sqrt""sqrt""sqrt""sqrt" and 'n'"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.
注意
The transformation is always performed for the entire image, i.e., the
domain of the image is ignored.
执行信息
- 多线程类型:可重入(与非独占算子并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 在元组级别上自动并行化。
- 在通道级别上自动并行化。
- 在内部数据级别上自动并行化。
参数
ImageImageImageImageimageimage (输入对象) (multichannel-)image(-array) → objectHImageHObjectHImageHobject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real / complex)
输入图像。
ImageFFTImageFFTImageFFTImageFFTimageFFTimage_fft (输出对象) image(-array) → objectHImageHObjectHImageHobject * (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real / complex)
Fourier-transformed image.
DirectionDirectionDirectionDirectiondirectiondirection (输入控制) string → HTuplestrHTupleHtuple (string) (string) (HString) (char*)
Calculate forward or reverse transform.
默认值:
'to_freq'
"to_freq"
"to_freq"
"to_freq"
"to_freq"
"to_freq"
值列表:
'from_freq'"from_freq""from_freq""from_freq""from_freq""from_freq", 'to_freq'"to_freq""to_freq""to_freq""to_freq""to_freq"
NormNormNormNormnormnorm (输入控制) string → HTuplestrHTupleHtuple (string) (string) (HString) (char*)
Normalizing factor of the transform.
默认值:
'sqrt'
"sqrt"
"sqrt"
"sqrt"
"sqrt"
"sqrt"
值列表:
'n'"n""n""n""n""n", 'none'"none""none""none""none""none", 'sqrt'"sqrt""sqrt""sqrt""sqrt""sqrt"
ResultTypeResultTypeResultTypeResultTyperesultTyperesult_type (输入控制) string → HTuplestrHTupleHtuple (string) (string) (HString) (char*)
Image type of the output image.
默认值:
'complex'
"complex"
"complex"
"complex"
"complex"
"complex"
值列表:
'byte'"byte""byte""byte""byte""byte", 'complex'"complex""complex""complex""complex""complex", 'cyclic'"cyclic""cyclic""cyclic""cyclic""cyclic", 'direction'"direction""direction""direction""direction""direction", 'int1'"int1""int1""int1""int1""int1", 'int2'"int2""int2""int2""int2""int2", 'int4'"int4""int4""int4""int4""int4", 'real'"real""real""real""real""real", 'uint2'"uint2""uint2""uint2""uint2""uint2"
WidthWidthWidthWidthwidthwidth (输入控制) integer → HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Width of the image for which the runtime should be
optimized.
默认值:
512
建议值:
128, 160, 192, 256, 320, 384, 512, 640, 768, 1024, 2048
结果
rft_genericrft_genericRftGenericRftGenericRftGenericrft_generic 在所有参数正确时返回 2 ( H_MSG_TRUE )。当输入为空时,可设置行为通过算子 set_system(::'no_object_result',<Result>:)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)set_system("no_object_result",<Result>)。如有必要,则抛出异常。
可能的前趋
optimize_rft_speedoptimize_rft_speedOptimizeRftSpeedOptimizeRftSpeedOptimizeRftSpeedoptimize_rft_speed,
read_fft_optimization_dataread_fft_optimization_dataReadFftOptimizationDataReadFftOptimizationDataReadFftOptimizationDataread_fft_optimization_data
可能的后继
convol_fftconvol_fftConvolFftConvolFftConvolFftconvol_fft,
correlation_fftcorrelation_fftCorrelationFftCorrelationFftCorrelationFftcorrelation_fft,
phase_correlation_fftphase_correlation_fftPhaseCorrelationFftPhaseCorrelationFftPhaseCorrelationFftphase_correlation_fft,
convert_image_typeconvert_image_typeConvertImageTypeConvertImageTypeConvertImageTypeconvert_image_type,
power_bytepower_bytePowerBytePowerBytePowerBytepower_byte,
power_realpower_realPowerRealPowerRealPowerRealpower_real,
power_lnpower_lnPowerLnPowerLnPowerLnpower_ln,
phase_degphase_degPhaseDegPhaseDegPhaseDegphase_deg,
phase_radphase_radPhaseRadPhaseRadPhaseRadphase_rad
替代
fft_genericfft_genericFftGenericFftGenericFftGenericfft_generic,
fft_imagefft_imageFftImageFftImageFftImagefft_image,
fft_image_invfft_image_invFftImageInvFftImageInvFftImageInvfft_image_inv
模块
基础