clear all
clc

    % I=imresize(I,0.2,'nearest');
    I = vfm('grab',1);
    I2 = rgb2gray(I);
    I3 = im2bw(I2);

i1=~I3;
%Ia=imread('merda.bmp');
%ic=imresize(Ia,.2);
%ia=im2bw(ic);
figure(1)
imshow(i1)

ib=bwmorph(i1,'thicken',inf);
figure(2)
imshow(ib)

Icentro_1 = bwmorph(i1,'shrink',inf);
Icentro_2 = bwmorph(i1,'erode',2);
Icentro_21 = bwmorph(Icentro_2,'shrink',inf);
I_final = double(Icentro_21)+double(Icentro_1);
figure(3)
imshow(I_final)

