MATLAB: After obtaining the pixel values of an image..how to store those pixel values in an array

array

After obtaining the pixel values of an image..how to store those pixel values in an array?

Best Answer

pixel = cell(1,rows);
ctr = 1;
for R=1:rows
for C=1:columns
pixel{ctr}=my_image(R,C);
disp (R)
end
ctr = ctr+1;
end
celldisp(pixel)
[pixel{:}] % double array