TAILIEUCHUNG - Biến đổi fourier rời rạc part 3

Nén ảnh lμ một kỹ thuật mã hoá hiệu suất cao ảnh số nhằm lμm giảm số bit cần cho biểu diễn ảnh. Chức năng của kỹ thuật nμy lμ giảm độ lớn dữ liệu phải lu trữ cùng với thời gian truyền trong khi vẫn giữ nguyên chất lợng của ảnh. | Taking FFT. FFT xr xi wr wi m N printf Enter file name for storing FFT scanf s file_name fptr fopen file_name w for i 0 i N i fprintf fptr e e xr i xi i fclose fptr void bit_reversal unsigned int L int m int N Routine for generating LUT for bit reversal. Note N 2 to the power of m . LUT will reside in LI unsigned int MASK C A j k i for k 0 k N k MASK 1 C 0 for i 0 j m-1 i m i j-- A k MASK i A j C A MASK MASK 1 L k C void WTS float wr float wi int N int sign Generating LUT for twiddle factors. Note sign -1 for FFT and sign 1 for IFFT int n2 i 95 float theta n2 N 1 -1 Generate look-up tables for twiddle factor. theta pi float N for i 0 i n2 i _ wr i float cos double i 1 theta wi i float sin double i 1 theta if sign int -1 wi i -wi i 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 bitreversal for that purpose. 3. The twiddle factors are assumed to be stored in LUT s wr I and wi j. You will need to use routine LUT for calculating and storing twiddle factors. int ip k kk l incr iter j i float Tr Ti ip 1 kk N 1 incr 2 for iter 0 iter m iter 96 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 xr j xr j Tr xi j xi j Ti if iter O . for k l k ip k l k kk-l for j k j N j incr i j ip Tr xr i wr l -xi i wi l Ti xr i wi l xi i wr l xr i xr j -Tr xi i xi j -Ti xr j xr j Tr xi j xi j Ti kk l ip l incr l .

TỪ KHÓA LIÊN QUAN
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.