clc; %% create a new figure to show the image . newImg = imread('onion.png'); % I = imread('cameraman.tif'); figure(1); %% show the loaded image. imshow(newImg); figure(2); %% convert RGB to gray scale. I = rgb2gray(newImg) imshow(I); %% apply sobel filter. size(I) BW = edge(I,'sobel',0.1) ; imshow(BW);
Chương trình ví dụ sử dụng lọc Sobel trong Matlab:

Subscribe to:
Post Comments (Atom)
0 nhận xét:
Post a Comment