Ask Your Question
0

Can OpenCV be utilized to take dimensions of a shipping package

asked 2016-12-15 07:11:07 -0600

We are trying to simplify the measurements of shipping packages for UPS & Fedex. Can OpenCV use an image to calculate Length Width and Height of a package from an image taken on a Android Device?

edit retag flag offensive close merge delete

Comments

it's nothing special to opencv, but with a single (calibrated) camera, you can only calculate the size of an object, if you know the distance (and vice versa). see pinhole model

berak gravatar imageberak ( 2016-12-15 08:09:30 -0600 )edit

Thanks is there an existing program that does this that I can tap into?

qfaison gravatar imageqfaison ( 2016-12-15 09:40:36 -0600 )edit

no idea, sorry. how do you plan to solve above problem ?

opencv can help you with the calibration, and with finding the (pixel) contours of your target.

(next problem is: after a calibration, you must not change the focus, ever, which might be almost impossible on a phone, where you can't control that)

berak gravatar imageberak ( 2016-12-15 09:59:57 -0600 )edit
1

So my thoughts would be to have a stationary camera on a pole over the Shipping Scale that would take the exact same photo from the exact same distance every time. If I can have a program that would calculate the dimensions then I could record it in our web based system which would be good enough... Just need the program ..lol Any help is greatly appreciated

qfaison gravatar imageqfaison ( 2016-12-15 10:15:06 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2016-12-15 20:11:30 -0600

Tetragramm gravatar image

If you're using one camera, you use OpenCV to calibrate the camera, and the rest is straight geometry.

THIS tutorial is how to calibrate the camera.

THIS function gets you field of view in degrees.

You have an angle, and a known distance. All else is triangles.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-12-15 07:11:07 -0600

Seen: 242 times

Last updated: Dec 15 '16