Pointer type instrument automatic reading method combining character recognition and pointer positioning

By combining lightweight network nanodet and deep learning methods for dial object detection and pointer positioning of pointer instruments, and using the common character recognition network cnocr for scale digit recognition, the low real-time and single automatic reading in the prior art are solved. The problems of applicability and computing resource consumption achieve efficient and automated pointer-based instrument readings.

CN119445555APending Publication Date: 2025-02-14FUJIAN JIANGXIA UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411557059.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-04
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

The prior art has many problems in pointer-based instrument automatic reading, including low real-time nature of traditional image processing methods, single applicability to specific types of instrument templates, insufficient automation, and computing resource consumption and manual labeling of data in deep learning methods. lack of.

Method used

The lightweight network nanodet is used for pointer-based instrument dial object detection, combined with deep learning methods for pointer positioning, and the common character recognition network CNocr is used for scale digit recognition, avoiding manual marking of data and large-scale training, and enhancing the degree of system automation.

Benefits of technology

Automatic reading of pointer-based instruments in complex contexts is realized, which improves the accuracy and robustness of recognition, reduces computing resource consumption, and enhances the degree of automation of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119445555A_ABST
    Figure CN119445555A_ABST
Patent Text Reader

Abstract

The invention provides a pointer type instrument automatic reading method combining character recognition and pointer positioning, and the method comprises the steps: carrying out the target detection of a dial plate of a pointer type instrument through employing a lightweight network nanodet, and carrying out the recognition of the scale numbers of the dial plate through employing a character recognition network cnocr; and after the pointer is positioned, the reading of the meter is determined by calculating the relative position relationship between the line segment of the pointer and the center connecting line of the circumscribed rectangles of the two adjacent scale numbers.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical fields of computer vision, instrument reading automation, etc., and specifically relates to an automatic reading method for a pointer-type instrument combining character recognition and pointer positioning. Background Art

[0002] Instruments are used to monitor and control various processes and systems, including power systems, chemical production, transportation systems, medical equipment, etc. Analog signal pointer instruments have specific advantages in the field of chemical equipment and substations, etc., because they do not require power supply, do not cause electric sparks, are highly resistant to vibration and impact interference, are resistant to high temperature and corrosion, and have low cost. The reading of traditional pointer instruments requires a dedicated person, which will increase costs on the one hand, and its accuracy depends on the subjective experience and perception of the staff, and there are certain subjective errors. Manual meter reading is slow and difficult to apply to fast and multi-task measurements. If the instrument is hung in a place with a complex background and a high position, manual meter reading will be extremely difficult. Therefore, it is of practical significance to study a set of automatic reading methods for pointer instruments that can replace human eye reading in natural scenes.

[0003] The prior art has proposed some automatic reading solutions for pointer instruments, but they have the following defects: (1) Based on traditional image processing, different automatic instrument detection and recognition methods are proposed. Such pointer-type instrument recognition methods involve reliable and clear theories based on traditional image processing, and usually have good real-time performance. However, there are many problems: many preprocessing steps are used to extract features, and the cumulative error of each step reduces the accuracy of the detection results; the image must be clear enough to detect the scale line and the center of the circle; most recognition methods are only applicable to specific types of instrument templates, with a single meter type and a single application scenario; key parameters such as the range or the scale zero point often need to be manually marked, and the degree of automation is insufficient.

[0004] (2) Using deep learning methods, deep convolutional neural networks provide a potential solution for readings under complex backgrounds and can improve the accuracy and robustness of recognition. However, deep learning methods are essentially the use of artificial neural networks for big data training. The complex architecture usually requires dozens or even hundreds of layers of networks, with many parameters and large amounts of computation, which consumes too many hardware resources and is not convenient for industrial applications. In addition, deep learning methods usually require labeled data, which is time-consuming and laborious to obtain manually. The lack of labeled data is the main factor limiting the application of deep learning networks in practice. Summary of the invention

[0005] In view of the defects and shortcomings of the prior art, the present invention proposes a method for automatic reading of pointer-type instruments that combines character recognition and pointer positioning. The lightweight network nanodet is used to detect the target of the dial of the pointer-type instrument. The deep learning method can avoid the defect that the traditional pointer-type instrument reading can only process a single type and simple background pointer-type instruments; the dial scale digits use a universal character recognition network cnocr, and the dial scale digit samples are used to fine-tune the model, avoiding a large amount of manual marking data and re-training on a large scale. Using cnocr to automatically read the scale digits in the dial area does not require manual calibration of the 0 point, thereby enhancing the degree of automation of the system. Determine which two adjacent scale digits the pointer is in, and calculate the relative position relationship between the pointer segment and the center line connecting the circumscribed rectangles of the two adjacent scale digits to determine the meter reading.

[0006] The technical solution specifically adopted by the present invention to solve the technical problem is: An automatic reading method for pointer-type instruments combining character recognition and pointer positioning: a lightweight network nanodet is used to detect the dial of the pointer-type instrument, and a character recognition network cnocr is used to recognize the scale numbers on the dial; after the pointer is positioned, the meter reading is determined by calculating the relative position relationship between the pointer line segment and the center line connecting the circumscribed rectangles of two adjacent scale numbers.

[0007] Furthermore, the image after dial positioning is normalized and then the pointer is detected. The Hough transform is used to detect the straight lines in the image, and the line segments whose length is greater than a certain threshold and whose distance is close are fitted into a new line segment to represent the pointer.

[0008] Furthermore, the pointer positioning is to determine within which two adjacent scale numbers the pointer is located; after determining between which two adjacent scale numbers the pointer is located, the indication is read; the two adjacent scale numbers are Ni, Ni+1, and the reading is achieved by calculating the distance between the intersection point O1 of the pointer line segment AB and the line connecting Ni, Ni+1 and Ni, Ni+1.

[0009] Furthermore, the method specifically includes the following steps: first, normalizing the segmented dial area image, and enhancing the image contrast and removing noise by image preprocessing technology; then using an edge detector to perform edge detection on the preprocessed image; then applying Hough line transform on the edge map to detect line segments, sorting the line segment lengths among all detected line segments, and calculating the distance between every two line segments: if the distance between two line segments is less than a preset threshold, and the sum of the lengths of the two line segments is the largest, then the two line segments are regarded as edge line segments on both sides of the pointer; using the least squares method to fit the two detected pointer edge line segments into a line segment AB, corresponding to the dial pointer; then using the fine-tuned trained cnocr model to perform scale digital detection to obtain digital detection results; finally, sorting all the obtained numbers from small to large, and connecting the centers of the circumscribed rectangles of the numbers in sequence, assuming that there are N scale numbers on the surface; then the obtained lines connecting the centers of the two numbers have a total of N-1 segments; according to whether the line segment where the pointer is located has an intersection with these N-1 straight lines, determine which two adjacent scale digital ranges the pointer is located in to complete the reading of the indication.

[0010] Furthermore, the fine-tuning training of the cnocr model is specifically as follows: using the recognition model en_PP-OCRv3_det and the detection model en_PP-OCRv3, the fine-tuning data set includes multiple pictures of dials digitally generated and labeled by simulation and multiple dial images after segmentation processing for digital labeling; using data enhancement to increase the diversity of training samples and expand the training samples; finally, dividing the training set and the validation set.

[0011] Furthermore, the method for reading the pointer indication is specifically as follows: Assume that the pointer line segment is AB, and any line segment among the N-1 straight lines is NiNi+1, where i=0...N; use the cross product method to determine whether the pointer line segment AB intersects with the line segment NiNi+1; the specific steps are as follows: Assume that the coordinates of the four points A, B, Ni, and Ni+1 are A(x1, y1), B(x2, y2), Ni(x3, y3), and Ni+1(x4, y4) respectively; Calculate the cross product of vector AB and NiNi+1: cross1=(x2−x1)·(y3−y1)−(y2−y1)·(x3−x1) Compute the cross product of vectors AB and AD: cross2=(x2−x1)·(y4−y1)−(y2−y1)·(x4−x1) Calculate the cross product of vectors CD and CA: cross3=(x4−x3)·(y1−y3)−(y4−y3)·(x1−x3) Calculate the cross product of vectors CD and CB cross4=(x4−x3)·(y2−y3)−(y4−y3)·(x2−x3) The condition for line segment AB to intersect line segment NiNi+1 is cross1·cross2<0 and cross3·cross4<0 The specific steps of reading calculation are as follows: Let the coordinates be O1 (x0, y0), Ni (x3, y3), Ni+1 (x4, y4); Calculate the distance between two tick numbers: Calculate the distance from Ni to the intersection point O1 Through the proportional relationship, the indication R is calculated as follows: Assume Ri is the value of scale number Ni, and Ri+1 is the value of scale number Ni+1; calculate the proportion of the intersection point within the scale interval: The final reading is calculated as: .

[0012] And, a pointer-type instrument automatic reading system combining character recognition and pointer positioning, including: a dial detection module, which uses a lightweight network nanodet to perform target detection on the dial of the pointer-type instrument; a scale number detection module, which uses a character recognition network cnocr to recognize the scale numbers on the dial; and a reading module, which determines the meter reading by calculating the relative position relationship between the pointer line segment and the center line connecting the circumscribed rectangles of two adjacent scale numbers after positioning the pointer.

[0013] Furthermore, it also includes a pointer detection module, which is used to normalize the image after the dial is positioned and then perform pointer detection; Hough transform is used to detect straight lines in the image, and line segments that meet the requirements of length greater than a certain threshold and are close to each other are fitted into a new line segment to represent the pointer.

[0014] An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps of the automatic reading method of a pointer-type instrument combining character recognition and pointer positioning as described above are implemented.

[0015] A non-transitory computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of a pointer-type instrument automatic reading method combining character recognition and pointer positioning as described above.

[0016] Compared with the prior art, the present invention and its preferred solution use a lightweight network nanodet to detect the dial of a pointer instrument, and use a deep learning method to avoid the defect that the traditional pointer instrument reading can only process a single type and simple background pointer instruments; the dial scale digits use a universal character recognition network cnocr, and the dial scale digit samples are used to fine-tune the model, avoiding a large amount of manual marking data and re-training on a large scale. Using cnocr to automatically read the scale digits in the dial area does not require manual calibration of the 0 point, and can enhance the system automation when used for automatic reading of pointer instruments. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments: Figure 1 This is a flow chart of a method according to an embodiment of the present invention; Figure 2 This is an example diagram of a pointer-type instrument provided with a pressure data generating device; Figure 3 This is a diagram showing the dial positioning result using the nanodet network in an embodiment of the present invention; Figure 4 This is a diagram showing the steps of pointer detection according to an embodiment of the present invention; Figure 5 This is a graph showing the digital results of the CNOCR detection scale used in an embodiment of the present invention. DETAILED DESCRIPTION

[0018] In order to make the features and advantages of this patent more obvious and easy to understand, the following embodiments are specifically described in detail as follows: It should be noted that the following detailed descriptions are illustrative and are intended to provide further explanation of the present application. Unless otherwise specified, all technical and scientific terms used in this specification have the same meanings as those commonly understood by those skilled in the art to which the present application belongs.

[0019] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.

[0020] The embodiment of the present invention provides a method for automatically reading a pointer-type instrument by combining character recognition and pointer positioning. Figure 1 shown.

[0021] The following is a brief introduction to the scheme designed by the present invention through a process example: Process 1. In this embodiment, the construction of the sample database is partly derived from the collection of network data, and the other part is derived from the laboratory's self-built acquisition terminal. The acquisition terminal includes a two-dimensional pan-tilt camera that can capture dial images from different angles. The experimental instrument in this embodiment uses a pointer-type pressure gauge and a pressure data generator that can drive the pressure gauge to display different indications at different times. It should be noted that the solution of the present invention is not only for pressure gauges, but other pointer-type meters can also adopt the solution of the present invention.

[0022] Process 2: The dial recognition and positioning adopts the lightweight network nanodet. Nanodet is a lightweight target detection model that is easy to deploy to embedded terminals. It adopts an anchor-free detection idea based on FCOS. It directly classifies and regresses each pixel point in the feature map. This method reduces the computational complexity while avoiding the positive and negative sample imbalance problem common in the anchor box method.

[0023] Process 3: After the dial is positioned, the image is normalized and then the pointer is detected. Hough transform is used to detect straight lines in the image, and two line segments that meet the requirements of length greater than a certain threshold and are close to each other are fitted into a new line segment.

[0024] Process 4: Identify the scale numbers on the dial. Since the workload of manually labeling the scale numbers is too large, a program is used to generate simulated dial data images and digital annotations, and the training set and test set are divided into 8:2. The character recognition network cnocr is used to fine-tune the network parameters. cnocr is a text recognition tool based on the CRNN framework, which comes with multiple trained models. Different models can support Chinese, English, and number recognition.

[0025] Process 5: Pointer positioning is to determine which two adjacent scale numbers the pointer is located within. After determining which two adjacent scale numbers the pointer is between, read the indication. The two adjacent scale numbers are Ni, Ni+1, and the reading is achieved by calculating the distance between the intersection point O1 of the pointer line segment AB and the line connecting Ni, Ni+1 and Ni, Ni+1.

[0026] The following is a further detailed introduction to the solution of the present invention through a specific use example: 1. When using, Figure 2 The device shown is placed in different scenes, the camera acquisition device is facing the dial, and the acquired image is adjusted to make the camera plane as parallel to the dial plane as possible. The pressure data generating device is turned on to obtain dial images with different pointer deflection angles. Figure 2The pressure gauge in the device can be selected or replaced with different styles. This process mainly generates a sample database for the training of the dial positioning model. The dials in the image can have different lighting conditions, backgrounds, etc., to ensure that there are enough diverse samples in the data set. Collect 1000 photos to form a sample data set, use the labelimg tool to label the dial area, and divide the training set and test set into 8:2. Store the data in COCO format.

[0027] 2. Before training the nanodet network, first select the model nanodet-m, and modify the data path, category label, and number of categories in the configuration file of this model according to the actual situation. The positioning effect of the model after training is as follows: Figure 3 shown.

[0028] 3. Normalize the segmented dial area image to 415*415. During the processing, first enhance the contrast of the image and remove noise through image preprocessing techniques such as histogram equalization, adaptive histogram equalization and Gaussian blur, so as to better extract the edges in the image. Next, use an edge detector to detect the edge of the preprocessed image so that the Hough line transform can be applied on the edge map to detect the line segments. Among all the detected line segments, sort the line segment lengths and calculate the distance between every two line segments. If the distance between two line segments is less than the preset threshold and the sum of the lengths of the two line segments is the largest, the two line segments are regarded as edge segments on both sides of the pointer. Use the least squares method to fit the two detected pointer edge segments into a line segment AB, which is the dial pointer. Figure 4 It is a display of the testing process.

[0029] 4. Use cnocr to detect scale numbers. First, select the recognition model en_PP-OCRv3_det and the detection model en_PP-OCRv3, and prepare a fine-tuned data set: 700 images of dial numbers generated by simulation and annotated, and 300 dial images segmented in step 2 for digital annotation. Use data enhancement technology such as rotation, translation, and scaling to increase the diversity of training samples and expand the training samples to 3,000. Arrange the training set and validation set in a ratio of 9:1. The detection effect of the trained model is as follows: Figure 5 shown.

[0030] 5. Sort all the numbers obtained from small to large, and connect the centers of the circumscribed rectangles of the numbers in sequence. If there are N scale numbers on the surface, there will be N-1 lines connecting the centers of the two numbers. Determine in which two adjacent scale numbers the pointer is located based on whether the line segment where the pointer is located intersects with these N-1 straight lines. Assume that the pointer line segment is AB, and any line segment among the N-1 straight lines is NiNi+1, where i=0...N; to determine whether the pointer line segment AB intersects with the line segment NiNi+1, the cross product method can be used. The specific steps are as follows: Assume that the coordinates of the four points A, B, Ni, and Ni+1 are A(x1, y1), B(x2,y2), Ni(x3, y3), and Ni+1(x4, y4); Calculate the cross product of vector AB and NiNi+1: cross1=(x2−x1)·(y3−y1)−(y2−y1)·(x3−x1) Compute the cross product of vectors AB and AD: cross2=(x2−x1)·(y4−y1)−(y2−y1)·(x4−x1) Calculate the cross product of vectors CD and CA: cross3=(x4−x3)·(y1−y3)−(y4−y3)·(x1−x3) Calculate the cross product of vectors CD and CB cross4=(x4−x3)·(y2−y3)−(y4−y3)·(x2−x3) The condition for line segment AB to intersect line segment NiNi+1 is cross1·cross2<0 and cross3·cross4<0 The specific steps of reading calculation are as follows: Assume coordinates O1 (x0, y0), Ni (x3, y3), Ni+1 (x4, y4); Calculate the distance between two tick numbers: Calculate the distance from Ni to the intersection point O1 Through the proportional relationship, the indication R can be calculated as follows: Assume Ri is the value of scale number Ni, and Ri+1 is the value of scale number Ni+1. Calculate the proportion of the intersection point within the scale interval: The final reading is calculated as: .

[0031] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0032] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0033] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0034] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0035] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the present invention should be understood by people with ordinary skills in the field to which the present invention belongs. The "first", "second" and similar words used in the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprise" and similar words mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0036] The above is only a preferred embodiment of the present invention, and does not limit the present invention in other forms. Any technician familiar with the profession may use the above disclosed technical content to change or modify it into an equivalent embodiment with equivalent changes. However, any simple modification, equivalent change and modification made to the above embodiment according to the technical essence of the present invention without departing from the technical solution of the present invention still belongs to the protection scope of the technical solution of the present invention.

[0037] This patent is not limited to the above-mentioned optimal implementation mode. Anyone can derive other various forms of a pointer instrument automatic reading method combining character recognition and pointer positioning under the inspiration of this patent. All equal changes and modifications made according to the scope of the patent application of the present invention should be covered by this patent.

Claims

1. A method for automatic reading of a pointer-type instrument combining character recognition and pointer positioning, characterized in that: The lightweight network nanodet is used to detect the dial of the pointer instrument, and the character recognition network cnocr is used to recognize the scale numbers on the dial. After the pointer is located, the meter reading is determined by calculating the relative position relationship between the pointer segment and the center line connecting the circumscribed rectangles of two adjacent scale numbers.

2. The method for automatic reading of a pointer-type instrument based on combining character recognition and pointer positioning according to claim 1, characterized in that: The image after dial positioning is normalized and then the pointer detection is performed; the straight lines in the image are detected using Hough transform, and the line segments whose length is greater than a certain threshold and whose distance is close are fitted into a new line segment to represent the pointer.

3. The method for automatically reading a pointer-type instrument combining character recognition and pointer positioning according to claim 1, characterized in that: The pointer positioning is to determine within which two adjacent scale numbers the pointer is located; after determining between which two adjacent scale numbers the pointer is located, the indication is read; the two adjacent scale numbers are Ni, Ni+1, and the reading is achieved by calculating the distance between the intersection point O1 of the pointer line segment AB and the line connecting Ni, Ni+1 and Ni, Ni+1.

4. The method for automatic reading of a pointer-type instrument combining character recognition and pointer positioning according to claim 1, characterized in that: The specific steps include: First, the segmented dial area image is normalized, and the image contrast is enhanced and noise is removed through image preprocessing technology; Then, an edge detector is used to detect the edge of the preprocessed image; then, Hough line transform is applied to the edge map to detect line segments. Among all the detected line segments, the line segment lengths are sorted, and the distance between every two line segments is calculated: if the distance between two line segments is less than the preset threshold and the sum of the lengths of the two line segments is the largest, then the two line segments are regarded as edge segments on both sides of the pointer; the two detected pointer edge segments are fitted into a line segment AB using the least squares method, corresponding to the dial pointer; then, the fine-tuned trained cnocr model is used to detect the scale numbers to obtain the digital detection results; finally, all the obtained numbers are sorted from small to large, and the centers of the circumscribed rectangles of the numbers are connected in sequence. Assuming that there are N scale numbers on the surface; then the obtained lines connecting the centers of the two numbers are N-1 segments in total; according to whether the line segment where the pointer is located intersects with these N-1 straight lines, it is determined within which two adjacent scale numbers the pointer is located to complete the reading of the indication.

5. The method for automatically reading a pointer-type instrument combining character recognition and pointer positioning according to claim 4, characterized in that: The fine-tuning training of the cnocr model is specifically as follows: using the recognition model en_PP-OCRv3_det and the detection model en_PP-OCRv3, the fine-tuning data set includes multiple pictures of dials digitally generated and labeled by simulation and multiple dial images after segmentation processing for digital labeling; using data enhancement to increase the diversity of training samples and expand the training samples; finally, dividing the training set and the validation set.

6. The method for automatically reading a pointer-type instrument combining character recognition and pointer positioning according to claim 4, characterized in that: The specific method of reading the pointer indication is: Assume that the pointer line segment is AB, and any line segment among the N-1 straight lines is NiNi+1, where i=0...N; use the cross product method to determine whether the pointer line segment AB intersects with the line segment NiNi+1; the specific steps are as follows: Assume that the coordinates of the four points A, B, Ni, and Ni+1 are A(x1, y1), B(x2, y2), Ni(x3, y3), and Ni+1(x4, y4) respectively; Calculate the cross product of vector AB and NiNi+1: cross1=(x2−x1)·(y3−y1)−(y2−y1)·(x3−x1) Compute the cross product of vectors AB and AD: cross2=(x2−x1)·(y4−y1)−(y2−y1)·(x4−x1) Calculate the cross product of vectors CD and CA: cross3=(x4−x3)·(y1−y3)−(y4−y3)·(x1−x3) Calculate the cross product of vectors CD and CB cross4=(x4−x3)·(y2−y3)−(y4−y3)·(x2−x3) The condition for line segment AB to intersect line segment NiNi+1 is cross1·cross2<0 and cross3·cross4<0 The specific steps of reading calculation are as follows: Let the coordinates be O1 (x0, y0), Ni (x3, y3), Ni+1 (x4, y4); Calculate the distance between two tick numbers: Calculate the distance from Ni to the intersection point O1 Through the proportional relationship, the indication R is calculated as follows: Assume Ri is the value of scale number Ni, and Ri+1 is the value of scale number Ni+1; calculate the proportion of the intersection point within the scale interval: The final reading is calculated as: .

7. An automatic reading system for pointer-type instruments combining character recognition and pointer positioning, characterized in that: include: The dial detection module uses a lightweight network nanodet to detect the dial of the pointer instrument; The scale number detection module is used to identify the scale numbers on the dial using the character recognition network CNOCR; and the reading module determines the meter reading by calculating the relative position relationship between the pointer segment and the center line connecting the circumscribed rectangles of two adjacent scale numbers after positioning the pointer.

8. The automatic reading system for pointer-type instruments combining character recognition and pointer positioning according to claim 7, characterized in that: It also includes a pointer detection module, which is used to normalize the image after the dial is positioned and then perform pointer detection; Hough transform is used to detect straight lines in the image, and line segments whose lengths are greater than a certain threshold and whose distances are close are fitted into a new line segment to represent the pointer.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of a method for automatic reading of a pointer-type instrument combining character recognition and pointer positioning as described in any one of claims 1 to 6 are implemented.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of a method for automatic reading of a pointer-type instrument combining character recognition and pointer positioning as described in any one of claims 1 to 6 are implemented.