Goal: improve precision of automatic document cropping by switching: - from Douglas-Peucker algorithm (OpenCV's approxPolyDP) + a heuristic for documents missing a corner - to an algorithm that looks for edges * New quad algorithm: identify edges from contour orientation * Performance optimization: reduce number of calls to trigonometric functions * Performance: use a single threshold for live analysis * Fix orientation of debug mask and compute it only if required * Exclude quads that go out of the frame
Tools to evaluate the image processing pipeline
Preparing the environment
Python
cd python
python -m venv venv
source venv/bin/activate # venv\Scripts\activate on Windows
pip install -r requirements.txt
Images
Put JPEG images in dataset/images.