| With the widespread deepening of machine vision and automation technology in the fields of mechanical manufacturing and industrial control,production efficiency has been greatly improved.For the mechanical manufacturing industry,one of the most important indicators is the specification and accuracy of the product to meet user needs.As a basic measuring tool,vernier calipers have been widely used for measuring the internal and external dimensions of various mechanical components.In recent years,the use of digital vernier calipers has become widespread,basically replacing mechanical vernier calipers.However,in the production and manufacturing process of digital calipers,there may be readings jumping in the digital display area of the calipers,which can easily lead to measurement accuracy exceeding the standard,resulting in unqualified calipers and even affecting the brand reputation of the manufacturer.Therefore,before the digital calipers leave the factory,it is necessary to perform skip count testing on the assembled digital calipers.The traditional manual skip count detection method is not only dull,inefficient,time-consuming,and labor-intensive,but also requires high testing personnel,making it difficult to meet the fast-paced production needs of current production lines.Therefore,designing an automated system or device for skip count detection of digital calipers has become a research hotspot for major manufacturers.Based on this opportunity,this article conducts research on character recognition methods based on deep learning,and builds a hardware transmission device and Qt visualization software interface that simulates the manual pulling of caliper vice rulers by inspectors.At the same time,a low-cost and small volume Raspberry Pi 4B Raspberry Pi motherboard is selected as the embedded hardware platform for character recognition algorithm deployment,And finally,the recognition accuracy and work stability of this system were verified in actual digital caliper skip detection scenarios.The main research content is as follows:(1)Image sample collection and preprocessing.Based on the Open CV computer vision library and combined with a visual acquisition system composed of USB 2.0industrial cameras with no external drive,image samples are automatically collected from the caliper digital display area.At the same time,in order to remove redundant information in the images and improve ROI areas of interest,image preprocessing methods are used to amplify the original samples,ultimately completing the production of the dataset.(2)Research and improvement optimization of character recognition algorithms.The convolutional recurrent neural network(CRNN)algorithm is used as the basic framework for digital caliper digital recognition,while considering the single background of digital caliper text characters and the limited types of caliper text characters,an attempt is made to lightweight the character recognition network.Specifically,the complex BLSTM structure of the original network is removed and replaced with a fully connected layer,which consists of two stacked convolutional layers.While ensuring recognition accuracy,this improves the inference speed of the model.The experimental results indicate that the improved CRNN_lite_The Dense character recognition network has a recognition accuracy of 97.5%,a PC inference time of only3.4 milliseconds,and a model size of only 5.7MB,meeting the deployment requirements of embedded platforms.(3)Design and model deployment of hardware transmission devices.The basic structure is composed of components such as the STC90C52 RC microcontroller control unit,industrial camera,and dual output shaft stepper motor,and each component is logically controlled through the built-in program of the microcontroller control unit to simulate the detection state of manually pulling the caliper and vice ruler in actual scenarios.In addition,Raspberry Pi 4B Raspberry Pi motherboard and Intel NCS2 neural network computing stick were selected as embedded hardware platforms for algorithm deployment,and the improved network model was effectively deployed using the Open VINO2022.1 inference framework.Finally,testing experiments were conducted on the entire system.By changing the operating speed of the stepper motor,the recognition accuracy can reach over 97% when the pulse equivalent is below 0.1mm/pulse.The test results indicate that the system basically meets the skip detection requirements of the digital caliper production line and the metrological verification department.(4)Visual software interface design.In order to facilitate users to understand the skip detection status of the digital caliper in a more intuitive form,Py Qt has been used to build a human-machine interaction interface.At the same time,a Python based serial port operation library is used to monitor the skip detection information of the caliper in real time,and the monitoring information is transmitted in real time to the Qt software interface on the PC and the peripheral LCD display screen and voice prompt module,in order to achieve the separation of views and logic,This greatly improves the universality and convenience of the application of this system. |