![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/192117/image.png)
How can I create a montage of images without using the montage function?
18 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Emily Boylan
il 18 Ott 2018
Risposto: Image Analyst
il 19 Ott 2018
I need to create a 2x2 montage of an original image, red slice, green slice, and blue slice without using the built-in montage function.
0 Commenti
Risposta accettata
Chad Greene
il 18 Ott 2018
Modificato: Chad Greene
il 19 Ott 2018
Emily,
Note: Screenshots of code are sometimes tough to follow along with. It's typically more helpful to copy and paste the actual text of your code and format it real fancy with the {} Code button. But on with your question:
If your images are all the same size, creating a montage is easy. Just treat each image as a matrix and concatenate them into one larger matrix like this:
I = imread('football.jpg');
% Concatenate the images:
Im = [I I I;
I I I];
image(Im)
axis image off
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/192117/image.png)
Più risposte (2)
Image Analyst
il 19 Ott 2018
Try using imtile().
1 Commento
Chad Greene
il 19 Ott 2018
Ah, I hadn't seen that function before (Introduced in R2018b). Very cool!
Image Analyst
il 19 Ott 2018
Regarding your edited question. You shouldn't change the question so much that it's now an entirely different question and the existing answers are rendered meaningless.
Anyway, for your new question, see my attached demo. Adapt as needed.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/192176/image.png)
0 Commenti
Vedere anche
Categorie
Scopri di più su Display Image in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!