What about color intensity

I want to display an image with red, green and blue intensity, between 1:5 lines and 2:8 columns, Thanks.

댓글 수: 1

Image Analyst
Image Analyst 2012년 11월 25일
Do you want a red stripe, a green stripe, and a blue stripe in lines (rows) 1-5? If you had one color per row, then that's 3 rows, so what color do you want rows 4 and 5 to be? Same for the vertical stripes going down the image in the 7 columns 2 through 8? You have 3 colors and 7 columns. 7 is not a multiple of 3. So, what color goes into what column?

댓글을 달려면 로그인하십시오.

답변 (1개)

Walter Roberson
Walter Roberson 2012년 11월 25일

0 개 추천

MyImage = zeros(3, 8, 3);
MyImage(1,:,1) = 1; %red
MyImage(1,:,2) = 0;
MyImage(1,:,3) = 0;
MyImage(2,:,1) = 0; %green
MyImage(2,:,2) = 1;
MyImage(2,:,3) = 0;
MyImage(3,:,1) = 0; %blue
MyImage(3,:,2) = 0;
MyImage(3,:,3) = 1;
image(MyImage)

태그

질문:

2012년 11월 25일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by