Home > Blockchain >  How to detect only specific objects like cardboard boxes?
How to detect only specific objects like cardboard boxes?

Time:04-27

Imagine a factory warehouse, there are different sized boxes which loaded with products. I want to measure these.boxes with a camera. There is no background, background is natural factory warehouse. I have a code for measuring. But this code measuring everything. I want to measure only boxes.

I have code for measuring objects but How to detect only cardboard boxes with opencv?

Should i detect with color filter or with yolo?

Also maybe user will measure other objects instead of cardboard boxes like industrial machines etc. Maybe i need more general solution...

camera facing with width,height(180degrees).

enter image description here

As you see code measuring everything but I want only cardboard Boxes. I have tried filter colors with Hue, Saturation, Volume. But it didnt work because I'm using Aruco perimeter. Aruco perimeter is Black and White. When i lost other colors, Aruco perimeter is lost too. And maybe there would be different colored boxes.

CodePudding user response:

Did your use any deep learning(DL) methods for cardboardboxes detection? If not, I recommend you to use yolov5 method based DL or choose some machine learning methods such as HOG with SVM. The advantage you use DL methods is that you only need label this boxes and pass the data(images and annotations) to model without worrying about whatever other object.

CodePudding user response:

You can try detecting rectangular or quadrilateral contours in a copy of B/W frame and then correlate the contours to the original(colored) frame. Thus you can apply color filtering on it to detect cardboard box. The advantage of this over DL would be DL might take more processing power.

  • Related