"Overlapping" means that at least 1 vertex of the block in "segmented image" is contained "inside" the corresponding BB coordinates of the block in "ground truthed image". Perfect overlap: if 3 or 4 vertices are inbound or overlapping area of segmented block with GT >=90 its own area. Red boxes covering the entire page (contain border noise) will not be considered as overlapping as the 4 vertices are outside all ground truth blocks. Common Errors: over-segmentation (OSE), under-segmentation (USE), missed (MSE), false alarm (FA). AND correct segmentation (CS) Initiate all to zero. * For every test image * For "every" block in the "ground truth" (text or non-text): 1. Compute the total no. of black pixels in the "ground truth" block --> BPG 2. Find the corresponding overlapping blocks in the "segmented image" --> OBS No of over-segmentation errors (OSE) += no. of overlapping blocks (OBS) - 1 if OBS = 1, then no. of correct segmentation (CS) += 1 Compute the ratio of (total black pixels count in the overlapping blocks) to (BPG) --> BPR check that the overlapping block overlaps with a single block (at least 90%) in ground truth, otherwise under-segmentation (USE) +=1 In such case split the black pixel count between the 2 ground truth blocks when computing BPR 3. if a block in the "ground truth" has no corresponding overlapping black in the "segmented image", then missed error (MSE) += 1 4. if a block in the "segmented image" has no corresponding overlapping black in the "ground truth", then false alarm (FA) +=1 --> this is probably border noise that has not corresponding annotation in the ground truth * Over all the blocks in the test image, average the BPR * Over all test images, average the BPR, average OSE, USE, MSE, and CS It is important to do it on every image individually to comment on the lowest results. Similarly for the classification we have (Acc., P, R, F1-measure) for blocks and pixels * For every test image 1. Compute the total no. of black pixels in the "ground truth" Text blocks --> TPG 2. Compute the total no. of black pixels in the "ground truth" Non-Text blocks --> NTPG ** For "every" block in the "ground truth" (labeled as text): 3. Find the corresponding overlapping blocks in the "segmented image" TP += total black pixels count in the overlapping blocks classified as text FN += total black pixels count in the overlapping blocks classified as non-text ** For "every" block in the "ground truth" (labeled as non-text): 4. Find the corresponding overlapping blocks in the "segmented image" TN += total black pixels count in the overlapping blocks classified as non-text FP += total black pixels count in the overlapping blocks classified as text ** Compute accuracy, P, R, F1-measure for text and non-text pixel classification * Over all test images, average Accuracy, P, R, F1-measure. * For "every" block in the "segmented image" (text): 1. Compute the total no. of blocks in the "segmented image" classified as Text blocks --> TBS 2. Compute the total no. of blocks in the "segmented image" classified as NON-Text blocks --> NTBS 3. For "every" block in the "segmented image" (classified as text) if it overlaps with a "ground truth" block (labeled as text): TP ++ if it overlaps with a "ground truth" block (labeled as non-text): FN ++ 4. For "every" block in the "segmented image" (classified as non-text) if it overlaps with a "ground truth" block (labeled as text): FP ++ if it overlaps with a "ground truth" block (labeled as non-text): TN ++ 5. If no overlaps occur (largest red BB containing border noise covering the entire page) FA (false alarm)++ ** Compute accuracy, P, R, F1-measure for text and non-text block classification * Over all test images, average Accuracy, P, R, F1-measure.