Open ErenKarabey opened 11 months ago
The reason Figure 10 Label D contains extra is the classification algorithm is using shortest line distance to determine what to classify each segment as. In some cases, such as Figure 10 Label D, the dotted-line section is closer to a wrong label (D) than the correct one (E).
The example in this issue are from:
figure 8:
and figure 10:
![image_20230906091918_63df1](https://github.com/KewBridge/specimens2illustrations/assets/63162769/d6b2b60b-3bfc-44fc-bb39-db4ffe1dd668)
The new tested segmentation and labelling algorithm is given below.
Results for Figure 8:
Results for Figure 10:
![Figure 10 GIF](https://github.com/KewBridge/specimens2illustrations/assets/63162769/7f318f7a-b0cb-4097-9a16-e6b28bb5d07f)
The dotted lines are never taken into consideration by the algorithm. This is case for both segmentation, and classification.
For segmentation, dotted-line contour may be separate and even if its brought together by dilation, its contour area is always smaller than labelling letter contour area - which is added later in classification with no chance of error and a very good indicator of
min_area
). However, the resulting segments should strive to show the dotted-lines as they portray important information about the monograms.For classification, in Figure 8, even without considering the dotted-lines classification has no error. However, there are some cases such as Figure 10, where the classification D contains a part of classification E - or as there is an intersection and the algorithm does not detect intersections, it should be classified as A. The intersection will be discussed extensively in another issue.
Both for segmentation and for classification dotted-lines are necessary and should be detected.