@ -348,7 +348,8 @@ def boosting_headers_by_longshot_region_segmentation(textregion_pre_p, textregio
# headers_in_longshot= ( (textregion_pre_np[:,:,0]==2) | (textregion_pre_np[:,:,0]==1) )*1
# headers_in_longshot= ( (textregion_pre_np[:,:,0]==2) | (textregion_pre_np[:,:,0]==1) )*1
textregion_pre_p [ : , : , 0 ] [ ( headers_in_longshot [ : , : ] == 1 ) & ( textregion_pre_p [ : , : , 0 ] != 4 ) ] = 2
textregion_pre_p [ : , : , 0 ] [ ( headers_in_longshot [ : , : ] == 1 ) & ( textregion_pre_p [ : , : , 0 ] != 4 ) ] = 2
textregion_pre_p [ : , : , 0 ] [ textregion_pre_p [ : , : , 0 ] == 1 ] = 0
textregion_pre_p [ : , : , 0 ] [ textregion_pre_p [ : , : , 0 ] == 1 ] = 0
# textregion_pre_p[:,:,0][( img_only_text[:,:]==1) & (textregion_pre_p[:,:,0]!=7) & (textregion_pre_p[:,:,0]!=2)]=1 # eralier it was so, but by this manner the drop capitals are alse deleted
# earlier it was so, but by this manner the drop capitals are also deleted
# textregion_pre_p[:,:,0][( img_only_text[:,:]==1) & (textregion_pre_p[:,:,0]!=7) & (textregion_pre_p[:,:,0]!=2)]=1
textregion_pre_p [ : , : , 0 ] [ ( img_only_text [ : , : ] == 1 ) & ( textregion_pre_p [ : , : , 0 ] != 7 ) & ( textregion_pre_p [ : , : , 0 ] != 4 ) & ( textregion_pre_p [ : , : , 0 ] != 2 ) ] = 1
textregion_pre_p [ : , : , 0 ] [ ( img_only_text [ : , : ] == 1 ) & ( textregion_pre_p [ : , : , 0 ] != 7 ) & ( textregion_pre_p [ : , : , 0 ] != 4 ) & ( textregion_pre_p [ : , : , 0 ] != 2 ) ] = 1
return textregion_pre_p
return textregion_pre_p