Skip to content
Snippets Groups Projects
Commit 3a115044 authored by Nick Cleintuar's avatar Nick Cleintuar
Browse files

Renamed shift function for future addition of rotation function

parent 3f9a2653
No related branches found
No related tags found
No related merge requests found
...@@ -266,8 +266,7 @@ def guess_dpi(image_array): ...@@ -266,8 +266,7 @@ def guess_dpi(image_array):
resolutions = np.array([1200, 600, 300, 200, 150, 120, 100, 75, 60, 50, 40]) resolutions = np.array([1200, 600, 300, 200, 150, 120, 100, 75, 60, 50, 40])
return resolutions[np.argmin(abs(resolutions - 25.4 * h / 297))] return resolutions[np.argmin(abs(resolutions - 25.4 * h / 297))]
def shift_image(image_data, extracted_qr, qr_coords):
def rotate_and_shift(image_data, extracted_qr, qr_coords):
"""Roll the image such that QR occupies coords specified by the template.""" """Roll the image such that QR occupies coords specified by the template."""
page, position = extracted_qr.page, extracted_qr.coords page, position = extracted_qr.page, extracted_qr.coords
y, x = np.mean(position, axis=0) y, x = np.mean(position, axis=0)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment