## 2 Materials and Methods
### Camera Recording
The x, y, dx, and dy parameters were recorded in pixels. A parameter for scaling point coordinates of the image was expressed in mm/pixel and was derived from the following relation:  
\[\mathrm{s_{c}}=\frac{dx_{r}}{\sum_{i=1}^{n}\frac{dx_{i}}{n}} \tag{1}\]  
where \(dx_{r}\) denoted the real value of marker size on \(X\)-axis, i.e., 5 mm; \(dx_{i}\) was the measurement of the marker's size on the \(X\)-axis and was expressed in pixels; \(n\) was several measurements taken into consideration when computing the scaling value; and \(\mathrm{s_{c}}\) value was determined only using the upper marker. To establish the mandible's trajectory, f(x) line was drawn between the positions of the two markers to connect the two points. The line's parameters were calculated only during initial measurements and were constant throughout the study. With the line joining the two markers, i.e., two mass centers, it was possible to correct the image for rotations of a face in relation to the camera. Importantly, the camera did not change its position or orientation during the study. Therefore, the width of the mandible (the distance to the camera) was changing when the mouth was opening or closing. Due to the different distances of the upper and lower marker on the \(Z\)-axis, it was assumed that the upper one would serve as a reference; the lower marker was, in this case, a projection from its plane tangent to the upper marker's plane. As the distance of the lower marker changed (on the \(Z\)-axis--width), its size decreased; however, its mass center did not change position, so the same scaling parameter was used for the upper marker. The determined parameter value of the straight line connecting markers' mass centers was used to establish an optimal movement trajectory of the mandible (assuming that when discomfort occurred during movement, the mandible remained in the same position on the \(X\)-axis). Analysis of movement included an algorithm for detecting the earliest stage of opening and closing the jaw. Next, movement parameters were computed together with differ  
Figure 4: Correctly detected markers. ences between the real and referential trajectory. An example movement pathway with highlighted start and endpoints of the mouth opening and closing is illustrated in Figure 5.  
Information about the f(x) line and the real value of y (black line) was used to determine the referential value on \(X\)-axis (red line), which was then compared with the real value on \(X\)-axis (blue line). To identify the characteristic points of pathways for two cycles of mouth opening and closing, a derivative of the y signal (black dashed line) and an instantaneous y value were used. The characteristic points were described as t1, t2, t3, and t4. Movement statistics were calculated only for signals within \(\mathrm{t=t2-t1}\) and \(\mathrm{t=t4-t3}\). Initial filtering used median filters, and each estimation provided the following parameters: maximum jaw abduction, normalized mean squared error in the frontal plane, and maximum displacement in the frontal plane. Only the value of maximum opening and normalized squared error was determined during \(\mathrm{t=t2-t1+t4-t3}\). The most significant parameter was the value of normalized mean squared error, which was calculated by dividing the sum of squared errors in movement trajectory on the \(X\)-axis by the number of measurements taken during analysis time t. The quality of the image and vision signal influenced estimation error, which depended on many factors, such as exposure and selection of filter parameters when extracting marker characteristics off the image.