chore: remove debug code
This commit is contained in:
parent
b0467f2335
commit
23406004ed
@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "cv-analysis-service"
|
||||
version = "2.16.1"
|
||||
version = "2.19.0"
|
||||
description = ""
|
||||
authors = ["Isaac Riley <isaac.riley@knecon.com>"]
|
||||
readme = "README.md"
|
||||
|
||||
@ -44,11 +44,9 @@ def annotate_page(page: fitz.Page, prediction):
|
||||
start = itemgetter("x1", "y1")(line)
|
||||
end = itemgetter("x2", "y2")(line)
|
||||
|
||||
bbox = *start, *end
|
||||
bbox = (*start, *end)
|
||||
height = page.bound()[3]
|
||||
logger.info(f"{height=}")
|
||||
bbox = mirror_horizontal(bbox, page_height=height)
|
||||
assert bbox == mirror_horizontal(mirror_horizontal(bbox, height), height)
|
||||
|
||||
start = tuple(bbox[:2])
|
||||
end = tuple(bbox[2:])
|
||||
|
||||
@ -58,7 +58,6 @@ def mirror_horizontal(bbox: BBoxType, page_height: int | float) -> BBoxType:
|
||||
x0, y0, x1, y1 = bbox
|
||||
y0_new = page_height - y0
|
||||
y1_new = page_height - y1
|
||||
logger.info(f"Mirrored horizontally: {x0}, {y0} -> {y0_new}, {x1}, {y1} -> {y1_new}; page height: {page_height}")
|
||||
|
||||
return x0, y0_new, x1, y1_new
|
||||
|
||||
@ -67,7 +66,6 @@ def mirror_vertical(bbox: BBoxType, page_width: int | float) -> BBoxType:
|
||||
x0, y0, x1, y1 = bbox
|
||||
x0_new = page_width - x1
|
||||
x1_new = page_width - x0
|
||||
logger.info("Mirrored vertically:", x0_new, y0, x1_new, y1)
|
||||
|
||||
return x0_new, y0, x1_new, y1
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user