rgb_=vfm('grab',1);
% imshow(rgb_)
rgb_1=(rgb_(:,:,1) >250);
rgb_2=(rgb_(:,:,2) >250);
% rgb_3=(rgb_(:,:,3) >250);
rgb_4 = rgb_1 & rgb_2;

img1=rgb_4(:,1:end/2);

img2=rgb_4(:,end/2:end);

[x1 y1]=find(img1);
xx1_xmin=min(x1)
xx1=max(x1);

[x2 y2]=find(img2);
xx2=max(x2);
xx2_xmin=min(x2)

%****************************

linha_x=20

if xx1>10,
    
xx_m1=img1(xx1_xmin,:);
[x1_m y1_m]=find(xx_m1);
[yy1min_m]=min(y1_m);
[yy1min_M]=max(y1_m);    

xx_M1=img1(xx1-linha_x,:);
[x1_M y1_M]=find(xx_M1);

[yy1_xm]=min(y1_M)
[yy1_xM]=max(y1_M)
end

if xx2>10,
xx_m2=img2(xx2_xmin,:);
[x2_m y2_m]=find(xx_m2);
[yy2min_m]=min(y2_m);
[yy2min_M]=max(y2_m);

xx_M2=img2(xx2-linha_x,:);
[x2_M y2_M]=find(xx_M2);

[yy2_xm]=min(y2_M)
[yy2_xM]=max(y2_M)
end