Steps to identify date & mint in coin photographs

asked 2020-01-25 17:08:32 -0600

EDN gravatar image

updated 2020-01-26 20:11:02 -0600

I'm building a machine to automatically sort coins by date and mint. It will send one coin at a time down a belt, take a photograph of it, and hopefully read the date and mint stamp.

I'm currently working through the OpenCV Tutorials. I'm currently able to identify where the coin is in the photograph and sharpen the image. (using HoughCircles() and saturate_cast<uchar>() )

Can the experts here offer a suggestion which functions I should use to identify if the coin is face up, tails up?

I suspect I will first need to crop the image to just have the coin image. And then the image will need to be rotated a small amount (again and again) until I get a good match to either a generic head's image or tail's image. Is there a more precise, or efficient, or accurate method?

Please note... I'll write the code. But I'm hoping to get some pointers about what strategy to use and the likely functions to implement the strategy. (Even with a correctly rotated coin image, I'm not far enough into the tutorials to know which functions to use to compare the images.)

For the purposes of going through the tutorials, I'm using this image:

image description

Here is an example of the sharpened image:

image description

I need better lighting... But I can pretty much detect the location of the coin. With better lighting, I should be able to get the edges and center more accurately detected:

image description

THANKS SO MUCH!

edit retag flag offensive close merge delete

Comments

a sample image will be useful

sturkmen gravatar imagesturkmen ( 2020-01-26 03:44:42 -0600 )edit

also some more images (different coin, different angle) will be useful

sturkmen gravatar imagesturkmen ( 2020-01-26 08:28:57 -0600 )edit