Home Syllabus Schedule AI Prompt Resources

Written Homework 4 - Solutions

CSSE 461 - Computer Vision

Solutions

Problem 1: Uniform Scaling

\[ \begin{bmatrix} 1.3 & 0 \\ 0 & 1.3 \end{bmatrix} \]

Problem 2: Scaling in X Direction

\[ \begin{bmatrix} 2 & 0 \\ 0 & 1 \end{bmatrix} \]

Problem 3: Shear Transformation

\[ \begin{bmatrix} 1 & 0.25 \\ 0 & 1 \end{bmatrix} \]

The 0.25 should be in the upper right since we’re modifying the new \(x\) coordinate as a function of the old \(y\) coordinate.

Problem 4: Rotation

Let \(a = 30 \cdot \pi / 180 \approx 0.524\) (i.e., 30 degrees in radians).

\[ \begin{bmatrix} \cos a & -\sin a \\ \sin a & \cos a \end{bmatrix} = \begin{bmatrix} \sqrt{3}/2 & -1/2 \\ 1/2 & \sqrt{3}/2 \end{bmatrix} \]

Problem 5: Translation

\[ \begin{bmatrix} 1 & 0 & 40\\ 0 & 1 & 40\\ 0 & 0 & 1 \end{bmatrix} \]

Problem 6: SSD Distance Table

Feature 1 Feature 2 Feature 3
F₁₁ 4 41 2
F₁₂ 2 41 4
F₁₃ 13 2 13
F₁₄ 1 20 5

Problem 7: Closest Feature Matches

Problem 8: Ratio Distance

Feature Closest match in F₁ Ratio
1 4 0.5
2 3 0.1
3 1 0.5

Problem 9: Translation Warping Matrix

\[ \begin{bmatrix} 1 & 0 & t_x\\ 0 & 1 & t_y\\ 0 & 0 & 1 \end{bmatrix} \]

Problem 10: Combined Image Size

\[h' = \max(h_1, h_2 + t_y)\]

\[w' = \max(w_1, w_2 + t_x)\]

Problem 11: Homography Residuals

\[ r_x = \frac{ax + by + c}{gx + hy + 1} - x' \]

\[ r_y = \frac{dx + ey + f}{gx + hy + 1} - y' \]