14 February 2014

Storing each pixel color(RGB) in excel using matlab

d=[0,0,0,0,0];
filename=uigetfile({'*.*';'*.bmp';'*.jpg';'*.jpeg';'*.gif';'*.png'},'Select Image File');
image=imread(filename);
[y,x]=size(image);
x=x/3;
for i=1:x
for j=1:y
d=cat(1,d,[i,j,impixel(image,i,j)]);
end
end
xlswrite('info.xls',d,'Image Information');

1 comment:

Thank you for comment. We will try to enhance the quality of this website.