I need a clean, well-documented module that receives a JPEG image, finds every polygon—regular or irregular—among roughly eight to ten known shape families, and returns precise geometric data for each one. For every detected outline the routine must report: • overall maximum and minimum length • overall maximum and minimum width • the exact length of every side • the internal angle at every corner Consistency is critical. The same image processed at a different rotation, scale, or under uneven lighting should yield numerically identical results once the pixel-to-metric scale is fixed. Please build the solution around solid geometric reasoning rather than brittle colour or edge-count shortcuts. Core expectations • Input: JPEG still images only (the module will later sit behind a live camera, but for now we work with files). • Shapes: both regular and irregular polygons. • Accuracy: results must be physically realistic; target ≤2 % error against ground-truth measurements in my validation set. • Code style: modular, readable, and ready to be dropped into an existing Python + OpenCV pipeline (NumPy/SciPy welcomed). Deliverables 1. Fully commented source code organised into importable classes or functions. 2. A short README explaining the maths, calibration steps, and integration points. 3. A minimal test harness that ingests a folder of JPEGs and emits a JSON or CSV report matching the fields above. 4. Sample output on at least three differently lit or rotated images showing stable measurements. I will supply representative images and a spreadsheet of reference dimensions for validation as soon as the project starts. Let me know if any assumptions about distortion, camera intrinsics, or allowable libraries need to be clarified before you begin.