Development of Technique for Face Detection in Image Based on Binarization, Scaling and Segmentation Methods

A technique for face detection in the image is proposed, which is based on binarization, scaling, and segmentation of the image, followed by the determination of the largest connected component that matches the image of the face.<br><br>Modern methods of binarization, scaling, and taxonomic image segmentation have one or more of the following disadvantages: they have a high computational complexity; require the determination of parameter values. Taxonomic image segmentation methods may have additional disadvantages: they do not allow noise and outliers selection; clusters can’t have different shapes and sizes, and their number is fixed.<br><br>Due to this, to improve the efficiency of face detection techniques, the methods of binarization, scaling and taxonomic segmentation needs to be improved.<br><br>A binarization method is proposed, the distinction of which is the use of the image background. This allows to simplify the process of scaling and segmentation (since all the pixels in the background are represented by the same color), non-uniform brightness of the face, and not to use the threshold settings and additional parameters.<br><br>A binary image scaling method is proposed, the distinction of which is the use of an arithmetic mean filter with threshold processing and fast wavelet transform. This allows to speed up the image segmentation process by about P2 times, where P is the scaling parameter, and not to use the time-consuming procedure for determining.<br><br>A binary scaled image segmentation method is proposed, the distinction of which is the use of density clustering. This allows to separate areas of the face of non-uniform brightness from the image background, noise and outliers. It also allows clusters to have different shapes and sizes, to not require setting the number of clusters and additional parameters.<br><br>To determine the scaling parameter, numerous studies were conducted in this work, which concluded that the dependence of the segmentation time on the scaling parameter is close to exponential. It was also found that for small P, where P is the scaling parameter, the quality of face detection deteriorates slightly.<br><br>The proposed technique for face detection in image based on binarization, scaling and segmentation can be used in intelligent computer systems for bio-metric identification of a person by the face image.


Introduction
Information that characterizes the person's unique biological characteristics is most valuable when designing biometric identification systems for solving problems of access control for users of software and hardware facilities, because it allows for direct identification of a person.
Previously, for objective reasons, many of the biometric parameters of a person that would unambiguously allow the determination of their image and were difficult to fake could not be used for registration. This is, firstly, because there was no information about the possibility of identifying a person by a certain biometric parameter, and, secondly, because there were no methods and means of recording and researching relevant biometric data.
To date, a theoretical basis for the identification of a person using their biometric parameters has already been created. Moreover, methods and techniques for automation of recording and researching of the process of identifying a person that were previously absent have also been developed.
Currently, methods of automatic and automated biometric identification by voice, face, fingerprints, handwriting, palm vein pattern, iris, etc., which are based on artificial intelligence approaches, are widely used. Wherein one of the most popular and simple methods in terms of technical means of identification is face identification.

E . F e d o r o v
Existing face recognition systems for biometric identification of a person include the following steps: -face detection; -face alignment; -facial features extraction; -face classification. The most important, in terms of obtaining a high-quality final result, is the face detection stage. It is this stage that is reviewed in this paper.
Existing face detection systems are based on techniques grounded on: -knowledge; -invariant features; -template matching; -appearances (they include FindFace -one of the best techniques today, which is based on a convolutional neural network).
The disadvantage of techniques based on knowledge is the limited formalized empirical knowledge of the human face.
The disadvantages of techniques based on invariant features are high sensitivity to changes in lighting, noise.
The disadvantages of techniques based on template matching are high sensitivity to changes in the scale, orientation and shape of the face, changes in lighting, noise, high computational complexity, high power of the training set.
The disadvantages of techniques based on the appearance are high computational complexity, high power of the training set.
Thus, the problem of insufficient effectiveness of face detection in the image is currently relevant.

Literature review and problem statement
Face determination in the image plays an important role in automatic [1] and automated [2] biometric identification, for which methods of binarization, scaling and segmentation of the image can be used.
However, issues related to improving the efficiency of threshold processing remained unresolved. The reason for this may be: -insufficient accuracy of the binarization; -the complexity of the procedure for determining the threshold value; -the complexity of the procedure for determining additional parameters.
An option to overcome the corresponding difficulties may be to use a priori information about the binarizable image. This approach was used in [6], but it is applicable only to mammograms. All this suggests that it is advisable to conduct a study on the creation of an image binarization method.
The work [7] presents the results of studies related to image segmentation. According to it, the following approaches are usually used for image segmentation: -regions boundaries determination (pixels with a large intensity gradient, as well as pixels differing in color, are selected as the regions boundaries) [8]; -regions identification (regional growth, division and merging of regions, watershed) [9]; -histogram [10]; -based on partial differential equations [11]; -variation [12]; -graph [13]; -based on the Markov random field [14]. However, the issues related to improving the efficiency of the detected areas remained unresolved. The reason for this can be: -insufficient accuracy of the performed segmentation; -high computational complexity of segmentation; -the complexity of the procedure for determining additional parameters.
An option to overcome the corresponding difficulties may be to use a taxonomic approach.
However, these methods have one or more of the following disadvantages: -possess high computational complexity; -don't allow separating noise and outliers; -clusters can't have different shapes and sizes; -require setting the number of clusters; -require the determination of parameter values. All this suggests that it is advisable to conduct a study on the creation of an image segmentation method.
The work [27] presents the results of studies related to image scaling, which allows for image size reduction. It has been shown that the nearest neighbor method is often used to scale images [28]. However, the issues related to improving compression efficiency remained unresolved. The reason for this may be the low quality of restored images.
An option to overcome the corresponding difficulties may be to use an approach based on the following methods: -filtering (bilinear, bicubic, Lanczos filters, etc.) [29]; -supersampling (oversampling, mipmap) [30]; -spectral transformations [31]. Still, these methods have one or more of the following disadvantages: -high computational complexity of scaling; -requirement to determine the additional parameters values.
All this suggests that it is advisable to conduct a study on the creation of an image scaling method.
Thus, to improve the efficiency of the technique for face detection in the image, it is necessary to improve the binarization, scaling and segmentation methods.

The aim and objectives of the study
The aim of this work is the development of a face detection technique based on digital signal processing and clustering methods. This makes it possible to improve the quality of face detection in the image.
To achieve the aim, the following objectives were set: -develop an image binarization method based on image background; -develop a binary image scaling method; -develop a binary scaled image segmentation method based on density clustering.

Image binarization based on image background
The proposed image binarization based on image background includes the following steps: As a result, the binary image is formed. The stages, input and output data of the image binarization method are presented in Fig. 1.
The advantage of the proposed method of image binarization is that, unlike other methods of binarization, it allows simplifying the processes of scaling and segmentation (since all background pixels are represented in one color) and does not require a threshold setting.

Binary image scaling
The paper proposes two versions of the method for binary image scaling (based on filtering and based on two-dimensional fast wavelet transform). Determining the best version of the method is performed on the results of numerical study on a specific benchmark.

1. Binary image scaling based on arithmetic mean filter and threshold processing
The proposed binary image scaling based on an arithmetic mean filter and threshold processing includes the following steps: 1) set the binary image ( ) 1 2 , , b n n Set the scaling parameter P that defines the length of a square window as 2 P . Set the threshold value T; 2) set the row number of the binary scaled image n 1 =1; 3) set the column number of the binary scaled image n 2 =1; 4) calculate the average pixel value in a window of size 2 P ×2 P : if it is not the end of the current row of the binary scaled image, i. e. n 2 <N 2 /2 P , then increase the column number of the current row of the binary scaled image, i. e. n 2 =n 2 +1, go to step 4; 7) if it is not the last row of the binary scaled image, i. e. n 1 <N 1 /2 P , then increase the row number of the binary scaled image, i. e. n 1 =n 1 +1, go to step 3.
As a result, the binary scaled image is formed. The stages, input and output data of the binary image scaling method are presented in Fig. 2.

2. Binary image scaling based on two-dimensional fast wavelet transform
The proposed binary image scaling based on two-dimensional fast wavelet transform (FWT) includes the following steps: 1) set the binary image ( ) Set the scaling parameter P that determines the number of decomposition levels. Set the number of decomposition level i=1; 2) for each row x,   Electronic copy available at: https://ssrn.com/abstract=3703328 3) for each column y, where ( ) round x is the rounded x. As a result, the binary scaled image is formed. The stages, input and output data of the binary image scaling method are presented in Fig. 3.
The advantage of the image scaling method (Fig. 2, 3) is that, unlike other scaling methods, it allows to speed up the process of image segmentation by about P 2 times, where P is the scaling parameter.

Segmentation of a binary scaled image based on density clustering
The proposed segmentation of the binary scaled image includes the following steps: 1) set the binary scaled image ( )  1, n n = + go to step 3. As a result, the matrix of pixel markings of a segmented binary scaled image is formed.
The stages, input and output data of the binary scaled image segmentation method are presented in Fig. 4.
The advantage of the image segmentation method is that it allows to separate noise or outliers from the face, does not require additional parameters. It also allows clusters to have different shapes and sizes, and does not require setting the number of clusters.

Determining the largest connected component of a binary scaled image that matches the face
The proposed determination of the largest connected component of the binary scaled image includes the following steps: 1) set the pixel markings matrix ( ) 1 2 , , g n n

5.
If it is not the end of the current row of the pixel markings matrix, i. e. 2 2 , n N <  then increase the column number of the current row of the pixel markings matrix, i. e. 2 2 1, n n = + go to step 4. 6. If it is not the last row of the pixel markings matrix, i. e. 1 1 , n N <  then increase the row number of the pixel markings matrix, i. e. 1 1 1, n n = + go to step 3.  Electronic copy available at: https://ssrn.com/abstract=3703328 As a result, the matrix of pixels belonging to the face is formed.

Results of experimental studies of face detection in the image using the developed technique
In the work, the proposed technique for face detection in the image was investigated. Fig. 5, a shows the original 8-bit image. Image size is 1024×1024 pixels. Fig. 5, b shows the resulting 8-bit image that does not use scaling (P=0).
According to the experiments for the images shown in Fig. 6, a-f, for scaling using an arithmetic mean filter with threshold processing, the value of the scaling parameter should be P=2 (at higher P, a significant change in the shape of the face begins, which can already be seen from Fig. 6, c).
According to the experiments that are presented in Fig. 7, a-f, to scale an image using fast wavelet transform by means of the Daubechies wavelet of length 8 (denoted by db4), the value of the scaling parameter should be 2 P = (at higher P, a significant change in the shape of the face and the appearance of unwanted artifacts like gray color begin, which can already be seen from Fig. 7, c).
For both methods, such a value of the scaling parameter P, on the one hand, does not lead to significant changes in the shape of the face (this is typical for values 3-6), which impair visual perception, and, on the other hand, does not significantly slow down segmentation (this is typical for 1).
According to Fig. 6, 7, the fast wavelet transform truncates the face, as well as requires the choice of the wavelet and its length, and has greater computational complexity, while the arithmetic mean filter with threshold processing does not require additional parameters.
The influence of the scaling parameter P on the time of binary image segmentation is shown in Fig. 8. The experiments were carried out on a computer with an Intel Pentium Quad-Core processor with a base frequency of 2.58 GHz.
According to Fig. 8, the dependence of the segmentation time on the scaling parameter is close to exponential and shows that, since P=2, the segmentation time varies only slightly. Table 1 presents error probabilities of the first and second kind upon face detection, obtained using the Sib-  Table 1 shows that the best results are given by the proposed technique.

Discussion of the results of the study of methods for face detection in the image
For the technique of face detection in the image, the proposed methods of binarization, scaling, and segmentation were investigated.
The solution to the problem of developing the image binarization method was obtained by using the image background. This allows for separation of the face segments of non-uniform brightness from the image background later on during segmentation, as can be seen in Fig. 6, 7 for small values of the scaling parameter P. As can be seen from the structure of the method in Fig. 1, there are no complex procedures for determining the threshold value and additional parameters.
The solution to the problem of developing a binary image scaling method was obtained by using an arithmetic mean filter with threshold processing and fast wavelet transform. This allows to significantly accelerate segmentation later on even at small values of the scaling parameter P, which is seen in Fig. 8. As can be seen from the two variants of the method structure in Fig. 2, 3, there is no complex procedure for determining additional parameters.
The solution to the problem of developing a binary scaled image segmentation method was obtained by using density clustering. This allows to separate areas of the face of non-uniform brightness from the image background, noise and outliers, as can be seen in Fig. 6, 7 for small values of the scaling parameter P . As can be seen from the method structure in Fig. 4, the shape, size and number of clusters are determined based on the neighborhood, and there is no specification of additional parameters.
The advantage of the image binarization method is that it simplifies the process of scaling and segmentation (since all the pixels in the background are represented in the same color) and does not require a threshold setting.
The disadvantage of the image binarization method is that it can lead to noise or outliers.
The advantage of the image scaling method is that it allows to accelerate the process of image segmentation by about 2 P , where P is the scaling parameter. The disadvantage of the image scaling method is that it can lead to noise or outliers.
The advantage of the image segmentation method is that it allows to separate noise or outliers from the face, does not require additional parameters. It also allows clusters to have different shapes and sizes, and does not require setting the number of clusters.
The disadvantage of the image segmentation method is that it has computational complexity is the size of the scaled binary image. The proposed methods are useful in face detection in the image, and they can be used in visual image recognition systems.
The proposed methods are a continuation of a previously conducted study on the analysis of mammograms, and in the future they are planned to be improved to further reduce computational complexity through the use of parallel information processing technology.
According to Table 1, the proposed technique, due to improved binarization, scaling, and segmentation, improves the quality of the solution to the problem of insufficient efficiency of face detection in the image.
This technique's limitation may be blurring the border of the face and background in the image (there are no pixels that are unique to the face among the boundary pixels of the face) and the image size, which is significantly larger than 1,024×1,024.

1.
A binarization method is proposed, the distinction of which is the use of the image background. This allows to simplify the process of scaling and segmentation (since all the pixels in the background are represented in the same color), non-uniform brightness of the face, and not to use the threshold setting and additional parameters.
2. A binary image scaling method is proposed, the distinction of which is the use of an arithmetic mean filter with threshold processing and fast wavelet transform. This allows to speed up the process of image segmentation by about P 2 times, where P is the scaling parameter, and not to use the time-consuming procedure for determining additional parameters.
3. A binary scaled image segmentation method is proposed, the distinction of which is the use of density clustering. This allows to separate areas of the face of non-uniform brightness from the image background, noise and outliers. It also allows clusters to have different shapes and sizes, to not require setting the number of clusters and additional parameters. Electronic copy available at: https://ssrn.com/abstract=3703328