AirContour 1:13 01D H Fig.15.Relationship between projected axis and plane included angle In regard toaresin the length ofisa fixed value (e.gait),if the projection's length 002|of O1P(i.e.,projection of h-axis,yh-axis or zh-axis)achieves the minimal value,then (and 03)achieves the minimal value,the plane perpendicular to this axis will be selected as the reference coordinate plane. Therefore,in human-frame,the coordinate plane perpendicular to the axis which has the shortest projection in principal plane,will be selected as the reference coordinate plane. In Fig.10(b),Fig.13(b)and Fig.14(b),the shortest projected axis from human-frame is yh-axis,Zh-axis,Th-axis,respectively.Thus,the corresponding reference coordinate plane is Th-Zh plane,Th-yh plane,and yh-Zh plane. 4.2.3 Reference Axis Pair Determination.As shown in Fig.6,when we detect the reference coordinate plane,we can determine the viewing angle based on the orientation of the coordinate plane.To describe the reference coordinate plane and its associated orientation, we introduce the reference aris pair.For the detected Th-zh plane,yh-Zh plane,Th-yh plane,the corresponding reference aris pairs are Th,zh >,<-yh,zh >h,yh >when writing with right hand.Accordingly,the reference axis pairs are <h,Zh>,<yh,zh>, <Th,yh>,when writing with left hand.By obtaining the projection of reference axis pair in the principal plane,we can detect the reversal and skew of the projected 2D contour. As shown in Fig.11(b),Fig.12(b)and Fig.13(b),the user writes with right hand, the reference plane is h-zh plane,Uh-zh plane and h-Uh plane,respectively.Thus the corresponding reference axis pairs are h,zh >,<-yh,Zh and h,yh >It is noteworthy that when the user writes with right hand and the reference plane is yh-zh plane,the reference axis pair is <-yh,zh>,instead of yh,zh >Therefore,we project -yh-axis of human-frame into the principal plane based on M(Rhp[0,-1,0]),as cyan dashed line shown in Fig.12(b).In the figures,to clearly show the small contour in the coordinate range,we shorten the projection vi of an axis by multiplying a scale factor o, i.e.,updating vi as av;and setting a=0.2 by default.In Fig.10-Fig.14,the reference axis pairs are emphasized with bold dashed line. 4.3 2D Contour Calibration in Principal Plane We use the projection of reference aris pair,e.g.,the projections of xh-axis,zh-axis in Fig. 10(b),to calibrate the projected 2D contour in the principal plane through reversing,rotating and normalizing. Reversing:Firstly,we verify whether the projected axes in the principal plane satisfy the right hand rule based on their cross product.If not,we will reverse the 2D contour in the principal plane for calibration.For convenience,we use <v1,v2>to represent the projection ACM Trans.Sensor Netw.,Vol.1,No.1,Article 1.Publication date:January 2019.AirContour 1:13 B A C D F G H O1 O1 O2 I ’ P’ 1 2 3 E P Fig. 15. Relationship between projected axis and plane included angle In regard to 𝜃1 = arcsin |𝑂′ 1𝑂2| |𝑂1𝑃 | , the length of 𝑂1𝑃 is a fixed value (e.g., a unit), if the projection’s length |𝑂′ 1𝑂2| of 𝑂1𝑃 (i.e., projection of 𝑥ℎ-axis, 𝑦ℎ-axis or 𝑧ℎ-axis) achieves the minimal value, then 𝜃1 (and 𝜃3) achieves the minimal value, the plane perpendicular to this axis will be selected as the reference coordinate plane. Therefore, in human-frame, the coordinate plane perpendicular to the axis which has the shortest projection in principal plane, will be selected as the reference coordinate plane. In Fig. 10(b), Fig. 13(b) and Fig. 14(b), the shortest projected axis from human-frame is 𝑦ℎ-axis, 𝑧ℎ-axis, 𝑥ℎ-axis, respectively. Thus, the corresponding reference coordinate plane is 𝑥ℎ − 𝑧ℎ plane, 𝑥ℎ − 𝑦ℎ plane, and 𝑦ℎ − 𝑧ℎ plane. 4.2.3 Reference Axis Pair Determination. As shown in Fig. 6, when we detect the reference coordinate plane, we can determine the viewing angle based on the orientation of the coordinate plane. To describe the reference coordinate plane and its associated orientation, we introduce the reference axis pair. For the detected 𝑥ℎ − 𝑧ℎ plane, 𝑦ℎ − 𝑧ℎ plane, 𝑥ℎ − 𝑦ℎ plane, the corresponding reference axis pairs are < 𝑥ℎ, 𝑧ℎ >, < −𝑦ℎ, 𝑧ℎ >, < 𝑥ℎ, 𝑦ℎ >, when writing with right hand. Accordingly, the reference axis pairs are < 𝑥ℎ, 𝑧ℎ >, < 𝑦ℎ, 𝑧ℎ >, < 𝑥ℎ, 𝑦ℎ >, when writing with left hand. By obtaining the projection of reference axis pair in the principal plane, we can detect the reversal and skew of the projected 2D contour. As shown in Fig. 11(b), Fig. 12(b) and Fig. 13(b), the user writes with right hand, the reference plane is 𝑥ℎ − 𝑧ℎ plane, 𝑦ℎ − 𝑧ℎ plane and 𝑥ℎ − 𝑦ℎ plane, respectively. Thus the corresponding reference axis pairs are < 𝑥ℎ, 𝑧ℎ >, < −𝑦ℎ, 𝑧ℎ > and < 𝑥ℎ, 𝑦ℎ >. It is noteworthy that when the user writes with right hand and the reference plane is 𝑦ℎ − 𝑧ℎ plane, the reference axis pair is < −𝑦ℎ, 𝑧ℎ >, instead of < 𝑦ℎ, 𝑧ℎ >. Therefore, we project −𝑦ℎ-axis of human-frame into the principal plane based on 𝑀(𝑅ℎ𝑝[0, −1, 0]𝑇 ), as cyan dashed line shown in Fig. 12(b). In the figures, to clearly show the small contour in the coordinate range, we shorten the projection 𝑣𝑖 of an axis by multiplying a scale factor 𝛼, i.e., updating 𝑣𝑖 as 𝛼𝑣𝑖 and setting 𝛼 = 0.2 by default. In Fig. 10-Fig. 14, the reference axis pairs are emphasized with bold dashed line. 4.3 2D Contour Calibration in Principal Plane We use the projection of reference axis pair, e.g., the projections of 𝑥ℎ-axis, 𝑧ℎ-axis in Fig. 10(b), to calibrate the projected 2D contour in the principal plane through reversing, rotating and normalizing. Reversing: Firstly, we verify whether the projected axes in the principal plane satisfy the right hand rule based on their cross product. If not, we will reverse the 2D contour in the principal plane for calibration. For convenience, we use < 𝑣1, 𝑣2 > to represent the projection ACM Trans. Sensor Netw., Vol. 1, No. 1, Article 1. Publication date: January 2019