Ask Your Question
0

PET bottle recognition

asked 2019-12-03 11:15:22 -0600

rexendz gravatar image

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!!

image description

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2019-12-04 00:48:04 -0600

Greydel gravatar image

Some ideas:

Take only a frame from the video, like a photo. It work for me.

Try houghcircles approximations instead of rectangle for contours, this is an example https://docs.opencv.org/master/d1/de6...

Try using lights with green filters, almost all cameras work better with green lights.

I'm also working with object recognition for logistics procedures. Be in touch.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2019-12-03 11:06:23 -0600

Seen: 1,578 times

Last updated: Dec 03 '19