Skip to content

phase_correlation_fftPhaseCorrelationFftPhaseCorrelationFftphase_correlation_fftphase_correlation_fftπŸ”—

Short descriptionπŸ”—

phase_correlation_fftPhaseCorrelationFftPhaseCorrelationFftphase_correlation_fftphase_correlation_fft β€” Compute the phase correlation of two images in the frequency domain.

SignatureπŸ”—

phase_correlation_fft( image ImageFFT1, image ImageFFT2, out image ImagePhaseCorrelation )void PhaseCorrelationFft( const HObject& ImageFFT1, const HObject& ImageFFT2, HObject* ImagePhaseCorrelation )static void HOperatorSet.PhaseCorrelationFft( HObject imageFFT1, HObject imageFFT2, out HObject imagePhaseCorrelation )def phase_correlation_fft( image_fft1: HObject, image_fft2: HObject ) -> HObject

Herror phase_correlation_fft( const Hobject ImageFFT1, const Hobject ImageFFT2, Hobject* ImagePhaseCorrelation )

Herror T_phase_correlation_fft( const Hobject ImageFFT1, const Hobject ImageFFT2, Hobject* ImagePhaseCorrelation )

HImage HImage::PhaseCorrelationFft( const HImage& ImageFFT2 ) const

HImage HImage.PhaseCorrelationFft( HImage imageFFT2 )

DescriptionπŸ”—

phase_correlation_fftPhaseCorrelationFft calculates the phase correlation of the Fourier-transformed input images in the frequency domain. The phase correlation is calculated by multiplying ImageFFT1imageFFT1image_fft1 with the complex conjugate of ImageFFT2imageFFT2image_fft2 and dividing by the absolute value of this product. It should be noted that in order to achieve a correct scaling of the phase correlation in the spatial domain, the operators fft_genericFftGeneric or rft_genericRftGeneric with Normnormnorm \(=\) 'none'"none" must be used for the forward transform and fft_genericFftGeneric or rft_genericRftGeneric with Normnormnorm \(=\) 'n'"n" for the reverse transform. If ImageFFT1imageFFT1image_fft1 and ImageFFT2imageFFT2image_fft2 contain the same number of images, the corresponding images are phase-correlated pairwise. Otherwise, ImageFFT2imageFFT2image_fft2 must contain only one single image. In this case, the phase correlation is performed for each image of ImageFFT1imageFFT1image_fft1 with ImageFFT2imageFFT2image_fft2 .

AttentionπŸ”—

The filtering is always performed on the entire image, i.e., the domain of the image is ignored.

Execution informationπŸ”—

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

ParametersπŸ”—

ImageFFT1imageFFT1image_fft1 (input_object) (multichannel-)image(-array) β†’ object (complex)HObject (complex)HImage (complex)HObject (complex)Hobject (complex)

Fourier-transformed input image 1.

ImageFFT2imageFFT2image_fft2 (input_object) (multichannel-)image(-array) β†’ object (complex)HObject (complex)HImage (complex)HObject (complex)Hobject (complex)

Fourier-transformed input image 2.

Number of elements: ImageFFT2 == ImageFFT1 || ImageFFT2 == 1

ImagePhaseCorrelationimagePhaseCorrelationimage_phase_correlation (output_object) image(-array) β†’ object (complex)HObject (complex)HImage (complex)HObject (complex)Hobject * (complex)

Phase correlation of the input images in the frequency domain.

ExampleπŸ”—

(HDevelop)

* Compute the phase correlation of two images.
get_image_size(Image1,Width,Height)
rft_generic(Image1,ImageFFT1,'to_freq','none','complex',Width)
rft_generic(Image2,ImageFFT2,'to_freq','none','complex',Width)
phase_correlation_fft(ImageFFT1,ImageFFT2,PhaseCorrelationFFT)
rft_generic(PhaseCorrelationFFT,PhaseCorrelation,'from_freq','n', \
            'real',Width)
* Determine the translation between the two images.
local_max_sub_pix (PhaseCorrelation, 'facet', 1, 0.02, Row, Column)

ResultπŸ”—

phase_correlation_fftPhaseCorrelationFft 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>:). If necessary, an exception is raised.

Combinations with other operatorsπŸ”—

Combinations

Possible predecessors

fft_genericFftGeneric, fft_imageFftImage, rft_genericRftGeneric

Possible successors

fft_genericFftGeneric, fft_image_invFftImageInv, rft_genericRftGeneric

Alternatives

correlation_fftCorrelationFft

ReferencesπŸ”—

C. D. Kuglin, D. C. Hines: β€œThe Phase Correlation Image Alignment Method”; IEEE International Conference on Cybernetics and Society; pp. 163-165; 1975.

ModuleπŸ”—

Foundation