MATLAB Answers

0

how to arrange RGB image in a plane

Asked by Bibin George on 13 Aug 2018 at 0:48
Latest activity Answered by Walter Roberson
on 13 Aug 2018 at 2:00

I need to create an input plane by separating an rgb image into individual images red, green and blue channels and placing them in specific points of the 2d plane. I tried it using uint8 array but did not yield the desired result. Could someone help me with this problem please.

  0 Comments

Sign in to comment.

1 Answer

Answer by Walter Roberson
on 13 Aug 2018 at 2:00

R = 0 * YourRGBImage;
G = R;
B = R;
R(:,:,1) = YourRGBImage(:,:,1);
G(:,:,2) = YourRGBImage(:,:,2);
B(:,:,3) = YourRGBImage(:,:,3);
image([xmin_1, xmax_1], [ymin_1, ymax_1], R);
hold on
image([xmin_2, xmax_2], [ymin_2, ymax_2], R);
image([xmin_3, xmax_3], [ymin_3, ymax_3], R);
hold off

The xmin_1 and so on reflect the "specific points on the 2d plane" that the centers of the lower left and upper right pixels are to be placed at.

  0 Comments

Sign in to comment.