## 4 Discussion
### Objective Assessment  
In addition to the subjective assessment performed above, in this part we perform objective assessments of the images produced by comparable algorithms [11; 14; 18; 19; 20] and our proposed approach, as shown in Figure 5c-h, Figures 6c-h and 7c-h. These objective assessments were carried out with metrics calculated with the confusion matrix previously reported [19; 38; 42; 43]. The confusion matrix was achieved by comparing the reference image and the final resulting shadow image of each test image for every shadow detection approach pixel by pixel. Based on the confusion matrix, we exploited several metrics [11; 13; 21] for objectively evaluating accuracies of the final resulting shadow images obtained with the different detecting methods. The corresponding metrics, namely the producer's accuracy (PA), also called sensitivity, the omitted error (EO), the specificity (SP), the committed error (EC) and the overall accuracy (OA), were calculated pixel by pixel as follows:  
\[PA=\frac{TP}{(TP+FN)} \tag{22}\]  
\[EO=\frac{FN}{(TP+FN)} \tag{23}\]  
\[SP=\frac{TN}{(TN+FP)} \tag{24}\]\[EC=\frac{FP}{(TN+FP)} \tag{25}\]  
\[OA=\frac{TP+TN}{(TP+TN+FP+FN)} \tag{26}\]  
where \(TP\) (true positive) indicates the number of true shadow pixels correctly identified, \(TN\) (true negative) is the number of nonshadow pixels correctly classified, \(FP\) (false positive) refers to the number of true nonshadow pixels wrongly classified as shadows, \(FN\) (false negative) shows the amount of true shadow pixels wrongly defined as nonsmadows, and the terms \(TP\) + \(FN\) and \(TN\) + \(FP\) denote the amounts of shadow pixels and nonshadow pixels, respectively, and the term \(TP\) + \(TN\) + \(FP\) + \(FN\) is the total number of pixels in the study image. Specifically, the PA indicates how well shadow pixels are correctly detected among true shadow pixels in the reference image, which is the ratio of the number of shadow pixels correctly detected in the resulting image to the total amount of the shadow pixels in the reference image. Complementarily, the EO is caused by identifying true shadow pixels in the original image as nonshadow pixels, which is the ratio of the number of nonsmhadow pixels in the resulting image wrongly classified from true shadow pixels to the total amount of the true shadow pixels. The higher the PA, the more accurate the method is for shadow detection. At the same time, a lower EO is also achieved, which means much fewer true shadow pixels are omitted as nonshadow pixels. A good shadow detection approach usually has a high PA value and a low EO value. Similarly, the SP denotes how well nonshadow pixels are correctly classified among true nonshadow pixels in the study image, which is the ratio of the number of nonsmhadow pixels correctly classified in the resulting image to the total amount of the true nonshadow pixels. Correspondingly, the EC is caused by classifying true nonshadow pixels in the original image as shadow pixels, which is presented as the ratio of the number of shadow pixels wrongly classified in the resulting image from true nonshadow pixels in the original image to the total amount of the true nonshadow pixels. The higher the SP, the better the algorithm performs for detecting shadow regions. Meanwhile, a lower EC is also obtained, which reveals that much fewer true nonshadow pixels are classified as shadow pixels. Many shadow detection approaches that are suitable for well differentiating nonsmadows (e.g., vegetation regions) from shadows, usually have a high SP value and a low EC value. Additionally, the OA explains the entire effectiveness of a certain shadow detection algorithm for detecting shadow pixels. A better performance of a certain shadow detection algorithm is achieved when the OA is higher.