Design and implementation of fuzzy image enhancement system in police application

A set of image processing system based on fuzzy image enhancement algorithm is designed and implemented in the light of the actual needs of image material evidence extraction in the criminal investigation process of public security department, which is combined with the computer technology such as C++ language and graphic development tools. The system can enhance the processing efficiency by continuously selecting different algorithms for input images. The same type of fuzzy image can be processed by various algorithms and the ideal image can be obtained by comparing the image evaluation indexes, and the optimal selection of image quality and algorithm is realized.


Introduction
In the actual combat of public security, due to the influence of weather factors, the quality of the scene image is degraded or blurred. This situation can't provide effective clues for case detection. In recent years, image enhancement technology has been used more and more in the field of public security. The traditional image processing system has achieved good results in practical applications, but most of the fuzzy image processing algorithms are only suitable for specific images. The traditional image processing system does not classify the types of fuzzy images in a more detailed manner or compare the processing and comparison of multiple algorithms for the same kind of fuzzy images so as to obtain the optimal image [1]. This paper designs and implements a set of fuzzy image processing system with perfect functions and simple operation according to the actual needs of the public security. The system is designed and developed by using image processing and development tools such as C++ programming language, MFC (Microsoft Foundation Classes) graphical interface language, and OPENCV (Open Source Computer Vision Library). It integrates multiple image enhancement algorithms to process images and solves the problem of blurred image enhancement in different environments effectively.

Function of target system
System designed in this paper covers most of the common fuzzy images. It is easy to operate and easy to handle. It can meet the needs of public security work to the greatest extent so as to help the investigators get more case clues. The system is divided into the following parts: (1) Open image: The system can process images of different formats and can read the image file format such as TIF, PNG, JPG, JPEG, BMP and so on.
(2) Selecting the type of blurred image: When inputting the blurred image of the scene to be processed, it is first necessary to determine the type of fuzzy image.
(3) Image preprocessing: The main purpose of this step is to eliminate the useless information in the image as much as possible, so as to restore the true information of the image to the greatest extent.
(4) Image enhancement: Perform targeted processing on the blurred images of a certain type of environment. Finally, the available images are obtained by different calculation experiments.
(5) Image output and save: For the processed image to be analyzed, it is necessary to output and save the image and the format of the saved image is not limited.

System flow
The flow chart of the system is shown in Figure 1. It is clear that the first step needs to choose the fuzzy image input system to be processed and preprocess the image according to the requirement, then select the different sub modules according to the different factors that cause the image blur. These sub modules include image rain removal, image defogging, motion blurred image enhancement, low illumination blurred image enhancement, infrared blurred image enhancement [2], backlight blurred image enhancement, and blurred image enhancement through glass. There are different fuzzy image enhancement algorithms in each module. For example, there are five sub-modules under the low-light image enhancement module. These sub-modules include laplacian-based image enhancement algorithms, gammabased images, log-based image enhancement algorithm, Retinex algorithm and histogram equalization algorithm [3]. The images obtained by different algorithms are processed to output and save images. The system framework interface is shown in Figure 2. The whole interface is mainly divided into four parts: image reading and saving module, image preprocessing module, image enhancement module and adjustment module of various parameters on the right side of the interface. In addition to this, there are two image display areas in the middle of the interface: the original image and the enhanced effect image for comparison before and after image processing. The important features of the software are placed on the upper side of the main interface.
When dealing with images a foggy image, select the foggy image that needs to be processed from the computer. Clicking on the image defog button will show the interface shown in Figure 2. The parameters on the right side of the interface are all preset default values. If the processing effect is not satisfied, the parameters can be adjusted. When you click the defog button, there will be different fog removal algorithms. For the retinex algorithm [4], there will be different improved algorithms under the sub-module. Finally, the fuzzy image is enhanced by different algorithms to obtain the best image.

Code embedding
The software code is mainly composed of framework building code, function implementation code and interface code (1) Framework building code This system is built using VS2010 and OpenCV2.49. The first step is to configure the OpenCV2.49 development environment in VS2010, and then build a new MFC application in VS2010. The platform will create a simple software framework, select the view in the toolbar, and then select the resource attempt. Finally, add the required controls in the dialog box design under the resource view, modify the ID of the corresponding control property to facilitate the interactive operation of the later data.
(2) Function implementation code The realization of function code is mainly implemented in OnInitDialog () and the implementation of the image enhancement code is to write the .h file to the header file under the resource attempt. The contents of the .cpp file are also written to the file corresponding to the MFC class view, so that the Win32 console program can be embedded in the MFC program to achieve the required functions.
(3) Interface code The interactive operation of the system is realized by button control, and each button control has its corresponding function. The system can be debugged by clicking on the button control. Figure 3 is a blurred image of a person running in a foggy day. The images are compared with the experimental results processed by different algorithms. In Figure 3, (a) is the original image of the foggy image, (b) is the enhanced image of the defogging algorithm based on the dark channel [5], (c) is the enhanced image of the Retinex algorithm, (d) is the enhanced image of fuzzy defogging algorithm, (e) is the enhanced image of real-time defogging algorithm, (f) is the enhanced image of adaptive gradation contrast algorithm. It can be seen from Fig. 4 that (b) is obviously enhanced, but because of the maximum atmospheric light value, the value of transmittance and other parameters will cause color deviation. It can be seen from (c) that the effect is also obvious. Generally, the Retinex algorithm is prone to halo phenomenon when processing images. The system uses guided filtering to reduce the halo phenomenon in the fog removal algorithm and the effect is better from the processing results. The algorithm used in (d) is an image defogging algorithm based on wavelet transform, which has a good effect on the brightness and fidelity of the image, and there is no color spot, halo and other problems. It can be seen from the (e) that the enhanced image is enhanced compared with the original image, but the processed image is dark. The color of the processed image in (f) is bright, but there are spots and color deviations in some places. From the abovementioned defogging image processing renderings, all the algorithms have an enhancement effect on the original image. But for different foggy images, each algorithm has different processing effects.

Quantitative analysis
Based on a large number of experimental analyses, this paper quantitatively evaluates the defogging algorithm involved in the system [6]. In this paper, the variance method and the gradient method are used as the indicators for evaluating image quality. The Tenengrad gradient method uses the Sobel operator to calculate the horizontal and vertical gradients respectively. The higher the gradient value in the same scene is, the clearer the image is. The Laplacian gradient method is basically the same as Tenegrad. A sharply focused image should have a larger grayscale difference between its data than a blurred focus image. The sharpness of the image is measured by the variance of the grayscale data of the image. The larger the variance, the better the clarity. The values of all the enhanced images in Table 1 obtained by different evaluation criteria are higher than the original image. The image has been significantly enhanced. The image parameters obtained by the dark channel defogging algorithm of the original Fig. 1 are higher than those obtained by other methods. However, foggy images taken in different scenes will also have different results. For the original Fig. 2, it can be seen from Table 1 that the image index parameters processed by the multi-scale defogging algorithm are significantly higher than those of other algorithms. Experiments show that the optimal algorithm is different for the same kind of blurred image to different shooting environments. The system solves this problem well. IMPRESS is a widely used fuzzy image processing system. It uses a problem-guided approach to blur image processing, which consumes more time. Table 2 shows the time taken by IMPRESS and the system designed in this paper in actual operation. The actual operation time is the total time from inputting the image to selecting the appropriate image processing method to outputting the image. It can be seen from Table 2 that when processing the same foggy image, the system designed in this paper only needs 6s from the input image to the output image. IMPRESS needs to select step by step due to the problem guiding method and the overall operation time is as long as 15s.
With the increase of the number and variety of input images, the system designed in this paper will have more advantages in processing time.  Image type  Quantity  System  IMPRESS   foggy  1  6s  15s  foggy& low light  10  73s  196s  foggy& low  light& infrared   15 102s 305s

Practical application case
On the night of March 13, 2018, a major theft cases occurred in the jurisdiction of Yipeng police station in Hangzhou. The camera near the crime scene captured a large number of video recordings. The police intercepted many images of suspects from the surveillance video. These images all have obvious noise and dark light, which makes the suspect's appearance unrecognizable. Using the system designed in this paper to enhance the blurred image can quickly obtain identifiable images. The police investigators finally determined the identity of the suspect and arrested the suspect through a number of reconnaissance methods.
The system designed in this paper is easy to operate and has high efficiency and it has been unanimously recognized by the police.

Conclusion
This paper designs and implements a police fuzzy image enhancement system with convenient operation and complete functions, which improves the efficiency of public security work. By comparing the processing of various algorithms on the input image, the effective enhancement of image quality and the optimal selection of the algorithm are realized. In the next work, we need to study the intelligent aspect. By the recognition of the input image, the fuzzy type is automatically selected and then the optimal results are compared with the processing of various algorithms.