## 4 Optimal Exposure Scene Analysis
### Optimal Equivalent Exposure Analysis  
In concrete crack image segmentation, there is a remarkable imbalance between concrete and the crack pixels in images, and the imbalance extent depends mainly on image size. According to dataset image size in previous research, the size of 300 \(\times\)300 pixels for image segmentation was used, and the histogram of specified size images showed a good bimodal property, which is the basis for the Otsu method and iterative thresholding-based segmentation. Figure 11a is the original gray image, Figure 11b is the segmented binary  
Figure 10: Comparison of the HSV and HSD of 21 and 50 equivalent exposures. Figure 9: Concrete image histogram and normal distribution curve of ten scenes. image produced by iterative thresholding, and Figure 11c is the ground-truth binary image produced by manual labeling with LabelMe4.5.6 software. In segmentation accuracy metrics, precision, recall, and the F1 score are the most popular indices and are defined as follows:  
\[Precision=\frac{TP}{TP+FP} \tag{9}\]  
\[Recall=\frac{TP}{TP+FN} \tag{10}\]  
In Equations (9) and (10), true positive (_TP_), false positive (_FP_), true negative (_TN_), and false negative (_FN_) are the elements in the confusion matrix of the segmented image and the ground truth image. The F1 score [24,25] is defined based on precision and recall as follows:  
\[F1=\frac{2\times Precision\times Recall}{Precision+Recall} \tag{11}\]  
Figure 12 illustrates the _precision_ and _recall_ of the image segmentation for three samples under 50 exposure conditions. Referring to the precision and recall values in Table 5, it can be seen that the precision and recall are both large within an equivalent exposure range of 5-80 lx-s, suggesting effective crack segmentation using digital image processing within this range. Figure 13 reveals a similar law in the F1 scores of three specimens in relation to equivalent exposure. The F1 scores decrease from their peaks downward by 0.5 with the increase in exposure, where the optimal exposure is also 5-80 lx-s. In Figure 13, the largest F1 scores, indicating the most effective distinction between concrete and cracks, are achieved also within this exposure interval, where the scene is also the same as that marked by a red cross in Figure 12. Figure 13 indicates that a higher exposure level adversely affects crack detection accuracy. Moreover, the precision-recall curve and the F1 score of the three specimens show that the segmentation accuracy properties are specimen-dependent even in the same exposure scene, with the same image processing or segmentation method. The property that segmentation accuracy depends on specimen is called segmentability, which needs further exploration. To be more specific, Table 5 presents the precision, recall, and F1 score values for the first 30 groups of images in the equivalent exposures scenes for specimen D. it can be seen that the F1 score values gradually decrease with the increase in equivalent exposure, and the highest value reaches 96.3% in the exposure range of 5-50 lx-s. Metric comparisons between the iterative thresholding segmentation method and the ground truth of three specimens are plotted in Figure 14, and the _TP_, _FP_, _FN_, and _TN_ areas are colored with numbers. Panel (a) displays the original images with real cracks and concrete pixel numbers, and panels (b) and (c) present the segmentation maps under the low-exposure scenes of 5 lx-s and 10 lx-s. It can be seen that low exposure reduced the contrast of the concrete crack images and resulted in false positives (_FPs_) and lead to segmentation error. Panels (d) and (e) show the optimal segmentation maps of the scenes achieving the highest F1 score, and the equivalent exposure interval is in the range of 5-50 lx-s. Panels (f) and (g) show the segmentation result under the high-equivalent  
Figure 11: Crack image, segmentation file, and label file. exposure scenes of 245 lx-s and 250 lx-s.