Ask Your Question

Can I measure suface of an object which can have any shape with this library.

asked 2017-09-20 16:49:47 -0500

yokohama gravatar image

updated 2017-09-21 03:18:45 -0500

The camera is fixed above a conveyer, where pieces of leathers (objects) passes under the camera. The camera analyze the image and by software (open CV) calculate the surface (in sq feet) of each object. The distance between the camera and the conveyer is always the same.

edit retag flag offensive close merge delete


You're going to have to be more specific. That's not enough detail to know what you mean or want.

Tetragramm gravatar imageTetragramm ( 2017-09-20 20:45:06 -0500 )edit

I have also interested, I can take several mesure for calibration, I think perpective is a exponentiel function. what is precision can I have, if I determine this function?

carton99 gravatar imagecarton99 ( 2017-09-21 02:51:46 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2017-09-21 19:08:39 -0500

Tetragramm gravatar image

You can indeed find the surface area of leather pieces like that, assuming they lie flat.

You need to calibrate the camera extremely well, and then it is a matter of simple math, and careful measurement. You lay the calibration target out on the conveyor and use solvePnP to get the camera location and orientation. And that gives you the plane of the conveyor relative to the camera. You can project the ray from the camera to the plane at any pixel, giving you a point. If you do that for the pixels that are the edges of the leather, and use those points to get the surface area.

You know the size of your calibration target, so you can use that as a test to make sure your code works properly.

The projection of the ray is outside of OpenCV, but it's just math. Google the intersection of a vector with a plane and you'll find the formulas. Give it a try, and we'll be glad to help you fix problems, but it's important you have tried to solve things already. We won't do it for you. This should be enough to get you started.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2017-09-20 16:49:47 -0500

Seen: 260 times

Last updated: Sep 21 '17