Search
H = u2H( u, u0 )
H = hw05.u2H( u, u0 )
Create function u2H computing homography from four image matches. Let u be the image coordinates of points in the first image (2×4 matrix/np.array) and u0 (2×4) be the image coordinates of the corresponding points in the second image. Then H is a 3×3 homography matrix (np.array), such that
u2H
u
u0
H
$\lambda_i \left[\begin{array}{c}u_{0 i}\\1\end{array}\right] = H \left[\begin{array}{c}u_i\\1\end{array}\right]$
for all i and some nonzero λ_i. Matrix H is regular. Return an empty array [] if there is no solution.
i
λ_i
[]
u2h_optim
point_sel
05_homography.mat
C
05_corrected.png
05_homography.pdf
The part of reference image is transferred to your image, so we need the transformation of coordinates in the opposite direction.
u0i
ui
Upload an archive consisting of:
hw05.m
hw05.py
The input entry point script hw05 should make all work without manual intervention.
hw05