How can I tile an image?

Tiling an image: The image is broken up into a grid of 4 sub-images. Each of the 4 sub-images is a scaled down version of the entire image that is either (1) image, (2) flipped horizontally, (3) flipped vertically or (4) flipped both. The resulting image should be tiled such that:(1)(2) (3)(4) I have to put this image in subplot(2,4,8).
Using Repmat(A,2,2), I am able to tile the image A in a 2,2 matrix. I am not sure how to change the images.

 採用された回答

Image Analyst
Image Analyst 2013 年 1 月 17 日

1 投票

Don't use repmat. Just create four images (upperLeftImage, upperRightImage; lowerLeftImage, lowerRightImage) using flipud(), fliplr(), transpose ', imrotate(), or similar commands, then use this line to stitch everything together
tiledImage = [upperLeftImage, upperRightImage; lowerLeftImage, lowerRightImage];
Of course you have to make sure that the number of rows or columns at the "seams" match up.

1 件のコメント

P
P 2013 年 1 月 18 日
Thank you. That helped a lot. My four images were identical so the number of columns and rows matched perfectly.

サインインしてコメントする。

その他の回答 (0 件)

タグ

質問済み:

P
P
2013 年 1 月 17 日

Community Treasure Hunt

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

Start Hunting!

Translated by