## 2 Materials and Methods
### The Functions Required by the Visually Impaired People
#### 2.2.4 Walking Guide Strategy  
After the confidences for seven divisions are obtained, we give a walking guide strategy for the visually impaired user as follows.  
Case 1: If the _Conf_ > 0.5 in the middle division, then the middle division is chosen, and the voice prompt gives the instruction \"go straight.\" Otherwise, check _Conf_ in all divisions and go to Case 2.  
Case 2: Find the division with the highest _Conf_, which is larger than 0.2, in all divisions, then guide the user to walk to that division and the voice prompt gives instructions such as \"slightly right/left,\" \"right/left,\" or \"go straight.\"  
Case 3: If all _Conf_ values are smaller than 0.2, it means there is a dead-end ahead, and the user must turn around to find another way. In addition, it also occurs in the condition that the user looks up or down. Then the voice prompt plays the instruction \"dead.\"  
**Remark 1:**_If the selected division is the middle division continuously in Case 1 or Case 2, the voice prompt will not repeatedly play \"go straight\" to avoid interference with the user. For instance, all images in Figure 7 with the walking directions selections are shown in Table 4, and the corresponding voice prompts are given too._  
The above walking guide strategy is summarized as Algorithm 1 and Figure 8 below.  
At last, we have to add one more remark about the voice prompts. Although both crosswalks and sidewalks are walkable to the visually impaired user, they are different environments that the visually impaired users should know. When the visually impaired user walks on the crosswalk, they should pay more attention to the surrounding environment. In the walking guide strategy, one more function is added. When the middle division is chosen, and the user walks from the sidewalk (or crosswalk) to the crosswalk (or sidewalk), the voice prompt will alert the user that the environment is changed.  
```
Inputs:  The confidence score based on segmentation, \(Conf_{s}\in R^{1\times 7}\).  The confidence score based on the depth map obtained from ZED 2, \(Conf_{d}\in R^{1\times 7}\). Outputs:  The instruction of walking guide, \(select\in\)(\"go straight\", \"slightly left\", \"slightly right\", \"left\", \"right\"). Algorithm: while the system non-stop do \(Conf\)=minimum(\(Conf_{s}\), \(Conf_{d}\)) if\(Conf\)[3]=0.5, \(select\)= \"go straight\" else if\(Conf\)[ALL]=0.2, Find a value \(I\) satisfy maximum(\(Conf\)) equal \(Conf\)[1] if(\(I\) equal 3), \(select\)= \"go straight\" else if(\(I\) equal 2), \(select\)= \"slightly left\" else if(\(I\) equal 4), \(select\)= \"slightly right\" else if(\(I\) equal 0 or \(I\) equal 1), \(select\)= \"left\" else if(\(I\) equal 5 or \(I\) equal 6), \(select\)= \"right\" else, \(select\)= \"dead\" endwhile
```  
**Algorithm 1** Walking guide strategy  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Figure 7** & **Selected Division (Voice Prompt)** \\ \hline Figure 7a & dead-end, (dead) \\ Figure 7b & the third division from the left, (slightly left) \\ Figure 7c & the leftmost division, (left) \\ Figure 7d & the third division from the right (slightly right) \\ Figure 7e & the second division from the right, (right) \\ Figure 7f & The middle division (go straight) \\ \hline \hline \end{tabular}
\end{table}
Table 4: Walking guides and voice prompts in different cases.