Take the 2-minute tour ×

I am using a depth camera to determine the distance from the camera to an object. Somehow, using this data, I would like to find the area of the object. The end goal is to find the volume of the object, but that will require user input and should be easy enough to obtain once I have the area of the objects.

The data looks like this. A 0 represents a point that the sensor couldn't resolve, so we can safely ignore all 0's. All other points are fair game. If needed, we can eliminate some of the larger values, since the idea is that the object being measure should be the closest one to the sensor. Let's say anything over 100 should be ignored. After this, we still have LOTS of points.

Each point represents one depth value. Now, each image can contain many objects, such as in the example above. However, thanks to the way the depth camera works, we can get a rough idea of where each object is thanks to the fact that there should be a jump in depths outlining each object. For example, if a book is at around 32 inches away, there may be a line that is around 60 inches away outlining that book. It's also helpful that we don't have to find the area of each object. By using the threshold of a certain distance and eliminating zeros, we can get a decent estimation of where the important object(s) lie(s) and do the math on that entire portion of the image (if necessary).

I can also get this data as vector point for the same positions, if that would be more helpful.

Any ideas on how to do something along these lines?

share|improve this question
This sounds like an interesting question, but I think you need to describe your exact setup in more detail. It sounds as if your depth camera returns one depth value per pixel, and as if each image always contains only one object. Pixels which are too close or too far away produce a depth value of zero. Maybe adding a sketch to your post would help... –  fgp Oct 13 '12 at 11:37
I can't add images due to only having 6 reputation on math, but I tried to clarify the question a bit more. –  Linell Oct 13 '12 at 14:47

Your Answer



Browse other questions tagged or ask your own question.