feat(phase1): implement OpenCV image processing pipeline

- Create ImageProcessor service with EXIF orientation detection
- Implement smart cropping via OpenCV contour detection (10% padding)
- Add text orientation detection using Hough line transform
- Resize and compress images to 1200px with 85% JPEG quality
- Generate 200px square thumbnails with center crop
- Fallback to Pillow if OpenCV fails
- Comprehensive test suite: 28 tests all passing
- File size validation (reject >10MB)
- Graceful error handling for corrupted/invalid images
- Update requirements.txt with opencv-python, piexif, python-magic
This commit is contained in:
2026-04-20 22:17:11 +03:00
parent 01321bf607
commit 3aafacab12
1068 changed files with 720366 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
from numpy._core.defchararray import *
from numpy._core.defchararray import __all__, __doc__

View File

@@ -0,0 +1,111 @@
from numpy._core.defchararray import (
add,
array,
asarray,
capitalize,
center,
chararray,
compare_chararrays,
count,
decode,
encode,
endswith,
equal,
expandtabs,
find,
greater,
greater_equal,
index,
isalnum,
isalpha,
isdecimal,
isdigit,
islower,
isnumeric,
isspace,
istitle,
isupper,
join,
less,
less_equal,
ljust,
lower,
lstrip,
mod,
multiply,
not_equal,
partition,
replace,
rfind,
rindex,
rjust,
rpartition,
rsplit,
rstrip,
split,
splitlines,
startswith,
str_len,
strip,
swapcase,
title,
translate,
upper,
zfill,
)
__all__ = [
"equal",
"not_equal",
"greater_equal",
"less_equal",
"greater",
"less",
"str_len",
"add",
"multiply",
"mod",
"capitalize",
"center",
"count",
"decode",
"encode",
"endswith",
"expandtabs",
"find",
"index",
"isalnum",
"isalpha",
"isdigit",
"islower",
"isspace",
"istitle",
"isupper",
"join",
"ljust",
"lower",
"lstrip",
"partition",
"replace",
"rfind",
"rindex",
"rjust",
"rpartition",
"rsplit",
"rstrip",
"split",
"splitlines",
"startswith",
"strip",
"swapcase",
"title",
"translate",
"upper",
"zfill",
"isnumeric",
"isdecimal",
"array",
"asarray",
"compare_chararrays",
"chararray",
]