clear all
clc

I = vfm('grab',1);
    %I2 = rgb2gray(I);
    %I3 = im2bw(I2);
    %I3 =~ I3;
    % I3 = imrotate(I3,5,'nearest');
    Ia=imresize(I,0.4,'nearest');
    
    nivel=40;
    
    Ib=(double(Ia(:,:,1))>nivel).*(double(Ia(:,:,2))>nivel).*(double(Ia(:,:,3))>nivel);

imshow(Ib);