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?