フィルターのクリア

Error using vertcat Dimensions of matrices being concatenated are not consistent.

1 回表示 (過去 30 日間)
vani shree
vani shree 2017 年 4 月 20 日
コメント済み: vani shree 2017 年 4 月 23 日
sir i m getting this error i dont know how to rectify it please help me
%%appendimages
% im = appendimages(image1, image2)
%
% Return a new image that appends the two images side-by-side.
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] %%in this line im getting error.
thanks with regards
  2 件のコメント
Stephen23
Stephen23 2017 年 4 月 20 日
@vani shree: please tell us the exact outputs from these commands:
size(image1)
size(image2)
vani shree
vani shree 2017 年 4 月 20 日
sir it does not show any output. but my input file of image1 and image 2 is

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

採用された回答

KSSV
KSSV 2017 年 4 月 20 日
Instead of adding extra zeros, you can resize the images to same dimensions. you may consider the following:
I1 = imread('ORIGINAL1.jpg') ;
I2 = imread('FAKE.jpg') ;
if numel(I1)>numel(I2)
I2 = imresize(I2,[size(I1,1) size(I1,2)]) ;
else
I1 = imresize(I1,[size(I2,1) size(I2,2)]) ;
end
I12 = [I1 I2] ;
figure
imshow(I12)
I12 = [I1 ; I2] ;
figure
imshow(I12)
  19 件のコメント
KSSV
KSSV 2017 年 4 月 22 日
Hello...Are both files RGB? There is a small correction...copy the code now and run.
vani shree
vani shree 2017 年 4 月 22 日
thank you sir.. its running successfully. thank you very much. you explained me well.

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

その他の回答 (1 件)

Image Analyst
Image Analyst 2017 年 4 月 22 日
A very general stitching app with a GUI is given here: http://www.mathworks.com/matlabcentral/fileexchange/25797-stitch
  1 件のコメント
vani shree
vani shree 2017 年 4 月 23 日
thank you sir for sharing this gui file. sir can u help me to run ASIFT code in matlab. i have tried but i dont know how to run this sir.

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

カテゴリ

Help Center および File ExchangeImage Processing Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by