Closed GCBallesteros closed 1 year ago
The calculation shown here is actually wrong because the image transformation routine used does some reshaping and back of the input that messes things up. I have found a better way that parametrizes the transformation using directly a single affine transformation matrix instead of 3 sequential transformations (scale -> rot -> translation). This is both faster and less ambiguous as the output of the algo is just a homography matrix.
If there is interest for such a PR I'm more than happy to prepare it. It only requires changes to the transform_img
function. In the meantime I will have my own simplified fork of the repo.
I needed to map pixel indices in the source image to pixel indices on the transformed image and needed the similarity_matrix function to be working for this.