Error using image Error using image TrueColor - How to plot images created by joining arrays instead of using imread
显示 更早的评论
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.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Images 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!