Given a pinhole camera with known 3x4 calibration matrix $P$ how do we find the 3x3 homography matrix $H$ that can map 2D image points to 3D world points given that the 3D points are constrained to a known world plane $\pi$?
Hartley and Zissermann's Multiple View Geometry section 8.1.1 gives a simple case with the world plane $Z=0$.
$$x=PX=\begin{bmatrix}p1 & p2 & p3 & p4\end{bmatrix}
\begin{pmatrix}X \\ Y \\ 0 \\ 1\end{pmatrix}
=\begin{bmatrix}p1 & p2 & p4\end{bmatrix}
\begin{pmatrix}X \\ Y \\ 1\end{pmatrix}
$$
Here the 3x3 homography that maps world points to image points is given by $H=\begin{bmatrix}p1 & p2 & p4\end{bmatrix}$ and the inverse $H^{-1}$ maps homogeneous pixels to world points $$X=H^{-1}x$$
In my case the world points are constrained to a known plane that is parallel to $Z=0$ but offset some known amount $a$. I tried to solve:
$$x=PX=\begin{bmatrix}p1 & p2 & p3 & p4\end{bmatrix}
\begin{pmatrix}X \\ Y \\ a \\ 1\end{pmatrix}$$
But I'm not sure how to proceed in this case because I can't invert the 3x4 matrix on the right. If it exists I'm looking for a solution that gives $H^{-1}$ with parameter $a$ so I don't have to invert a matrix for each point I want to map.