# A Review of Document Image Enhancement Based on Document Degradation Problem
## 3 Document Image Degradation Methods
### The Problem of Poor Lighting Conditions  
Due to the effects of uneven lighting, various shadows are produced in the captured images. The following is a proposed method for removing shadows to address the problem of uneven lighting. In 2017, [PERSON] et al. proposed a method to estimate the background and text colors in local image blocks [42]. First, the local background color estimates are matched to the global reference to generate a shadow map. This shadow map is then used to correct the image to produce a final unshadowed output. This method detects and removes shadows from document photos and other text-based items. However, there are some limitations; e.g., the result will produce slight color and brightness variations, or in cases with strong hard  
Figure 6: The structure of the model constructed by [PERSON] et al. [40]. Reproduced with permission from [PERSON] et al., _Pattern Recognition_; published by Elsevier, 2022. Figure 7: DocEnTr model structure constructed by [PERSON] et al. [41]. The input image is split into patches, which are linearly embedded, and the position information is added to them. The resulting sequence of vectors is fed to a standard Transformer encoder to obtain the latent representations. These representations are fed to another Transformer representing the decoder to obtain the decoded vector, which is linearly projected to vectors of pixels representing the output image patches. Published under a Creative Commons Attribution 4.0 license. shadows, the method can leave small residual artifacts at the shadow boundaries. In 2018, [PERSON]. [43] proposed the ST-CGAN model, which consists of two stacked CGANs, each with a generator and a discriminator, capable of performing two tasks, shadow detection and shadow removal. It is the first framework for end-to-end joint learning of shadow detection and shadow removal with superior performance on various datasets and on both tasks. However, it is more demanding on the dataset and has more a priori conditions. In the same year, [PERSON] et al. introduced a newer general approach to the document enhancement problem [4], the main idea being to modify any state-of-the-art algorithm to improve its results by providing it with new information (input). Finally, it was found that the algorithm can be used for visibility detection and has better results for document shadow removal. However, for slight shadow problems, the PSNR effect of the output image does not have an advantage. In 2019, [PERSON] et al. proposed an efficient shadow removal algorithm for digitized documents [44], which uses the luminance value of each pixel to create a digitized input document and then estimates the shading artifact on the document by simulating the immersion process before correcting the illumination. After estimating the shading artifacts, the digitized document is reconstructed using the Lambertian surface model. However, for the task of eliminating specularly reflected light from the image, the model does not process very well. In 2020, [PERSON] et al. proposed the BEDSR-Net model [17], the first work to propose using deep learning to remove document shadows, as shown in Figure 8 below. The authors designed a background estimation module to extract the global background color of a document, as well as to learn information about the spatial distribution of pixels, encode it into an attention map, and then use a shadow removal network (SR-Net) to complete the shadow removal work. However, the effect of removing images with low background brightness needs to be improved. In 2021, CANet [45] was proposed by [PERSON] et al., as shown in Figure 9. The innovation of this model is to achieve shadow removal by passing information from non-shadowed regions to shadowed regions in the feature space, but the poor precision and inconsistent color of the segmented blocks limit it. Ref. [46] proposed the LG-ShadowNet model for shadow removal by training on unpaired data, where shaded and unshadowed training images are completely different and have no correspondence.