Simon
Simon

Reputation: 9425

Determine the volume of an object from pictures

Im doing some preliminary research into the problem stated above. I have read a bit about OpenCV and it looks like it may be able to help me out.

I have a subject (it is a metal chain) i can take pictures of and would like to determine the volume of one of the chain links. I can take as many pictures as required. What would be required to accurately calculate the volume of the link? Would i need some size reference in the pictures?

What i am thinking to achieve my goal is to reconstruct a 3D model using x number of images, then import it into Solidworks/CAD to calculate length/width/volume etc.

Any pointers would be appreciated.

Upvotes: 2

Views: 8693

Answers (2)

Jesse Seger
Jesse Seger

Reputation: 960

If the links were of the same general shape, could you create a base model in Solidworks? Then you could take 2 pictures, and side view and a top view. You would then need a way to judge the scale of the link in the picture. Then you could just drive the dimensions in Solidworks such as length, width, radius, etc.

Upvotes: 0

Throwback1986
Throwback1986

Reputation: 6005

I think that you could apply space carving in this instance (PDF can be downloaded from the link). This technique will allow you to construct a closed, polygonal representation of the subject.

And, yes, some means of establishing the scale of your object will be needed. Here is a brief discussion of the camera intrinsic and extrinsic parameters that are used to establish a relationship between an image pixel and an area (or volume). Since space carving requires that the viewpoint change between each frame, it's probably a good idea to recompute the external camera calibration parameters (extrinsic parameters) frequently. OpenCV has some capacity for determining camera parameters, see this reference or perhaps this tutorial.

Alteratively - if you can assume that the camera orientation will not change much between frames, you might try an easier method. As you suggested, an object of known size and orientation may be placed in the image, thereby providing scale cues. Note that this method is fairly straightforward, but will work under limited conditions. Foreshortening due to perspective and changes in perceived scale due to changing camera orientation will limit this method.

Once the "space" of the chain has been identified and represented in polygonal (i.e. meshed) form, it should be straight-forward to compute the volume. OpenCV provides some mathematical primitives that should help.

Upvotes: 3

Related Questions