## 3 Methodology
### LiDAR-Camera Object Distance Extraction
#### 3.3.3 Grid Central Region Depth Extraction  
The GCRDE is designed to enhance the accuracy of object distance estimation. This approach improves the object detection process by employing both bounding boxes and segmentation masks to improve depth estimates. Once an object is detected in an image, a grid is drawn over it to divide it into smaller regions for more precise depth extraction. The KITTI dataset provides occlusion levels and difficulty information based on object height. Depending on the information, objects with a bounding box or a segmentation mask height of a minimum of 25 pixels fall under the hard or moderate category. In this case, no grid is drawn, and only the central point of the entire bounding box or the segmentation mask is used. Equation (14) shows that \(y_{\text{min}}\) and \(y_{\text{max}}\) are determined by finding the top and bottom of the bounding box and the segmentation mask. \[height=y_{\text{max}}-y_{\text{min}}>25 \tag{14}\]  
If the object's bounding box or segmentation mask height exceeds a minimum of 40 pixels, a \(m\times m\) grid is created over the object, and the length and width of each grid cell are calculated using Equation (15). \[w_{cell}=\frac{x_{\text{max}}-x_{\text{min}}}{m},\quad h_{cell}=\frac{y_{\text {max}}-y_{\text{min}}}{m} \tag{15}\]  
Since the bounding box contains background pixels, direct depth extraction from its center can lead to inaccuracies. To prevent this, each grid cell's central point is calculated,  
Figure 10: Depth value points for each object in Central Region Depth Extraction (CeRDE) result using the segmentation mask. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Feature** & **Bounding Box** & **Segmentation Mask** \\ \hline Shape Precision & Extract (\(x_{c}\), \(y_{c}\)) Point & Extract (\(x_{c}^{\prime}\), \(y_{c}^{\prime}\)) Point \\ Background Noise & Only object pixels & Only object pixels \\ Distance Accuracy & More precise & More precise \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Comparison of bounding box and segmentation mask for Central Region Depth Extraction. ensuring a more localized and precise estimation. The central point of each grid cell \((x_{cell_{e}},y_{cell_{L}})\) is computed as follows:  
\[x_{cell_{e}}=x_{\min}+\left(i+\frac{1}{2}\right)w_{cell},\quad y_{cell_{e}}=y_{ \min}+\left(j+\frac{1}{2}\right)h_{cell} \tag{16}\]  
where \(i,j\) are the row and column indices of the grid cells, and they range from \(0\) to \(m-1\), as given by \(i,j\in\{0,1,\ldots,m-1\}\). The grids shown in Figure 11 were generated using the bounding box coordinates of each object, and then the center point of each grid cell was calculated based on these grids. Due to the lower resolution of the transparent sparse depth map, an (\(n\times n\)) pixel search area is used around each cell's central point. If depth values exist within this region, the minimum depth value is selected using Equation (12) to estimate the object distance. This process is repeated for each grid cell, ensuring that depth values are captured at multiple points in the object. Figure 12 illustrates the grid cells drawn on each object, with colors representing the distance measurement of these cells. Even though some grid cells belong to the same object, they appear in different colors. This variation occurs because object detection methods create bounding boxes that not only encompass the object itself but also capture parts of the surrounding background. Figure 12 shows how irrelevant background fields can influence the detected object distance. Each depth value that is extracted corresponds to a specific grid center point. In order to ensure consistency and robustness, a grouping process is applied. This process involves counting the number of grid cells that share the same depth value. The depth value that has the largest occurrence is then chosen as the object's final estimated distance.