Miguel, Gino Carlos O.; Racimo, John Vincent S.
Enhancing B. Wang and C.L.P. Chen’s local water-filling algorithm applied to shadow detection and removal in document images - Undergraduate Thesis: (Bachelor of Science in Computer Science) - Pamantasan ng Lungsod ng Maynila, 2025
ABSTRACT: The Local Water-Filling (LWF) algorithm by Bingshu Wang and C.L.P. Chen effectively detects and remove shadows in digitized documents by modeling images as topographic surfaces and redistributing light intensity to normalize shadowed regions. While enhancing readability and visual quality, the LWF algorithm faces limitations, including color degradation in documents with colored text, pixel-level distortion, and inaccurate shadow mask generation, which affect text clarity and structural accuracy. To address these issues, this study proposes the Enhanced Local Water-Filling (ELWF) algorithm. The ELWF integrates Penumbra Enhancement based on Retinex Theory to preserve color fidelity, adaptive thresholding with Canny edge detection text mask to reduce pixel-level distortion, and channel-wise histogram analysis to improve shadow mask generation for more accurate umbra and penumbra segmentation. The ELWF algorithm was evaluated using the OSR Dataset of 237 document images. Results showed an 81.32% improvement in Mean Squared Error (MSE), reducing it from 1282.40 to 542.60; a 36.82% decrease in Error Ratio, from 0.685 to 0.472; and a 5.88% increase in Structural Similarity Index (SSIM), from 0.875 to 0.928. Distance-Reciprocal Distortion (DRD) measure improved by 121.61%, and OCR accuracy, measured via Levenstein distance, improved by 54.86%, lowering the edit distance from 283.890 to 161.671. These results demonstrate the ELWF algorithm’s effectiveness in enhancing shadow removal and OCR accuracy, contributing to improved document digitization, archival processing, and automated text attraction.
academic writing
QA76.9 A43 M54 2025
Enhancing B. Wang and C.L.P. Chen’s local water-filling algorithm applied to shadow detection and removal in document images - Undergraduate Thesis: (Bachelor of Science in Computer Science) - Pamantasan ng Lungsod ng Maynila, 2025
ABSTRACT: The Local Water-Filling (LWF) algorithm by Bingshu Wang and C.L.P. Chen effectively detects and remove shadows in digitized documents by modeling images as topographic surfaces and redistributing light intensity to normalize shadowed regions. While enhancing readability and visual quality, the LWF algorithm faces limitations, including color degradation in documents with colored text, pixel-level distortion, and inaccurate shadow mask generation, which affect text clarity and structural accuracy. To address these issues, this study proposes the Enhanced Local Water-Filling (ELWF) algorithm. The ELWF integrates Penumbra Enhancement based on Retinex Theory to preserve color fidelity, adaptive thresholding with Canny edge detection text mask to reduce pixel-level distortion, and channel-wise histogram analysis to improve shadow mask generation for more accurate umbra and penumbra segmentation. The ELWF algorithm was evaluated using the OSR Dataset of 237 document images. Results showed an 81.32% improvement in Mean Squared Error (MSE), reducing it from 1282.40 to 542.60; a 36.82% decrease in Error Ratio, from 0.685 to 0.472; and a 5.88% increase in Structural Similarity Index (SSIM), from 0.875 to 0.928. Distance-Reciprocal Distortion (DRD) measure improved by 121.61%, and OCR accuracy, measured via Levenstein distance, improved by 54.86%, lowering the edit distance from 283.890 to 161.671. These results demonstrate the ELWF algorithm’s effectiveness in enhancing shadow removal and OCR accuracy, contributing to improved document digitization, archival processing, and automated text attraction.
academic writing
QA76.9 A43 M54 2025