matlab - how to retrieve original matrix from RGB image? -
in matlab, how retrieve original matrix rgb image? case, have 50x360 matrix. after imagesc, save jpeg file. , now, need load matrix(50x360) jpeg file. there anyway it? if use imread, matrix dimension 1366x628x3 different 50x360. thanks.
like this:
im = imread('image.jpg') size(im) ycoord = 20; xcoord = 20; im(ycoord,xcoord,1) %for r im(ycoord,xcoord,2) %for g im(ycoord,xcoord,2) %for b