# Advanced Methods for Point Cloud Processing and Simplification
## 7 Vectorization of Basic Space Features  
One of the point cloud processing aims is the decreasing of descriptive points. The meaning of the term vectorization is to describe a shape by the vertices points. For example, the knowledge of all border positions of pixels is unnecessary, only the vertices points are important for reconstruction of the shape, as is shown in Figure 13d. The proposed method for finding the vertices points is based on our presented method for the perimeter estimation (see reference [30]). Figure 14 illustrates the way how to determine the perimeter of a shape. The perimeter is not possible to determine as simply as the area by multiplication of the count of border pixels. Borders are extracted in the same way as in Algorithm 1. The additional analysis of these borders is necessary for precise perimeter estimation. We need to determine the direct and diagonal path of the perimeter. This mentioned problem solves the modified connected component algorithm for the determination of these borders, including the record of the searching direction of connected pixels, the perimeter path \(P_{p}\). The algorithm uses a different mechanism of searching connected pixels, see Figure 14b. When the first border pixel \(n\) is found, the neighbor pixel \((n+1)\) is searched in the direction denoting the numbers in Figure 14b. When the neighbor pixel \((n+1)\) is found, the actual searching ends. The pixel \((n+1)\) becomes the pixel \(n\) and the searching continues in the same way until all pixels of the border are found. For the direct pixel path, there are numbers 1, 3, 5 and 7 and their length is pixel size. Numbers 2, 4, 6 and 8 are used for the diagonal direction and their length  
Figure 14: Shape perimeter determination: (**a**) Shape with the marked optimal perimeter path; (**b**) Way of searching neighbor pixels on borders of a shape. is equal to the diagonal of one pixel. We also watch the score function in the Y-axis determining the position of the last pixel of the round perimeter against the first pixel of the perimeter. For more details, see paper [30]. Figure 14a gives the example of all possible occurrences of directions during the perimeter pixels searching. The optimal perimeter is marked by the light red color line. The number in the corner is the border pixel order and the bigger numbers are directions of their detection. The difference of the perimeter estimation in this simple example with consideration of diagonal direction against the simple pixel multiplication is 10%. We developed the algorithm for the shape vertices points extraction represented by a level image from the known history of the searching path \(P_{p}\), the score function \(Y_{s}\) and round perimeter condition. The pseudo-code is shown in Algorithm 2. ```
Input: Perimeter path \(P_{p}\);  Score function in the Y axis \(Y_{s}\)  Condition of circle perimeter \(cirP\) Output: Vertices of element \(cPos\)
1\(cP_{i}=0\)
2\(cPos(cP_{i}+\)+,\(\forall)=[P_{p}(1),1]\)
3 foreach \(P_{p}(\text{n})\in P_{p}\) from n = 2 do
4 if(\(cPos(cP_{i},1)\
eq P_{p}(\text{n})\)) then
5\(//\)last position before change
6\(cPos(cP_{i}+\)+,\(\forall)=[P_{p}(\text{n}-1),\text{n}-1]\)
7\(//\)actual position
8\(cPos(cP_{i}+\)+,\(\forall)=[P_{p}(\text{n}),\text{n}]\)
9 end if
10
11 end for
11 Exclude repeated items in \(cPos\)
12 if(\(cirP\)&&\(Y_{S}>0\)) then
13 Remove \(cPos(end,\)\(\forall)\)
14 end
```  
**Algorithm 2**Element Vertices Extraction  
The vertices positions are stored in the array \(cPos\). The first found border direction is written into this array. The next step is searching through the whole history of the direction path \(P_{p}\) from the index \(n=2\). The algorithm focuses on indexes with a change of path direction against the last found vertex \(cP_{i}\). When the direction change is detected, the actual path direction on \(n\) position is stored including the border position index. The corresponding values on position \((n-1)\) are stored too. The reason for this is obvious in Figure 14a.