# A Depression Recognition Method Based on the Alteration of Video Temporal Angle Features
## 3 Proposed Framework
### Flip Correction  
Human head movements commonly involve shaking the head laterally (left and right deflection) as well as tilting it upward and downward (referred to as pitch movement). The lateral deflection (roll) and pitch movement have a significant impact on the angular properties, consequently influencing facial expression recognition. Angle correction is essential to address changes in angular properties caused by target flipping. To achieve accurate flipping correction, it is crucial to comprehend the relationship between the flipping angle, target angle, and image angle in the two given scenarios. 4.1 When the Target Is Flipped Horizontally, There Exists a Relationship among the Target Angle, Image Angle, and Flip Angle  
The target's left and right deflection, known as \"Roll\", indicates rotation around the y-axis or a parallel straight line. Deflection of the target surface in the left and right directions causes a change in the image angle. First, establish a space coordinate system \(XFY\) as shown in Figure 5, where the point \(F\) is the optical center of the camera. Assuming that \(AB\) is parallel to the y-axis, and the image of \(AB\) is \(A^{\prime}B^{\prime}\), in the image plane \(\pi^{\prime}\), establish the \(uO^{\prime}v\) plane coordinate system, where \(u\) and \(v\) represent the horizontal axis and the vertical axis, respectively. Obviously, the \(A^{\prime}B^{\prime}\) and \(v\) axes are parallel. Suppose the intersection point of the target and the main optical axis of the camera is \(O\), and a plane \(\pi^{\prime}\) parallel to the image plane \(\pi_{1}\) is made through point \(O\), connect \(FA\) and extend \(\pi^{\prime}\) to intersect \(A_{1}\), connect \(FB\) and extend \(\pi^{\prime}\) to intersect \(B_{1}\). \(A^{\prime}B^{\prime}\) intersects \(u\) axis at \(D^{\prime}\), connects \(D^{\prime}F\) and extends, and intersects \(AB\), \(A_{1}B_{1}\) at \(D\), \(D_{1}\), respectively. Connect \(OD\) and \(OD_{1}\). In plane \(XFZ\), a straight line parallel to the z-axis passing through point \(D\) intersects \(OD_{1}\) at point \(D_{2}\), and a straight line drawn through point \(D\) along \(OD_{1}\) intersects the z-axis at \(D_{3}\). Because \(\pi^{\prime}\) is parallel to \(\pi_{1}\), there is the following Formula (6):  
\[\angle A^{\prime}O^{\prime}B^{\prime}=\angle A_{1}OB_{1} \tag{6}\]  
Let \(\angle A_{1}OB_{1}=\phi,\angle A_{1}OD_{1}=\phi_{1},\angle B_{1}OD_{1}=\phi_{2}, \angle AOB=\theta,\angle AOD=\theta_{1},\angle BOD=\theta_{2}\) and \(\phi_{1}+\phi_{2}=\phi,\theta_{1}+\theta_{2}=\theta\). Set the distance between point \(O\) and the optical center of the camera as \(m\), that is, \(|FO|=m\). Also, set the distance from point \(O\) to line segment \(AB\) as \(d\), that is, \(|OD|=d\). Suppose the length of line segment \(AB\) is \(c\), the length of \(AD\) is \(c_{1}\), and the length of \(BD\) is \(c_{2}\), then there is \(c_{1}+c_{2}=c\). Let \(\alpha\) be the angle between plane \(\Delta OAB\) and plane \(\pi_{1}\). Since \(DD_{2}\bot OD_{1}\), then there is the following Formula (7):  
\[ \begin{cases}|DD_{2}|=d\times sin\alpha\\ |DD_{3}|=d\times cos\alpha\end{cases}  \tag{7}\]  
\[\therefore\Delta DFD_{3}\approx\Delta D_{1}FO,\therefore\]  
\[|OD_{1}|=\frac{m\times d\times cos\alpha}{m-d\times sin\alpha} \tag{8}\]  
\[\therefore\Delta DFA\approx\Delta D_{1}FA_{1},\therefore\]  
\[|A_{1}D_{1}|=\frac{c_{1}\times m}{m-d\times\sin\alpha} \tag{9}\]  
In \(\Delta D_{1}OA_{1}\), there is the following Formula (10):  
\[\tan\phi_{1}=\frac{|A_{1}D_{1}|}{|OD_{1}|}=\frac{c_{1}}{d\times cos\alpha} \tag{10}\]  
\[\therefore\therefore tan\theta_{1}=\frac{c_{1}}{d},\therefore\]  
\[tan\phi_{1}=\frac{tan\theta_{1}}{cos\alpha} \tag{11}\]  
In the same way, there is the following Formula (12):  
\[tan\phi_{2}=\frac{tan\theta_{2}}{cos\alpha} \tag{12}\]  
Figure 5: The relationship between the target angle, image angle, and turnover angle during left and right deflections.