h=imread('E:\资料\image\sql_t\1.bmp'); h1=rgb2gray(h); level=graythresh(h1); h2=im2bw(h1,level); figure(1); imshow(h2); se=strel('line',7,90); h3=imopen(h2,se); figure(2) imshow(h3);