Is OpenMV Right For: Object Counting & Market Rotation Detection

Hi Everyone,

Two different projects, but I just wanted a preliminary check of their suitability before I purchase a OpenMV H7 module.

Project 1:
Could I use this to count a bunch of screws on a tray for example. Say M3 x 12mm or similar, single layer.
The tray could vibrate between captures a few times to go some way to avoid overlapping/touching screws.

This would be used to count a specific quantity, with a method of removing one or two if incorrect before recounting.

Project 2:
This one is more developed conceptually.
I have a grid of ‘tokens’, they can be rotated to 1 of 8 directions, and will only ever be placed in a grid formation, with known locations, maybe 4x6.
I need to read the rotation of each token present in the plane of the grid only, and know it’s position in the grid.
Camera position can be fixed, either under the grid, with windows at each grid position, or on an angle looking down over the grid from one end.
Speed is not an issue, and the tokens will not be moved ‘live’ in the grid, the whole grid will be taken out, adjusted and reloaded for reading.
The readings will direct two servos to move sequentially based on the direction of each token in order.

Colour markers are fine to use, April tags are ok though less ideal. The only issue that the tokens need to be identical, it’s just their position in the grid and rotation that matters.

Any feedback on the suitability of an OpenMV camera for these applications would be most appreciated.

Hi, we have a pretty robust color tracking system with lots of measurements for blobs of a certain color. E.g. rotation , size, and position of blobs. Do the objects you are looking at have a high contrast with the background?


They certainly can be high contrast against the background, fairly flexible with that one.
So I can measure rotation on multiple, say two or three colour groups/blobs - Even when they are the same two/three colours on each token?

Something like the attached would be fine…
As long as the direction is visually easy to distinguish, ie. includes an arrow, or similar.

Yes, that’s super easy. This is exactly what our system is designed to do. Um, you’d want to just track the white lines. Not the colors. But, if you track the white you will get the position of each arrow along with rotation from 0-180 degrees (not 360 degrees however). You will have to do something special to determine where the arrow head is and then add ±180 degrees to the rotation information we give. A second find_blobs() call on the tips of each line found should be good enough to determine which side the arrow is on by using looking for a clump of pixels at the end of the line.

Great thanks!

This should be much easier than my previous method of detection, which was an array of Hall effect sensors, magnets, and metal discs imbedded in the tokens…

What about the part counting for bolts or similar? Would that work also?

Thanks again!

Yep, you just need to make sure you have plenty of contrast. Note that grey metal on a white surface is not contrast. Grey metal on blue would be contrast.