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

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 close merge delete

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

( 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?

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

Sort by ยป oldest newest most voted

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.

more