|
|
@ -982,7 +982,7 @@ def check_any_text_region_in_model_one_is_main_or_header_light(
|
|
|
|
(regions_model_full[:,:,0]==2)).sum()
|
|
|
|
(regions_model_full[:,:,0]==2)).sum()
|
|
|
|
pixels_main = all_pixels - pixels_header
|
|
|
|
pixels_main = all_pixels - pixels_header
|
|
|
|
|
|
|
|
|
|
|
|
if (pixels_header>=pixels_main) and ( (length_con[ii]/float(height_con[ii]) )>=1.3 ):
|
|
|
|
if (pixels_header/float(pixels_main)>=0.3) and ( (length_con[ii]/float(height_con[ii]) )>=1.3 ):
|
|
|
|
regions_model_1[:,:][(regions_model_1[:,:]==1) & (img[:,:,0]==255) ]=2
|
|
|
|
regions_model_1[:,:][(regions_model_1[:,:]==1) & (img[:,:,0]==255) ]=2
|
|
|
|
contours_only_text_parent_head.append(con)
|
|
|
|
contours_only_text_parent_head.append(con)
|
|
|
|
if contours_only_text_parent_d_ordered is not None:
|
|
|
|
if contours_only_text_parent_d_ordered is not None:
|
|
|
|