samedi 11 novembre 2023

Finding the best placement of two black and white images to maximize the similarity

I am looking for an algorithm that would allow me to have the optimal displacement of an image on another (only in 2D x and y, no need for rotation) to find the maximum common pixel (pixel black if on white background and vice versa).

Comparing all the pixels, then redoing the same algorithm by sliding image x+1,y+1 etc. is too time-consuming.. (but works perfectly)

I've thought of comparing 1-2 columns where there's a lot of relief with the image, which would increase speed but doesn't seem optimal.

Also thought of transforming the reliefs into points and then trying to make the best correlation by moving this cloud.

If you have any solutions, I'd love to hear them!

Aucun commentaire:

Enregistrer un commentaire