Given 4 or more point correspondences $(x_i, y_i) \leftrightarrow (x'_i, y'_i)$, we can solve for $H$ using the Direct Linear Transformation (DLT) algorithm.
The core relationship $\mathbf{x}' \times H\mathbf{x} = \mathbf{0}$ yields two linearly independent equations for each point pair:
Where $\mathbf{h}_j$ is the $j$-th row of $H$. Stacking these for multiple points forms a large matrix $A$.
In practice, we solve $A\mathbf{h} = \mathbf{0}$ as a least-squares problem using Singular Value Decomposition (SVD). The optimal solution is the unit singular vector corresponding to the smallest singular value of $A$.
Drag the projected coordinates into the correct slots for Point 1 ($x_1, y_1, 1 \leftrightarrow x'_1, y'_1, w'_1$).