Method and device for reading a pointer gauge
By using convolutional neural networks and perspective transformation to eliminate distortion, the problems of low reading stability and accuracy of pointer instruments are solved, enabling efficient automated identification and management.
Patent Information
- Application Number
- CN202010219951.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-03-25
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2040-03-25
AI Technical Summary
Existing pointer-type instruments suffer from poor stability, low accuracy, and low efficiency, making them unsuitable for industrial automation management, especially in complex industrial control environments.
A convolutional neural network is used for automatic instrument detection. Perspective transformation is used to eliminate distortion, and a radial grayscale algorithm is used to determine the pointer position and calculate the reading.
It improves the accuracy and recognition efficiency of pointer instrument readings, achieves stability and robustness in different scenarios, avoids complex pre-calibration work, and supports automated management.
Smart Images

Figure CN112990190B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of industrial control safety, and in particular to a pointer instrument reading recognition method and device, computer equipment and a storage medium. BACKGROUND
[0002] In the industrial safety field, such as power plants, gas production plants, substations and other industrial sites, many devices are configured with instruments such as barometers, thermometers and oil temperature gauges, and a large part of them are still pointer instruments. Currently, the table data is recorded by human eye observation, which is low in detection efficiency and low in accuracy, and in particular, long-term continuous inspection of readings can easily cause visual fatigue, thereby causing errors. In addition, there are some occasions where manual inspection of readings is not possible, which is not conducive to the automation and efficient management of the industrial field. Therefore, it is of great practical significance to study a fast, accurate and robust pointer instrument automatic detection and recognition method.
[0003] Instrumentation is a very common measurement tool in the industrial field, and is an important basis for monitoring, adjusting and controlling the running state of industrial production. However, due to the influence of human eye resolution and fatigue, etc., subjective factors, the reliability of instrument readings is low, the stability is poor, the speed is slow, and it is difficult to find parameter mutations in operation in time. In fact, this has become one of the key factors restricting the improvement of industrial automation level.
[0004] At present, there have been some studies on the processing and recognition of pointer instrument images in China. The existing recognition algorithms are mainly divided into two parts: dial area positioning and pointer positioning. For dial area positioning, the shape features of the instrument dial are used to determine the basic position of the instrument dial in the image through template matching or ellipse fitting method. Although the algorithm has certain real-time and robustness, many industrial control sites have complex structures, and the collected instruments may contain other approximate circular components at the same time. In the use of ellipse detection algorithm, it is easy to have false detection results, and the instruments studied in this paper are different and the camera needs to meet the installation of multiple perspectives and multiple distances, so these algorithms are not suitable for this paper. In the aspect of pointer positioning, researchers have conducted a lot of research, mainly including center projection method, subtraction method, template feature method, Hough transform method, least squares method and the joint application of these methods. Among the many methods, the center projection method, the subtraction method and the template feature method are greatly disturbed by image noise, the Hough transform method has good fault tolerance, but it is not suitable for some instruments with multiple symbols and multiple stripes, and the calculation amount and storage amount are very large, which is difficult to meet the actual use demand.
[0005] Furthermore, most research on automatic detection and recognition of pointer-type instruments relies on pre-acquired instrument images. These images typically feature large, centrally located instrument targets with the instrument dial parallel to the camera plane, and are thus considered high-quality images. Obtaining these high-quality images requires extensive prior recording of the instrument targets and meticulous camera calibration. Each time the instrument position in a substation changes, re-measurement and recalibration are necessary. These methods suffer from poor universality, stability, and efficiency, making them unsuitable for practical applications in industrial control systems. Summary of the Invention
[0006] In view of this, the purpose of this application is to provide a method, device, computer equipment and storage medium for identifying pointer instrument readings, so as to solve the problems of poor stability, low accuracy and poor efficiency in the prior art.
[0007] To achieve the above objectives, this application proposes a method for identifying the readings of a pointer-type instrument, the method comprising:
[0008] Acquire scene images corresponding to the instrument in different scenarios;
[0009] The scene image is subjected to automatic instrument detection to obtain an instrument image;
[0010] Distortion removal is performed on the instrument image to obtain a frontal view instrument image;
[0011] The reading of the instrument is determined based on the orthogonal view of the instrument image.
[0012] In one embodiment, the scene image includes training images and test images; the automatic instrument detection of the scene image to obtain the instrument image includes:
[0013] Based on the training images and the convolutional neural network, an automatic instrument detection model is determined;
[0014] The test image is input into the instrument automatic detection model to obtain the instrument image.
[0015] In one embodiment, determining the automatic instrument detection model based on the training images and the convolutional neural network includes:
[0016] The training image labeled with the location information of the instrument is input into the convolutional neural network to obtain the instrument automatic detection model.
[0017] In one embodiment, distortion removal of the instrument image to obtain a front-view instrument image includes:
[0018] The instrument image is processed by perspective transformation to obtain a frontal view instrument image.
[0019] In one embodiment, the instrument image is processed by perspective transformation to obtain a front-view angle instrument image, comprising:
[0020] The instrument image is recognized by OpenCV for an elliptical dial, and the long and short axis endpoints of the elliptical dial are selected as a transformation matrix to correct the dial viewing angle, and the front-view angle instrument image is determined.
[0021] In one embodiment, according to the front-view angle instrument image, the reading of the instrument is determined, comprising:
[0022] The front-view angle instrument image is subjected to mean filtering to obtain a gray image corresponding to the front-view angle instrument image;
[0023] The gray image is subjected to Hough transformation to determine the dial of the instrument in the gray image;
[0024] The dial is processed by a radial gray algorithm to determine the position of the pointer in the dial;
[0025] The angle between the pointer and the zero scale line of the instrument is calculated, and according to the instrument angle range and the reading range, the reading of the instrument is obtained by proportional conversion.
[0026] A pointer instrument reading recognition device, the device comprising:
[0027] An acquisition module for acquiring scene images corresponding to an instrument in different scenes;
[0028] A detection module for automatically detecting the instrument in the scene images to obtain an instrument image;
[0029] A distortion elimination module for eliminating distortion of the instrument image to obtain a front-view angle instrument image;
[0030] An instrument reading determination module for determining the reading of the instrument according to the front-view angle instrument image.
[0031] A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor executes the computer program to implement the steps of the method according to any one of the above.
[0032] A computer readable storage medium having a computer program stored thereon, characterized in that the computer program is executed by a processor to implement the steps of the method according to any one of the above.
[0033] This application provides a method, apparatus, computer device, and storage medium for recognizing pointer instrument readings. The method includes: acquiring scene images corresponding to the instrument in different scenarios; automatically detecting the instrument in the scene images to obtain an instrument image; then performing distortion removal on the instrument image to obtain a frontal view instrument image; and finally determining the instrument reading based on the frontal view instrument image. This method improves the accuracy, recognition efficiency, and stability of pointer instrument readings. Attached Figure Description
[0034] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0035] Figure 1 This is a flowchart illustrating a method for recognizing the readings of a pointer-type instrument according to an embodiment of this application.
[0036] Figure 2 This is a schematic diagram of the model_loss curve of the instrument automatic detection model in an embodiment of this application;
[0037] Figure 3(a) is an image before detection in an embodiment of this application;
[0038] Figure 3(b) shows the image after detection using the yolov3 model in an embodiment of this application;
[0039] Figure 4(a) is a screenshot of the location of the instrument after target detection in an embodiment of this application;
[0040] Figure 4(b) is an upright image of the instrument obtained by perspective transformation according to an embodiment of this application;
[0041] Figure 5(a) is a schematic diagram of the dial detection results according to an embodiment of this application;
[0042] Figure 5(b) is a schematic diagram of the pointer detection results of an embodiment of this application;
[0043] Figure 6 This is a schematic diagram of the structure of a pointer-type instrument reading recognition device according to an embodiment of this application;
[0044] Figure 7 This is a schematic diagram of the internal structure of a computer device according to an embodiment of this application. Detailed Implementation
[0045] In order to make the purpose, technical scheme and advantages of the present application more clear, the present application is further described in detail below with reference to the drawings and in conjunction with specific embodiments.
[0046] It should be noted that, unless otherwise defined, technical terms or scientific terms used in the embodiments of the present application should be understood as their common meanings to those skilled in the art to which the present disclosure pertains. The terms "first", "second" and similar terms used in the present disclosure do not represent any order, number or importance, but are only used to distinguish different components. The terms "include", "contain" and similar terms mean that the elements or objects before the terms encompass the elements or objects listed after the terms and their equivalents, and do not exclude other elements or objects. The terms "connect" or "connected" and similar terms are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. The terms "upper", "lower", "left", "right" and the like are only used to represent relative positional relationships, and when the absolute positions of the described objects change, the relative positional relationships can also change accordingly.
[0047] In order to facilitate the understanding of the present application, the following key words need to be explained, as follows:
[0048] High-quality image: refers to an image in which the instrument target is large and centrally located, and the instrument dial is parallel to the camera plane.
[0049] De-warping of instrument image: refers to correcting the angular deviation between the instrument dial plane and the camera plane through image processing.
[0050] Target detection: refers to identifying which objects are present in a picture and their positions (coordinate positions), i.e., the object objects present in the image.
[0051] Radial gray sum: refers to calculating the sum of gray values along the radius of the dial.
[0052] Convolutional neural network: refers to a type of feedforward neural network that contains convolutional calculations and has a deep structure, has the ability to learn representations, and can perform translation-invariant classification on input information according to its hierarchical structure, and is one of the representative algorithms of deep learning.
[0053] Computer vision: refers to a simulation of biological vision using computers and related devices, and its main task is to obtain three-dimensional information of the corresponding scene by processing collected pictures or videos.
[0054] The object of the present application can be achieved by the following technical solutions:
[0055] In conjunction with Figure 1 A method for recognizing a reading of a pointer-type instrument, the method comprising:
[0056] Step S100: acquire a scene image corresponding to an instrument in different scenes;
[0057] Step S200: instrument automatic detection is performed on the scene image to obtain an instrument image;
[0058] Step S300: distortion elimination is performed on the instrument image to obtain a front-view-angle instrument image;
[0059] Step S400: a reading of the instrument is determined according to the front-view-angle instrument image.
[0060] In an embodiment, the scene image includes a training image and a test image; and step S200 includes:
[0061] Step S2001: an instrument automatic detection model is determined according to the training image and a convolutional neural network;
[0062] Step S2002: the test image is input into the instrument automatic detection model to obtain an instrument image.
[0063] In an embodiment, step S2001 includes:
[0064] Step S2001a: a training image labeled with position information of the instrument is input into the convolutional neural network to obtain an instrument automatic detection model.
[0065] In an embodiment, step S300 includes:
[0066] Step S3001: a perspective transformation is adopted to process the instrument image to obtain a front-view-angle instrument image.
[0067] In an embodiment, step S3001 includes:
[0068] Step S3001a: an OpenCV is used to recognize an elliptical dial of the instrument image, and long and short axis endpoints of the elliptical dial are selected as a transformation matrix to correct a dial viewing angle to determine the front-view-angle instrument image.
[0069] In an embodiment, step S400 includes:
[0070] Step S4001: mean filtering is performed on the front-view-angle instrument image to obtain a gray image corresponding to the front-view-angle instrument image;
[0071] Step S4002: Hough transformation is performed on the gray image to determine a dial of the instrument in the gray image;
[0072] Step S4003: a radial gray algorithm is adopted to process the dial to determine a pointer position in the dial.
[0073] Step S4004: Calculate the angle between the pointer and the zero scale line of the instrument, and obtain the reading of the instrument by proportional conversion according to the angle range of the instrument and the reading range.
[0074] The pointer instrument type recognition is derived based on target detection technology, and is aimed at automatic recognition of industrial control pointer instruments, so as to form a reading function based on instrument automatic recognition, combine with the target detection widely used in the field of computer vision at present, and finally form a pointer instrument recognition method based on computer vision. The instrument detection and recognition method provided in the application comprises three steps of instrument automatic detection, instrument image distortion elimination and instrument reading recognition:
[0075] In one embodiment, the specific implementation process of instrument automatic detection of the scene image to obtain an instrument image is described in detail below. The task of the instrument automatic detection module is to automatically detect the target position of the instrument in the field of view of the current camera, and mark it out from the background with a target frame. Such a target detection method needs to have high precision and stability, and can accurately detect multiple types of instruments in different types of environments. The traditional detection method based on template matching and artificial design feature selection often has good effect for detecting fixed types of instruments in some specific scenes, but it is difficult to migrate to the problem of detecting multiple types of instruments in different scenes.
[0076] In recent years, deep learning has made a series of breakthroughs in natural language processing, pattern recognition, image classification, image segmentation and target detection. CNN simulates the processing method of human visual nerve cells for images, adopts convolution operation, local receptive field and weight sharing, and is suitable for processing computer vision problems such as image classification, image segmentation and target detection. Convolutional neural network is used as the model framework of the instrument target detection module, and the YOLOV3 (You Only Look Once) model is improved to be suitable for instrument target detection.
[0077] The instrument automatic detection process comprises several modules:
[0078] The data preparation module is used for training data required for training the model.
[0079] The labeled data module labels the labels and position information of the instruments in the image data.
[0080] The training model module trains the model to obtain the instrument automatic detection model weight.
[0081] The instrument target detection test module tests the accuracy of the model weight, and adjusts the model according to the test data.
[0082] The detailed scheme of this process is as follows:
[0083] According to the instrument information data provided by the industrial site, image cleaning processing is performed (cleaning images with target blur and target ambiguity); then the cleaned pictures are labeled by the LabImg tool, and some similar instrument positions are labeled as negative samples to improve the accuracy of the model, and finally an xml file is generated for model training.
[0084] After data processing, jpg and xml files are obtained. Since the training data needs to be operated on a matrix, a server or GPU card is used to train the model, the yolov3-keras framework is used to train the model, and a better model weight is obtained after 400 epochs of training according to the experience value. The model_loss curve of the trained model is shown in FIG. 2. Figure 2
[0085] After training the model, a weight file is obtained, which is used to test the model and calculate the mAp to obtain the detection rate of the instrument, which is 99.8%. FIG. 3 shows the test results of the instrument target detection model. FIG. 3(a) is the image before detection, and FIG. 3(b) is the image after detection using the yolov3 model.
[0086] In one embodiment, the present application details the specific embodiments of the instrument image distortion elimination to obtain the front view angle instrument image. After instrument target detection, there may be a certain angle deviation between the instrument dial plane and the camera plane in the instrument image to be detected. When the instrument dial is parallel to the camera plane, the dial imaging is circular, and the front view image of the instrument to be detected can be obtained. When the instrument dial is not parallel to the camera plane, the dial imaging is elliptical, and the greater the difference between the major axis and the minor axis of the ellipse, the greater the dial tilt angle. At this time, the instrument image to be detected is a distorted image. The perspective transformation is used to process the distorted image and correct it to a front view image to reduce the reading error.
[0087] The perspective transformation can project the image from the current view plane to the new view plane to change the imaging details of the image, and the transformation rule is as follows:
[0088]
[0089] After the ellipse recognition by OpenCV, the long and short axis endpoints of the elliptical dial are selected as the basis for calculating the transformation matrix to realize the dial view angle correction, as shown in FIG. 4. FIG. 4(a) shows the position of the instrument after target detection, and FIG. 4(b) shows the front view image of the instrument obtained by perspective transformation.
[0090] In one embodiment, the specific embodiment of determining the reading of the instrument according to the front view instrument image is described in detail below. After target detection and image distortion correction, a high-quality image of the instrument to be detected is obtained, and the image pre-processing, dial detection, pointer detection and scale correspondence can complete the instrument reading recognition task.
[0091] This process is divided into several modules:
[0092] The image pre-processing module performs mean filtering processing on the image.
[0093] The image circle detection module detects the dial Hough transform circle of the instrument image to be detected.
[0094] The pointer detection module uses the radial gray scale algorithm to detect the pointer.
[0095] The scale correspondence module reads the reading of the instrument with different scales.
[0096] The instrument reading recognition test module tests the reading accuracy according to the algorithm.
[0097] The detailed scheme of this process is as follows:
[0098] The image pre-processing model performs mean filtering on the image obtained after image distortion correction, eliminates image noise, and preserves the edge contour information of the image as much as possible. In order to reduce the calculation amount of subsequent image processing, the three-channel color image is converted into a single-channel gray scale image.
[0099] After image pre-processing, a gray scale image of the detected image with appropriate size and clear contour is obtained, and the circular contour in the image is detected by Hough transform as the dial detection result. The equation of the circle in the image coordinate system is: (x-a)+(y-b)=r2In the formula: (a, b) is the center, and r is the radius. A set of (a, b, r) parameters forms a conical surface in the (a, b, r) parameter space. The formulas of multiple conical surfaces are common points representing a circle in the image space. The search of all pixel points in the image space completes the detection of the circle in the image.
[0100] After Hough transform circle detection, the center coordinates (a, b) and the radius r of the circular disc are obtained. Since the color difference between the dial and the pointer is large, the gray scale value difference in the corresponding gray scale image is also large. By calculating the gray scale sum s on the dial radius, when the sum value is maximum (or minimum, determined according to the dial background and the pointer color), the radius direction is the pointer direction, and the center can be combined to determine the pointer position.
[0101] After obtaining the pointer detection result, the angle between the pointer and the zero scale line of the instrument can be calculated, and according to the instrument angle range and the reading range, the current instrument reading can be obtained through proportional conversion.
[0102] Figure 5 shows the results of the instrument reading module test, wherein Figure 5(a) shows the dial detection results, and Figure 5(b) shows the pointer detection results. The 20 instrument reading recognition results are shown in Table 1. The test results show that the dial detection and the pointer detection are not dependent on the overall imaging quality of the image, but depend on the boundary profile of the dial and the pointer, and the detection accuracy directly affects the final reading accuracy. The method has stable recognition ability for different light and clear images, and the maximum reading error is 1.888, which has strong stability and accuracy.
[0103] Table 1 20 instrument reading recognition test results
[0104]
[0105]
[0106] The beneficial technical effects of the present application are:
[0107] 1) The method proposed in the present application does not depend on the pre-acquired high-quality image, avoiding the complex pre-position calibration work of the instrument.
[0108] 2) It can be conveniently deployed in different industrial fields to meet the needs of practical applications.
[0109] 3) The test results show that the proposed method has good stability and robustness for detecting and recognizing the pointer instrument in different environments.
[0110] 4) For the deviation caused by the dial plane and the camera plane, the perspective transformation of the proposed method can eliminate the image distortion, and is suitable for instrument recognition in different scenes.
[0111] 5) Personnel do not need to go to the scene to record the instrument reading, realizing automatic management.
[0112] 6) The target detection is based on the results obtained after learning a large amount of different data. If there is data that is quite different from the training model, it may be more difficult to detect, and such data needs to be added to the training model.
[0113] It should be understood that, although Figure 1 The steps in the flowchart are displayed in sequence according to the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this article, the execution of these steps has no strict order limitation, and these steps can be executed in other orders. Moreover, Figure 1At least one of the steps in the method can comprise a plurality of sub-steps or stages which are not necessarily performed at the same time but can be performed at different times and which can not necessarily be performed sequentially but can be performed in rotation or alternation with at least one of the other steps or sub-steps or stages of the other steps.
[0114] In one embodiment, as shown in Figure 6 a pointer gauge reading recognition device is provided, comprising:
[0115] An acquisition module 1 is configured to acquire scene images of a gauge in different scenes.
[0116] A detection module 2 is configured to perform automatic gauge detection on the scene images to obtain gauge images.
[0117] A distortion elimination module 3 is configured to perform distortion elimination on the gauge images to obtain orthoview-angle gauge images.
[0118] A gauge reading determination module 4 is configured to determine a reading of the gauge according to the orthoview-angle gauge images.
[0119] For specific limitations of the pointer gauge reading recognition device, refer to the limitations of the pointer gauge reading recognition method described above, which will not be repeated here. The modules in the pointer gauge reading recognition device described above can be realized by software, hardware, and combinations thereof, in whole or in part. The modules described above can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory in the computer device in software form, so as to be called and executed by the processor to perform the operations corresponding to the modules.
[0120] In one embodiment, a computer device is provided, which can be a server, and an internal structure diagram thereof can be as shown in Figure 7 The computer device comprises a processor, a memory, a network interface, and a database connected through a system bus. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The database of the computer device is configured to store data required by the computer program. The network interface of the computer device is configured to communicate with an external terminal through a network connection. The computer program is executed by the processor to implement an information decoupling method.
[0121] Those skilled in the art can understand, Figure 7The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0122] In one embodiment, a computer device is provided, comprising a memory and a processor, the memory storing a computer program, and the processor implementing the steps of the method when executing the computer program.
[0123] In one embodiment, a computer readable storage medium is provided, storing a computer program, and the computer program is executed by a processor to implement the steps of the method.
[0124] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer readable storage medium and can include the processes of the above-mentioned embodiments when executed. Any reference to memory, storage, database or other medium used in the embodiments provided by the present application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration but not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0125] The technical features of the above embodiments can be combined in any way. In order to make the description concise, not all possible combinations of the technical features in the above embodiments are described, but as long as the combinations of the technical features do not exist, they should be considered as the scope of the present application.
[0126] The above-described embodiments are merely illustrative of several embodiments of the present application, which are described in more detail and in a specific and detailed manner, but should not be construed as limiting the scope of the patent. It should be noted that for those skilled in the art, several modifications and improvements can be made without departing from the concept of the present application, and these are all within the scope of the present application. Therefore, the scope of protection of the patent of the present application should be subject to the appended claims.
Claims
1. A method of reading a dial of an analog instrument, characterized in that, The method comprises: Obtaining scene images corresponding to the instrument in different scenes; The scene images include Training images and test images; The instrument automatic detection of the scene images comprises: Determining an instrument automatic detection model according to the training images and a convolutional neural network; Inputting the test images into the instrument automatic detection model to obtain instrument images; Determining an instrument automatic detection model according to the training images and a convolutional neural network comprises: Inputting the training images labeled with position information of the instrument into the convolutional neural network to obtain an instrument automatic detection model; The instrument automatic detection process comprises the following modules: A data preparation module for training data required by a model; A labeled data module for labeling a label and position information of the instrument in image data; A model training module for training a model to obtain instrument automatic detection model weights; An instrument target detection test module for testing the accuracy of the model weights and adjusting the model according to test data; According to the instrument information data provided by the industrial site, image cleaning processing is performed; then the cleaned pictures are labeled by using the LabImg tool; in order to improve the accuracy of the model, some positions similar to the instrument are labeled as negative samples, and finally an xml file is generated for model training; after data processing, jpg and xml files are obtained; since the training data need to be subjected to matrix operation, a server or a GPU card is used to train the model; the yolov3-keras framework is used to train the model; a better model weight is obtained by training 400 epochs according to the experience value, and a model_loss curve of the trained model; The instrument image is subjected to distortion elimination to obtain a front-view-angle instrument image; The instrument image is processed by using perspective transformation to obtain a front-view-angle instrument image; The instrument image is subjected to oval dial recognition by using OpenCV, and the long and short axis endpoints of the oval dial are selected as a transformation matrix to correct the dial viewing angle and determine the front-view-angle instrument image; According to the front-view-angle instrument image, the reading of the instrument is determined, comprising: The front-view-angle instrument image is subjected to mean filtering to obtain a gray image corresponding to the front-view-angle instrument image; The gray image is subjected to Hough transformation to determine a dial of the instrument in the gray image; The dial is processed by using a radial gray algorithm to determine a pointer position in the dial; The angle between the pointer and the zero scale line of the instrument is calculated, and the reading of the instrument is obtained by equal proportion conversion according to the instrument angle range and the reading range.
2. An apparatus for reading a dial gauge, characterized in that The device is implemented by using the method for recognizing the reading of the pointer instrument according to claim 1, and the device comprises: An acquisition module for acquiring scene images corresponding to the instrument in different scenes; A detection module for instrument automatic detection of the scene images to obtain instrument images; A distortion elimination module for distortion elimination of the instrument images to obtain front-view-angle instrument images; An instrument reading determination module for determining the reading of the instrument according to the front-view-angle instrument images.
3. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the pointer instrument reading identification method in claim 1.
4. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the pointer instrument reading identification method in claim 1.
Citation Information
Patent Citations
Automatic pointer type instrument reading identification method based on scale searching
CN109993166A