Hello, I've just started (trying)to learn opencv for the purpose of a project. My project is a PET bottle exclusive bin that, before it stores the plastic bottles, checks if it is a plastic bottle or not and if it is, calculates the approximate volume via the right cylinder volume formula. I attempted to use ultrasonic distance sensors for the volume calculation to no avail. I then decided that the best solution is to use opencv image processing. So I got myself a Raspberry Pi 3 model B w 1 gb of ram and a Pi Camera.
I've come across a great article by Adrian Rosebrock on measuring objects dimensions via masking the image to detect its edges and enclosing it with minarearect. It then calculates the euclidean distances of the rectangle and converts the pixel distance to real world measurement. I made my own object measurement based from the article and integrated it with my pi camera. It works, but not so well. It encloses the bottle with the box but it is so noisy, the box moves around and it's unreliable. The best I could do is adjusting the Canny threshold parameters and hope for the best.
I've looked into Cascade classifiers and techniques like YOLO DNN, SIFT, SURF etc to try and classify the bottles instead of detecting its edges. Given a folder of plastic bottle images, it must correctly identify the plastic bottle and crop it. I can then get the dimensions of the bottle through the cropped image.
What can you guys suggest I will use for plastic bottle detection and measurement?
Parameters: *Plastic Bottle will be placed on an enclosure on its side, stationary, and will always be centered *Camera will be fixed on top of the enclosure having overhead view of the bottle. Height of camera from base of the enclosure is fixed. *Plastic bottles are not deformed and empty of liquids *Surface where the plastic bottle will be placed is colored black
After I have successfully implemented the plastic bottle recognition software, I might also try to implement shape deformation recognition. Any inputs, suggestions or comments would be really appreciated! Thanks!!