How to get repeating pattern frequency information from fft

7 Ansichten (letzte 30 Tage)
fireman
fireman am 19 Okt. 2016
Beantwortet: Image Analyst am 20 Okt. 2016
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.

Antworten (2)

Walter Roberson
Walter Roberson am 19 Okt. 2016
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 am 20 Okt. 2016
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.

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by