What about color intensity
Afficher commentaires plus anciens
I want to display an image with red, green and blue intensity, between 1:5 lines and 2:8 columns, Thanks.
1 commentaire
Image Analyst
le 25 Nov 2012
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?
Réponses (1)
Walter Roberson
le 25 Nov 2012
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)
Catégories
En savoir plus sur Annotations dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!