- Replace corner marker detection with contour-based sheet boundary detection
using findContours + approxPolyDP to find the largest rectangle
- Add corner marker detection as fallback (extracted to corner-marker-fallback.js)
- Switch bubble fill measurement from mean intensity to Otsu threshold + countNonZero
for better robustness against uneven lighting
- Remove 2-degree skew threshold — always apply perspective correction when 4 corners found
- Calibrate SHEET_LAYOUT ratios to match real CV1239 template measurements
- Add references doc with OMR tutorial and repository links
Remove TypeScript from the project and convert all .ts/.tsx files to
.js/.jsx. Add JSDoc @typedef and @param annotations to all lib functions
for type checking via jsconfig.json checkJs. Delete tsconfig.json and
src/types/ directory, replace with src/lib/types.js JSDoc definitions.
- Split 1152-line ImageProcessor into 7 focused modules under src/lib/ and src/types/
- Fix bubble grid to match Vietnamese THPT layout (Công văn 1239/BGDĐT 2025): 8-digit student ID, 4-digit exam code, proportional section positioning
- Replace hardcoded pixel positions with relative positioning anchored to corner markers
- Add weighted scoring (Phần I: 0.25pts, Phần II: 0.25pts/sub-option with partial credit, Phần III: 0.5pts) with configurable weights
- Replace window global callback hack with useRef-based resolver in UploadPage
- Add image thumbnails, real progress bar, inline status messages (replacing alert())
- Add sortable/filterable results table with score color badges and search
- Extract shared types to eliminate 3x duplication across components
- Remove CLAHE/bilateralFilter (unavailable in opencv.js browser) for reliable preprocessing
Enhanced the image preprocessing pipeline using CLAHE and bilateral filtering for better bubble detection. Updated the bubble fill confidence calculation to use Gaussian blur and variance checks, and lowered detection thresholds for improved sensitivity. Added visual confidence indicators and logging for debugging, and adjusted debug visualization to reflect confidence levels.