## 3 Materials and Methods
### Signing in at Inspection Points  
The patrolling of the robot does not only follow the path which is determined from the depth image, but also guided to the specified location by detecting inspection points. The inspection points are made by a colored marker and an RFID tag. As shown in Figure 6, the RFID tag as an inspection point is mounted on walls 12 cm above the ground in accordance with the RFID sensor of the robot. This location was marked using a red circular patch (diameter 4.8 cm) at 21 cm above the ground for the SVS system of robot to identify while the robot moving closer to the inspection point. The identification process is divided into two steps, color and shape recognition. In order to prevent the influence of light condition, color images from the SVS is transferred from RGB (red, green, and blue) to HSV (hue, saturation, and value) color space at first. Assume \(p_{r}\), \(p_{g}\), \(p_{b}\) are the values in RGB color space per pixel, \(\Big{[}\begin{array}{cc}p_{r}&p_{g}&p_{b}\end{array}\Big{]}\in[0,1]\), and \(p_{max}\), \(p_{min}\) are the maximum and minimum one in \(\Big{[}\begin{array}{cc}p_{r}&p_{g}&p_{b}\end{array}\Big{]}\), then the values in HSV color space per pixel can be calculated from:  
\[p_{h}=\cos^{-1}\Bigg{(}\frac{0.5\Big{(}2p_{r}-p_{g}-p_{b}\Big{)}}{\sqrt{\Big{(} p_{r}-p_{g}\Big{)}^{2}+(p_{r}-p_{b})\Big{(}p_{g}-p_{b}\Big{)}}}\Bigg{)} \tag{3}\]  
\[p_{s}=\left\{\begin{array}{cc}0&,\text{if}\,p_{max}=0\\ 1-\frac{p_{min}}{p_{max}}&,\text{ else}\end{array}\right. \tag{4}\]  
\[p_{v}=p_{max}. \tag{5}\]  
The transferred image is then binarized by the threshold which is defined as \(0^{\circ}\leq p_{h}\leq 10^{\circ}\), \(33.3\%\leq p_{s}\leq 56.9\%\), and \(29.4\%\leq p_{v}\leq 100\%\) to filter the red color. After the color recognition process, the circle Hough transform (CHT) function of the openCV library is then used for shape recognition.  
Figure 5: The region of interest (ROI) of (**a**) depth information and (**b**) color image of the SVS.  
Circles with a radius between 22 to 70 pixels in the binarized images are selected as candidates, and the biggest one is considered as an inspection point, such as depicted in Figure 6b.  
While the inspection point is detected, the function of the robot will change from patrolling to signing. Moreover, the algorithm used for signing is designed by controlling the robot to align the center of the detected circle. Assume the image coordinate of the detected circle center in horizontal is \(i_{cc}\), and the edges of the center region are \(i_{IT}\) and \(i_{T}\). If \(i_{cc}\) is less than \(i_{IT}\), then the robot is turned CCW for 15 degrees. On the other hand, if \(i_{cc}\) is larger than \(i_{T}\), then the robot is turned clockwise (CW) for 15 degrees. The 15 degrees of turning is limited by the minimum movement of the robot. As long as the value of \(i_{cc}\) falls between \(i_{IT}\) and \(i_{IT}\), then the robot moves toward the circle marker until the RFID tag is detected. This algorithm is described in (6). Based on experiment results, we set the values of \(i_{IT}\) and \(i_{IT}\) to 310 and 330, respectively.  
\[\left\{\begin{array}{l}\text{Turned CCW for 15}^{\circ},\text{ if }i_{cc}<i_{IT}\\ \text{Turned CW for 15}^{\circ},\text{ if }i_{cc}>i_{IT}\\ \text{Go forward},\text{ if }i_{IT}\leq i_{cc}\leq i_{IT}\end{array}\right., \tag{6}\]  
When the robot is sufficiently close to the RFID sensor to detect the RFID tag, the tag ID and sign-in time are recorded, and the signing task is deemed to have been completed. Based on the left-hand-rule, the robot then rotates CCW until the circle target is outside the viewing window, whereupon it continues its patrolling task.