Based on previous results in digital topology, this paper focuses on algorithms related to topological invariants of objects in 2D and 3D Digital Spaces. Specifically, we are interested in hole counting objects in 2D and closed surface genus calculation in 3D. We also present a proof of the hole counting formula in 2D. This paper includes fast algorithms and implementations for topological invariants such as connected components, hole counting in 2D, and boundary surface genus for 3D. For 2D images, we designed a linear time algorithm to solve the hole counting problem. In 3D, we also designed a O(n) time algorithm to obtain the genus of a closed surface. These two algorithms are both in [Formula: see text] space complexity.
Algorithms for Computing Topological Invariants in Digital Spaces