jdeskew 0.2.2__tar.gz → 0.2.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. {jdeskew-0.2.2 → jdeskew-0.2.3}/.circleci/config.yml +1 -1
  2. {jdeskew-0.2.2 → jdeskew-0.2.3}/PKG-INFO +18 -4
  3. {jdeskew-0.2.2 → jdeskew-0.2.3}/README.md +6 -2
  4. {jdeskew-0.2.2 → jdeskew-0.2.3}/jdeskew/utility.py +5 -3
  5. {jdeskew-0.2.2 → jdeskew-0.2.3}/jdeskew.egg-info/PKG-INFO +18 -4
  6. {jdeskew-0.2.2 → jdeskew-0.2.3}/tests/test.py +0 -2
  7. {jdeskew-0.2.2 → jdeskew-0.2.3}/.dockerignore +0 -0
  8. {jdeskew-0.2.2 → jdeskew-0.2.3}/.flake8 +0 -0
  9. {jdeskew-0.2.2 → jdeskew-0.2.3}/.github/workflows/codeql-analysis.yml +0 -0
  10. {jdeskew-0.2.2 → jdeskew-0.2.3}/.github/workflows/dependency-review.yml +0 -0
  11. {jdeskew-0.2.2 → jdeskew-0.2.3}/.github/workflows/docker-build-and-push.yml +0 -0
  12. {jdeskew-0.2.2 → jdeskew-0.2.3}/.github/workflows/greetings.yml +0 -0
  13. {jdeskew-0.2.2 → jdeskew-0.2.3}/.github/workflows/label.yml +0 -0
  14. {jdeskew-0.2.2 → jdeskew-0.2.3}/.github/workflows/python-package.yml +0 -0
  15. {jdeskew-0.2.2 → jdeskew-0.2.3}/.github/workflows/python-publish.yml +0 -0
  16. {jdeskew-0.2.2 → jdeskew-0.2.3}/.github/workflows/stale.yml +0 -0
  17. {jdeskew-0.2.2 → jdeskew-0.2.3}/.gitignore +0 -0
  18. {jdeskew-0.2.2 → jdeskew-0.2.3}/.pre-commit-config.yaml +0 -0
  19. {jdeskew-0.2.2 → jdeskew-0.2.3}/Dockerfile +0 -0
  20. {jdeskew-0.2.2 → jdeskew-0.2.3}/LICENSE +0 -0
  21. {jdeskew-0.2.2 → jdeskew-0.2.3}/cog.yaml +0 -0
  22. {jdeskew-0.2.2 → jdeskew-0.2.3}/estimator.py +0 -0
  23. {jdeskew-0.2.2 → jdeskew-0.2.3}/jdeskew/__init__.py +0 -0
  24. {jdeskew-0.2.2 → jdeskew-0.2.3}/jdeskew/estimator.py +0 -0
  25. {jdeskew-0.2.2 → jdeskew-0.2.3}/jdeskew.egg-info/SOURCES.txt +0 -0
  26. {jdeskew-0.2.2 → jdeskew-0.2.3}/jdeskew.egg-info/dependency_links.txt +0 -0
  27. {jdeskew-0.2.2 → jdeskew-0.2.3}/jdeskew.egg-info/requires.txt +0 -0
  28. {jdeskew-0.2.2 → jdeskew-0.2.3}/jdeskew.egg-info/top_level.txt +0 -0
  29. {jdeskew-0.2.2 → jdeskew-0.2.3}/main.py +0 -0
  30. {jdeskew-0.2.2 → jdeskew-0.2.3}/pyproject.toml +0 -0
  31. {jdeskew-0.2.2 → jdeskew-0.2.3}/reproduce.ipynb +0 -0
  32. {jdeskew-0.2.2 → jdeskew-0.2.3}/setup.cfg +0 -0
  33. {jdeskew-0.2.2 → jdeskew-0.2.3}/setup.py +0 -0
  34. {jdeskew-0.2.2 → jdeskew-0.2.3}/tests/test.png +0 -0
@@ -8,7 +8,7 @@ executors:
8
8
  docker:
9
9
  - image: cimg/python:3.9
10
10
  environment:
11
- TZ: "Asia/Ho_Chi_Minh"
11
+ TZ: "Australia/Melbourne"
12
12
 
13
13
  jobs:
14
14
  build-and-test:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: jdeskew
3
- Version: 0.2.2
3
+ Version: 0.2.3
4
4
  Summary: Document Image Skew Estimation using Adaptive Radial Projection
5
5
  Author-email: Luan Pham <phamquiluan@gmail.com>
6
6
  License: MIT License
@@ -26,13 +26,21 @@ License: MIT License
26
26
  SOFTWARE.
27
27
 
28
28
  Description-Content-Type: text/markdown
29
- Provides-Extra: dev
30
29
  License-File: LICENSE
30
+ Requires-Dist: numpy
31
+ Requires-Dist: opencv-python-headless
32
+ Provides-Extra: dev
33
+ Requires-Dist: black; extra == "dev"
34
+ Requires-Dist: pytest; extra == "dev"
35
+ Requires-Dist: coverage; extra == "dev"
36
+ Requires-Dist: pre-commit; extra == "dev"
37
+ Requires-Dist: pytest-xdist; extra == "dev"
38
+ Requires-Dist: fastapi; extra == "dev"
39
+ Requires-Dist: uvicorn[standard]; extra == "dev"
40
+ Requires-Dist: python-multipart; extra == "dev"
31
41
 
32
42
  # Document Image Skew Estimation
33
43
 
34
- *To my love, Jenna*
35
-
36
44
  [![pypi package](https://img.shields.io/pypi/v/jdeskew.svg)](https://pypi.org/project/jdeskew)
37
45
  [![CircleCI](https://dl.circleci.com/status-badge/img/gh/phamquiluan/jdeskew/tree/master.svg?style=svg&circle-token=f409daaab0e6671c81bb4b266b387fe933c131eb)](https://dl.circleci.com/status-badge/redirect/gh/phamquiluan/jdeskew/tree/master)
38
46
  [![Codacy Badge](https://app.codacy.com/project/badge/Coverage/25553a5195074e37a01dd3370c55abaa)](https://www.codacy.com/gh/phamquiluan/jdeskew/dashboard?utm_source=github.com&utm_medium=referral&utm_content=phamquiluan/jdeskew&utm_campaign=Badge_Coverage)
@@ -153,6 +161,8 @@ This datasets are built upon three other datasets: DISEC 2013, RVL-CDIP, RDCL 20
153
161
  | DISE 2021 (45 degree) | https://drive.google.com/file/d/1a-a6aOqdsghjeHGLnCLsDs7NoJIus-Pw/view?usp=sharing |
154
162
  | DISE 2021 (15 degree) | https://drive.google.com/file/d/1BLiuu-j28dbuPFi4n3C0KuV6vXGmB0qS/view?usp=sharing |
155
163
 
164
+ Can also download from Zenodo: https://zenodo.org/records/12570649
165
+
156
166
  ## Reproducibility and Evaluation Code
157
167
 
158
168
  Check the [reproduce.ipynb](reproduce.ipynb) file
@@ -170,3 +180,7 @@ L. Pham, H. Hoang, X.T. Mai, T. A. Tran, "Adaptive Radial Projection on Fourier
170
180
  organization={IEEE}
171
181
  }
172
182
  ```
183
+
184
+ ## Star History
185
+
186
+ [![Star History Chart](https://api.star-history.com/svg?repos=phamquiluan/jdeskew&type=Date)](https://star-history.com/#phamquiluan/jdeskew&Date)
@@ -1,7 +1,5 @@
1
1
  # Document Image Skew Estimation
2
2
 
3
- *To my love, Jenna*
4
-
5
3
  [![pypi package](https://img.shields.io/pypi/v/jdeskew.svg)](https://pypi.org/project/jdeskew)
6
4
  [![CircleCI](https://dl.circleci.com/status-badge/img/gh/phamquiluan/jdeskew/tree/master.svg?style=svg&circle-token=f409daaab0e6671c81bb4b266b387fe933c131eb)](https://dl.circleci.com/status-badge/redirect/gh/phamquiluan/jdeskew/tree/master)
7
5
  [![Codacy Badge](https://app.codacy.com/project/badge/Coverage/25553a5195074e37a01dd3370c55abaa)](https://www.codacy.com/gh/phamquiluan/jdeskew/dashboard?utm_source=github.com&utm_medium=referral&utm_content=phamquiluan/jdeskew&utm_campaign=Badge_Coverage)
@@ -122,6 +120,8 @@ This datasets are built upon three other datasets: DISEC 2013, RVL-CDIP, RDCL 20
122
120
  | DISE 2021 (45 degree) | https://drive.google.com/file/d/1a-a6aOqdsghjeHGLnCLsDs7NoJIus-Pw/view?usp=sharing |
123
121
  | DISE 2021 (15 degree) | https://drive.google.com/file/d/1BLiuu-j28dbuPFi4n3C0KuV6vXGmB0qS/view?usp=sharing |
124
122
 
123
+ Can also download from Zenodo: https://zenodo.org/records/12570649
124
+
125
125
  ## Reproducibility and Evaluation Code
126
126
 
127
127
  Check the [reproduce.ipynb](reproduce.ipynb) file
@@ -139,3 +139,7 @@ L. Pham, H. Hoang, X.T. Mai, T. A. Tran, "Adaptive Radial Projection on Fourier
139
139
  organization={IEEE}
140
140
  }
141
141
  ```
142
+
143
+ ## Star History
144
+
145
+ [![Star History Chart](https://api.star-history.com/svg?repos=phamquiluan/jdeskew&type=Date)](https://star-history.com/#phamquiluan/jdeskew&Date)
@@ -2,7 +2,7 @@
2
2
  import cv2
3
3
 
4
4
 
5
- def rotate(image, angle, resize=True, border_mode=None, border_value=None):
5
+ def rotate(image, angle, resize=True, border_mode=None, border_value=None, flags=None):
6
6
  """Rotate input image respect to a given angle.
7
7
 
8
8
  Params:
@@ -13,6 +13,9 @@ def rotate(image, angle, resize=True, border_mode=None, border_value=None):
13
13
  """
14
14
  if border_mode is None:
15
15
  border_mode = cv2.BORDER_CONSTANT
16
+ if flags is None:
17
+ # flags=cv2.INTER_NEAREST
18
+ flags = cv2.INTER_LINEAR
16
19
 
17
20
  h, w = image.shape[:2]
18
21
  M = cv2.getRotationMatrix2D(center=(w // 2, h // 2), angle=angle, scale=1.0)
@@ -20,8 +23,7 @@ def rotate(image, angle, resize=True, border_mode=None, border_value=None):
20
23
  src=image,
21
24
  M=M,
22
25
  dsize=(w, h),
23
- # flags=cv2.INTER_CUBIC,
24
- flags=cv2.INTER_NEAREST,
26
+ flags=flags,
25
27
  borderMode=border_mode,
26
28
  borderValue=None if border_mode == cv2.BORDER_REPLICATE else border_value,
27
29
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: jdeskew
3
- Version: 0.2.2
3
+ Version: 0.2.3
4
4
  Summary: Document Image Skew Estimation using Adaptive Radial Projection
5
5
  Author-email: Luan Pham <phamquiluan@gmail.com>
6
6
  License: MIT License
@@ -26,13 +26,21 @@ License: MIT License
26
26
  SOFTWARE.
27
27
 
28
28
  Description-Content-Type: text/markdown
29
- Provides-Extra: dev
30
29
  License-File: LICENSE
30
+ Requires-Dist: numpy
31
+ Requires-Dist: opencv-python-headless
32
+ Provides-Extra: dev
33
+ Requires-Dist: black; extra == "dev"
34
+ Requires-Dist: pytest; extra == "dev"
35
+ Requires-Dist: coverage; extra == "dev"
36
+ Requires-Dist: pre-commit; extra == "dev"
37
+ Requires-Dist: pytest-xdist; extra == "dev"
38
+ Requires-Dist: fastapi; extra == "dev"
39
+ Requires-Dist: uvicorn[standard]; extra == "dev"
40
+ Requires-Dist: python-multipart; extra == "dev"
31
41
 
32
42
  # Document Image Skew Estimation
33
43
 
34
- *To my love, Jenna*
35
-
36
44
  [![pypi package](https://img.shields.io/pypi/v/jdeskew.svg)](https://pypi.org/project/jdeskew)
37
45
  [![CircleCI](https://dl.circleci.com/status-badge/img/gh/phamquiluan/jdeskew/tree/master.svg?style=svg&circle-token=f409daaab0e6671c81bb4b266b387fe933c131eb)](https://dl.circleci.com/status-badge/redirect/gh/phamquiluan/jdeskew/tree/master)
38
46
  [![Codacy Badge](https://app.codacy.com/project/badge/Coverage/25553a5195074e37a01dd3370c55abaa)](https://www.codacy.com/gh/phamquiluan/jdeskew/dashboard?utm_source=github.com&utm_medium=referral&utm_content=phamquiluan/jdeskew&utm_campaign=Badge_Coverage)
@@ -153,6 +161,8 @@ This datasets are built upon three other datasets: DISEC 2013, RVL-CDIP, RDCL 20
153
161
  | DISE 2021 (45 degree) | https://drive.google.com/file/d/1a-a6aOqdsghjeHGLnCLsDs7NoJIus-Pw/view?usp=sharing |
154
162
  | DISE 2021 (15 degree) | https://drive.google.com/file/d/1BLiuu-j28dbuPFi4n3C0KuV6vXGmB0qS/view?usp=sharing |
155
163
 
164
+ Can also download from Zenodo: https://zenodo.org/records/12570649
165
+
156
166
  ## Reproducibility and Evaluation Code
157
167
 
158
168
  Check the [reproduce.ipynb](reproduce.ipynb) file
@@ -170,3 +180,7 @@ L. Pham, H. Hoang, X.T. Mai, T. A. Tran, "Adaptive Radial Projection on Fourier
170
180
  organization={IEEE}
171
181
  }
172
182
  ```
183
+
184
+ ## Star History
185
+
186
+ [![Star History Chart](https://api.star-history.com/svg?repos=phamquiluan/jdeskew&type=Date)](https://star-history.com/#phamquiluan/jdeskew&Date)
@@ -19,7 +19,6 @@ def test_basic():
19
19
  def test_text_image_angle_range_10(angle: int):
20
20
  """Test_text_image_angle_range_10."""
21
21
  image = cv2.imread(path.join(path.dirname(__file__), "test.png"))
22
- # for angle in range(-10, 10):
23
22
  skew_image = rotate(image, angle=angle, resize=False)
24
23
  estimated_angle = get_angle(skew_image, vertical_image_shape=512)
25
24
  assert abs(angle + estimated_angle) < 0.5, f"{angle} - {estimated_angle}"
@@ -29,7 +28,6 @@ def test_text_image_angle_range_10(angle: int):
29
28
  def test_text_image_angle_range_44(angle: int):
30
29
  """Test_text_image_angle_range_44."""
31
30
  image = cv2.imread(path.join(path.dirname(__file__), "test.png"))
32
- # for angle in range(-44, 44):
33
31
  skew_image = rotate(image, angle=angle, resize=False)
34
32
  estimated_angle = get_angle(skew_image, vertical_image_shape=512, angle_max=44.9)
35
33
  assert abs(angle + estimated_angle) < 0.5, f"{angle} - {estimated_angle}"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes