Combine two seperate matrices into a 3d matrix.
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Jhangir
am 6 Okt. 2013
Beantwortet: Image Analyst
am 6 Okt. 2013
Lets say I have a matrix R and a matrix B. These matrices are X*Y and I want to combine them both so they are a multidimensional matrix so I can show the new matrix as an image. How do I do this? I tried using this F=cat(3,R,B); figure(2) image(C)
But I get an error/
0 Kommentare
Akzeptierte Antwort
Image Analyst
am 6 Okt. 2013
image can take a 3D image with 3 color channels, not two. If you want the green channel to be zero, then concatenate a zero matrix
rgbImage = cat(3, R, zeros(size(R), 'uint8')), B);
image(rgbImage);
0 Kommentare
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!