MATLAB: Aligning fiducial marks in two images

digital image processing

I have two different types of microscope images showing the same region of a sample that need to be overlaid. The images are different sizes and look completely different except for a set of small, square fiducial marks near each of the four corners (visible in both images). It is likely that the area of interest is also slightly rotated between the two images. I need to make the area of interest the same size for both images, align them, and superimpose them. From my brief reading about the Image Processing Toolbox, I’ve outlined a basic potential strategy and I'm wondering if it's viable:
1.Load images;
2.Make white regions of image 1 transparent;
3.For each image, set control points on the same fiducial mark (or multiple fiducial marks);
4.Measure the distance between control points for both images;
5.Change the size of image 1 (increase or decrease) so the distance between control points is the same as in image 2;
6.Translate and rotate image 1 so the control points (and fiducial marks) are aligned with image 2 ("register" the images?);
7.Output the composite image
Is this worth pursuing or should I think along different lines? Thanks!

Best Answer

If you can find the coordinates of corresponding fiducials in both images, you can use this FEX file
to find the rotation, translation, and scaling that matches them. Then you can just use imtransform.