% coded By Swayam pattanayak
% its Aim is to create binary version of the image.,and add color to the
% label matrix. thogh it is done only on Intensity images I exploited that
% for RGB
BWa1=imread('gry.jpg');
imshow(BWa1);
%pause(0.333);
movrr=moviein(16);
for i=1:15
background=imopen(BWa1,strel('disk',i));
   % pause(1.333);
imshow(background);
Bwaa=imsubtract(BWa1,background);
level=graythresh(Bwaa);
B11=im2bw(Bwaa,level); % intensity to binary exploiting here this function
pseudo_color=label2rgb(labeled,@spring,'c','shuffle');
imshow(pseudo_color)
pause(0.333);
movrr(:,i)=getframe;
pause(0.333);
end;
movie(movrr,2);
%pause(0.333);
imshow(B11),colorbar;
disp('Howz the movie Dr Lakaemper!!')