Abstract
This paper observes a fitting cylinders problem for 3D shapes. The method presented defines two cylinders that fit well with the shape considered. These cylinders are easy and fast to compute. Would the 3D shape considered be digitized, i.e. represented by the set of voxels, the computation is asymptotically optimal. Precisely, the time required for the computation is \({{\mathcal {O}}}(N)\), where N is the number of voxels inside the shape. Next, we show how these fitting cylinders can be used to measure 3D shapes. More precisely, we define a new 3D shape measure that numerically evaluates how mach a shape given looks like a cylinder. Interestingly, both fitting cylinders have to be used to define such a measure—just one of them is not sufficient. The new measure is invariant with respect to translation, rotation, and scaling transformations, and ranges over the interval [0; 1], and takes the value 1 if and only if the shape considered is a perfect cylinder. It is robust and simple to compute.
Similar content being viewed by others
Data Availability
Now new data is provided by the authors, in this manuscript.
Notes
Here in, by a cylinder we mean a 3D body, not a cylindrical surface.
This is a cubic equation, whose solutions can be given in an explicit (but slightly complicated) form, by using Cardano’s result.
Notice that the fitting cylinders, in Fig. 2 are presented by their oval surfaces only — not as 3D closed bodies, as they are. This has been done for a better visualization purpose.
Notice that a comparison with just one of these fitting cylinders does not lead to the measure satisfying the desirable properties like those listed in the Theorem 1. This is, for example, because \({{\mathcal {C}}}_a(S) = {{\mathcal {C}}}_b(S)= 1\) cannot be true for an arbitrary shape (cylinder) S. More precisely, \({{\mathcal {C}}}_a(S) = {{\mathcal {C}}}_b(S)= 1\) would imply that S coincides with both fitting cylinders corresponding to the parameters a and b. This is not possible.
References
Aktaş MA, Žunić J (2013) A family of shape ellipticity measures for galaxy classification. SIAM J Imag Sci 6:765–781
Aylward S, Jomier J, Weeks S, Bullitt E (2003) Registration and analysis of vascular images. Int J Comput Vision 55:123–138
Chambers CP, Miller AD (2010) A measure of bizarreness. Quart J Polit Sci 5:27–44
Davenport H (1951) On a principle of Lipschitz. J Lond Math Soc 26:179–183
Duda RO, Hart PE, Stork DG (2001) Pattern classification, 2nd edn. Wiley, New York
Dupain Y, Kamae T, Mendés M (1986) Can one measure the temperature of a curve? Arch Ration Mech Anal 94:155–163
Edelsbrunner H, Pausinger F (2013) Stable length estimates of tube-like shapes. J Math Imaging Vis 50:164–177
Frangi AF, Niessen WJ, Vincken KL, Viergever MA (1998) ‘Multiscale vessel enhancement filtering’, MICCAI’98. LNCS 1496:130–137
Gabrielides CN, Sapidis NS (2020) Shape analysis of generalized cubic curves. Comput Aided Des 125:102849
Genctav A, Tari S (2019) Discrepancy: local/global shape characterization with a roundness bias. J Math Imaging Vis 61:160–171
Huxley MN, Klette R, Žunić J (2006) Precision of geometric moments in picture analysis. In: Klette R, Kozera R, Noakes L, Weickert J (eds) Chapter in Geometric Properties from Incomplete Data. Kluwer Publisher, pp 221–235
Hu M (1961) Visual pattern recognition by moment invariants. IRE Trans Inf Theory 8:179–187
Lain Z, Rosin PL, Sun X (2010) Rectilinearity of 3D meshes. Int J Comput Vis 89:130–151
Lo C-H, Don H-S (1989) 3-D moment forms: their construction and application to object identification and positioning. IEEE Trans Pattern Anal Mach Intell 11:1053–1064
Ma Z, Ma J, **ao B, Lu K (2017) A 3D polar-radius-moment invariant as a shape circularity measure. Neurocomputing 259:140–145
Mamistvalov AG (1998) n-Dimensional moment invariants and conceptual mathematical theory of recognition n-dimensional solids. IEEE Trans Pattern Anal Mach Intell 20:819–831
Marshall D, Lukacs G, Martin R (2001) Robust segmentation of primitives from range data in the presence of geometric degeneracy. IEEE Trans Pattern Anal Mach Intell 23:304–314
Martinez-Ortiz C, Everson R (2013) ‘Minkowski compactness measure,’ 13th UK Workshop on Computational Intelligence – UKCI, pp 62–66
Martinez-Ortiz C, Žunić J (2012) A family of cubeness measures. Mach Vis Appl 23:751–760
McGill 3D Shape Benchmark data set: http://www.cim.mcgill.ca/~shape/benchMark/. Accessed 2023
Misztal K, Tabor J (2016) Ellipticity and circularity measuring via Kullback-Leibler divergence. J Math Imaging Vis 55:136–150
Nievergelt Y (2013) Fitting cylinders to data. J Comput Appl Math 239:250–269
Nurunnabi A, Sadahiro Y, Lindenbergh R, Belton D (2019) Robust cylinder fitting in laser scanning point cloud data. Measurement 138:632–651
Proffitt D (1982) The measurement of circularity and ellipticity on a digital grid. Pattern Recogn 15:383–387
Rhouma MBH, Žunić J, Younis MC (2017) Moment invariants for multi-component shapes with applications to leaf classification. Comput Electron Agric 142:326–337
Rosin PL, Pantović J, Žunić J (2016) Measuring linearity of curves in 2D and 3D. Pattern Recogn 49:65–78
Rosin PL, Žunić J (2011) Measuring squareness and orientation of shapes. J Math Imaging Vis 39:13–27
Sadjadi FA, Hall EL (1980) Three-dimensional moment invariants. IEEE Trans Pattern Anal Mach Intell 2:127–136
Tool AQ (1910) A method for measuring ellipticity and the determination of optical constants of metals. Phys Rev (Series I) 31:1–25
Tran T-T, Cao V-T, Laurendeau D (2015) Extraction of cylinders and estimation of their parameters from point clouds. Comput Graph 46:345–357
Xu D, Li H (2008) Geometric moment invariants. Pattern Recogn 41:240–249
Zhang Z, Li J, Guo Y, Li X, Lin Y, **ao G, Wang C (2019) Robust procedural model fitting with a new geometric similarity estimator. Pattern Recogn 85:120–131
Žunić A (2018) Shape diameter for object analysis. Inf Process Lett 136:76–79
Žunić J, Hirota K, Rosin PL (2010) A Hu invariant as a shape circularity measure. Pattern Recogn 43:47–57
Žunić J, Hirota K, Dukić D, Aktas MA (2016) On a 3D analogue of the first Hu moment invariant and a family of shape ellipsoidness measures. Mach Vis Appl 27:129–144
Žunić J, Hirota K, Martinez-Ortiz C (2012) ‘Compactness measure for 3D shapes’, Proc. IEEE/IAPR ICIEV 2012 Conference. Dhaka (Bangladesh) 2012:1180–1184
Žunić J, Stojmenović M (2008) Boundary based shape orientation. Pattern Recogn 41:1768–1781
Žunić J, Žunić D (2016) Shape interpretation of second order moment invariants. J Math Imaging Vis 56:125–136
Acknowledgements
The authors wish to hank to Dr. Carlos Martinez-Ortiz for his help during the preparation of this paper.
Funding
This work is partially supported by the Serbian Ministry of Science and Technology.
Author information
Authors and Affiliations
Corresponding author
Additional information
Communicated by Wei GONG.
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
Žunić, J., Corcoran, P. Fitting cylinders computation with an application to measuring 3D shapes. Comp. Appl. Math. 42, 207 (2023). https://doi.org/10.1007/s40314-023-02348-0
Received:
Revised:
Accepted:
Published:
DOI: https://doi.org/10.1007/s40314-023-02348-0
Keywords
- Fitting 3D shapes
- Fitting objects by cylinders
- 3D moments
- Invariants
- Object fitting efficiency
- 3D shape measure