3.1.3. Supervoxelization and Topological Organization
Supervoxelization of 3D data is a natural extension of superpixel detection in 2D images. These methods divide the 3D point cloud into meaningful regions, with the characteristic that this is an over-segmentation of the data. Over-segmentation reduces the complexity of post-processing while preserving essential structural and spatial information, being a crucial step in many computer vision tasks [
41,
42].
Among all the methods proposed for the supervoxelization of 3D point clouds, we used the algorithm discussed in [
43], since it is an edge-preserving algorithm. This feature proves vital when the proposed segmentation method relies on an edge point detection algorithm.
This method initially considers each 3D point to be a supervoxel. Iteratively, nearby supervoxels will be clustered following a minimisation procedure of an energy function,
, occurring whenever the following condition is satisfied:
where
is a regularisation parameter that initially takes a small value and increases iteratively;
is the number of points in the supervoxel
; and
is distance metric between the centroids,
and
, of the candidate supervoxels to be joined,
and
. This metric is defined as:
where
and
are, respectively, the normal vector associated with the supervoxels
and
; and
is the resolution of supervoxels.
Once the algorithm is completed, the set of supervoxels of the points cloud, , denoted as , is obtained, where . is the set that stores the points of that form the supervoxel j.
Formally, the algorithm implements a non-injective surjective function, that we called supervoxel assignation function, , in which each 3D point is associated with a supervoxel of . The inverse set-valued function, called points assignation function, , also exists and it is determined by the algorithm. The condition ensures that there are more points in the 3D cloud than supervoxels.
The following step involves constructing a graph structure, , that organizes the point cloud topologically, facilitating the remaining segmentation process. In , each node corresponds to one of the supervoxels of the point cloud.
To establish the edges of , we first identify the 3D points that lie on the boundaries between different supervoxels. Then, we connect the supervoxels in the graph whose boundary points touch each other. This connection forms the edges of the graph, thus connecting adjacent supervoxels.
To do this, we start by looking for the
nodes belonging to a given supervoxel
, using the
points assignation function,
. Next, we search for the nearest
neighbors to each of the
using a k-NN search [
35]. This set of adjoints points to
is denoted as
. Next, the
supervoxel assignation function,
, is applied
, to obtain the supervoxel to which the points in
belong.
From this set we define a logical function
that returns TRUE if the point
is on the edge of the supervoxel
, and FALSE otherwise, according to the following definition:
The set difference operation gives us a subset of the supervoxels that are neighbors of the supervoxel and are close to the point . If we apply the function to all points in the supervoxel, perform the union operation on these points, and then subtract , we obtain the set of neighbors of .
Formally, the set of supervoxels neighboring to
, that is denoted as
, will be given by the following expression:
In conclusion, is defined based on the supervoxels and the neighboring supervoxels of each supervoxel. This results in a graph that encapsulates the topological organization of the point cloud. Mathematically, we can define the vertices and edges of as follows:
Definition 1. Let be the set of vertices and
be the set of edges in the graph . Then: , where each is a supervoxel.
, where is the set of neighboring supervoxels to .
Our graph is undirected type, which means that an edge between two vertices and is identical to an edge between and . This characteristic is reflected in our definition of the set of edges, .
3.1.5. Segments Determination
The last stage of the algorithm consists of determining the different regions of the point cloud. To do this, we will perform two steps:
The region growing algorithm does not make use of geometrical similarity analysis between supervoxels, only the set of supervoxels, , and the topological sorting provided by .
If we denote the different regions as , and assuming that we are creating the region this step can be performed by following the steps below:
Initialize .
Choose a supervoxel not yet assigned to another region.
.
Determine the edges of in , .
, iff and .
Choose as new a supervoxel of of which neighborhood in the network has not yet been analyzed.
If there is that satisfies the condition in step 6, go back to step 4. Otherwise, the algorithm is finished.
This algorithm is repeated until every non-edge supervoxel is assigned to a region.
The final stage of segmentation is the inclusion of edge supervoxels in the regions identified previously. For this purpose, we will analyze the edge supervoxels, according to , and divide them into three types:
Edge supervoxels that have some non-edge supervoxels neighbors and all of them belong to a unique region. In this case, the supervoxel in question is assigned to the region to which its neighbours belong.
Edge supervoxels that have some non-edge supervoxels neighbours belonging to different regions. In this case, we apply equation (2) and assign the edge supervoxel to the region of the supervoxel with a lower distance value.
Edge supervoxels in which all its neighbours are edge supervoxels. The edge supervoxel is not assigned yet.
After applying these rules, some edge supervoxels may be not assigned to any region. Therefore, the procedure must be repeated iteratively until all supervoxels are assigned.