Too many arguments in imwarp (imregister problem)

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')
title('Unregistered')
[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.
Antonio.

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.

Answers (0)

Asked:

on 10 Nov 2014

Commented:

on 10 Nov 2014

Community Treasure Hunt

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

Start Hunting!