涉及到的主要知识点:图像的四叉分解、连接(4连接/8连接)、Freeman链码、边界提取,以及被称为'cell
walls'的概念(细胞墙/细胞联合体/细胞壁)
①原始图像:
>> f=imread('fengye.jpg');
>> gf=rgb2gray(f);
>> bwf=im2bw(f,graythresh(f));
>> bwf_fillholes=imfill(bwf,'holes');
>> bwf_sliced=bwf_fillholes(70:547,125:584);
>> h=fspecial('average',9);bwf_filt=imfilter(bwf_sliced,h);
>> bwf_filt_fillholes=imfill(bwf_filt,'holes');figure,imshow(bwf_filt_fillholes)
%以上为做一些预处理,获得二值图像

(注:原图像“枫叶”链接hiphotos.baidu.com/������/pic/item/2176973bdddee28c7c1e71ff .jpg)
②
①原始图像:
>> f=imread('fengye.jpg');
>> gf=rgb2gray(f);
>> bwf=im2bw(f,graythresh(f));
>> bwf_fillholes=imfill(bwf,'holes');
>> bwf_sliced=bwf_fillholes(70:547,125:584);
>> h=fspecial('average',9);bwf_filt=imfilter(bwf_sliced,h);
>> bwf_filt_fillholes=imfill(bwf_filt,'holes');figure,imshow(bwf_filt_fillholes)
%以上为做一些预处理,获得二值图像
(注:原图像“枫叶”链接hiphotos.baidu.com/������/pic/item/2176973bdddee28c7c1e71ff
②
