TAILIEUCHUNG - Giáo trình xử lý ảnh y tế Tập 2 P11

Nhân đôi độ phân giải trên ảnh dùng phép nội suy không gian: Trong phương pháp này ảnh đầu tiên được chứa lên một mảng có kích thước 2N - 2N với tất cả các hàng và các cột được xoá về không. ảnh được chiếu lần lượt với các phép nội suy. | char file_name 14 clrscr printf Enter file name for image-- scanf s file_name fptri fopen file_name rb if fptri NULL printf No such image file exists. n exit 1 nsq double filelength fileno fptri printf Is image length equal to image width y or n -- while ch getche y ch n switch ch case y image_length image_width int sqrt nsq break case n printf nEnter image_width-- scanf d image_width image_length int nsq float image_width printf n Image size dx d. image_length image_width printf nEnter file name for filter s coefficients-- scanf s file_name fptro fopen file_name r if fptro NULL printf nNo such file exists. n exit 1 _ fscanf fptro d N printf IIR filter has an order of dx d. N N N1 N 1 Allocating memory space. a float malloc N1 sizeof float for i 0 i N 1 i a i float malloc N1 sizeof float b float malloc N1 sizeof float for i 0 i N1 i b i float malloc N1 sizeof float wx unsigned char malloc N1 sizeof char 193 for i 0 i N 1 i wx i unsigned char malloc image_width sizeof ehar wy float malloc N1 sizeof float for i 0 i N 1 i wy i float malloc image_width sizeof float buff unsigned char malloc image_width sizeof char bufft float malloc image_width sizeof float for i 0 i N i for j 0 j N j fscanf fptro f f a i j b i j fclose fptro yt wherey 1 again gotoxy 1 yt printf gotoxy 1 yt printf Enter file name for filtered image - scanf s file_name if stricmp file_name 0 printf This is a reserved file name. Use some other name. goto again gotoxy 1 yt 1 printf ind access file_name 0 while ind gotoxy 1 yt 1 printf File exists. Wish to overwrite y or n -- while ch tolower getch y ch n putch ch switch ch case y ind 1 break case n gotoxy 1 yt 1 printf gotoxy 1 yt printf gotoxy 1 yt 194 printf Enter file name -- scanf s file_name ind access file_name 0 fptro fopen file_name wb fptrt fopen wb Clearing input and output image transfer buffers. for i 0 i N 1 i for j 0 j image_width j J wx i j char 0 wy i j float z. max float min float true_width image_width-N1

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã 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.