## 5 Curvilinear Path Approximation  
The guide paths tracked by an AGV may be straight or curvilinear. Usually, the operation points, e.g., loading and unloading workstations, are deployed on a straight path with high positioning accuracy. However, the curvilinear path is mostly used as the turning pathway to connect two adjacent straight paths. Hence, a relatively large guidance error can be tolerated when the AGV makes a turn on the curvilinear path. Moreover, a much simpler linear model is needed in the parameter estimation approach for the straight path, which has higher computational efficiency and stronger resist-interference performance, compared with the case for the curvilinear path. According to the principle of curve approximation in numerical control technology, a large number of small sections of basic lines (straight and circular) are considered to be able to approximate a complex irregular curve, as long as the step lengths of lines are small enough [43]. In order to make full use of the parameter estimation approach for the straight path, we propose a curvilinear path approximation method based on binary tree guidance window partition (BTGWP), which can convert a curvilinear path into a series of end-to-end connected straight paths, called a polyline path. The flowchart of the proposed method is shown in Figure 11. The method can automatically determine whether it is necessary to continue to partition the guidance window, based on the approximation error threshold \(\Delta\alpha\) predefined for the curvilinear path. Step 1: Acquiring the path image  
Obtain the binarized image of a curvilinear path after the path recognition based on the KPCA-BPNN classifier. Make a contour scan on the binarized image, and then collect the center pixel set \(\mathrm{S_{C}}\) of the curvilinear path. Step 2: Assuming a straight path model  
Assume that the center pixel set \(\mathrm{S_{C}}\) pertains to a straight path. The linear model is used in the IPSO-based path parameter estimation approach for the center pixel set \(\mathrm{S_{C}}\) in the whole guidance \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Image** & **Number of Noise Points** & **Number of Target Points** & **Accuracy Rate\%** \\ \hline Figure 10a & 7 & 76 & 100 \\ Figure 10b & 14 & 36 & 100 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Recognition accuracy of a straight path with noise points. Figure 10: The estimation results of the IPSO method for straight paths. (**a**) A straight path with highlights and (**b**) a straight path with coverings. window. The parameters of the straight path assumed are obtained, together with the output of the target points \(SN_{h}\) and the noise points. Step 3: Calculating the mean squared error  
Calculate the mean squared error \(\sigma_{h}^{pix}\) of the distances that are measured from each target point of the set \(SN_{h}\) to the straight path estimated. Compare the mean squared error \(\sigma_{h}^{pix}\) with the approximation error threshold \(\Delta\alpha\). Step 4: Partitioning the guidance window  
If the mean squared error \(\sigma_{h}^{pix}\) is less than or equal to the threshold \(\Delta\alpha\), the straight path is the final estimation result. Otherwise, divide the guidance window into two subguidance windows equally. Then, go back to Step 2 and continue to estimate the straight path model for each subguidance window. Taking the curvilinear path in Figure 12 as an example, we explain the specific implementation process of the BTGWP-based curvilinear path approximation method. In Figure 12, the blue points are the center pixel set \(\mathrm{S_{C}}\), surrounded by some noise points. Arc \(AB\) is the ideal curvilinear guide path. Line segment \(A_{1}B_{1}\) is the chord of arc \(AB\). Line segment \(JG\) is the vertical line from the vision measurement center \(J\) to chord \(A_{1}B_{1}\). Point \(T\) is the intersection point of line segment \(JG\) and curve \(AB\). \(q(k)\) is the direction of the tangent line through point \(T\) on Arc \(AB\).