どのようにしてims​howpairを使っ​て縦に2画像を並べる​ことができますか?

2 views (last 30 days)
MathWorks Support Team
MathWorks Support Team on 14 Mar 2018
imshowpair(Img1,Img2,'montage')
にて、2つの画像が横並びで表示されますが、こちらを縦並びで表示させることはできますか?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 14 Mar 2018
imshowpair で montage オプションで並べて表示する場合、縦並びとするオプションは用意されておりませんが、下記montageコマンドを利用して、目的の処理を実現することができます。
 
A = imread('cameraman.tif');
B = imrotate(A,5,'bicubic','crop');
montage(cat(4,A,B),'Size',[2,1])
※ cat(4,A,B) は A,B を4次元方向に行列を結合するという意味となります。 
 

More Answers (0)

Tags

No tags entered yet.

Products


Release

R2017b

Community Treasure Hunt

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

Start Hunting!