How to create an image from an RGB Matrix
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Pavel Chatterjee
am 21 Mär. 2018
Kommentiert: Jan
am 22 Mär. 2018
I have a RGB matrix and that is very big. However I would like to create an image out of it. Can you please help?
7 Kommentare
Greg
am 22 Mär. 2018
You keep mentioning loops, what in the world are you looping?
KSSV gave the full answer, don't put any other code with it. 1584x2780x3 is not a big RGB matrix. That should display nearly instantaneously.
Jan
am 22 Mär. 2018
@Pavel Chatterjee: I agree with Greg: The problem is not the display of the array, but the creation. Then post the code, which takes so much time. Usually a forgotten pre-allocation is a cause for slow code, but a 1584x2780 array is not large, such that this would waste some seconds of runtime only.
Akzeptierte Antwort
KSSV
am 22 Mär. 2018
Let I be your mxnx3 RGB matrix.
imshow(I) ;
saveas(gcf,'myimage.jpg')
2 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Convert Image Type finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!