## 3 Methods  
### Rode Detection  
In this study, fisheye cameras are utilized to address the processing of road detection by achieving a wider field of view compared to traditional cameras. Fisheye cameras provide more environmental information, which is highly beneficial for the robot's environmental perception. However, images captured by these cameras inherently exhibit distortion. In these images, straight lines in the real world appear curved, particularly towards the edges where significant arc-like distortions occur. Traditionally, various correction algorithms have been employed to rectify these distortions, such as the Straight Lines Spherical Perspective Projection Constraint (SLSPPC), the Ellipsoidal Function Model (EFM), and techniques based on three-view stitching. Considering the computational resource constraints in this study, a different approach was chosen: applying the algorithms  
Figure 3: Graphical diagram of a two-wheeled differential platform. directly to the uncorrected, distorted images. This approach requires the algorithm to handle the curved lines in the images, posing new design requirements. By acknowledging the distortion as an inherent feature of the fisheye camera images, this method incorporates it into the algorithmic processing. This reduces the computational load associated with distortion correction, enabling more efficient processing within the limitations of the available hardware. The methodology adopted in this study is illustrated in Figure 4. The process begins by converting the captured image into the HSV (Hue, Saturation, Value) color space and applying a filter to highlight the features of road markings, as shown in Figure 4a,b. Following this, the Canny edge detection algorithm is used to extract the edge features from the image, as depicted in Figure 4c. In distorted images, the density of edge features can potentially decrease the performance of standard road detection algorithms. However, this study leverages the density as an advantage. The approach involves analyzing the direction and length of each small segment of edges in the image and converting them into a series of localized road cues. This method's versatility lies in its ability to adjust the threshold values of the Canny algorithm based on the robot's computational capabilities. By altering these thresholds, the number of extracted edges can be increased or decreased, thus finding a balance between accuracy and computational speed. After extracting all the edges, the system divides the image into several analysis regions and uses Equation (11) to obtain the weight value of each region. \[\text{gain}= \begin{cases}0.5&\text{if}\Big{(}L_{yt}+L_{yr}\leq\lambda_{1} \Big{)}\\ 0.3&\text{if}\Big{(}L_{yt}+L_{yr}\leq\lambda_{2}\Big{)}\\ 0.2&\text{if}\Big{(}L_{yt}+L_{yr}\leq\lambda_{3}\Big{)}\end{cases}  \tag{11}\]  
where \(L_{yt}\) and \(L_{yr}\) are the average y-coordinates of the lane edge lines in each area, and \(\lambda_{1}\) to \(\lambda_{3}\) are the threshold values. Then, apply Equation (12) to calculate the error value of each area. The calculated average value of each area is used to construct the final road  
Figure 4: Image recognition of the road: (**a**) right mask status; (**b**) left mask status; (**c**) edge detection results; (**d**) final result. trajectory. The edge data of these areas are weighted and summed to calculate a combined error value that indicates the target navigation direction of the robot in the current state. \[\text{error}_{\text{image}}=\sum_{i=0}^{n}\text{gain}_{\text{i}}\times\left( \frac{Y_{ti}+Y_{ri}}{2}\right) \tag{12}\]  
In this study, the number of areas is defined as \(n\), and \(Y_{l}\) and \(Y_{r}\) are, respectively, defined as the \(y\) coordinates of both ends of the road edge line. This algorithm not only accounts for the characteristics of distorted images but also features an adaptive design that allows for parameter adjustments based on the robot's processing capabilities.