## 3 Materials and Methods
### Multi-Subject-Tracking System
#### 3.3.2 Human Identification
The multiple histogram data of clustered tracking information are identified and compared with the reference ID information of participants predetermined during the registration procedure, as shown in Figure 5.  
Figure 5: The procedure of ID assignment based on hue value histogram matching. The same as the position clustering method, the HBM algorithm was used as a matching method. The source group is composed of multiple histogram data that are captured in real time, and the target group is the multiple histogram data of reference ID information. Then, the cost matrix is calculated on the basis of the Bhattacharyya distance (BD) [19]. The BD is widely used in signal processing, image processing, and pattern recognition research, as an index for measuring the distance between two probability distributions. The BD is also used to measure the difference (or similarity) between two different histograms \(H_{1}\) and \(H_{2}\) and can be defined, as in Equation (1). \[d(H_{1},\;H_{2})=\sqrt{1-\frac{1}{\sqrt{H_{1}H_{2}N^{2}}}\sum_{l}\sqrt{H_{1}(I )H_{2}(I)}} \tag{1}\]  
where \(H_{1}\) denotes the histogram of the first probability distribution, \(H_{2}\) denotes the histogram of the second probability distribution, \(N\) represents the number of data probability distributions, and \(H_{k}=\frac{1}{N}\sum_{l}H_{k}(I)\). The BD can obtain each probability distribution without being affected by being co-rated and can express their similarity with the obtained probability distribution. This method compares the similarity of the distance between two probability distributions by dividing the histogram by the total size of the histogram to make the sum equal to 1 and then transforming it into a probability distribution to determine the similarity of the distribution of the histogram. Several variables could disturb the collection of data in various environments. For example, the participants could move out, unregistered people could enter the content area, or registered subjects do not perform the content. The issue with participants moving out was not severe because the tracking system could re-track when the subject re-enters the content area. Similarly, the existence of a drop frame that means miss-tracking for single or multiple subjects was not severe. However, other cases could impair the data. For instance, if unregistered subjects are not filtered, the data could not consist of target subjects, and the result of ADHD screening is significantly influenced. Furthermore, the HBM algorithm can only operate when the number of sources and targets is equal. To address these issues, for robust data collection, some tricks have been proposed in the identification process. First, unregistered subjects are filtered with the threshold of the BD in the color information matching process. The threshold was set to 0.5 in every data collection in this study. Second, when an unregistered subject who is wearing clothing of similar color to a registered subject enters the content area, the number of target classes is increased to be equal to the number of subjects in the content area. In other words, the amount of dummy data equal to the difference between in-subject and target is appended to target classes. Then, the cost value between each source and target dummy class is set as the largest number, indicating the highest cost. Following the construction of the cost matrix with the proposed trick, the non-target (unregistered subjects) could be filtered by excluding the source assigned with a dummy of target classes. Third, when subjects do not perform the content, meaning that the number of source classes is smaller than the number of targets, the source classes are extended to be equal to the number of targets similar to the extension of target classes. Then, the target class assigned with the source class of the dummy could be filtered as a non-player subject. Figure 6 shows an example of identifying three subjects and a robot using the explained methods.