Raspberry pi assembly line counter (pic)

Hello guys, I’ve been tasked with creating an assembly line counter and was wondering what would be the best and/or easiest sensor to achieve this. The counter would need to recognize every time a wrapped covid mask (plastic wrap) passes under it. As a side note, the program would need to count the masks and begin a countdown beep every 50 masks.

https://i.ibb.co/drTdR1L/counter.jpg

I’ve looked into laser sensors and raspberry pi camera running opencv but maybe there are more appropriate sensors for this task. I’ve also looked into RGB color sensors. I thought sampling the G color channel and checking for changes would do the trick. ALSO -very important - there are approximately 160 masks whizzing by every minute so my code would need to run very quickly.

Looking forward to hearing some ideas, suggestions or comments from you all. Thanks!

Jevois just released a camera https://www.jevoisinc.com/collections/j … art-camera that might be what you are looking for…

How about a scale at the end of the line?

Have you tried line tracking sensor? That will be able to differentiate between the mask’s color and the green background’s colour.