How can I swap the phases of two fourier transforms?

조회 수: 4 (최근 30일)
Esa Soudbakhsh
Esa Soudbakhsh 2021년 2월 1일
댓글: Bjorn Gustavsson 2021년 2월 3일
In my assignment I am supposed to swap phases of the Fourier transform for two images and perform the inverse Fourier transform to reconstruct the images using ifft2(). I am new to Matlab and all I could find was extracting the phase from a fourier transform using angle(), but how do I assign it to another fourier transform?

답변 (1개)

Bjorn Gustavsson
Bjorn Gustavsson 2021년 2월 1일
Tip: Think about the difference between Cartesian and polar representation of a complet number are, also be prepared to use element-wise multiplication (i.e.: .*) and the exp-function.
HTH
  댓글 수: 5
Esa Soudbakhsh
Esa Soudbakhsh 2021년 2월 3일
Okay so what I did was get the phase and magnitude of an fft matrix in rectangular form. Then made a new matrix in polar form by multiplying the new phase with the other magnitude and that made me a new matrix. This is of course after resizing the images to be in the same dimensions.
Bjorn Gustavsson
Bjorn Gustavsson 2021년 2월 3일
Sounds exactly right! But if you are a bit unsure about the assignment of variables and such I suggest that you browse through the on-ramp courses: matlab-onramp. That is intended to get you up and running as fast as possible.
With regards to the dimensions-nuisance: You might (I've neither thought nor tested this) get somewhere by zero-padding the fft of the smaller images

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Fourier Analysis and Filtering에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by