How can I create a montage of images without using the montage function?

11 次查看(过去 30 天)
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.

采纳的回答

Chad Greene
Chad Greene 2018-10-18
编辑:Chad Greene 2018-10-19
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

更多回答(2 个)

Image Analyst
Image Analyst 2018-10-19
Try using imtile().

Image Analyst
Image Analyst 2018-10-19
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.

类别

Help CenterFile Exchange 中查找有关 Images 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by