MATLAB: Can imregister provide transformation details on the registeration of the moving image

Image Processing Toolboximregister fuse imagesimregtformimwarp

I want to register and fuse two images, but I need to do some image processing of the images that I register, then use the translation and rotation details of the registration to fuse the unprocessed images. imregister only provides a transformed image, but no details on how it transformed it. Is there any way to get the details of the transformation to apply to my unprocessed images?

Best Answer

I modified imregister to return the "tform" object that it uses for the transformation. I then created a copy of "transformMovingImage", a function within imregister so I can call it.
[optimizer, metric] = imregconfig('multimodal');
[movingRegisteredProcessed, tform] = imregister2(movingProcessed,fixedProcessed,'rigid',optimizer,metric);
movingRegisteredUnprocessed = MyTransformMovingImage(movingUnprocessed, fixedUnprocessed, tform);
fused_image = imfuse(fixedUnprocessed,movingRegisteredUnprocessed,'blend');
This worked. It would be nice if the standard function provided the "tform" object.