# Navigating a Service Robot for Indoor Complex Environments
## 2 Method
### Gender Recognition  
In the gender identification part, the features with higher classification accuracy are selected from LBP [17] and HOG (Histogram of Oriented Gradients) [18] of different scales, and then screened using \(p\)-values before being combined. The advantage of this method is that it uses the differences between LBP and HOG methods of calculation to increase the classification accuracy. Simple experiments show that the results of combining both is higher than using either one alone. In addition, using the \(p\)-value to filter can be used to pick out features that are more prominent, so that the number of classification features required would be greatly reduced, and the time required for training or testing could also be improved.  
After \(p\)-value is used to filter the statistical values of the texture features of HOG and LBP, the more robust features in the training samples are used to train a SVM (Support Vector Machine) [19] model, which is used as the basis for the classification of the test samples. The training and testing data were taken from the same online databases for facial recognition. We compared the accuracy rates of LBP, HOG, and LPB + HOG + \(p\)-value filtering. The results are shown below in Table 1. The rate of success of HOG + LBP + \(p\)-value filtering has reached 92.6%.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Feature (s)** & **Classification Accuracy** & **Feature Points** \\ \hline LBP & 91.8862\% & 2891 \\ HOG & 90.0464\% & 1548 \\ LBP + HOG + \(p\)-value & 92.6829\% & 1365 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Comparison of Gender Classification Accuracy Using Different Features.  
Figure 2: Facial and gender recognition flowchart.  
At this range, generally the obstacles tend to be at the bottom of the depth image. In order to speed up the process, we extract the regions of interest (ROI) from the entire image by disregarding the depth information from above the middle of the height of the image. This is also to avoid the effects of lighting from above. In [PERSON]'s paper [5], he listed eight possible scenarios for obstacle arrangement; where the scene is divided into five parts, and if any of the space is occupied by an obstacle then it is marked, as shown in Figure 5. For example, the obstacle arrangement in Figure 4c is the scenario of Figure 5d.  
In the most likely cases are cases (f-h), scenarios where the robot uses [PERSON]'s method randomly move left or right, and can easily make the wrong decision. So instead of detecting obstacle arrangement first before moving, we decided that the robot should actively seek gaps between obstacles while moving in order to find the largest gap and judge if there is a chance to pass through. Figure 6 shows the various gaps detected using this method. The proposed method would be more proactive than that proposed by [PERSON].  
Figure 5: [PERSON]’s eight obstacles scenarios. (**a**) No obstacle; (**b**) One obstacle at the far right; (**c**) Two obstacles at the right, separated by a gap; (**d**) One obstacle at the far left; (**e**) Two obstacles at the left, separated by a gap; (**f**) An obstacle at the middle; (**g**) Two obstacles at the far right and far left; (**h**) Three obstacles separated by two gaps.  
Figure 6: Threshold depth maps and detected gaps.