| With the rapid development of modern industry,the application of industrial instruments is becoming more and more extensive.Pointer instruments have the advantages of low cost,simple structure,and strong anti-interference ability.Therefore,they are widely used in the industrial field.The meter performs reading and monitoring.The manual reading has the disadvantages of low efficiency and high error rate.However,industrial production is developing in the direction of automation and intelligence.Relying on manual reading alone cannot meet the needs of rapid industrial development.Therefore,how to use the convenient equipment and related processing technology to automatically read the pointer meter has become an urgent problem to be solved in industrial production.This system combines embedded technology and image processing technology to realize automatic reading of pointer instrument,select embedded ARM hardware platform that meets system performance requirements,and transplant Linux operating system on the embedded platform,in-depth study of pointer instrument image preprocessing Algorithm and indication judgment algorithm,transplant the meter reading algorithm program to the embedded platform to run.This article mainly studies the overall design of the system,the automatic reading algorithm of the pointer instrument,the embedded reading terminal and the server.The specific contents are as follows:1.Analyze the actual use environment of the pointer instrument in the industrial field,and divide the system into an embedded reading terminal and a server.The embedded reading terminal collects on-site instrument images,and uses the image processing algorithm to process the instrument images to realize automatic reading of the pointer instrument,and transmits the instrument reading results and on-site video images to the server side.Reading alarm,data storage and command control functions.2.First the collected instrument image is subjected to preprocessing operations such as enhanced noise reduction,and the adaptive threshold method is used to binarize the instrument image to extract the foreground pixel area of the instrument image,combined with the Hough circle transformation and the scale centroid point fitting circle.The center and radius of the instrument’s characteristic area are calculated in two ways.The algorithm is more robust.Secondly,the binary image contour method is used to extract the single characters of the main scale,and the characters are identified by the K nearest neighbor(k NN,k-Nearest Neighbor)classification algorithm.Obtain the value of the character,determine the main scale indication value and the center point coordinate of the main scale character area according to the positional relationship of the characters,complete the numerical matching of the minimum scale line and the maximum scale line,use the cumulative probability Hough transform to locate the instrument pointer,and finally pass The angle method calculates the number of pointer instruments.3.To build an embedded system platform,you first need to build the crosscompilation environment required for embedded system development,transplant the boot program u-boot,configure the main device driver of the Linux kernel,crosscompile the Linux kernel source code,and make the root file system.In order to enhance the practicality of the reading system,the video monitoring function is added to the system.When the embedded terminal reads the error or the instrument fails,remote monitoring can be realized.The Open CV visual algorithm library and video transmission jrtplib required by the embedded system are transplanted.The library generates the dynamic link library required on the ARM platform,and provides an operating environment for the reading terminal application program.The video data compression adopts the hardware encoding method,and the MFC hardware encoding API function source file needs to be loaded.4.The server is based on Qt interface programming,compile jrtplib and FFmpeg source code library in Ubuntu16.04 system,build a development environment to receive and decode H.264 video stream,jrtplib library is used to receive and parse RTP protocol load H.264 video stream,decoding H.264 stream through FFmpeg,displaying the decoded video image on the Qt interface,the server uses TCP protocol to send and receive important data such as reading results and configuration commands,and also realizes data storage and abnormal reading alarm function.Through the design of this system,the functions of remote automatic reading,video monitoring and data storage of pointer industrial instruments can be realized,which is of great significance in the field of industrial production. |