# how to know cylinder volume in pixels?

I have a 3D point cloud representing ad object. I use a 3D cylinder to fit this object in the point cloud, so I check if each point is inside the cylinder and, if it is, then I assign a weight to that point.

So, at the end I have an estimate of how many points fall inside the cylinder and what is the weight of the fitting.

Now I would like to normalize the fitting dividing for the cylinder volume but this is in decimeter so the proportion I think it is not right. I think I can't count and weight points and divide them for a metric number. I think that I have to transform the metric volume into the "number of points that the cylinder can contain". This is just an idea of mine.

But how can I do so? Do you have any other idea?

-
If the dimensions of the cylinder are significantly larger than the dimensions of a pixel (or rather voxel), then the standard "continuous" formula for the volume is a good approximation. Just be sure to measure radius and height in multiples of the voxel lattice spacing. –  Hagen von Eitzen Feb 17 '13 at 16:28

The volume of the cylinder is $V=\pi r^2 h$ in any unit system as long as you measure $r,h$ in the same units of length and $V$ in units of that same length$^3$ I don't understand what you mean about weighting the points. Looking at your title involving pixels, if each point represents a certain volume, you can divide this volume into the cylinder volume to see how many points will fit. It will not be exact as the edge of the cylinder is round. The error will get smaller as the number of pixels increases.

-
an object is represented from a sparse cloud point in which each point is represented from 3 coordinates (x,y,z). So each point doesn't represent a volume. I need to know how many points can contain the cylinder when it is completely full. –  Gappa Feb 17 '13 at 18:57
If the points are just points, the cylinder can contain an infinite number of them. I don't think I am understanding your question. Do you want to find a position of the cylinder that contains as few or as many points of the cloud as possible? –  Ross Millikan Feb 17 '13 at 21:49
These points are limited because I create them with stereovision transformation, so from a stereoscopic camera I can obtain the point cloud of the object I'm looking at. So the camera has some kind of precision, for that reason I can't get an infinite number of points. So there would be a method that permits me to recreate a "dense" point cloud that fill completely the cylinder and thus I'll get the volume in "number of points". For dense I mean points that are far each other only for a decimal. –  Gappa Feb 17 '13 at 23:01