PDA

View Full Version : mấy pro cho em hỏi cái code này cái


quiphuc01
08-04-2013, 11:25 AM
Chạy chương trình Matlab để mô phỏng thuật toán lọc ảnh trung bình như thế nào với các kiểu ảnh có mật độ nhiễu khác nhau: nhiễu 10%, 20%, 30%,.....80%, 90% với 1 ảnh gốc Lena, cho nhiễu các mức độ khác nhau trên Matlab sau đó đưa vào lọc để xử lý, lưu ảnh kết quả lại.


Em có cái code này mà sao chạy hoài ko đc cái bác giúp em cái



function output_image = ro_filt(image_file,order);
%
% filename: ro_filt.m
% author: Tony Nelson
% date: 1/11/00
% detail: performs basic 3x3 rank order filtering
%

input_image = LoadImage(image_file); % loads image into input_image
[ylength,xlength] = size(input_image); % determines size of input image
output_image(1:ylength,1:xlength) = zeros; %inits output_image

% loops to simulate SE window passing over image
for y=1:ylength-2
for x=1:xlength-2
window = [input_image(y:(y+2),x:(x+2))];
window_v = [[window(1,1:3)] [window(2,1:3)] [window(3,1:3)]];
sorted_list = sort(window_v);
output_image(y+1,x+1) = sorted_list(order);
sorted_list(order);
end
end

%plots ro filtered image
figure;
image(output_image)
colormap(gray(256));
title('Rank Order Filter Output');
đấy là thuật toán chạy Rank Order Fillter đó

tramnn92
08-04-2013, 11:50 AM
[ylength,xlength] = size(input_image); % determines size of input image thiếu s nha bạn,mình đã text và chạy dc

Thiết kế kiến trúc nhà ở (http://kientrucminhtuan.com/home/loaisanpham/8/1/Kien-Truc-Nha-Pho)
Thiết kế đồ gỗ nội thất (http://kientrucminhtuan.com/home/loaisanpham/10/1/Noi-That-Phong-Khach)
Thiết kế tiểu cảnh sân vườn (http://kientrucminhtuan.com/home/loaisanpham/12/1/Noi-That-Tieu-Canh)

newbanmaylamkem
25-02-2014, 04:20 PM
[ylength,xlength] = size(input_image); % determines size of input image thiếu s nha bạn,mình đã text và chạy dc



bỏ s cũng có vấn đề gì đâu bạn? Thấy vẫn chạy oke mà

vnmember
07-06-2019, 03:50 PM
anh em nào chạy được code hỗ trợ e chút,

namhoang15
17-07-2019, 03:50 PM
Mình cũng không chạy được luôn ạ. Có ai giúp mình với


------------------
Motor Sumitomo (https://dongcomotorgiamtocsumitomo.wordpress.com/)

vnmember
22-06-2021, 01:33 AM
chào cả nhà