Align an image to match another image

I’ve had no luck with this.

Does anyone know how to align image 2 to image 1? Ideally, it would rotate and then rotate the image based on on some type of similarity score??

Image 1

Image 2


you have coins, so you need to implement stuff specific to that.

others before you have tried feature matching. that works somewhat, but isn’t great.

in general, the appearance of a coin varies wildly under different illumination. that is something you have to get under control, or else the results will disappoint.

are you prepared to design and train your own deep neural networks?

I guess what you want is to find object in the inspection image, sort of object recognition.

Here is a solution for you:

The total rows of code is up to 1000, please check the whole version here