Using OpenCV to detect unpolished area of metalic element

Hi guys,
I’ve got recently an interesting project to do. I’m trying to get the unpolished area of pilers (not sure if it’s right word, looks like a scissors). The problem is that this certain area is barely visible by human eye, only when you get the right rotation in proper lightning. Moreover the arm of this pilers are rounded metallic and I have difficulties to set the light properly for camera.
I’ve been searching the whole internet for the right solution for this problem, not sure if it’s existing. The only solution that I found is using Deep Learning.
I’m not experienced in image processing, only got some experience during studies, so I know that it can be impossible, but I want to get the most knowledge I can in this project(my life doesn’t depend on it).
My question is, have you ever encounter this kind of problem(if yes, then how did you solve it) and is OpenCV the right tool to use in this project?
(Hope you can understand it, english is not my primary language)


As you can see, this area has different texture, but I have no idea how to implement this, to detection.

surface inspection.

companies make lots of money with knowing how to do that. and they keep their trade secrets. there might be scientific publications but those are scientific, i.e. not industrially proven.

you have correctly identified that reflection/lighting plays a crucial role in this. failure to do this right cannot be corrected after image acquisition. you might need to move light/workpiece/camera to acquire multiple pictures. you might have to do that with mechatronics (“robotics” but not smart).

your first task should be to figure out how to take pictures that show the surface condition well.

“well” means “machine-readable”, i.e. good contrast.

Thanks for your reply!

For now I have created code that uses simple morphology operations and highlight the surface of different color. It will work quite well, but in certain conditions with proper light etc. But as you mentioned the lightning is key factor and I found something called ‘coaxial light’ that is reducing light reflection, but don’t know if it’s reasonable to use it.
Other methods may be dome light or ring light.

I’m constantly thinking about how to implement algorithm that will be able to tell “Hmm that part of the object is not right, it need to be fixed”, because as a human we can tell that this scratch is a defect and the second one is the texture of an object.

So all in all I’ve read multiple articles about surface detecions but most of them are specified for flat metal objects, but that will be easiest way to do. However the problem is with irregular shapes, because there is no solution for that. For me it’s ridiculous, because how the company can get the working system if there are as you say some companies that keep their secret. I was really shocked that there is no commercial solution for this kind of problem. If something is very special, then why noone want to sell this product?
I am really motivated now to try my best to find any solution. Even if I will fail, it will be good to get experience.

Time to find more articles and gain knowledge :slight_smile:

there are companies with the knowledge and the means to make you a solution. you should approach them.

Not sure if there are any in Poland :confused:
Btw. I’m just as a trainee in the company for my studies practice and the boss gave me this topic, that interested me so much.
I want to use this time to learn about image processing and maybe be a part of inventing some new solutions for automatize the process of production in my region.
This sounds like a dream now, but the circumstances are perfect, to at least try something.
Is there a certain way or process to get better and better in image processing or it’s everything about practise and studying certain cases, like for example: finding the good light set, then a nice algorithm, etc.

in your situation, I would take a flashlight and shine it on the workpiece, look at it from various angles, notice the play of light and shadow.

you could even work with the reflections off the surface. use it like a mirror. bounce some light off the workpiece and against a wall or sheet of paper. assuming the surface is supposed to be smooth, wherever the reflection is dark is where the surface scattered the light instead of reflecting it evenly.

some of that is bound to make a useful picture.

crosspost/related: