Skip to main content

A Cuboid Volume Measuring Method Based on a Single RGB Image

  • Conference paper
  • First Online:
  • 627 Accesses

Part of the book series: Communications in Computer and Information Science ((CCIS,volume 1787))

Abstract

We should estimate the camera’s pose when utilizing a camera to measure volume. Traditional methods based on monocular camera lack depth, so they can’t estimate a camera’s pose from image to spatial features. And the principle of binocular cameras usually has errors in the centimeter range in volume. Considering these problems, this paper proposes a new method to measure the cuboid volume using a monocular camera, relying on geometric relationships about angles from 2D to 3D. This thesis has two advantages: firstly, the camera pose parameters, i.e. orientation and position, are easily recovered from the correspondence between a corner and a nonsingular point of a view; secondly, experiments using OpenCV present good results, and the real images show the method to be extremely promising. Volume measurement can be achieved with just one image, requiring low computing power of the computing device, easy to implement, at low cost, and with errors that can be down to the millimeter level, improving the measurement accuracy.

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

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   89.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   119.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

References

  1. Mur-Artal, R., Montiel, J.M.M., Tardos, J.D.: ORB-SLAM: a versatile and accurate monocular SLAM system. IEEE Trans. Robot. 31(5), 1147–1163 (2015)

    Article  Google Scholar 

  2. Davison, A.J., Reid, I.D., Molton, N.D., Stasse, O.: MonoSLAM: real-time single camera SLAM. IEEE Trans. Pattern Anal. Mach. Intell. 29(6), 1052–1067 (2007)

    Article  Google Scholar 

  3. Wang, Y.M., Li, Y., Zheng, J.B.: A camera calibration technique based on OpenCV. In: The 3rd International Conference on Information Sciences and Interaction Sciences, pp. 403–406. IEEE (2010)

    Google Scholar 

  4. Liu, Y., Huang, T.S., Faugeras, O.D.: Determination of camera location from 2-D to 3-D line and point correspondences. IEEE Trans. Pattern Anal. Mach. Intell. 12(1), 28–37 (1990)

    Article  Google Scholar 

  5. Kumar, R., Hanson, A.R.: Robust estimation of camera location and orientation from noisy data having outliers. In: Proceedings Workshop on Interpretation of 3D Scenes, pp. 52–53. IEEE Computer Society (1989)

    Google Scholar 

  6. Ansar, A., Daniilidis, K.: Linear pose estimation from points or lines. IEEE Trans. Pattern Anal. Mach. Intell. 25(5), 578–589 (2003)

    Article  MATH  Google Scholar 

  7. Zhang, Z.: Camera calibration with one-dimensional objects. IEEE Trans. Pattern Anal. Mach. Intell. 26(7), 892–899 (2004)

    Article  Google Scholar 

  8. Shapiro, L.G., Stockman, G.C., et al.: Computer Vision, vol. 3. Prentice Hall, New Jersey (2001)

    Google Scholar 

  9. Su, C., Zhang, S., Xing, J., Gao, W., Tian, Q.: Deep attributes driven multi-camera person re-identification. In: Leibe, B., Matas, J., Sebe, N., Welling, M. (eds.) ECCV 2016. LNCS, vol. 9906, pp. 475–491. Springer, Cham (2016). https://doi.org/10.1007/978-3-319-46475-6_30

    Chapter  Google Scholar 

  10. Jia, Z., et al.: Improved camera calibration method based on perpendicularity compensation for binocular stereo vision measurement system. Opt. Express 23(12), 15205–15223 (2015)

    Article  Google Scholar 

  11. Hauck, A., Ruttinger, J., Sorg, M., Farber, G.: Visual determination of 3D grasping points on unknown objects with a binocular camera system. In: Proceedings 1999 IEEE/RSJ International Conference on Intelligent Robots and Systems. Human and Environment Friendly Robots with High Intelligence and Emotional Quotients (Cat. No. 99CH36289), vol. 1, pp. 272–278. IEEE (1999)

    Google Scholar 

  12. Zhang, Z.: Flexible camera calibration by viewing a plane from unknown orientations. In: Proceedings of the Seventh IEEE International Conference on Computer Vision, vol. 1, pp. 666–673. IEEE (1999)

    Google Scholar 

  13. Audet, S., Okutomi, M.: A user-friendly method to geometrically calibrate projector-camera systems. In: 2009 IEEE Computer Society Conference on Computer Vision and Pattern Recognition Workshops, pp. 47–54. IEEE (2009)

    Google Scholar 

  14. Hemayed, E.E.: A survey of camera self-calibration. In: Proceedings of the IEEE Conference on Advanced Video and Signal Based Surveillance, pp. 351–357. IEEE (2003)

    Google Scholar 

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

    Article  Google Scholar 

  16. Bradski, G., Kaehler, A.: Learning OpenCV: Computer Vision with the OpenCV Library. O’Reilly Media Inc., Sevastopol (2008)

    Google Scholar 

  17. Kaehler, A., Bradski, G.: Learning OpenCV 3: Computer Vision in C++ with the OpenCV Library. O’Reilly Media Inc., Sevastopol (2016)

    Google Scholar 

  18. Pulli, K., Baksheev, A., Kornyakov, K., Eruhimov, V.: Real-time computer vision with OpenCV. Commun. ACM 55(6), 61–69 (2012)

    Article  Google Scholar 

  19. Grisetti, G., Kümmerle, R., Stachniss, C., Burgard, W.: A tutorial on graph-based SLAM. IEEE Intell. Transp. Syst. Mag. 2(4), 31–43 (2010)

    Article  Google Scholar 

  20. Pritsker, A.A.B.: Introduction to Simulation and SLAM II. Halsted Press (1984)

    Google Scholar 

  21. Shi, F., Zhang, X., Liu, Y.: A new method of camera pose estimation using 2D–3D corner correspondence. Pattern Recognit. Lett. 25(10), 1155–1163 (2004)

    Article  Google Scholar 

Download references

Acknowledgements

The authors acknowledge the financial support of the Anhui Provincial Natural Science Foundation of China (Grant no. 2108085MF224).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Jianhua Shan .

Editor information

Editors and Affiliations

Appendix A

Appendix A

As shown in Fig. 3, we take \( |m_{0}q_{i}| = |m_{0}q_{j}| = 1; q_{i}q_{i}^{'} \perp \overrightarrow{l_{i}}^{'}, q_{j}q_{j}^{'} \perp \overrightarrow{l_{j}}^{'} \), so

$$\begin{aligned} |q_{i}^{'}q_{j}^{'}|^{2} = |q_{i}q_{j}|^{2} - (|q_{j}q_{j}^{'}| - |q_{i}q_{i}^{'}|)^{2} = 2 - (sin \theta _{j} - sin \theta _{i})^{2} \end{aligned}$$
(12)

In \( \triangle q_{i}^{'}m_{0}m_{j}^{'}\)

$$\begin{aligned} \begin{aligned} |q_{i}^{'}q_{j}^{'}|^{2}&= |m_{0}q_{i}^{'}|^{2} + |m_{0}q_{j}^{'}|^{2} -2|m_{0}q_{i}^{'}||m_{0}q_{j}^{'}|cos \phi _{ij} \\ {}&= (cos\theta _{i})^{2} + (cos\theta _{j})^{2} - 2cos\theta _{i}cos\theta _{i}cos\phi _{ij} \end{aligned} \end{aligned}$$
(13)

From Eqs. (12) and (13), we can get

$$\begin{aligned} tg\theta _{i}tg\theta _{j} + cos\phi _{ij} = 0,(i \ne j; i,j = 1,2,3) \end{aligned}$$
(14)

Rights and permissions

Reprints and permissions

Copyright information

© 2023 The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd.

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Ding, X., Shan, J., Zhang, D., Sun, Y., Zhao, L. (2023). A Cuboid Volume Measuring Method Based on a Single RGB Image. In: Sun, F., Cangelosi, A., Zhang, J., Yu, Y., Liu, H., Fang, B. (eds) Cognitive Systems and Information Processing. ICCSIP 2022. Communications in Computer and Information Science, vol 1787. Springer, Singapore. https://doi.org/10.1007/978-981-99-0617-8_39

Download citation

  • DOI: https://doi.org/10.1007/978-981-99-0617-8_39

  • Published:

  • Publisher Name: Springer, Singapore

  • Print ISBN: 978-981-99-0616-1

  • Online ISBN: 978-981-99-0617-8

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics