Color recognition using OpenMV M7

Hello, I am currently working on a project that makes a real life color picker like nix. The whole setup works well with paper texture , returning nearly same rgb values as the test sample and I have isolated the camera in a box from external light. the only light source is the LED built in the M7.

Now the problem arises when I have to test different objects, any type of plastic/ reflective coating makes the light from LED reflect and the program returns (255,255,255)

Any way to distribute the light source on the test sample so it returns the true color instead of just white?

Imgur: The magic of the Internet image captured of a color board and green paper strip

Mmm, yeah, that’s a hard problem. The light reflecting back is going to blow out the camera. You pretty much need to cut that out.

I guess you could illuminate from underneath the object. You’ll need to get creative.

We cannot illumiate from underneath as the cam will be in a housing and it will be held over the object in the final design. I have decided to illuminate with LED strips along the housing to distribute the light. Also is there a way to process the image to get like a phone camera quality not in terms of resolution but in terms of the saturation to get true colors.

for such an application you must the dome lighting teqhnique.

I have designed one for my applications so to be more cost effective for me.
have a look at the video. as you can see there is not reflection although the can is fully metallic.

and this is the final design i use:

1 Like

Dont forget to turn off auto white balance.
and these are some photos with dome lighting on plastic pellets for color recognition:
i have been there too…

Ohh nice. This is helpful , btw what was the source of light for the dome (was it the LED from the M7?).
Also how effective is a smaller handheld model of this dome?

ofcourse i use custom leds and almost never cameras leds.
If you can tell me the field of view and working distance of the inspection maybe i can custom a light for you too.
But this is the only approach for such app…