# Adjustment of images with FindGeometricTransform

The following question uses the answers taken from here.

I have two images which should be adjusted by image correlation using FindGeometricTransform.

The desired overlapped result should be the "overlapped image".

To do that I am using the following code:

img1 = Import["http://i.imgur.com/flgbobm.png"];

img2 = Import["http://i.imgur.com/ajXibPe.png"];

{merit, trans} = FindGeometricTransform[img2, img1, TransformationClass -> "Similarity"];

imgt = ImageTransformation[img2, trans, DataRange -> Full];

Blend[{ColorNegate[img1], imgt}, {0.3, 1}]


The results is not exactly what I want.

• First, the small disk is not centered inside of the larger disk.

• Second, it has not the same size (I assume this should be obtained since TransformationClass -> "Similarity"considers translation, rotation, and scaling).

• Third, the resulting image is only showing some overlapped squared region and not the whole scaled images.

How could this be solved?

I got your disks to align by filtering them into doughnuts.

{fi1, fi2} =
DistanceTransform[

{merit, trans} = FindGeometricTransform[fi2, fi1];

The above difference image shows FindGeometricTransform found a better transform. However, I don't know how applicable this technique is to other images.
As for producing a union of the two images, there may be help in the Mathematica documentation for FindGeometricTransform under Applications (text starts "A basic image-stitching method" and uses images of a shoreline.)