3

I'd like to register two images with the findTransformECC function offered by OpenCV.

My images have a irregular surrounding border I'd like to mask. I worked with feature based matching functions from the Feature2D-library and findHomography which worked quite well and offered a masking of image parts that should not be taken into account for estimating the transformation parameters.

findTransformECC doesn't offer such a masking, therefore I clipped the images by a centered rectangular shape. The clipped images are aligned very well after transformation. Since I'm using MOTION_EUCLIDEAN - which is just a rotation and translation - I thought I could use exactly the same transformation matrix for aligning the images of original extent - but I was proved wrong. The images aren't correct aligned after transforming them. The orientation of transformed images seem to be OK but images show a wrong translation. My thought was when input-images are clipped with exactly the same centered clipping-area and the rotation is performed around the center the final translation operation should fit as well?

Any suggestions appreciated.

Wilmar van Ommeren
  • 7,469
  • 6
  • 34
  • 65
PaulZ
  • 31
  • 4

1 Answers1

1

In OpenCV 3.* masking is possible with the findTransformECC function. You can use the argument inputMask in the function.

Wilmar van Ommeren
  • 7,469
  • 6
  • 34
  • 65