is there a bug in imregcorr-function for transformtype "rigid" ?

2 views (last 30 days)
Eirik Kvernevik
Eirik Kvernevik on 28 Oct 2021
Commented: Eirik Kvernevik on 28 Oct 2021
I have tried some examples where imregcorr does not give the wanted result for the transformtype "rigid" , for the same examples I obtain the correct result when using "similarity" .
Here is one example :
I1 = imread('...\cameraman.tif');
FIXED = im2double(I1);
MOVING = imrotate(I1,125);
fixedRefObj = imref2d(size(FIXED));
movingRefObj = imref2d(size(MOVING));
tform = imregcorr(MOVING,movingRefObj,FIXED,fixedRefObj,'transformtype','rigid','Window',true);
MOVINGREG.RegisteredImage = imwarp(MOVING, movingRefObj, tform, 'OutputView', fixedRefObj,'interp','cubic', 'SmoothEdges', true);
imshow(MOVINGREG.RegisteredImage) giving the following output image :
This is far away from the original cameraman image, which was rotated 125 degrees counterclockwise
  1 Comment
Eirik Kvernevik
Eirik Kvernevik on 28 Oct 2021
I have found problems for the "rigid" transformtype for a multiple og angles : a bunch of angles between 21 and 87 degrees , and a bunch between 133 and 239 degrees is what I have found so far.
there also seems to be a problem with the "similarity" type for 88, 89, 268 and 269 degrees . Would be interesting if anyone else have problems with this or if someone have a solution to this ?

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!