Abstract
This paper reprocesses the information of the boundary intelligent contour so as to effectively extract the codes of image contour features. The algorithm based on the coordinates of contour extracted through the level set evolution algorithm is used to obtain several 2D contour matrixes with the same size after repeated conversions. Moreover, the matrixes are diagonally, column-wise and horizontally coded to obtain new coded features. The anti-interference analysis of algorithm indicates that the algorithm of extracting feature code has variable and flexible extraction schemes and high stability. Distinguishable information can be obtained in similar images more easily. In order to prove the validity of the proposed algorithm, feature code exaction algorithm is used to facial expression recognition, and a facial expression recognition model on the basis of facial part contour code exaction is established. According to the experimental results, this facial expression recognition system can eliminate the interference with recognition resulted from the similarity of samples. The comprehensive recognition rate of facial expression is up to 97.20%.
Introduction
Contours are the important information relevant to the shapes of target images [1–3]. Different from commonalgorithms of image recognition, such as geometrical-feature-based recognition algorithm, geometrical-feature-based recognition algorithm, texture-based recognition algorithm and K-L recognition, image contour recognition only needs the boundary information of the image target [4–6]. The contour-feature-based image recognition algorithm can not only substantially decrease the time of feature extraction, but also realize more specific secondary extraction of contour features [7–10]. In this way, by fusing with the recognition models, the extracted feature information can achieve the recognition of more complex images.
The existing recognition algorithms based on image contours have made significant progresses in two aspects: recognition on the basis of image contour boundary and the recognition on the basis of image region [11, 12]. The recognition on the basis of image region can make use of the statistical features of pixel values in the image region, segment and extract the image region. The feature information of the target image can be acquired according to various models of extraction analysis [13]. In contrast, recognition on the basis of image contour has obvious advantages [14]. For example, the feature information is more distinguishable and fused with other numerical analysis skills, such as wavelet analysis and Fourier transform [15]. The information of boundary contour can be quantitatively reprocessed. Based on the secondary feature information, the extracted feature information can be endowed with better anti-interference ability and stability [16]. However, there are still some problems in processing the contour features of images: (1) Serious errors in the boundary contour retrieval for the target image with noise; (2) imperfection of boundary contour extraction through mathematical model; and (3) poor distinguishability of the traditional secondary feature extraction for similar images.
In view of the bottlenecks in the extraction of image contour features, this paper particularly analyzes the extraction of contour feature codes. After accurately obtaining the target contours through an an image level set evolution and active representation model, this paper proposes a novel contour feature coding scheme to extract the feature codes in the target contour boundary. These codes are further applied to recognize the face, which can further guide the research on image feature extraction.
Extraction of contour codes from a target image
The internal image information is mainly used by the traditional image codes in background prediction and compression, such as transform coding, predictive coding and entropy coding. The image features cannot be extracted through the traditional coding algorithms. The stored data of digital images can be reduced without the loss of image information.
The following factors should be further considered so as to accurately extract the contour features of a target image: the complexity of extraction, the stability of contour feature extraction, the accuracy of target image contour. Considering the above factors, the algorithm of coding the target image proposed in this paper can convert the contour coordinates of the target image and extract the contour feature matrix. On this basis, information about image contour feature can be extracted from multiple perspectives, which lays foundation for image processing. The algorithm of extracting the image contour feature codes is as below:
To facilitate the establishment of model test and model analysis, the features of a human brain image are extracted and analyzed according to the above steps. The parameters of the model are as follows:
The model of contour extraction in Step 1 can segment and extract the level set. The code matrix of image contour in Step 4 is set as [20, 50]. In step 5, the binarization coefficient of the code matrix of image contour code is 0.9, and the coding scheme is horizontal.
In order to verify the effectiveness of the image contour code extraction proposed in this paper, the extraction results of global pixels and contour codes of the typical human brain image are presented. Figure 1 shows the comparison results.

Results of extracting the contour code of a typical human brain image.
According to the horizontal coding results of global pixel, the images are compressed when the global pixel information is extracted. The original information of the image information is not changed. The feature information can be acquired in the case that the features are coded horizontally. This means that the image features do not have significant attributes, which are likely to be lost where there are other interference factors. The attributes obtained by horixontal coding results on the basis of image contour information are not stable, and the feature information is crude. The interfering signals do not exist around the coding section. The feature information has high stability and good robustness despite of the external interference. The anti-interference ability and stability of the model are analyzed as below.
Parametric analysis of the contour code extraction model
The effect of different coding schemes
The coding of contour aims to extract the information about features of an image. The information of the features in different images varies with the coding scheme. A target image with a salient contour is taken as an example to give various coding results. The parameters of the model are set as below:
The model of contour extraction in Step 1 can segment and extract the level set. The code matrix of image contour in Step 4 is set as [20, 50]. In step 5, the binarization coefficient of the code matrix of image contour code is 0.9. The coding scheme is diagonal, column-wise and horizontal, respectively.
The results of extracting contour codes through different schemes are as shown in Fig. 2.
According to the coding results as shown in Fig. 2, it can be observed that:

Results of the coding of image contour features through different schemes.
The results of horizontal coding in Fig. 2(c) indicate that there is a small number of white segments in the coding section, which are salient and long. Therefore, the coding result can explain the attributes of the image. The local changes of the image cannot lead to significant variation of the length and position of the coding section, which has excellent anti-interference ability in image recognition.
According to the results column-wise and diagonal coding in Figs. d and e, the white segments are fine and narrow. However, the whole distribution is uniform. As for local changes in the image, there are only some white segments in the coding sections, which does not significantly include the attributes of the image. In other words, the information about the features has excellent anti-interference ability.
According to the experiment results of the coding schemes, horizontal coding can obtain a small number of broad white segments, which can significantly represent the attributes of the single-phase image and has excellent anti-interference ability. Therefore, it can be used to recognize excellent anti-interference ability. However, diagonal and column-wise coding can obtain a large number of narrow white segments with uniform distributions. Therefore, it can be used to recognize images with multiple phases. The effect of different parameters
The size of the code matrix in Step 4 and the coefficient of binarization in Step 5 can affect the algorithm of extracting contour codes. Therefore, the attributes of the extracted image vary with the core parameters. In practice, the preferred parameters of the coding algorithm exist.
The effect of thresholds: When the binaryzation coefficient in Step 5 is 0.7, the results of code extraction are as shown in Fig. 3.

The results of image coding when the binarization coefficient is 0.7.According to the coding results as shown in Fig. 3: From the results of horizontal coding in Fig. 3(c), there are broad white segments in the coding section. Compared with the coding scheme with the binarization coefficient of 0.9 in Fig. 2, there is no original white segment. However, the number and breadth of the coding section are increased. Therefore, the influence of image code information can be enhanced by decreasing the threshold when the coding is not significant.
According to the results of column-wise and diagonal coding in Figs. d and e, when the binarization threshold is decreased in the coding process, there are more white segments in the coding section. However, the position of the white segments is fixed. Therefore, the distinguishability of image code information is enhanced by decreasing the threshold.
Based on the code extraction results, when the binarization threshold is decreased in the code extraction, both the breadth and the number of white segments in contour code information are increased. In other words, the effect of image code information can be enhanced by decreasing the threshold.
2) The effect of code matrix: the code matrix of the image contour in Step 4 is set as [10, 50] and [20, 50], respectively. The binarization threshold is 0.9. The coding schemes are column-wise and horizontal.
Based on the coding results in Fig. 4, when the code matrix is smaller in the process of coding, both the breadth and number of the white segment extracted in each direction are decreased, the position of which also changes to a certain degree. Salient white segments can be acquired through either column-wise or horizontal coding. The number of the white segments is almost decreased by half. Therefore, for all kinds of target images, the matrix size can be reduced appropriately in the coding process, so that the coding section can distinguish more samples through more sample codes.
In order to verify the effectiveness of the contour code extraction algorithm proposed in this paper, the stability of the code extraction is further analyzed. Analysis of image magnification interference
A sensitive target image of a mechanical workpiece is taken as the example, and the anti-interference ability of the code extraction proposed in this paper is given. The core parameters in the experiemnts are as follows:
The model of contour extraction in Step 1 can segment and extract the level set. The code matrix of image contour in Step 4 is set as [20, 50]. In step 5, the binarization coefficient of the code matrix of image contour code is 0.9. The coding scheme is diagonal, column-wise and horizontal, respectively. Figure 5 shows the results of code extraction with the image magnification interference.

Results of image coding through different code matrixes.

Results of extracting codes with image magnification interference.
According to the experimental results in Fig. 5, in the case that the image is magnified and the code extraction scheme is the same, the results of extracting the codes of the original and artificially magnified images are basically the same. Based on the calculation of Bhattacharyya coefficient, similarity and consistent statistic, it can be known that the similarity between two coding sections is above 0.92, which is relatively high. Table 1 shows the numerical values of correlation: Analysis of image noise interference
Similarity between original image and magnified image in the formation of code features
In a similar way, a sensitive target image of a mechanical workpiece is taken as the example, the corresponding contour codes are extracted by artificially adding noise. The core parameters are set as below:
The model of contour extraction in Step 1 can segment and extract the level set. The code matrix of image contour in Step 4 is set as [20, 50]. In step 5, the binarization coefficient of the code matrix of image contour code is 0.9. The coding scheme is diagonal, column-wise and horizontal, respectively. Figure 6 shows the results of extracting codes under noise interference.
According to the experimental results in Fig. 6, when the image is added with the Gaussian noise with a variance of 0.01 and a mean value of 0, there are some differences from the original image in terms of contour boundary. However, as for the code feature information, the breadth and position of white segments are not changed. Therefore, the code feature information has high similarity. Similarly, the correlation in the information about code features is above 0.95, which is relatively high. Table 2 shows the numerical values of correlation.

Results of extracting codes with image noise interference.
Similarity between the original image and the artificially noised image in coding section
According to the above results of extracting codes with the interferences of magnification and noise, the image contour code feature extraction algorithm proposed has excellent resistance performance. Diagonal, column-wise and horizontal schemes can reflect the image attributes, explore more contour feature information and guide the research on image feature extraction.
Based on different features for recognition, there are three categories of facial expression recognition models: (1) approaches based on gray features, such as local feature analysis (LFA), independent component analysis (ICA) and principal component analysis (PCA); and (2) approaches based on motion features, such as tracking learning detector (TLD) and facial action coding system (FCAS); and (3) approaches based on frequency features, like Gabor wavelet method. Despite of the effect of some recognition models in the recognition of facial expression and high recognition rate in certain conditions, the synthesis of several model methods has the highest recognition rate. The changes in sample conditions and a single recognition method can decrease the recognition rate, which can hardly meet the real-time demands of the actual system.
According to the simulation results of contour code, the image contour feature extraction algorithm proposed in this paper is based on the acquisition of a target contour. Therefore, based on the contour of a target image, the feature information of the target image can be obtained through the contour feature extraction, which trains the classifier as the input. As for image analysis, the image contour can be acquired more easily compared with frequency feature or motion feature. The preprocessing raises lower requirements for the original image. In the meantime,, when a target contour is extracted, feature information with high distinguishability can be acquired more easily, and the features can be extracted from multiple modals. In this way, the interference resulted from the similarity between samples is overcome.
A facial expression recognition model on the basis of facial part contour codes is proposed in this paper so as to verify the actual effect of the contour feature code extraction proposed in this paper. Firstly, the contours of mouth and eyebrows relevant with facial expression are extracted through an AAM model. Secondly, the contours of some key facial expressions are obtained. Thirdly, the contour code extraction algorithm is used to extract the features and obtain the feature information of the expressions. In the meantime, based on the interaction between the facial expressions, an independent SVM model recognition system is established, as shown in Fig. 7. Finally, the facial expression is judged according to the recognition results.

A diagram of SVM system for six parts of face.
The core steps of facial expression recognition of the six key parts are extracted through the AAM model:
JAFFE facial expression database which contains 213 images is taken as the analysis object of the model. Each expression library includes 10 persons, each of who has 7 expressions. There are 30 samples for surprised, 32 samples for scared, 31 samples for happy, 29 samples for disgusted, 31 samples for sad, 30 samples for neutral and 30 samples for angry. One image is selected from seven expressions of ten persons as the training sample to guarantee the representativeness of facial expressions. There are a total of 70 training samples. The samples of the model are further tested through other 143 facial expressions.
Through the algorithm above, a GUI system is developed through MATLAB R2014a on the basis of contour code extraction and AAM key facial expression, as shown in Fig. 8. Figure 9. shows the results of coding the key expressions.

GUI system which acquires scared expression codes on human face using AAM contours.

Results of code extraction from key facial expressions.
Similarly, the code features of the key expressions are extracted from the facial expression samples which have been tested. They are further recognized through the above trained SVM system to recognize the six facial expressions. Table 3 shows the accuracy of facial expression recognition through horizontal code extraction.
Results of facial expression recognition on the basis of contour code extraction (test samples)
In order to verify the effectiveness of the target contour code extraction algorithm proposed in this paper, we further compare the algorithm proposed in this paper and other model algorithms in terms of the accuracy of recognizing the facial expressions in JAFFE database. The comparison results indicate that the proposed facial expression recognition algorithm has a comprehensive facial expression recognition rate higher than 97.20%. In other words, after fusing diagonal, column-wise and horizontal coding with SVM, it has higher performance compared with other facial expression recognition models. Table 4 shows the comparison between the recognition results of the proposed algorithm and other algorithms.
Results of all facial expression recognition algorithms in JAFFE database
This paper introduced the application of the target image contour extraction in image recognition, and summed up the shortcomings of contour feature processing. Moreover, the bottlenecks of the existing image contour feature extraction were further proposed. Based on the relevant image processing models, this paper proposed a novel feature code extraction algorithm so that the features can be extracted from the target image. According to the contour coordinates of the target image, the relevant coordinates were converted through the algorithm. The contour features were matrixed and binarized to code the matrix.
On the basis of anti-interference analysis and parametric analysis of the model, the stability of the proposed feature code extraction algorithm is further proved. The information about the features with higher distinguishability can be acquired more easily, and the secondary contour feature mining can be realized more flexibly. Finally, in order to prove the effectiveness of the contour code feature extraction in practise, we established a facial expression recognition model through facial part contour codes. A simulation experiment of facial expression recognition was carried out. The simulation results indicate this facial expression recognition system can elimate the recognition interference resulted from the similarity between samples to a certain degree. The overall facial expression recognition rate is up to 97.20%, which is higher than that of other facial expression recognition models in [13–16].
