Skip to content

Latest commit

 

History

History
60 lines (44 loc) · 1.34 KB

File metadata and controls

60 lines (44 loc) · 1.34 KB

Image Processing Challenge

Repository focusing on high-performance document scanning and perspective correction.

Technologies: Python (Flask, Poetry), C++ (CMake, PyBind11), OpenCV, Docker.

Project Structure

  • python_service/: Web API/UI with strict typing and Docker support.
  • cpp_cli/: High-performance C++ tool with Python bindings and Docker support.

1. Python Service (Modern Stack)

Managed by Poetry and Docker.

Run with Docker (Recommended)

cd python_service
docker build -t scanner-pro .
docker run -p 5000:5000 scanner-pro

Run Locally (Poetry)

cd python_service
poetry install
poetry run python app.py

Access UI at: http://localhost:5000


2. C++ CLI Application

Run with Docker

cd cpp_cli
docker build -t scanner-cli .
# Mount current dir to access images
docker run -v $(pwd):/data scanner-cli /data/input.jpg /data/output.jpg --clean

Build Locally

cd cpp_cli/build
cmake .. && cmake --build .
./image_processor input.jpg output.jpg --clean

Features

  • Automatic Document Detection: Finds the largest quadrilateral.
  • Perspective Warp: flattens the document view.
  • Document Cleaning: Adaptive thresholding (Bonus).
  • Python Bindings: Use C++ in Python (Bonus).
  • Web UI: Drag & Drop interface (Bonus).