Giáo trình xử lý ảnh y tế Tập 1b P15

Nếu ngân sách bạn cho phép, tôi đề nghị bạn nên có một hệ thống như trong hình . Nó bao gồm một máy tính PC có kèm theo thiết bị xử lý ảnh. Nối với cổng vào của thiết bị thu nhận ảnh là một video camera, và cổng ra nối với một màn hình. Thực tế, phần lớn các nghiên cứu của chúng ta được đưa ra trên ảnh mức xám (ảnh đen trắng). Bởi vậy, hệ thống của bạn sẽ bao gồm một thiết bị xử lý ảnh đen trắng và một màn hình đen trắng | include include include include void void void bit int float int int xr float xi float int reversal unsigned int WTS float FFT float int int float main void int i k m N n2 sign unsigned int L float wr wi xr x char file_name 14 FILE fptr printf nEnter name of file containing data points- scanf s file_name if fptr fopen file_name rb NULL printf file s does not exist. printf Enter of data points to be read -- scanf d N m int log10 double N log10 double k 1 k 1 if k N printf n Length of file has to be multiples of 2. Allocating memory for bit reversal LUT. L unsigned int malloc N sizeof unsigned int 92 Generate Look-up table for bit reversal. bit_reversal L m N Allocating memory for FFT arrays real and imag. xr float malloc N sizeof float xi float malloc N sizeof float Setting-up the data in real and imag. arrays. for i 0 i N i k L i xr k float getc fptr xi k fclose fptr Allocating memory for twiddle factors. n2 N 1 -1 wr float malloc n2 sizeof float wi float malloc n2 sizeof float Generating LUT for twiddle factors. WTS wr wi N -1 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 93 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 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 .

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
Đã 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.