I have a setup in which the orbbec sensor is pointing to a flat surface.
I select 3 random points of this surface and calculate the plane equation in the following form:
Ax+By+Cy+D = 0;
Of which (A, B, C) is the planes normal vector.
Expanding from this i can take any pixel x,y,z in the depth map and calculate its vertical distance to this plane in the following manner:
L = |A * x + B * y + C * z + D| / sqrt(a^2 + b^2 + c^2 )
My problem is, though the result L makes sense (higher objects get higher values), it has a significant error (20-30%). This error wouldn't matter for many applications, but I do need to have somewhat precise readings. I suspect that this error comes from the fact that I never take into account lens distortion and pixel angular size.
Can someone help me understand how do I incorporate this factor into my calculations?
All the best.