From 010a4fd4b4b2a9478db63dd457a5d6a1f888a4ff Mon Sep 17 00:00:00 2001 From: Joker1212 <519548295@qq.com> Date: Tue, 29 Oct 2024 16:39:01 +0800 Subject: [PATCH] chore: add orientation easy use --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index eaccdc6..cd66027 100644 --- a/README.md +++ b/README.md @@ -119,6 +119,19 @@ print(f"elasp: {elasp}") ``` #### 表格旋转及透视修正 +##### 1.简单背景,小角度场景 +```python +import cv2 + +img_path = f'tests/test_files/wired/squeeze_error.jpeg' +from wired_table_rec.utils import ImageOrientationCorrector + +img_orientation_corrector = ImageOrientationCorrector() +img = cv2.imread(img_path) +img = img_orientation_corrector(img) +cv2.imwrite(f'img_rotated.jpg', img) +``` +##### 2.复杂背景,多表格场景 需要gpu或更高精度场景,请参考项目[RapidTableDet](https://github.com/RapidAI/RapidTableDetection) ```python pip install rapid-table-det