## 2 Conceptual Design  
This research used image-sensing equipment to detect head rotation position information and complete the comparison of head posture changes. Due to the use of a telescope lens, the user does not need to be very close to the camera to get a clear head image, which can save processing time for face or head detection. A personal computer and a C++ object-oriented development platform were used for program development. In Microsoft Windows, the user's control speed was improved with simple operation methods. In the aspect of searching for the target object (the head), first we adjusted the proper skin color threshold value for image input and, at the same time, calculated the coordinates of the center of the head (Figure 1). \[\left\{ \begin{array}{c}g(x,y)=1,\ (R_{XY}>R_{min}\&\&R_{XY}<R_{max}\&\&\&G_{XY}>G_{ min}\&\&G_{XY}<G_{max}\&\&B_{XY}>B_{min}\&\&\&B_{XY}<B_{max})\\ g(x,y)=0,\text{ }\text{otherwise}\end{array} \right. \tag{1}\]  
where \(R_{XY}\), \(G_{XY}\), and \(B_{XY}\) are the values of RGB components. \(Rmax\), \(Rmin\), \(Gmax\), \(Gmin\), \(Bmax\), and \(Bmin\) are the upper and lower values of RGB channels in the skin image. \(g(x,y)\) is the new gray level. Equation (1) assumed that in the RGB space skin color is cuboid, which was a simplification. We then activated the dynamic image search method and set up a dynamic image search frame by taking the coordinates of the barycenter point of the skin color part in the image (Figure 1) as the initial value. After finding the barycenter point (\(Ux\), \(Uy\)) in the image, the system proceeded to the validation process. \[U_{x}=\frac{\sum_{f=1}^{a}x_{f}}{a}, \tag{2}\]  
\[U_{y}=\frac{\sum_{f=1}^{a}y_{f}}{a}, \tag{3}\]  
where \(x_{f}\) and \(y_{f}\) are the coordinates of the points of the skin color part in the image. \(a\) is the number of pixels in the skin image. The user had to move along a specific path, according to the coordinates indicated by the system, to confirm that the system had retrieved the feature object. If not, the system must return to the initial setting to retrieve the feature object again. According to the head direction judgment rule of this study, the skin color barycenter point of the front-side image was taken as the datum point [18]. When the head moved, the system recorded the position of skin color points and then judged if the head moved upwards or downwards, according to the change in the position of the skin color points. If the number of skin color points after head movement was smaller than that of the front-side position, the result would be taken as an additional condition for subsequent direction judgment. The barycenter after object movement was then sought in the dynamic image search box. The relevance between the barycenter point after the movement and the new datum point (\(Ux_{2}\), \(Uy_{2}\)) was obtained in the judgment equation, and its corresponding status was displayed (Figure 2) [19]. Figure 1: The proper skin color threshold result in the image. The total number of skin color highlights of the front side of the head was _Ula_, while _Ula_2 was the total number of skin color highlights after head movement. When _Ula_2 was smaller than _Ula_, the judgment parameter _Ulc_ was set as 0; otherwise it was set as 1. \[\left\{ \begin{array}{l}if\ U_{a2}>U_{a}\,U_{c}=1\\ if\ U_{a2}<U_{a}\,U_{c}=0\end{array} \right. \tag{4}\]  
Here (_Ux_, _Uy_) are, respectively, the components \(x\) and \(y\) of the datum point; (_Ux_2, _Uy_2) are the respective components \(x\) and \(y\) of the barycenter coordinates of the image after its movement. When the head was raised or lowered, due to light reflection, many pixels belonging to the face were unrecognized as skin, so the system must have had a fault-tolerant design. After the above-mentioned judgment of head direction, the system was able to judge the upward, downward, leftward, and rightward movements of the head. In Figure 3, the blue parts show the facial positions traced by the system. The background was normally the wall of an office room.