(text)
| 74 | return extract_chinese_chars(compact) |
| 75 | |
| 76 | |
| 77 | def order_points(points): |
| 78 | pts = np.asarray(points, dtype=np.float32) |
| 79 | if pts.shape != (4, 2): |
| 80 | return pts |
| 81 | sums = pts.sum(axis=1) |
| 82 | diffs = np.diff(pts, axis=1).reshape(-1) |
| 83 | top_left = pts[np.argmin(sums)] |
| 84 | bottom_right = pts[np.argmax(sums)] |
no test coverage detected