Commit 6bb45fd3 authored by dmMaze's avatar dmMaze
Browse files

fix #834

parent bd9357dd
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -226,8 +226,8 @@ def split_textblock(src_img, crop_ratio=0.2, blur=False, show_process=False, dis
    bound0 = np.where(sumby_yaxis > sumby_yaxis.mean() * 0.1)[0].tolist()
    vars = (-1, -1)
    
    # if len(bound0) <= 1:
    #     return [TextSpan(0, height-1)], vars
    if len(bound0) < 2:
        return [TextSpan(0, height-1)], vars

    base_span = TextSpan(bound0[0], bound0[-1])
    meanby_yaxis = sumby_yaxis.mean()