# Distance from depthPoint to floor without FloorClipPlane/bodyFrame

• ### Question

• Hi,

in my project i detect depth points an i need the distance to the floor.
I am not able to calculate the correct distance. I have a given sensor height (may be 2 meters, tilt 0) the y-value of the point is -0.2.
I convert to cameraspace an back to depthspace, but i get always incorrect values.

I try something like that:

```float distance = SENSORHEIGHT + csRightMax.Y;
CameraSpacePoint csDistance;
csDistance.X = csRightMax.X;
csDistance.Y = distance * -1;
csDistance.Z = csRightMax.Z;
DepthSpacePoint dsDistance = this.coordinateMapper.MapCameraPointToDepthSpace(csDistance);```

What is the correct way to calculate that without bodyFrames?

Thx for any help
René

• Edited by Tuesday, March 17, 2015 9:56 AM
Tuesday, March 17, 2015 6:25 AM

• ```private Point FloorPoint(Point topPoint)
{
CameraSpacePoint csPoint =	this.CameraSpacePointFromDepthSpace(topPoint, depthIndex[topPoint.Y, topPoint.X]);

float distance2Floor = SENSORHEIGHT - csPoint.Y;

csPoint.Y -= distance2Floor;

DepthSpacePoint dsBottom =	this.coordinateMapper.MapCameraPointToDepthSpace(csPoint);

return new Point((int)dsBottom.X, (int)dsBottom.Y);
}```

• Marked as answer by Wednesday, March 18, 2015 11:24 AM
Wednesday, March 18, 2015 11:23 AM