I am new to image processing and learned only the basics from my studies. I have the following questions:
I am searching whole internet for any available solution. I've read multiple articles about this topic and finally decided that the only option is to use neural network, because the scratch sizes and positions can be infinity, so the hard-coded algorithm can be wrong in most situations.
As I said, I'm not experienced, but I have time to learn right now and it will be awesome to gain new experience and knowledge.
Hope someone has the idea what steps I need to take in order to get the desired effect.
Actually, I had just the sample code using Python and Opencv to preprocess the image, get the shape of the object and highlight the dark field on it. But it all depends on the proper lighting, so the pinholes are not exactly of the same color.
Below are the photo of my try to set the light properly.
It seems that you have multiple questions and you are a bit out of clue to decide from where to begin. I have narrowed down 3 questions which I'll try to answer one by one: