Error using image Error using image TrueColor - How to plot images created by joining arrays instead of using imread
Afficher commentaires plus anciens
Hello there, i have a question.
Let's suppose i have a image of 3x3 pixels with only a blue dot on the center.
>> image=imread('dot.bmp')
image(:,:,1) =
255 255 255
255 0 255
255 255 255
image(:,:,2) =
255 255 255
255 162 255
255 255 255
image(:,:,3) =
255 255 255
255 232 255
255 255 255
If i get the arrays separately and join them into an array:
dot(:,:,1) = [255 255 255; 255 0 255; 255 255 255] dot(:,:,2) = [255 255 255; 255 162 255; 255 255 255] dot(:,:,3) = [ 255 255 255; 255 232 255; 255 255 255]
>> image(dot) Error using image Error using image TrueColor CData contains element out of range 0.0 <= value <= 1.0
The question is, what should i do to make it work?
Regards.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Images 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!