I am attempting to use imregcorr to register 2d images obtained from a fluorescence microscope. I did
tform = imregcorr(MOVING,movingRefObj,FIXED,fixedRefObj,'transformtype','similarity','Window',true);
imwarp(MOVING, movingRefObj, tform, 'OutputView', fixedRefObj, 'SmoothEdges', true);
In these images, nearly all of the signal should be colocalized, but I see poor registration along the x-axis: the red signals at the left side are shifted left while the red signals at the right side are shifted right. Registration on the y-axis looks ok. The red channel is the moving image in this example.
imregcorr returns the following affine transformation matrix:
0.9863 0 0
0 0.9863 0
3.7267 7.7000 1.0000
The X and Y scale factors are both the same (0.9863), which seems suspicious to me; visually, it looks like the scale should be smaller along the x axis so that the image is stretched. I suspect that this function is somehow constraining the X and Y scales to be the same. Is there an option that allows them to be independent, or another function that allows registration with independent scaling of the two axes?
I have also tried imregister with both the "similarity" and "affine" options, but with similar results.
Thanks for any input.