I have a image ,divided it to blocks, drawn rectangle and now when i displayes it is not displaying ,plz tell where i made mistake
clcclear allI=imread('peppers.png');I=rgb2gray(I);[ r c n ]=size(I);siz = 64;bs = siz;Original = I; G = I ;nob = (r/bs)*(c/bs);in =0;kk=0;for i=1:(r/bs) for j=1:(c/bs) myima8(:,:,kk+j)=G((bs*(i-1)+1:bs*(i-1)+bs),(bs*(j-1)+1:bs*(j-1)+bs)); k8((bs*(i-1)+1:bs*(i-1)+bs),(bs*(j-1)+1:bs*(j-1)+bs))=figure,imshow(myima8(:,:,kk+j));rectangle('Position',[3,3,60,60],'EdgeColor','r','LineWidth',2) end kk=kk+(r/bs); endfigure;imshow(k8,[])
kindly assist
Best Answer