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

asked Jan 17 '19

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?

Preview: (hide)

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 (Jan 17 '19)edit

Thanks that helped me a lot!

LuisK gravatar imageLuisK (Jan 17 '19)edit