How to get repeating pattern frequency information from fft

조회 수: 7 (최근 30일)
fireman
fireman 2016년 10월 19일
답변: Image Analyst 2016년 10월 20일
I have an image filled with repeating patterns(imagine exact the same squares with the same spacing). If I do fft2 on this image, I can see a peak in the fft2 out. Let's say the original image size is 1024*1024. The fft2 image size is 1024*1024. And the peak of the fft2 is at (150, 120). How can I transform the location of the pixel to the frequency or period of the repeating pattern? Frequency is how many patterns in x and y direction, period is the distance between two repeating patterns.

답변 (2개)

Walter Roberson
Walter Roberson 2016년 10월 19일
In theory, length in pixels divided by index (up to half way through) to get the period in pixels. However, last year (the year before?) when I tried to do some pattern analysis that way on some fft2, I got nowhere. With some relatively simple patterns, I saw peaks I could not explain. Single dimensional fft was easier to understand, but aggregating across the rows or columns was something I did not manage to work out.

Image Analyst
Image Analyst 2016년 10월 20일
What do you want to do with the peaks? Do you want to find them so you can zero them out and then ifft2 to get the spatial domain image without the periodic pattern? Sometimes that can be a problem because the peaks are often on the side of a big mountain. So you can run adapthisteq() on the fft image to "flatten" it. Then threshold to find the peaks. Now you have a binary image that you can use that tells where the peaks are.
See attached demo. I don't call adapthisteq() because I didn't need to, but I show how to find peaks by thresholding.

카테고리

Help CenterFile Exchange에서 Transforms에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by