Task 1: Affine Rectification
Input image | Annotated parallel lines on input image | Affine-Rectified image |
---|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Verification
Test lines on input image | Test lines on Affine-Rectified image | Angles | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
![]() |
|
|||||||||
![]() |
![]() |
|
|||||||||
![]() |
![]() |
|
|||||||||
![]() |
![]() |
|
|||||||||
![]() |
![]() |
|
Implementation
- For each pair of parallel lines, compute the vanishing point.
- Use 2 vanishing points to compute the line at infinity \[l_{\infty}' = \begin{bmatrix} l_0\\ l_1\\ l_2 \end{bmatrix}\]
- According to \( H^T l_{\infty} = l_{\infty}'\), compute \[ H = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ l_0 & l_1 & l_2 \end{bmatrix} \]