Page 1 of 1

Position detection using ESP32

Posted: Sat Sep 10, 2022 5:58 pm
by MattiaBerton
Hello,
for a project I'm developing I need to see if an object (in my case, a bottle) is present in a shelf. There are 3 rows and 12 columns for each shelf, which is about 60cm x 150 cm. I can use more than 1 cam to see the objects.
I never used any type of image recognition, so I would like to understand if you think it's a good idea - in your opinion - using a cam to capture the bottle on the shelf and then make an image recognition.
What you think about it? Could it be possible? What instrument and libraries should I use?
Thanks!

Re: Position detection using ESP32

Posted: Sat Sep 10, 2022 6:29 pm
by Craige Hales
Search for OpenCV (computer vision.)
https://github.com/joachimBurket/esp32-opencv
The problem will be simpler if you can use a single camera above the shelf, and good contrast colors. Then you are just counting circular patches of not-shelf-color or bottle-cap-color. OpenCV might be overkill for that, but probably has the exact code already written.
If you must look edge-on to the shelf, counting gets harder. But just detecting something is on the shelf (not counting) might be as simple as painting the wall behind the shelf a contrasting color and counting patches of not-background-color with more than N pixels.
Good lighting will be important.

Re: Position detection using ESP32

Posted: Mon Sep 12, 2022 8:28 am
by MattiaBerton
Thank you for the tip, I will try the OpenCV