I am implementing an algorithm to remove projective distortions on the following image.
I understand this is possible by applying the following transformation:
$$ \begin{matrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ l_1 & l_2 & l_3 \\ \end{matrix} $$
Where $$ l_\infty=(\begin{matrix}l_1 & l_2 & l_3 \end{matrix})^T $$ is the line at the infinity. In a perspective image of a plane, the line at infinity on the world plane is imaged as the vanishing line of the plane.
The vanishing line can be computed by intersecting two vanishing points which can be computed in the following ways:
- From the intersection of two sets of imaged parallel lines. But seems there are no two sets of imaged parallel lines on the image.
- Given two intervals on a imaged line $$\lt0,a^\prime,a^\prime+b^\prime\gt$$ with a known length ratio $$ d(0,a^\prime):d(a^\prime,a^\prime+b^\prime)=0:a^\prime $$ Where I need to solve the system (up to scale) $$\left(\begin{matrix}0 \\ 1\end{matrix}\right)=\left(\begin{matrix}h11 & h12 \\ h21 & h22\end{matrix}\right) \left(\begin{matrix}0 \\ 1\end{matrix}\right)$$ $$\left(\begin{matrix}a \\ 1\end{matrix}\right)=\left(\begin{matrix}h11 & h12 \\ h21 & h22\end{matrix}\right) \left(\begin{matrix}a^\prime \\ 1\end{matrix}\right)$$ $$\left(\begin{matrix}a+b \\ 1\end{matrix}\right)=\left(\begin{matrix}h11 & h12 \\ h21 & h22\end{matrix}\right) \left(\begin{matrix}a^\prime+b^\prime \\ 1\end{matrix}\right)$$ And compute the vanishing point as $$x^\prime=\left(\begin{matrix}h11 & h12 \\ h21 & h22\end{matrix}\right) \left(\begin{matrix}0 \\ 1\end{matrix}\right)$$ But I don't understand this approach as I don't have the world points $$\lt0,a,a+b\gt$$ and I don't know what serves me for knowing the length ratio.
- Using the cross ratio. Which I totally don't understand how could be possible to use in this case.
I would appreciate any insight about this.
Edit: isn't necessary to follow any particular approach just remind that the planar objects are irregular (no orthogonal angles in real world) congruent shapes (they have the same shape in real world)