MATLAB Answers


Too many arguments in imwarp (imregister problem)

Asked by Antonio Esteban on 10 Nov 2014
Latest activity Commented on by Geoff Hayes
on 10 Nov 2014
Hello everybody, I am trying to register a pair of endoscopic images but i cannot because i get the following error:
Error using imwarp Too many input arguments.
Error in imregister2 (line 145) [movingReg,Rreg] = imwarp(moving,Rmoving,tform,'OutputView',Rfixed);
I am not doing anything strange in my code, just load the images and perform the registration:
im1 = imread('./Seq05/Seq05_50.bmp');
im2 = imread('./Seq05/Seq05_51.bmp');
figure, imshowpair(rgb2gray(im2), rgb2gray(im1), 'montage')
[optimizer, metric] = imregconfig('multimodal');
moving_reg = imregister2(rgb2gray(im1),rgb2gray(im2),'affine',optimizer,metric);
Any idea why this is happening? It is quiet important. Thank you very much in advance.

  1 Comment

Antonio - which version of MATLAB are you using? And if you open imwarp in the editor, what does its function signature look like? The error message is telling you that too many input arguments are being passed to this function (though the above looks correct given its R2014b documentation at imwarp).

Sign in to comment.

0 Answers