I have been trying to register some tif images of a vessel in the body so that I can then run imwarp and look 'into' the vessel perpendicularly, the problem is the camera that is taking pictures of these vessels 'jumps' at certain points to keep the vessel in view. I've attached two files (I saved them as jpg so that I could attach them) where such a view change occurs, it is a translation in the x direction, however using imregister with the 'translation' option does not seem to work, and leads to a 'did not converge error', and the 'affine' option leads to a rotation of viewing angle which is not what has actually occured. Here is the code I've been using I found it in some example documentation, in all honesty I have very little idea what the parameters optimizer and metric really are and what all the different attributes of optimizer do so if anyone could point me in the right direction that would be much appreciated.
[optimizer, metric] = imregconfig('multimodal');
fixed = imread('FIBSLICE0229.tif');
moving = imread('FIBSLICE0230.tif');
optimizer.InitialRadius = 0.01;
optimizer.Epsilon = 1.5e-4;
optimizer.GrowthFactor = 1.01;
optimizer.MaximumIterations = 300;