how to - detect right object in right position?

Hello DIYers,

I have a small square object (6cm x 6cm) that I must put in a mold, but how it's square, is possible put it in any position, but only 1 is the right one. The reference is a 5mm label in the top. I want detect if the object in the mold has the right position.
Actually I have 5 different objects, the difference between them is the number in the label. My idea is use a Raspberry Pi + Pi Camera + openCV. There will be a collection of images for reference and the camera will be recording jpgs (maybe 1fps) and comparing with the images in the collection. There will be a red led lighting, but if the RPi detect the right object in the right position will light a green led.
Maybe somebody knows a similar project? is possible with this hardware/software? some recommendation?
For better idea, I'm attaching a mock-up

Picture of how to - detect right object in right position?
sort by: active | newest | oldest
bwrussell3 months ago

Sounds like a solid plan so I say you should just start mocking it up. Doesn't need to attach to the machine, just see if you can get it ID'ing your labels at your desk and go from there.

Check the Related panel to the right ----> There are several Pi plus OpenCV projects in it for me.

HédelN (author)  bwrussell3 months ago

Thank you! Actually everything is lying on my desktop ;) till we have a working prototype. I'm reading similar projects, I knew about OpenCV, but I never used it, and I just knowif there is a similar library which adapt better to my situation, but look like this is the way to go. Thanks

seandogue3 months ago

periodically shine a light through the petri dish impinging on a sensor. When it's obscured (as evidenced by a drop in output levels), you have growth. FInding the correct color of light that doesn't corrupt your experiment/etc will be the rick. Sensors are easy.

PS, the reason for periodic rahter than continuous sampling is that light may alter the growth rate or even supress it, so to miinimize any "negative" affect can be accomplished by only using the light source and sampling when absolutely necessary

HédelN (author)  seandogue3 months ago

Thank you, yes, this a great idea. I didn't tell we have already a motion sensor for detect the movements in the working area

iceng3 months ago

Neural networks are very good at matching images...