Compute camera height

I have a dataset of images taken by Kinect (RGB+Depth). This dataset is for person detection so I do have the bounding box or/and the skeleton of the person.

I need to compute or estimate the height of the camera from the floor. Is it possible? if so how?

edit retag close merge delete

Sort by » oldest newest most voted First, you have to transform the image (depth) coordinates to a 3D point cloud (each point described by the x,y,z coordiantes).

If you can detect the floor plane (which is probably the lowest horizontal plane in the image at Y0) the camera is positioned at -Y0 height.

You can do it for example by iterating from 0 to Ymin and checking how many points you have at the given height.

If the floor is not visible, but you have the bounding box of the person, the floor level is probably at the minimal Y value of the bounding box. The same applies for a skeleton (except if the person is levitating).

more

Sorry I didn't get the second paragraph, Y0 means the minimum value of Y in the 3D point cloud? and what is "-Y0" the height of the camera?

1

By transforming the depth coordinates to a point cloud (depthToWorld or similar function), you'll have some points with (x,y,z) coordinates where (0,0,0) is at the camera position. If the camera is at Ycam=1000mm over the ground, then the ground plane will have Y0=-1000mm in the image. (you can see that Ycam=-Y0)

I finished developing a first version of estimating the height of the camera, and I thought to share it with you, maybe it will be usefull for you