# A Review of Document Image Enhancement Based on Document Degradation Problem
## 3 Document Image Degradation Methods
### Metrics  
In this section, for the quantitative evaluation and comparison of advanced algorithms, we introduce evaluation metrics: F-measure (FM), inverse distance distortion (DRD), pseudo-F-measure (p-FM), peak signal-to-noise ratio (PSNR), word error rate (CER), word error rate (WER), and structural similarity (SSIM). * F-Measure (FM) [71]: It is the summed average of accuracy and recall, which is a common evaluation criterion in the field of IR (information retrieval) and is often used to evaluate the classification models. The calculation formula is as follows: \[\mathbf{F}_{\beta}=\frac{\left(\beta^{2}+\mathbf{1}\right)\mathbf{PR}}{\beta^{2 }\cdot\mathbf{P}+\mathbf{R}}\] (1) where \(\beta\) is a parameter, P is precision, and R is recall. \(\mathbf{P}=\frac{\mathbf{TP}}{\mathbf{TP}+\mathbf{FP}}\), \(\mathbf{R}=\frac{\mathbf{TP}}{\mathbf{TP}+\mathbf{FN}}\), TP denotes true, FP denotes false positive, and FN denotes false negative. When the parameter \(\beta=1\), it is the most common F1-measure. \[\mathrm{F}_{1}=\frac{2\times\mathrm{PR}}{\mathrm{P}+\mathrm{R}}\] (2)
* Distance Reciprocal Distortion (DRD) [71]: It is used to measure the visual distortion of the image in the binary document. The formula is as follows: \[\mathrm{DRD}=\frac{\sum_{\mathbf{k}}\mathrm{DRD}_{\mathbf{k}}}{\mathrm{NUBN}}\] (3) where \(\mathrm{DRD}_{\mathbf{k}}\) is the distortion of the kth flipped pixel and NUBN is the number of non-uniform (not all black or white pixels) \(8\times 8\) blocks in the GT image. * Pseudo-F-Measure: It is introduced in Ref. [81], which makes use of pseudo-recall and pseudo-precision. The advantage of using pseudo-recall and pseudo-precision is that they use the weighted distance between output images as boundaries of characters in the extracted document and the boundaries of characters in the ground truth (GT) image. One other advantage of using the pseudo nature of recall is its consideration of local stroke width in output images, while pseudo-recall takes into consideration the \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Dataset** & **Task** & **No. of Image** & **Real vs. Synthetic** \\ \hline [PERSON]’s dataset & poor lighting conditions & 159 & real \\ RDSRD & poor lighting conditions & 540 & real \\ BMVC & deblurring & 3M train/35K test & synthetic \\ Bickley diary & multiple & 7 & real \\ SMADI & multiple & 240 & synthetic \\ DISCO and H-DISCO & multiple & \(10,10\) & real \\ DocImgEN & watermark removal & 10 k train/10 k validation/10 k test & synthetic \\ DocImgCN & watermark removal & 230 k train/10 k validation/10 k test & synthetic \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Degradation problems targeted by the datasets. local stroke width, and the pseudo nature of precision grows to the stroke width of the connected component in ground truth images. \[p-FM=\frac{2\times p\text{ Recall }\times\text{ Precision}}{p\text{ Recall }+\text{ Precision}}\] (4) where \(p\)Recall is defined as the percentage of the skeletonized ground truth image. * Peak signal-to-noise ratio (PSNR) [82]: The ratio between the maximum possible power used to represent a signal and the power of the corrupted noise that affects the fidelity of its representation. Since many signals have a wide dynamic range, PSNR is often expressed as a pair number using a decibel scale. PSNR is mainly used in image processing to quantify the reconstruction quality of images and videos affected by lossy compression. PSNR is defined by the mean square error (MSE). Given a noise-free m \(\times\) n monochrome image I and its noise approximation K, the MSE is defined as \[\text{MSE}=\frac{1}{\text{mn}}{\sum_{i=0}^{\text{m}-1}\sum_{j=0}^{\text{n}-1} [\text{I}(\text{i},\text{j})-\text{K}(\text{i},\text{j})]}^{2}\] (5) PSNR is defined as \[\text{PSNR}=10\cdot\log_{10}(\frac{MAX_{I}^{2}}{\text{MSE}})\] (6) where \(MAX_{I}^{2}\) is the maximum possible pixel value of the image. * Character error rate (CER) [83]: Character Error Rate is computed based on the Levenshtein distance.