## 3 Methodology
### LiDAR-Camera Object Distance Extraction
#### 3.3.2 Central Region Depth Extraction  
The CeRDE estimates the object's distance by choosing a single representative point instead of evaluating all pixels within the bounding box and the segmentation mask. This approach greatly reduces computational complexity while it consistently increases the accuracy of the depth estimation. The bounding box that is shown in Figure 8a is a rectangular box delineating the detected object. The center point of the bounding box is determined by calculating the midpoint between its minimum and maximum coordinates along both the x-axis and y-axis. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Feature** & **Bounding Box** & **Segmentation Mask** \\ \hline Shape Precision & Rectangular & Exact object shape \\ Background Noise & Includes background pixels & Only object pixels \\ Distance Accuracy & May include far pixels & More precise \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Comparison of bounding box and segmentation mask for complete region depth extraction. Figure 8: (**a**) Bounding box representation with center point \((x_{c},y_{c})\) and (**b**) segmentation mask representation with center point \((x^{\prime}_{c},y^{\prime}_{c})\). Figure 7: Depth value points for each object in Complete Region Depth Extraction (CoRDE) result using the segmentation mask. The coordinates \(x_{\min}\), \(y_{\min}\), \(x_{\max}\), and \(y_{\max}\) provided by the object detection algorithm are used to determine the center point within the bounding box. The coordinates of the central point (\(x_{c}\), \(y_{c}\)) are computed using Equation (11). \[x_{c}=\frac{x_{\min}+x_{\max}}{2},\quad y_{c}=\frac{y_{\min}+y_{\max}}{2} \tag{11}\]  
Once the central point is identified, it is mapped onto the transparent Sparse Depth Image to extract the corresponding depth value. However, due to the low resolution of the LiDAR point clouds, the exact depth value at (\(x_{c}\), \(y_{c}\)) may not always be available. To address this issue, a (\(n\times n\)) pixel rectangular area is delineated around (\(x_{c}\), \(y_{c}\)), ensuring that at least a few depth values can be obtained from the Sparse Depth Image. The depth values of all eligible pixels within this rectangle are extracted and the minimum depth value is chosen as the estimated distance of the object using Equation (12). \[d_{\min}=\min\{I(x,y)\mid(x,y)\in R\} \tag{12}\]  
where \(R\) represents the set of pixels inside the (\(n\times n\)) rectangular area, and \(I(x,y)\) is the depth value at pixel (\(x_{c}\), \(y_{c}\)) in the transparent Sparse Depth Image. Depth values associated with each object are represented by color pixels to be clear in Figure 9.  
Segmentation masks provide a more precise depiction of the object by delineating the actual shape of the object, in contrast to bounding boxes, which only provide an approximate representation of the object's localization. To extract the depth information that is meaningful, the segmentation mask is converted into a polynomial. The central point of the segmentation mask is computed by averaging the coordinates of the polygon using Equation (13), ensuring that the estimated center accurately represents the object's true position instead of relying on the center of the bounding box. \(N\) is the total number of pixels in the polynomial, while (\(x_{i}\), \(y_{i}\)) are the coordinates of each polynomial pixel, as defined in Equation (13). \[x_{c}^{\prime}=\frac{1}{N}\sum_{i=1}^{N}x_{i},\quad y_{c}^{\prime}=\frac{1}{N} \sum_{i=1}^{N}y_{i} \tag{13}\]  
The coordinates (\(x_{c}^{\prime}\), \(y_{c}^{\prime}\)) are determined and then the depth value is extracted from the transparent Sparse Depth Image at this coordinate. However, due to the limited space of LiDAR data, the precise depth value at (\(x_{c}^{\prime}\), \(y_{c}^{\prime}\)) may be missing. To resolve this, a small search region around (\(n\times n\)) is examined and the minimum depth value in this region is found using Equation (12).