www.gusucode.com > images 案例代码 matlab源码程序 > images/FindPerimeterOfObjectsInBinaryImageExample.m
%% Find Perimeter of Objects in Binary Image % %% % Read binary image into workspace. % Copyright 2015 The MathWorks, Inc. BW = imread('circles.png'); %% % Calculate the perimeters of objects in the image. BW2 = bwperim(BW,8); %% % Display the original image and the perimeters side-by-side. imshowpair(BW,BW2,'montage')