문제

I have a problem when I try a FFT filter on an image . The input is the pgm file format (b&w). The result image ain’t correct . The right one should look like this this . Don't mind the colors :)

For more detail please see the code. It ain’t clean ; sorry ; I’m working on it. A few steps in my program. I doubt step 3 and 5 the most . The FFT function (step 4) from Paul Bourke should be fine

1- read pgm file into an ‘image’ struct

2- create a 2d array of ‘Complex’ struct

3- pass values from the image to Complex.Real ( Maybe a problem about convert integers to doubles ; but I ain’t think it’s a trouble )

4- call the 2dFFT function

5- Read data from ‘Complex’ array and pass values to ‘image’ struct to display (The problem maybe I filter the result to fit the pgm format –convert double to integer ; then fit them into the range from 0 to 255)

도움이 되었습니까?

해결책

Okay ; I found this link and it's indeed helpful . This should be step 6 . After that ; the output image is quite good

http://sci.tech-archive.net/Archive/sci.image.processing/2006-08/msg00165.html

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top