# Time Classification Algorithm Based on Windowed-Color Histogram Matching
## 4 Experimental Results
### Results and Discussion
#### 4.3.2 Time Classification  
We first classify \"night\" and \"day\" using a hierarchical classification structure to simplify the problem. Intersection and Battacharya histogram comparison methods are appropriate to classify images with distinct features. Then, the bandwidth (\(BW\)) is changed according to the average of each channel of the reference color histogram. As a result of the experiment, we find that the \(BW=120\) and intersection histogram comparison method perform best when classifying images into \"night\" and \"day (dawn)\". As mentioned previously, the difference in contribution of each color component (BGR) should be considered. Table 2 shows the result of each color contribution experiment calculated by the intersection measure. According to the intersection result, green is more important than other colors. Therefore, we calculate the accuracy using the weighted histograms comparison by assigning the largest weight to green. In Table 3, when the weight ratio of blue, green, and red was \(\{0:6:4\}\) and the time classification accuracy was 98.33%, we achieved the best results. \begin{table}
\begin{tabular}{c c} \hline \hline
**Methods** & **Accuracy (\%)** \\ \hline Shen’s method [32] & 60.33 \\ Mask R-CNN [19] & 91.67 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: The accuracy comparison between Shen’s method [32] and the Mask R-CNN method for sky detection. Figure 5: Example of each time period from the dataset. After classifying \"night\" time, the remaining dataset is classified as \"dawn\" or \"day\". Similar to the \"night\" time classification, the bandwidth was adjusted using a histogram comparison method. As a result, the correlation method performed better than the other methods, including intersection, and it was effective to consider all sections of \(BW\). In Table 4, as a result of calculating the importance of each histogram color in the correlation, the blue color is important to distinguish between day and dawn. It means that the blue color has good separable feature to classify the sky region into \"dawn\" or \"dusk\" and \"day\" time periods. On the other hand, the red color affects less than the blue color. The green color band almost does not affect this classification. Therefore, we assign the largest weight to the blue color band and an accuracy of 91% was achieved when the blue, red, green were weighted by \(w_{i}=\{6:1:3\}\), respectively as shown in Table 5.  
Table 6 shows the performance comparison between the proposed method and the existing deep learning classification models. We employed ResNet [6], DenseNet [25], XceptionNet [26], InceptionResNet [27], NasNet [28], and EfficientNet [29]. The same train and validation dataset were used, and the classification performance was inferred from the test dataset. The deep learning models obtained the result with transfer learning using the pre-trained ImageNet weights. Among them, ResNet152 achieved the highest accuracy of 87.67%. The proposed algorithm achieved 91% of accuracy as shown bold face. This means \begin{table}
\begin{tabular}{c c} \hline \hline
**[B:G:R]** & **Correlation (\%)** \\ \hline
1:0:0 & 89.67 \\
0:1:0 & 79.67 \\
0:0:1 & 48.00 \\
1:1:0 & 87.00 \\
1:0:1 & 89.67 \\
0:1:1 & 78.33 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Result of classifying “dawn” or “dusk” and “day” time periods using the correlation method with all range of the bandwidth. \begin{table}
\begin{tabular}{c c} \hline \hline
**[B:G:R]** & **Intersection (\%)** \\ \hline
1:0:0 & 92.33 \\
0:1:0 & 97.33 \\
0:0:1 & 93.67 \\
1:1:0 & 96.67 \\
1:0:1 & 96.67 \\
0:1:1 & 96.67 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Result of classifying “night” and “day (dawn)” time periods using intersection with bandwidth = 120. \begin{table}
\begin{tabular}{c c} \hline \hline
**Weight** & **Accuracy (\%)** \\ \hline
0:9:1 & 97.33 \\
0:8:2 & 97.33 \\
0:7:3 & 93.00 \\
0:6:4 & 98.33 \\
1:8:1 & 97.00 \\
1:7:2 & 97.00 \\
1:6:3 & 97.67 \\
2:7:1 & 97.00 \\
2:6:2 & 97.00 \\ \hline \hline \end{tabular}
\end{table}