Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
Thiết bị có khả năng số hoá ảnh dùng ít nhất là 8 bit (256 mức xám) và ảnh thu được phải có kích thước ít nhất là 512 - 512 điểm hoặc hơn nữa. | First stage. gotoxy 1 3 printf First stage. for j 0 j N j gotoxy 1 4 printf FFT of row 4d j if sign int 1 fread buff NB 1 fptr for i 0 i N i k L i kk i 1 xr k buff kk xi k buff kk 1 else for i 0 i N i k L i xr k float getc fptr if i j 2 0 xr k -xr k xi k 0.0 FFT xr xi wr wi m N for i 0 i N i k i 1 buff k xr i buff k 1 xi 1 fwrite buff NB 1 fptro fclose fptr Transpose. gotoxy 1 5 123 printf Transposing of intermediate file. rewind fptro transpose fptro N m rewind fptro Second stage. printf n Second stage. for j 0 j N j gotoxy 1 7 printf FFT of row 4d j loc long j NB fseek fptro loc SEEK_SET fread buff NB 1 fptro for i 0 i N i k L i kk i 1 xr k buff kk xi k buff kk 1 FFT xr xi wr wi m N for i 0 i N i k i 1 if sign int 1 i j 2 int 0 buff k -xr i buff k 1 -xi i else buff k xr i buff k 1 xi i if fseek fptro loc SEEK_SET 0 perror n fseek failed. n exit 1 124 fwrite buff NB 1 fptro fclose fptro void FFT float xr float xi float wr float wi int m int N FFT algorithm. Decimation-in-time algorithm. Note 1. N 2 to the power of m. 2. The input arrays are assumed to be rearranged in bit-reverse order. You will need to use routine bit-reversal for that purpose. 3. The twiddle factors are assumed to be stored in LUT s wr and wi . You will need to use routine LUT for calculating and storing twiddle factors. int ip k kk l incr iter i j float Tr Ti ip 1 kk N 1 incr 2 for iter 0 iter m iter for j 0 j N j incr i j ip Tr xr i Ti xi i xr i xr j -Tr xi i xi j -Ti .