We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bb7e24e commit 2672be5Copy full SHA for 2672be5
ppocr/data/imaug/pg_process.py
@@ -265,8 +265,8 @@ def fit_and_gather_tcl_points_v2(
265
ys, xs = np.where(tmp_image > 0)
266
xy_text = np.array(list(zip(xs, ys)), dtype="float32")
267
268
- left_center_pt = ((min_area_quad[0] - min_area_quad[1]) / 2.0).reshape(1, 2)
269
- right_center_pt = ((min_area_quad[1] - min_area_quad[2]) / 2.0).reshape(1, 2)
+ left_center_pt = ((min_area_quad[0] + min_area_quad[3]) / 2.0).reshape(1, 2)
+ right_center_pt = ((min_area_quad[1] + min_area_quad[2]) / 2.0).reshape(1, 2)
270
proj_unit_vec = (right_center_pt - left_center_pt) / (
271
np.linalg.norm(right_center_pt - left_center_pt) + 1e-6
272
)
0 commit comments