Sunday, May 25, 2008

Assignment #4, Question 11

To make an exact copy of the RB face of the colour cube on p. 404, you will need to enter the following octave command.

Octave command:

RB(:,:,1)=[ones(256,1)*[0:1:255]/255];
RB(:,:,2)=zeros(256);
RB(:,:,3)=[ones(256,1)*[0:1:255]/255]';
RB =rotdim(RB,270);

imshow(RB)



The rotdim function allows you to rotate the image so that the orientation of the RB face of the colour cube is the same as it appears in the textbook.

No comments: