实验的目的:连接图像中存在断点的二值区域
原始图像如下所示:
实验原理:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
实验程序:
clear;close all; im = imread('C:\Documents and Settings\luokh\桌面\line1.jpg'); imshow(im) BW=im2bw(im,0.5); s = regionprops(BW, 'ConvexHull'); figure,imshow(BW); % hold on; % plot(s(1).ConvexHull(:,1) ,s(1)