Global model for uneven illumination enhancement of document images

Exponential growth of low-cost digital imagery is latterly observed. Images aqcuired under uneven lighting are prone to experience poor visibility, which may severely limit the performance of most computational photography and automatic visual recognition applications. Diﬀerent from current optimization techniques, we design a novel partial diﬀerential equation based model to rectify the variable illumination artifacts. In this study, a large number of document samples capturing uneven illumination and low contrast conditions are tested to compare the eﬃctiveness of the proposed local and nonlocal approaches. The suggested algorithm can be applied in Arabic, Latin and Chinese document images with any type of shade.


Introduction
With the current digital revolution and the availability of a wide range of imagecapturing devices such as digital cameras, digital camcorders, smartphones and scanners, document imaging has replaced paper files and documents as a vital medium to transmit information in people's life. However, by virtue of the effect of the shooting environment, the document images may undergo from various distortions. Bad illumination is among the major factors affecting the image formation. It naturally leads to uneven global brightness due to dissimilar texture of the object surface and the shadows produced from distinct light source directions. A non-uniform light distribution, unstable lighting and the shade of other objects in the scene represent mainly the nonideal conditions under which unevenenly illuminated images are acquired. This distortion leads to an extreme quality degradation of document images and may confuse the interpretation of their content which necessarily poses significant and notable problems in the subsequent layout analysis and the character recognition stages. Consequently, correcting illumination on document images can considerably enhance the performance of subsequent analysis tasks. Non-uniforme illumination enhancement shines in many vision-based applications. Within the context of medical imaging, Grisan et al. [1] proposed an effective algorithm to model and correct the local luminosity and the variability of the contrast in non-uniformly illuminated Retinal images, whereas in [2], a shading correction procedure of the digital microscopy images is outlined, it is based upon the intrinsic properties of the image, which are revealed through Gaussian smoothing. Illumination correction is also a crucial step in pre-processing high-resolution remote sensing data for forest change detection studies [3], satellite images [4] or for remote sensing images covered by thin clouds [5]. Another of the most important problems of illumination normalization is face recognition under varying illumination [6] and object tracking in video sequences [7]. The goal of illumination enhancement algorithms is to weaken as much as possible the effects of the present shade or bright light. As part of document images processing, traditional procedures commonly adopte adaptive binarization methods [8] [9] to eliminate the shadow. Knowing that the lighting of a document image often varies slowly, homomorphic filters [10] can be employed to subtract the background from the initial image, these filters produce satisfactory outputs for the textual parts of the images, but unfortunately can damage photographic regions. The illuminationbalance algorithm [11] can efficiently improve the quality of degraded document images with illustrations obtained by scanners. This technique translates into four distinct stages: edge detection step using Söbel edge detector in several directions, object mark step, light evaluation step, and illumination balance step. This technique is then improved in [12]. Meng et al [13] defined a Convex Hull to estimate the shading for scanned document images. The crucial objective of this work is to present an improved non-local approach for estimating variable illumination in document images. From a physical standpoint, nonlocal approaches play a vital rule in characterizing many natural phenomena. The concern for nonlocal methods is motivated by the ability of these approaches to capture with rigorous accuracy the effects that are difficult to describe by local models. Nonlocal functionals, nonlocal operators and nonlocal problems defined in nonlocal function spaces, have gradually attracted the mathematical community's attention by its theoretical wealth, as for its concrete real-world applications. This type of model occurs in a quite natural way in many different contexts, such as, among others, continuum theory [14], physics-based nonlocal elasticity [15], machine learning [16] and phase transition [17], and so on. To tackle the problem of varying illumination in document images, we introduce in this paper an effective a nonlocal p-Laplacian based equation to estimate the illumination component of the degraded source image. The proposed approach inherits the advantages of the nonlocal models in preserving text textures and small details.

The proposed model
In this section, we formulate a non-local evolution equation to correct the document images acquired under variable illumination. Starting with a grayscale image, our evolution equation estimates the non-uniform illumination to offer a perfectly clear version of the initial image.

Derivation of the proposed model
According to Reintal-Cortex theory [18], a given image "U " can be decomposed as follows: U (x, y) = I(x, y)R(x, y) I(x, y) stands for the illuminated part of ambient light and R(x, y) represents the reflected constituent of the real color of the object. The aim of this work is eliminating the effect of the component "I" and acquiring the text component of the original document image. For illumination estimation, Ait Bella et al. [19] explain that when the image contains only text, the intensity of the variable illumination background takes on values greater than the intensity of the dark text, which allows to approximate the illumination by replacing each pixel with the maximum average of its neighboring pixels. In essence, if I n ij represents the intensity of a pixel (i, j) at the n th iteration, we get: By subtracting I n ij from both sides of the equation (2), the discrete second derivatives in all directions appear and we obtain the discretized version of the equation: In a similar manner, taking into account only the vertical and horizontal directions, one can directly consider the Laplacian operator instead of the second derivatives. Inspired by [19], we propose the following nonlinear equation as the diffusion process of our illumination estimation model: where 1 < p < ∞ and Ω is a bounded open subset of R 2 . The p-Laplacian ∆ p I = div(|∇I| p−2 ∇I) has attracted much attention in various applications. For instance, it arises in non-Newtonian fluids, flow through porous media, reaction-diffusion problems, nonlinear elasticity or in petroleum extraction. It should be mentioned that when p = 2, the proposed results coincide with those of the article [19]. Our central idea is to adopt a non-linear generalization of the standard Laplacian for the sole purpose of correcting any non-uniform illumination effect by controlling the degree of smoothing by different choices of the exponent "p".
In this article, we deal with the evolutionary equation (4), we give an existence result for the solutions of the proposed model (4) within the framework of the theory of viscosity solutions [20].
To determine viscosity solutions, it is necessary to introduce a class of "test functions".
for all z = (t, x) with |z −ẑ| < δ . Now we shall introduce a notion of viscosity solutions of (5). Definition 2 [21] Assume that (H1) and (F 2) hold and that F(F ) is not empty. 1. A function u : Q T → R ∪ {−∞} is a viscosity subsolution of (5) if u * < +∞ on Q T and for all ϕ ∈ A(F ) and all local maximum point z of u * − ϕ in Q T , 2. A function u : Q T → R ∪ {−∞} is a viscosity supersolution of (5) if u * > −∞ onQ T and for all ϕ ∈ A(F ) and all local minimum point z of u * − ϕ in Q T , 3. A function u is called a viscosity solution of (5) if u is both aviscosity sub-and super-solution of (5).

Existence theorem
Theorem 1 Let Ω be a regular bounded open subset of R 2 and I 0 (x) ∈ U C(R 2 ). Then there exists a unique viscosity solution of the proposed model (4).

A nonlocal extension
The previous subsection provided initial formulation of the proposed model. The goal is to restore and reconstruct the badly illuminated documents in such a way that the text will be easily readable on the output document images but since document images can contain even more redundancy than other forms of images, we propose to modify the equation (4) in an attempt to better restore degraded documents. To achieve this goal, a nonlocal strategy looks like a potential breakthrough. In fact, the basic idea is to avail the self-similarity commonly present in natural as well as document images. Thus, to take benefit of the redundancy and self-similarity of the information in the document images, we propose the following nonlocal analogous problem to (4) with homogeneous Neumann boundary conditions: in Ω (16) where ∆ p N L I := Ω J(x − y)|I(y, t) − I(x, t)| p−2 (I(y, t) − I(x, t))dy (17) is the nonlocal p-Laplacian operator, J : R 2 → R is a nonnegative continuous radial function and 1 < p < +∞. The use of the non-local p-Laplacian (17) allows a powerful estimation process and since it does not rely on the gradient to extract the direction of diffusion, the proposed model proves capable of preserving the textures and details of the text.