SolvePnP With Hidden Points

asked 2018-08-18 22:01:52 -0500

carlosgj gravatar image

Given a calibrated image containing a rectangle whose real-life coordinates I know, I can easily find the transformation between the camera coordinates and the image coordinates. However, I can't figure out how to compute the pose of the rectangle when one edge of it (and thus, two vertices) are out of the frame: image description

Intuitively, this seems like it should be possible: given the two points of the rectangle that are in view, the angles of the two partial edges, and the known dimensions of the rectangle, I think there's enough information to get the pose. However, solvePnP (or findHomography) requires >2 points, and I haven't been able to find any similar algorithm that works with lines instead of points.

I considered trying to calculate the image coordinates of the two missing points to pass to solvePnP, but as far as I can tell, determining the would-be image coordinates of the missing line of the rectangle would essentially require me to already know the homography I'm trying to compute.

edit retag flag offensive close merge delete

Comments

Nice question. I think there is no way to solve using PnP or homography. As you have lesser point to point correspondence you will not able to solve equations.

ak1 gravatar imageak1 ( 2018-09-05 01:27:08 -0500 )edit