Wednesday, June 11, 2008
Q#3(ii) Picture
Q#3(b)
Average Colour of second image
Octave Commands
octave-3.0.0.exe:47> a=imread("pic2.jpg");
octave-3.0.0.exe:48> b=double(a)/255;
octave-3.0.0.exe:49> size(b)
ans =
541 500 3
octave-3.0.0.exe:50> c=sum(sum(b))/(541*500)
c =
ans(:,:,1) = 0.56223
ans(:,:,2) = 0.62916
ans(:,:,3) = 0.65633
octave-3.0.0.exe:51> d=ones(256);
octave-3.0.0.exe:52> d(:,:,1)=0.56223*ones(256);
octave-3.0.0.exe:53> d(:,:,2)=0.62916*ones(256);
octave-3.0.0.exe:54> d(:,:,3)=0.65633*ones(256);
octave-3.0.0.exe:55> imshow(d);
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment