Face Detection in Crowded Human Images by Bi-Linear Interpolation and Adaptive Histogram Equalization Enhancement

Face detection is a common computer technology being used in human identification applications. It can also refer to the process of locating human faces in a visual scene. Face detection is a branched field of object detection where all objects in an image are detected including several classes like cars, trees, humans... etc. Also face detection problems branch into a lot of cases, some focus on frontal faces, others focus on side pose and so on. In this paper, a new face detection method based on Bilinear Interpolation image zooming method and image enhancement by Adaptive Histogram Equalization (AHE) method is proposed. The new method gives an encouraging results for crowded human images. By comparing the proposed method with the Viola-Jones algorithm, face detector using the cascade object detector, which supported in MATLAB, the new method gives excellent results in detecting human faces with different resolutions, poses and sizes. It succeeds in detecting most of the human faces in the tested images regardless of image sizes. The new method is tested on several images in Pratheepan dataset with crowded humans. Also, I tested the new method on many images collected from the Internet, whose can be classified as crowded human images. Experimental results show that the proposed Ad_L_Hist method is more efficient in detecting human faces in crowded human images.


Introduction
Face detection is the first step in many face recognition applications such as automated control systems. It has a lot of challenges, represented in variations of image appearance, illumination conditions, occlusions, image orientation and face expressions. Photo taking is the most useful application of face detection, when you take some photos to yourself and your friends in a journey, for example, the algorithm of face detection in your camera detects the human faces in the taken photo and accordingly adjust the focus [1]. Another very useful application for face detection is security cameras in universities, airport offices, banks, ATM and any location with a security system [2]. These cameras should be able to detect faces images whose sizes, directions, head poses and illumination conditions are unknown.
Recently, a lot of researchers are working in face detection field tying to discover it's hidden. Many of novel methods have been proposed to resolve its variations and challenges. Some used skin color classification others used Neural Networks (NN) and many other directions. Skin color detection in color images is the common technique used in face detection. A lot of researches concerned on several color spaces like HSV, RGB, YC r C b , CIE-Lab and CIE-YIQ to detect skin like color range.

Related Work
An Automatic Contrast Limited Adaptive Histogram Equalization (CLAHE) method, for enhancement, was proposed in [3]. The clip point for CLAHE was set automatically based on texturizes of an image block. Also, they presented a dual gamma correction into CLAHE to preserve naturalness of the output images when applying the CLAHE method. In the beginning, they redistributed the histogram of the block in CLAHE based on the dynamic range of each block. Then, the dual gamma correction was applied to enhance the luminance, especially in dark regions while reducing over enhancement artifacts [3].
A color encoding framework based on CIE-Lab color space was proposed in [4]. It was developed to have a better visual perception and information exploration. They used the four decomposed components, surface scattering, helix scattering, volume scattering and double bounce, along with total return power to improve the discernibility among the scattering components [4].
A practical implementation of Viola-Jones algorithm, face detector using the cascade object detector supported in MATLAB was introduced in [5]. Using the function vision. Cascade Object Detector, there were eight face detectors were developed using the train Cascade Object Detector function and tuning the number of cascade layer and the False Alarm Rate. The performance of the eight face detectors were analyzed to use different tuning parameters. More training images were required to improve results with higher positive rate [5].
Researchers used Contrast Limited Adapted Histogram Equalization (CLAHE), which used popularly in medical images, to create face recognition system for variant illumination conditions [6]. They achieved this method by enhancing (CLAHE) technique and called their introduced method "Enhanced CLAHE". Many facial features, like eye brows, eyes, mouth and nose, can be extracted individually using the Enhanced CLAHE. The Enhanced CLAHE was tested using fisher face subspace projection method and Fuzzy K Nearest Neighbor classifier. Results of CLAHE was compared with the Enhanced CLAHE and the Enhanced CLAHE efficiency was tested with three common databases, Yale, ORL and AR. In the future, they looked to reduce features dimensions and increase the accuracy of face recognition by using SVM classifier [6].
Contrast limited fuzzy adaptive histogram equalization (CLFAHE) was proposed in [7] to improve the contrast of MRI (Magnetic resonance imaging) Brain images. The proposed method contains three stages. At first, the gray level intensities are transformed into membership plane and membership plane is modified with Contrast intensification operator. In the second stage, the contrast limited adaptive histogram equalization is applied to the modified membership plane to prevent excessive enhancement in contrast by preserving the original brightness. Finally, membership plane is mapped back to the gray level intensities. The performance of proposed method was evaluated and compared with the existing methods such as PSNR, entropy, FSIM, and AMBE [7]. This paper is organized as follows: section 2 talks about bilinear interpolation, definition and equations. In section 3, Adaptive Histogram Equalization (AHE) is explained and how to use it in enhancement purposes. A brief demonstration of CIE-Lab color format is presented in section 4. The proposed method of Bi_L_Hist is proposed in section 5, how to use it and its steps. Section 6, shows the experimental results obtained by applying the proposed method presented in section 5, and discussion of the results. Conclusion of the presented work and future work of this paper is presented in the last section.

Bi-linear Interpolation
Bilinear Interpolation, in mathematics, is an extension of Linear Interpolation. It is used in interpolating functions of two variables (x and y, for example) on a rectilinear 2D grid. To apply bilinear interpolation, at first, linear interpolation is calculated in one direction and then in the other direction [8].
Image processing and computer vision consider bilinear interpolation as one of the basic resampling techniques. It is called bilinear texture mapping or bilinear filtering [8].
In bi-linear interpolation, to compute the intensity of the zoomed image pixel "P", the weighted some of its 4 mapped neighboring pixels are used [9], figure 1. Consider the zooming factor is "s", so the mapped pixel point in the test image is given by "r" and "c" as follows: To measure the distance from the point of interest to the mapped pixels, the following equation is used: The 4 pixels neighboring to the interest point can be defined as: By using the previous values, the intensity of the pixel in inte rest can approximately defined as: . )

Adaptive Histogram Equalization Enhancement
Image histogram represents the relationship between image's grey levels and its corresponding frequency. Consider a gray image P (j) is expressed as follows [3]: where j represents the gray level of the image, n j represents the number of the gray level j and Num represents the total number of image pixels. The Histogram (H), in general, represents the probability distribution function of j, histogram Equalization (HE) can be defined as follows [3]: where s k represents the mapping function T (k) and maps each pixel value k of the image P (j) into s k . Adaptive Histogram Equalization (AHE) is a computer technique which used in image processing field to improve contrast of images. The main different between Adaptive Histogram Equalization (AHE) and the ordinary Histogram Equalization (HE) that AHE calculates many histograms, one to each section of the image and uses them all to redistribute the image lightness values. It is used to improve the contrast of the image and to enhance the definitions of edges in each region of the image [10].
The ordinary Histogram Equalization (HE) uses the same transformation derived from the histogram of the desired image to transform all pixels. These transformations work well if the pixel values transformation is similar throughout the whole image but if the image contains some regions are significantly darker or lighter than the others in the image, so the contrast in those regions will not be sufficiently enhanced [10]. Adaptive Histogram Equalization (AHE) is suitable in these cases because it transforms each pixel with a transformation function derived from the neighboring region. AHE was first developed for use in aircraft cockpit displays [10].
All the pixels near image edges have a special treatment, because they have incomplete neighborhood, for example, the pixels to the left or above the blue pixel in the following figure. This can be solved by mirroring pixel columns and rows with respect to image edges [10], figure 2.

CIE-Lab Color Space
The CIE-Lab is one of the color spaces defined by the International Commission on Illumination (CIE) in 1976. The three components of color: L represents lightness from black (0) to white (100), a represents color variation from green (-) to red (+) and b represents color variation from blue (-) to yellow (+). The CIE-Lab is a device independent color space, where, the colors are independently defined of how they are created or displayed [11], figure 3. where:

The Proposed Method
In this paper, a new face detection method based on Bilinear Interpolation zooming and image enhancement by Adaptive Histogram Equalization (AHE) method is proposed. The new method gives an encouraging results for crowded human images. By comparing with the face detection function supported in MATLAB, which depends on the Viola-Jones algorithm and face detector using the cascade object detector, the new method gives excellent results in detecting human faces with different resolution, poses and sizes. It succeeds in detecting most of human faces in the tested images regardless of image sizes. The new method is tested on several images in Pratheepan dataset with crowded humans. Also, I tested the new method on many images collected from the Internet, whose can be classified as crowded human images.
The face detection method supported in MATLAB uses vision. Cascade Object Detector. It uses the Viola-Jones algorithm to detect human faces, eyes, noses and mouth. To apply Face Detection function, first create the vision. Cascade Object Detector object and set its properties then call the desired object with its arguments, as if it were a function [14].
The vision. Cascade Object Detector System object contains many pre_trained classifiers used for detecting frontal faces, profile faces and several facial features. These classifiers are not always sufficient for particular applications so Computer Vision Toolbox TM provides the train Cascade Object Detector function to train a custom classifier, figure 4 [15]. Image scaling or image zooming is a basic process in computer graphics. Resizing image algorithms are trying to interpolate the suitable image intensity values for the resized image pixels which doesn't directly mapped to its original image. Bilinear interpolation is one of the major algorithms of image zooming or resizing [16].
In the following, the proposed Ad_L_Hist method is presented. We change the zooming threshold automatically according to tested images size. We treat automatically with four sizes: if the size of the tested image smaller than 400*400 pixels then the program uses 4 as a zooming threshold. If the tested images size is less than 800*800 pixels, the program uses 3 as a zooming threshold. The third category, if the tested images size is less than 900*900 pixels, then the program uses 2 as a zooming threshold. Otherwise, don't apply the zooming code because the tested image is big and clear enough and there is no need for zooming. Figure 5, shows the proposed Ad_L_Hist steps.

Experimental Results
The new method was tested on several images in Pratheepan dataset with crowded humans [17,18]. Also, I tested the new method on many images collected from the Internet, whose can be classified as crowded human images. The pratheepan dataset is a collection of images were downloaded randomly from Google search using different cameras, using different color enhancement and different illumination conditions [18]. It is divided to four folders FacePhoto, Family Photo and the ground for FacePhoto and FamilyPhoto. In my paper, I used the FamilyPhoto images because it contains a lot of people in the images and some of them have complex background.
The experimental results were performed on a laptop with Intel (R) Core ™ i7-2.60 GHz and 4 GB RAM with 64-bit operating system. The used version of MATLAB is MATLAB2016. Tables 1 and 2 shows a comparison results of the proposed method and the Viola and Jones method supported in MATLAB. In table 1, I apply the comparison on a set of randomly collected images. As we see, the new method achieves good results in all tested images with a high accuracy rate 81.64% on average compared with Matlab function 38.97% on average. In table 2, I apply the comparison on some Pratheepan dataset images-FamilyPhoto. Also, the new method achieves good results in all tested images with a high accuracy rate 95% on average compared with Matlab function 70% on average.
As shown in tables 1 and 2, the proposed Ad_L_Hist method is an efficient way in detecting human faces in crowded images. The reason dues to, the proposed method applies several steps to prepare the tested images. Image enlargement and AHE enhancement steps make the tested image better and clearer than the initial entered one.
The new method takes a bit more time than MATLAB face detection function, but the accuracy increased and the results are excellent than the old method. From table 3, the execution time is 9.04 seconds on average to the proposed method and 0.43 seconds on average to MATLAB function and for the Pratheepan dataset, the zooming threshold changed manually to get better results.

Conclusion
In this paper, a new face detection method based on Bilinear Interpolation Zooming Method and image enhancement by Adaptive Histogram Equalization method (AHE) was proposed. The proposed method was compared with face detection which used in MATLAB, based on Viola-Jones algorithm and face detector using the cascade object detector. The new method gave an encouraging results for crowded human images. It succeeded in detecting human faces in crowded images with different variations such as illumination, head poses, skin colors and sizes. Ad-L-Hist method was tested on several images from the Internet with different conditions and some images from Pratheepan dataset. Experimental results show that the proposed Ad_L_Hist method is more efficient in detecting human faces in crowded human images with a high accuracy rate. In the future work, we will try to enhance the proposed code to detect side faces and many several head poses with different illumination conditions.