correlation_fft — 在频域内将一个图像与另一个图像的复共轭相乘。
correlation_fft(ImageFFT1, ImageFFT2 : ImageCorrelation : : )
As part of calculating the correlation between two images,
correlation_fft multiplies the Fourier transform of the first image
ImageFFT1 with the complex conjugate of the Fourier-transformed
second image ImageFFT2。
According to the correlation theorem, the non-normalized correlation of two images in pixel space can be obtained in three steps:
Transforming the images into frequency space using a
Fourier transform (see, e.g., fft_generic).
Multiplying one transformed image with the complex conjugate of the other transformed image (pixel-wise).
Transforming the result back into pixel space using an
inverse Fourier transform (see, e.g., fft_generic).
算子 correlation_fft is used to perform the second step,
i.e., ImageFFT1 is pixel-wise multiplied with the complex
conjugate of ImageFFT2。
It should be noted that in order to achieve a correct scaling of the
correlation in the spatial domain, the operators
fft_generic or rft_generic with
Norm = 'none' must be used for the forward
transform (step 1) and fft_generic or rft_generic with
Norm = 'n' for the reverse transform (step 3).
If ImageFFT1 and ImageFFT2 contain the same number
of images, the corresponding images are multiplied pairwise.
Otherwise, ImageFFT2 must contain only one single image.
In this case, the multiplication is performed for each image of
ImageFFT1 with ImageFFT2。
The filtering is always performed on the entire image, i.e., the domain of the image is ignored.
ImageFFT1 (输入对象) (multichannel-)image(-array) → object (complex)
Fourier-transformed input image 1.
ImageFFT2 (输入对象) (multichannel-)image(-array) → object (complex)
Fourier-transformed input image 2.
元素数量: ImageFFT2 == ImageFFT1 || ImageFFT2 == 1
ImageCorrelation (输出对象) image(-array) → object (complex)
Result in the frequency domain.
* Compute the auto-correlation of an image. get_image_size(Image,Width,Height) rft_generic(Image,ImageFFT,'to_freq','none','complex',Width) correlation_fft(ImageFFT,ImageFFT,Correlation) rft_generic(Correlation,AutoCorrelation,'from_freq','n','real',Width)
correlation_fft 在所有参数正确时返回 2 ( H_MSG_TRUE )。当输入为空时,可设置行为通过算子 set_system(::'no_object_result',<Result>:)。如有必要,则抛出异常。
fft_generic,
fft_image,
rft_generic
fft_generic,
fft_image_inv,
rft_generic
基础