0
$\begingroup$

What are the results of the two-dimensional Fourier transform of the image?

For an intuitive interpretation of the Fourier transform, refer to the link below. enter link description here

The link explains that using the Fourier transform results in the following: enter image description here enter image description here

However, the results I got using matlab fft2 are as follows. enter image description here

Why is the result of FFT different when we used the same image? In the image I converted to matlab, many peak points are created horizontally, not three peak points.

Only three peak points appear in the image described above.

Also, if the 'input(1)' image is represented as 'imshow', it appears like a different image from the original image (2).

Why does this result come out?

I made FFT after creating an image using only a single pixel value (0 and 255) without gradation, but the results were the same. enter image description here enter image description here

What is the correct result?

$\endgroup$
2
  • $\begingroup$ Could you please edit your question for completeness. On your comment about your square-wave images: "but the results were the same." The same as what? On your results using Matlab fft2 -- much as I hate dredging through code, can you include your code, especially if you can get those results in 10 lines or so. $\endgroup$
    – TimWescott
    Dec 30, 2022 at 3:36
  • $\begingroup$ Your FFTs of the square-wave data look exactly right, by the way. Look up the Fourier transform of a square wave and compare that to the Fourier transform of a sine wave -- you should see that the example FFTs and your square-wave FFTs are correct. Only the left-hand transforms in the middle set seem wrong, and this could be a problem with displaying the results. $\endgroup$
    – TimWescott
    Dec 30, 2022 at 3:40

1 Answer 1

1
$\begingroup$

I think your sin1.tif and sin3.tif images have negative pixel values. However, when you read them into matlab, you get a uint8 image, where the negative values result in overflow. That's why what you display with imshow looks different, and that's why the fft does not look like what you expect.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.