将两张图像并排显示成一幅图像

来源:互联网 发布:广告牌计算软件 编辑:程序博客网 时间:2024/06/06 07:51
function im = appendimages(image1, image2)


% Select the image with the fewest rows and fill in enough empty rows
%   to make it the same height as the other image.
rows1 = size(image1,1);
rows2 = size(image2,1);


if (rows1 < rows2)
     image1(rows2,1) = 0;
else
     image2(rows1,1) = 0;
end


% Now append both images side-by-side.

im = [image1 image2];   


0 0
原创粉丝点击