global IPD_PATH; RGB = ReadImage(IPD_PATH+'demos\teaset.png'); RGB=RGB(80:480,80:480,:); //[h w d]=size(RGB); //Image=uint16(zeros(h,w)); //for i= 1:h // for j=1:w // Image(i,j)=(uint16(RGB(i,j,1))+uint16(RGB(i,j,2))+uint16(RGB(i,j,3)))/3; // end; // printf("%d\n",double(i/h)*100) //end //Metoda 1 //Image=RGB2Gray(RGB); //ShowColorImage(RGB,'Result'); //Metoda 3 Image(:,:)=(uint16(RGB(i,j,1))+uint16(RGB(i,j,2))+uint16(RGB(i,j,3)))/3; Image=uint8(Image); ShowImage(Image,'Obrazek');