Investigation on Intelligent Recognition System of Instrument Based on Multi-step Convolution Neural Network

: Digital instruments are widely used in industrial control, traffic, equipment displays and other fields because of the intuitive characteristic of their test data. Aiming at the character recognition scene of digital display Vernier caliper, this paper creatively proposes an intelligent instrument recognition system based on multi - step convolution neural network (CNN). Firstly, the image smples are collected from the Vernier caliper test site, and their resolution and size are normalized. Then the CNN model was established to train the image smples and extract the features. The digital display region in the image smples were extracted according to the image features, and the numbers in the Vernier caliper were cut out. Finally, using the MINIST datas set of Vernier caliper is established, and the CNN model is used to recognize it. The test results show that the overall recognition rate of the proposed CNN model is more than 95%, and has good robustness and generalization ability.


Introduction
Digital instrument has the advantages of high precision, easy to read and operate, so it is widely used in industrial control, equipment displays and detection and other fields, and has become the development trend of all kinds of instruments. With the more and more extensive application of digital instruments, the use of scenarios is becoming more and more abundant, and the corresponding demand for digital recognition of natural scenes is also growing rapidly. The automatic recognition of digital display instrument can be realized by using image processing and recognition technology, which can not only improve the work efficiency, but also ensure the accuracy of the collected data [1]- [6]. Therefore, it is of great practical significance and the economic value to study the intelligent recognition technology of digital instruments.
For a long time, the intelligent recognition of instrument numbers has been concerned by researchers, and many automatic recognition methods of instrument numbers have emerged, including template matching methods, featrue-based machine learning method and deep learning mthod [7]- [9]. Most of the traditional digital recognition methods use the characteristics of the number itself for recognition. For example, Lu et al. [10] proposed an improved maximum inter-class variance method to adaptively extract the characters of digital display instrument, and the thread method is used to realize the automatic recognition of numbers. Based on the pattern recognition technolgy, Dong et al. [11] changed the feature vector and increased the learning times through the improved feature matching algorithm. Chen et al. [12] proposed template matching based on Euler number, grouped template images and matched only target images with templates with the same Euler number. However, the above traditional digital recognition methods are easily affected by enviromental factors, the change of background, the floating and drift of numbers, and the intensity of illumination have a great impact on the recognition effect. Deep learning neural network is an effective method in neural network model, and it has been widely used in the field of digital recognition. The recognition method first needs to artificially select the feature image of the digital target 0~9, and establishthe feature vector of 10 numbers as the input matrix. Trough the training and learning of the CNN, the connection weight and threshold of the neurons in each layer of the neural network are constructed. The trained CNN is applied to digital instrument to output a vector composed of 10 elements to distinguish the displayed numbers [13]. This method has the advantages of strong classification ability, good fault tolerance, strong self-study ability and so on.
Based on the advantages of depth learning CNN algorithm in the automatic recognition of digital instruments, the intelligent recognition algorithm of Vernier caliper based on the principle of CNN is studied systematically in this paper. The reason why the Vernier caliper is selected, because there are many factors affecting its data recognition, as shown in Fig. 1, its location, angle and height in the test area are randomly changed, the display screen will appear reflective pphenomenon. These factors will bring difficulties to the location and identification of the data region, and need to constantly debug and optimize the CNN model. In the training, first of all, it is necessary to carry out rough locationing and precise locationing of the digital display area of the Vernier caliper in order to obtain this area. Then the image processing algorithm is used for key operations, such as tilt correction, grayscale, binarization, corrosion and expansion and so on. Finally, a 0~9 samples CNN model corresponding to the segmented numbers is established, the segmented Vernier caliper numbers is trained and tested, and its intelligent recognition is completed, which can greatly improve the efficiency and intensive reading of the digital recognition.

Hardware System
High resolution camera and high performance computer are the main equipent used in the automatic recognition of digital instruments in the field of artificial intelligence. In order to realize the automatic recognition of the instrument image, it is necessary to fix the camera in front of the digital instrument. It is necessary to ensure the resolution of the camera in order to improve the correctness of instrument data recognition. The use of high-resolution camera is also the key to the follow-up image processing work. The operation of related image acquisition software, image analysis software and image recognition software is mainly completed by computer. In order to reduce the unnecessary work burden and improve the work efficiency, the follow-up processing of automatic information recognition can be completed by the same computer.

Software System
The automatic recognition software of instrument data is divided into three layers: image acquisition layer, image processing layer and data recognition layer. When the instrument image is obtained in the image acquisition layer, the camera is driven by a specific programming interface, and can locate and segment the identified data region image to complete the image transmission for the upper layer. The middle layer is the image processing layer, which can not only convert the color image obtained by the image acquisition layer into grayscale image, but also realize the functions of image enhancement, image denoising and binarization, and finally complete the processing of black-and-white image to be recognized. In the recognition of image data, the third layer of data recognition layer plays a role, mainly under the action of the CNN model. Before the automatic recognition of Vernier caliper data, it is also necessary to train the corresponding fonts and finally complete the intelligent recognition of instrument data.
In order to improve the efficiency of automatic recognition of instrument data, the instrument data recognition software can encapsulate as an independent running program, which can be completed by interprocess call in the process of information exchange with other programs. In addition, the setting of the interface library can be obtained directly through the programming interface when other programs are called. The form of interface library can not only make the call of information more efficient, but also increase the flexibility of operation.

Results and Disscussion
Technical Route of the System CNN can use reduced spatial information to obtain better computional performance and better results. As shown in Fig. 2, the technical roadmap used in the intelligent data recognition system is shown. The intelligent recognition of Vernier caliper data includes three parts: image acquisition, data area extraction and data intelligent recognition. Image acquisition includes image acquisition from camera to image preprocessing. Data region area localization includes establishing a CNN model to train and extract the features of the image samples, extrctacting the digital display region of the image according to the image features, and segmenting the effective numbers to be recognized. Then, the segmented Vernier caliper image data set is grayed out, binary, edge detection, corrosion noise and closed operation and other methods to achieve precise location and segmentation of the instrument data region, so as to obtain the segmented number. Intelligent data recognition is the intelligent recognition of Vernier caliper data by using CNN again.

Locationing of Digital Display Area
In order to realize the intelligent recognition of Vernier caliper, it is necessary to locate and extract the digital display area. From Fig. 1, we can see that the Vernier caliper are located in a variety of environments and the background information is complex. In order to eliminate the interference of the background and improve the recognition accuracy, we first analyze the image information that needs to be processed, and propose a CNN model algorithm to locate and extract the digital display region according to the image features, so as to reduce the interference of the image background. It is conductive to the following precise processing. Because to ensure that the full image of the Vernier caliper can be captured, the shooting range will be relatively wide, so in the image, the area and angle of the Vernier caliper are uncertain, and the interference information is very complex. When extracting the target instrument, there is no regularity between different image targets, and the interference is random, which brings difficulties to the follow-up processing. We use the CNN algorithm to locate and extract the digital display region in the image. In order to locate the digital display area, the CNN algorithm is used to train the samples. The training process is carried out alternately by forward propagation and guided propagation, and the data is input from the input layer and transmitted through the hidden layer to the output layer to complete the forward propagation, and the network state is measured by the error between the actual results and the expected results.
The training process is carried out alternately by forward propagation and back propagation, and the data is input from input layer and transimitted through the hidden layer to the output layer to complete the forward propagation. The network state is measured by the error between the actual results and the expected results, and the back propagation is carried out. In the back propagation, by calculating the partial derivative of the each layer from the back to front, the weight coefficient of each layer is modified and adjusted until the network converges, or until the maximum number of iterations is satisfied. After the training, we begin to verify the training effect, put the random 10,000 Vernier caliper images into the input layer, after network processing, and finally get the locationing results of the digital display area as shown in Fig. 3. In the process of locationing, the image we input sets a uniform pixel size, and more than 98% of the recognition expectation is obtained. Because the CNN algorithm has strong anti-jamming

International Journal of Computer and Communication Engineering
ability and the image does not need preprocessing, it can extract the deep features of the digital region, and it is not easy to cause misrecognition and mislocation. Therefore, the Vernier caliper is not affected by the location, tilt angle, shooting distance and other factors in the image area.
As shown in Fig. 3, the location result images of the Vernier caliper data area based on CNN model training is shown. From the Fig. 3, we can see that the locationing accuracy is more than 99%, and Fig. 3(b) is even up to 100%. Although the locationing accuracy of the digital display area is very high, the locationing box contains the black area of the edge and the unit mm character of the Vernier caliper, and the size of balck area covered by each time is different, which makes it difficult to segment the Vernier caliper number. Therefore, it is necessary to locate the digital display area for the second time, that is, precise locationing. Because the second locationing is implemented on the basis of the first rough locationing, the operation process is easier and the accuracy is higher. The result of precise locationing of the digital display area of the Vernier caliper is shown in Fig. 4. As can be seen from the figure, the precisely located box covers only half of the Vernier caliper unit mm, which will bring great convenience to the following digital segmentation.

Digital Segmentation of Vernier Caliper
After locating the digital display area of Vernier caliper, the processing method of Vernier caliper digital display image is proposed based on the theory of mathematical morphology. First of all, the image is grayed out and binarized, so that the amount of data of the image is reduced, the contour becomes clearer, and the required structural features are highlighted. The corrosion operation removes discontinuous boundary points in the image. Then, the closed operation is carried out to connect the small area in the image. Finally, according to the height-width ratio and other information of the image, the area which is not digital is filtered out, and the digital display area iamge of Vernier caliper is obtaine.

International Journal of Computer and Communication Engineering
Digital segmentation is to divide the digital sequence into independent numbers, or to segment the required area blocks, which is an indispensable program in the intelligent recognition of Vernier caliper data. According to the digital features within the region, the image is divided into different regions, which is an important part of image data recognition. There are differences in the means of segmentation between different instruments. According to the standard number of liquid crystal display, each digital edge is found by looking up the outline, the contour moment of each contour is established, and each number is segmented, as shown in Fig. 5. Although the data of the Vernier caliper is divided into a single number, the size of each digital image is not exactly the same. For example, the size of the unit mm in the upper part of Fig. 5 is smaller than that of other digital images, so it is impossible to train the numbers in the CNN model. Therefore, it is necessary to normalize each segmented image, and the size of the processed digital image is 28×28, as shown in the lower part of Fig. 5.
Because the Vernier caliper data font format is completely different from the handwritten numbers in the dataset, and is also affected by the shooting angle, light and distance. Therefore, according to the digital characteristics of Vernier caliper, we will select the digital images taken under different conditions to make data sets, which will be used to input samples to train CNN model. Thus, a set of Vernier caliper digital recognition system based on CNN model algorithm is constructed to recognize the segmented numbers. In order to operate conveniently in practical application, this paper designs and implements the UI interface of intelligent data acquisition system, and its recognition effect is shown in Fig. 6. As can be seen from the figure, the UI interface consisits of three parts: the operation area, the image display area and the result recognition area. The operation area includes five buttons: image acquisition, digital display area rough locationing, digital display area precise locationing, digital display image post-processing and result recognition. The operation flow of the interface is as follows. First, click the image acquisition button in the operation area, and the original image will be obtained in the image display area. Second, clicking the "First" button for the first locationing operation marks the digital display area of the original image, as shown in the green box in Fig. 6. At the same time, the green box area is extracted, and the result will appear in the "First processing" location. Then click the "Second" button to carry out the second locationing operation, at this time, a red box appears on the "First processing" image for marking, and the red box area is extracted and placed in the "Second locationing" area. Next, click the "processed" button to operate on the obtained image, and the binary digital image will be obtained in the "processed image" area. Finally, click the "Result" button, and you will get the data result of the Vernier caliper in the recognition result area of the UI interface, as shown in the red number 25.47 at the bottom left of Fig. 6. In order to verify the accuracy of