Determine relative 3d-position of camera to a rectangular plane.

asked 2019-01-17 07:29:20 -0600

LuisK gravatar image

I have the following: cameraMatrix (intrinsic parameters), distortionCoefficients, and 4 detected points of a Rect. In world coordinate system these 4 points all have z-coord of 0 (Rect lays on the ground). I know the proportion of the rect in world coordinates (width and height).

I know that homography can be used to relate pixel coordinates of same plane in two different images.

I want to generate depth information of camera in relation to this plane (maybe out of homographyMat ?). So some information like: cameraHeight above ground (resp. relative camera position to the plane) and the angle/angles between optical camera axis and axis perpendicular to the plane.

Is this possible?

edit retag flag offensive close merge delete

Comments

1
  • "world" coords don't exist here. it's all relative to the camera
  • a homography gives you new coords for a known object in another image, not the camera pose, imho, you need solvePnP() here instead
  • maybe this tutorial or this one helps ?
berak gravatar imageberak ( 2019-01-17 07:53:35 -0600 )edit

Thanks that helped me a lot!

LuisK gravatar imageLuisK ( 2019-01-17 11:25:26 -0600 )edit