Rectifying Homographies for Stereo Vision: Analytical Solution for Minimal Distortion

  • Conference paper
  • First Online:
Intelligent Computing (SAI 2022)

Abstract

Stereo rectification is the determination of two image transformations (or homographies) that map corresponding points on the two images, projections of the same point in the 3D space, onto the same horizontal line in the transformed images. Rectification is used to simplify the subsequent stereo correspondence problem and speeding up the matching process. Rectifying transformations, in general, introduce perspective distortion on the obtained images, which shall be minimised to improve the accuracy of the following algorithm dealing with the stereo correspondence problem. The search for the optimal transformations is usually carried out relying on numerical optimisation. This work proposes a closed-form solution for the rectifying homographies that minimise perspective distortion. The experimental comparison confirms its capability to solve the convergence issues of the previous formulation. Its Python implementation is provided.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
EUR 32.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or Ebook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
EUR 29.95
Price includes VAT (Spain)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
EUR 192.59
Price includes VAT (Spain)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
EUR 239.19
Price includes VAT (Spain)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free ship** worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

Notes

  1. 1.

    It can be shown that approaching the roots of the denominator of the distortion function both from the upper and lower limit, the function always goes to \(+\infty \), therefore the global minimum never reaches \(-\infty \), as in Fig. 3.

References

  1. Abraham, S., Förstner, W.: Fish-eye-stereo calibration and epipolar rectification. ISPRS J. Photogramm. Remote. Sens. 59(5), 278–288 (2005)

    Article  Google Scholar 

  2. Besl, P.J.: Active optical range imaging sensors. In: Sanz, J.L.C. (ed.) Advances in Machine Vision, pp. 1–63. Springer, New York (1989). https://doi.org/10.1007/978-1-4612-4532-2_1

  3. Chen, Z., Wu, C., Tsui, H.T.: A new image rectification algorithm. Pattern Recogn. Lett. 24(1–3), 251–260 (2003)

    Article  Google Scholar 

  4. Deriche, R., Zhang, Z., Luong, Q.-T., Faugeras, O.: Robust recovery of the epipolar geometry for an uncalibrated stereo rig. In: Eklundh, J.-O. (ed.) ECCV 1994. LNCS, vol. 800, pp. 567–576. Springer, Heidelberg (1994). https://doi.org/10.1007/3-540-57956-7_64

    Chapter  Google Scholar 

  5. Fusiello, A., Trucco, E., Verri, A.: A compact algorithm for rectification of stereo pairs. Mach. Vis. Appl. 12(1), 16–22 (2000)

    Article  Google Scholar 

  6. Gallier, J.: Basics of projective geometry. In: Gallier, J. (ed.) Geometric Methods and Applications, pp. 103–175. Springer, New York (2011). https://doi.org/10.1007/978-1-4419-9961-0_5

  7. Gluckman, J., Nayar, S.K.: Rectifying transformations that minimize resampling effects. In: Proceedings of the 2001 IEEE Computer Society Conference on Computer Vision and Pattern Recognition, CVPR 2001 (2001)

    Google Scholar 

  8. Hartley, R., Zisserman, A.: Multiple View Geometry in Computer Vision, 2nd edn. Cambridge University Press, Cambridge (2003)

    MATH  Google Scholar 

  9. Hinzmann, T., Schönberger, J.L., Pollefeys, M., Siegwart, R.: Map** on the fly: real-time 3d dense reconstruction, digital surface map and incremental orthomosaic generation for unmanned aerial vehicles. In: Hutter, M., Siegwart, R. (eds.) Field and Service Robotics. SPAR, vol. 5, pp. 383–396. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-67361-5_25

    Chapter  Google Scholar 

  10. Hornberg, A.: Handbook of Machine and Computer Vision: The Guide for Developers and Users. Wiley, Weinheim (2017)

    Google Scholar 

  11. Kumar, S., Micheloni, C., Piciarelli, C., Foresti, G.L.: Stereo rectification of uncalibrated and heterogeneous images. Pattern Recogn. Lett. 31(11), 1445–1452 (2010)

    Article  Google Scholar 

  12. Loop, C., Zhang, Z.: Computing rectifying homographies for stereo vision. In: 1999 IEEE Computer Society Conference on Computer Vision and Pattern Recognition, vol. 1 (1999)

    Google Scholar 

  13. Lu, H., Plataniotis, K., Venetsanopoulos, A.N.: Multilinear Subspace Learning: Dimensionality Reduction of Multidimensional Data. Chapman & Hall/CRC (January 2013)

    Google Scholar 

  14. Luong, Q.-T., Faugeras, O.D.: The fundamental matrix: theory, algorithms, and stability analysis. Int. J. Comput. Vis. 17(1), 43–75 (1996)

    Article  Google Scholar 

  15. Monasse, P., Morel, J.-M., Tang, Z.: Three-step image rectification. In: BMVC 2010-British Machine Vision Conference (2010)

    Google Scholar 

  16. **ao, R., Sun, W., Pang, J., Yan, Q., Ren, J.: DSR: direct self-rectification for uncalibrated dual-lens cameras. In: International Conference on 3D Vision (2018)

    Google Scholar 

  17. Liansheng, S., Jiulong, Z., Duwu, C.: Image rectification using affine epipolar geometric constraint (2009)

    Google Scholar 

  18. Sun, C.: Closed-form stereo image rectification. Association for Computing Machinery (2012)

    Google Scholar 

  19. Turrini, C.: Geometria per la ricostruzione tridimensionale (2017)

    Google Scholar 

  20. **a, R., et al.: An accurate and robust method for the measurement of circular holes based on binocular vision. Measure. Sci. Technol. 31(2), 025006 (2019)

    Article  Google Scholar 

  21. Yin, X., Wang, X., Yu, J., Zhang, M., Fua, P., Tao, D.: FishEyeRecNet: a multi-context collaborative deep network for fisheye image rectification. In: Ferrari, V., Hebert, M., Sminchisescu, C., Weiss, Y. (eds.) ECCV 2018. LNCS, vol. 11214, pp. 475–490. Springer, Cham (2018). https://doi.org/10.1007/978-3-030-01249-6_29

    Chapter  Google Scholar 

  22. Zhang, Z.: A flexible new technique for camera calibration. IEEE Trans. Pattern Anal. Mach. Intell. 22(11), 1330–1334 (2000)

    Article  Google Scholar 

  23. Xue, Z., Xue, N., **a, G.-S., Shen, W.: Learning to calibrate straight lines for fisheye image rectification (April 2019)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Pasquale Lafiosca .

Editor information

Editors and Affiliations

Appendix A

Appendix A

The coefficients of the \(4^{th}\) order polynomial expression in \(y_1\) of Eq. (38) are:

$$\begin{aligned} \begin{aligned} a&= m_2 m_4+m_6m_8\\ b&= m_1 m_4+ 3 m_2 m_3 m_4+ m_5 m_8+3 m_6 m_7 m_8\\ c&= 3 m_1 m_3 m_4+3 m_2 m_3^2 m_4+3 m_5 m_7 m_8+3 m_6 m_7^2 m_8\\ d&= 3 m_1 m_3^2 m_4+ m_2 m_3^3 m_4+3 m_5 m_7^2 m_8+ m_6 m_7^3 m_8\\ e&= m_1 m_3^3 m_4+ m_5 m_7^3 m_8 \end{aligned} \end{aligned}$$
(40)

with:

$$\begin{aligned} \begin{aligned} m_1&= \left[ \mathbf {M}_1\right] _{2 3} \left[ \mathbf {C}_1\right] _{2 3}-\left[ \mathbf {M}_1\right] _{3 3} \left[ \mathbf {C}_1\right] _{2 2}\\[2pt] m_2&= \left[ \mathbf {M}_1\right] _{2 2} \left[ \mathbf {C}_1\right] _{2 3}-\left[ \mathbf {M}_1\right] _{2 3} \left[ \mathbf {C}_1\right] _{2 2}\\[2pt] m_3&= \frac{\left[ \mathbf {C}_2\right] _{2 3}}{\left[ \mathbf {C}_2\right] _{2 2}}\\[2pt] m_4&= \frac{\left[ \mathbf {C}_2\right] _{2 2}}{\left[ \mathbf {C}_1\right] _{2 2}}\\[2pt] m_5&= \left[ \mathbf {M}_2\right] _{2 3} \left[ \mathbf {C}_2\right] _{2 3}-\left[ \mathbf {M}_2\right] _{3 3} \left[ \mathbf {C}_2\right] _{2 2}\\[2pt] m_6&= \left[ \mathbf {M}_2\right] _{2 2} \left[ \mathbf {C}_2\right] _{2 3}-\left[ \mathbf {M}_2\right] _{2 3} \left[ \mathbf {C}_2\right] _{2 2}\\[2pt] m_7&= \frac{\left[ \mathbf {C}_1\right] _{2 3}}{\left[ \mathbf {C}_1\right] _{2 2}} \\[2pt] m_8&= \frac{\left[ \mathbf {C}_1\right] _{2 2}}{\left[ \mathbf {C}_2\right] _{2 2}} \end{aligned} \end{aligned}$$
(41)

The four roots of the equation are given by:

$$\begin{aligned} y_1=\frac{-b}{4a}\pm Q\pm \frac{1}{2}\sqrt{-4 Q^2-2p+\frac{S}{Q}} \end{aligned}$$
(42)

with:

$$\begin{aligned} \begin{aligned} Q&= \frac{1}{2}\sqrt{-\frac{2}{3}p+\frac{1}{3a}\left( \varDelta _0+\frac{q}{\varDelta _0}\right) }\\ S&= \frac{8 a^2d-4 a b c +b^3}{8 a^3}\\ \varDelta _0&= \left( \frac{s+\sqrt{s^2-4q^3}}{2}\right) ^{\frac{1}{3}}\\ p&= \frac{8 a c -3 b^2}{8 a^2} \\ q&= 12 a e -3 b d +c^2\\ s&= 27 a d^2-72 a c e + 27 b^2 e -9 b c d +2 c^3 \end{aligned} \end{aligned}$$
(43)

Remark: for the case \(\mathbf {A}_1 = \mathbf {A}_2\), \(\mathbf {P}_1 = \mathbf {P}_2\), \(\mathbf {P}_{c1} = \mathbf {P}_{c2}\) and \(\mathbf {R}_1 = \mathbf {R}_2\), the solution is given by:

$$\begin{aligned} y_1=-\frac{m_1}{m_2} \end{aligned}$$
(44)

Rights and permissions

Reprints and permissions

Copyright information

© 2022 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Lafiosca, P., Ceccaroni, M. (2022). Rectifying Homographies for Stereo Vision: Analytical Solution for Minimal Distortion. In: Arai, K. (eds) Intelligent Computing. SAI 2022. Lecture Notes in Networks and Systems, vol 507. Springer, Cham. https://doi.org/10.1007/978-3-031-10464-0_33

Download citation

Publish with us

Policies and ethics

Navigation