A method for identifying readings of pointer meters with uneven scales
By rectangular expansion and binary separation processing of pointer table reading images, the problem of uneven scale pointer table reading dependency model training is solved, and efficient and accurate reading recognition is achieved.
Patent Information
- Application Number
- CN202510729123.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-03
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2045-06-03
AI Technical Summary
Traditional pointer table reading recognition methods are inefficient and have poor real-time performance, especially in complex industrial environments. In addition, pointer table readings with uneven scales depend on model training requires a large amount of labeled data, which consumes a lot of computing resources and lacks generalization capabilities.
The instrument image is obtained through the visual module, and after preprocessing, the rectangle is expanded into a histogram, and the standard scale assisted picture is fused to form a reading diagram, the integer part is read and the decimal part is estimated based on binary separation, and finally merged into the data result.
The model training process is simplified, the computing resource consumption is reduced, the reading accuracy and generalization ability is improved, and it is suitable for pointer table reading recognition with any uneven scale.
Smart Images

Figure CN120236094B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of pointer meter reading, in particular to a method for identifying the reading of a pointer meter with uneven scales. Background Art
[0002] Pointer meters, essential equipment for industrial field monitoring, are widely used in power systems, chemical production, and mechanical control. Traditionally, readings from pointer meters rely primarily on manual visual interpretation, which suffers from low efficiency, poor real-time performance, and susceptibility to subjective factors. This presents particular safety risks in complex industrial environments, where manual inspection of instrument settings is impossible.
[0003] Since the reading of a pointer meter with uneven scale cannot be obtained by conventionally reading length data and then calculating the final data result, the reading of a pointer meter with uneven scale is too dependent on model training, requiring a large amount of labeled data for model training, and there are problems of high computing resource consumption and insufficient generalization ability. Therefore, the present invention provides a method for identifying the reading of a pointer meter with uneven scale. Summary of the Invention
[0004] In response to the shortcomings of the existing technology, the present invention provides a method for identifying the readings of pointer meters with uneven scales, which solves the problems that the readings of pointer meters with uneven scales are too dependent on model training, require a large amount of labeled data for model training, and have high computing resource consumption and insufficient generalization ability.
[0005] To achieve the above objectives, the present invention is implemented through the following technical solutions:
[0006] A method for identifying the reading of a pointer meter with uneven scale, comprising the following steps:
[0007] S1. Acquire the image of the instrument to be read based on the visual module and preprocess the image of the instrument to be read;
[0008] S2, performing rectangular expansion processing on the image of the instrument to be read to obtain a histogram;
[0009] S3, fusing the histogram and the auxiliary image with a standard scale to form a reading graph;
[0010] S4, reading the integer part T in the reading graph;
[0011] S5, estimating the fractional part X in the reading graph based on binary separation;
[0012] S6. Add the integer part T and the decimal part X and output the result as the final data.
[0013] Preferably, the image of the instrument to be read is an image obtained with a lens perpendicular to the dial plane, uniform lighting, and a resolution of not less than 1280×720.
[0014] Preferably, preprocessing the image of the instrument to be read includes: color space conversion to reduce computational complexity, highlighting shape features, Gaussian blurring and median filtering to eliminate noise, and histogram equalization to enhance global contrast.
[0015] Preferably, in step S5, estimating the decimal part in the reading graph based on binary separation specifically includes:
[0016] S501, perform center separation in the unit area where the pointer is located, record "0" on the left side, and the data length represents a; record "1" on the right side, and the data length represents b;
[0017] S502, selecting the area where the pointer is located from the two areas formed after the center separation in step S501 as a second unit area, and repeating step S501 within the second unit area;
[0018] S503, similarly perform step S502 N-1 times to obtain the path binary sequence (S1, S2, ..., S N ), S i ∈{0,1};
[0019] S504, calculating the decimal part X;
[0020] ①;
[0021] In formula ①, if the path binary sequence (S1, S2, ..., S N ) in the If the number of digits is 0, ; If the path binary sequence (S1, S2, ..., S N ) in the The number of digits is 1, then ;
[0022] In formula ①, N represents the binary sequence of the path of the area where the pointer is located (S1, S2, ..., S N ), The binary sequence of paths representing the region where the pointer is located (S1, S2, ..., S N ) in which the serial number is The specific value of a is that the data length when the record on the left is "0", b is that the data length when the record on the left is "1", and a+b=1.
[0023] Preferably, the number of layers of binary separation estimation is 6-10 layers. The higher the number of layers of binary separation estimation, the higher the accuracy of the decimal part X.
[0024] Preferably, step S501 performs center division in the unit area where the pointer is located, and the data on the left is recorded as "0", and the data length is represented by a; the data on the right is recorded as "1", and the data length is represented by b. Specifically,
[0025] a. Identify the unit area where the pointer is located, then convert the image into a single-channel grayscale image, and crop the unit area where the pointer is located into two first unit areas symmetrically;
[0026] b. Identify the first unit area where the pointer exists in the two first unit areas based on the YOLOv5 model.
[0027] Preferably, in step S2, the image of the instrument to be read is subjected to rectangular expansion processing to obtain a histogram, which specifically includes: using contour analysis to confirm the center of the image of the instrument to be read, and setting the radius of the image of the instrument to be read, based on the center and radius of the image of the instrument to be read, expanding the image of the instrument to be read into a rectangle to obtain a histogram.
[0028] Preferably, in step S3, fusing the histogram with the auxiliary image having a standard scale to form a reading graph specifically includes:
[0029] Identify the scale zero point of the histogram, then align the scale zero point of the histogram with the scale zero point of the auxiliary image with the standard scale, scale the histogram / auxiliary image with the standard scale in the length direction, so that the histogram and the auxiliary image with the standard scale are fused to form a reading image.
[0030] Preferably, it also includes: error correction of the final data output:
[0031] Process the multiple images of the instrument to be read that are acquired continuously, and exclude the ones with obvious jumps in the final data results;
[0032] Then calculate the average value of multiple final data results that meet the requirements.
[0033] The present invention provides a method for identifying the reading of a pointer meter with uneven scales. It has the following beneficial effects:
[0034] 1. The present invention performs rectangular expansion processing on the image of the instrument to be read to obtain a histogram, and fuses the histogram with an auxiliary image with a standard scale to form a reading graph. This process isolates most of the influencing factors in the image of the instrument to be read, reducing interference with the subsequent reading process of the integer part T in the reading graph and the decimal part X in the reading graph based on binary separation estimation.
[0035] 2. The present invention uses binary separation to estimate the decimal part X in the reading image, separates the image, and then identifies the area where the pointer is located. This process is a very simple process, and the recognition model used is consistent for any pointer meter reading with uneven scales, ensuring that the model training has sufficient labeled data; most importantly, the training data label of the model is only used to determine whether there is a pointer in the image area. Manual labeling (assisted model labeling) is very convenient, which simplifies the model's operating mechanism and achieves accurate reading of pointer meter readings with uneven scales. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 This is a flow chart of a method for identifying readings of a pointer meter with uneven scales proposed by the present invention;
[0037] Figure 2 This is a schematic diagram of binary separation of a method for identifying readings of a pointer meter with uneven scales proposed by the present invention. DETAILED DESCRIPTION
[0038] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0039] Example 1:
[0040] like Figure 1 As shown, an embodiment of the present invention provides a method for identifying the reading of a pointer meter with uneven scale, comprising the following steps:
[0041] S1. Acquire the image of the instrument to be read based on the vision module. It is necessary to ensure that the image of the instrument to be read is an image obtained with the lens perpendicular to the dial plane, uniform lighting, and a resolution of not less than 1280×720. Avoid image quality issues such as visual misalignment and pixel blur in the image of the instrument to be read that may affect subsequent readings. Preprocess the image of the instrument to be read, use color space conversion to reduce computational complexity, and highlight shape features; use Gaussian blur and median filtering to eliminate noise, and use histogram equalization to perform global contrast enhancement to grayscale the image of the instrument to be read.
[0042] For example, use a high-speed camera with more than 2 megapixels and automatic fill light, or a FLIR BFS-PGE-50S5C camera with automatic exposure (AE) + regional exposure (ROI).
[0043] S2. Perform rectangular expansion processing on the image of the instrument to be read to obtain a histogram. Compared with reading values from circular instruments, reading values on the histogram is simpler. Contour analysis is used to confirm the center of the image of the instrument to be read, and the radius of the image of the instrument to be read is set (when reading data from a known pointer-type instrument, the radius of the image of the instrument to be read can be set; of course, the radius of the image of the instrument to be read can also be determined based on contour analysis). Based on the center and radius of the image of the instrument to be read, the image of the instrument to be read is expanded into a rectangle to obtain a histogram.
[0044] S3. Fuse the histogram and the auxiliary image with a standard scale to form a reading graph, identify the scale zero point of the histogram, and then align the scale zero point of the histogram with the scale zero point of the auxiliary image with a standard scale. Scale the histogram / auxiliary image with a standard scale in the length direction so that the histogram and the auxiliary image with a standard scale are fused to form a reading graph. In the fused reading graph, the scale is clear and the scale has a clear value of the integer part T. The pointer position in the histogram is fused to the auxiliary image with a standard scale. Text-based reading can quickly read the integer part T in the reading graph, and provide a clearer picture for the subsequent binary separation-based estimation of the decimal part X in the reading graph, ensuring that it can be binary separated multiple times.
[0045] In the auxiliary picture of the standard scale, each unit area has a center dividing line, and the data lengths on both sides of the center dividing line are marked to prepare for the subsequent execution of the decimal part X in the reading diagram based on binary separation estimation; another method is: store the data length representation a and data length representation b on both sides of the center divider corresponding to the next unit area of the integer part T in the model database, and after the integer part T is read, obtain the data length representation a and data length representation b on both sides of the center divider corresponding to the unit area where the pointer is located based on the integer part T.
[0046] S4. Reading the integer part T in the reading graph includes two processes: one is confirming the unit area where the pointer is located, and based on the unit area where the pointer is located, reading the value marked near the left end of the unit area where the pointer is located.
[0047] S5. Estimating the decimal part X in the reading image based on binary separation. During the binary separation estimation process, the model's recognition of the image only involves multiple judgments of the pointer area, and its judgment method is unified and standardized. After the trained model adjusts the relevant parameters, it can read the pointer meter of any other uneven scale, and the data labels used for training the model are also very easy to mark manually. Compared with the traditional method of manually reading the reading data of the pointer meter with uneven scale as a label, this application only needs to select and judge, so that more training data can be obtained.
[0048] S6. Add the integer part T and the decimal part X and output the result as the final data.
[0049] S7. Error correction of the final data output:
[0050] The multiple images of the instrument to be read that are continuously acquired are processed, the final data results with obvious jumps are excluded, and then the average value of the multiple final data results that meet the requirements is calculated.
[0051] The present invention performs rectangular expansion processing on the image of the instrument to be read to obtain a histogram, and fuses the histogram with an auxiliary image with a standard scale to form a reading map. This process isolates most of the influencing factors (such as shadows, scale defects, misalignment, etc.) in the image of the instrument to be read, reducing interference with the subsequent reading process of the integer part T in the reading map and the decimal part X in the reading map based on binary separation estimation. The present invention also creatively proposes estimating the decimal part X in the reading map based on binary separation, separating the image, and then identifying the area where the pointer is located. This process is a very simple process, and the recognition model used is consistent for any pointer meter reading with uneven scales, ensuring that the model training has sufficient labeled data. Most importantly, the training data label of the model is only used to determine whether there is a pointer in the image area, and manual labeling (auxiliary model labeling) is very convenient, which simplifies the operation mechanism of the model and realizes accurate reading of pointer meters with uneven scales.
[0052] When the left data length after center separation represents a and the right data length is 0.5, it represents a pointer meter with uniform scale; that is, applying the technical solution disclosed in this application to the reading process of a pointer meter with uniform scale should also be a conventional application of this technology.
[0053] In one embodiment, estimating the fractional part in the reading graph based on binary separation in step S5 specifically includes:
[0054] S501. Perform center separation in the unit area where the pointer is located. The left side is recorded as "0", and the data length is a; the right side is recorded as "1", and the data length is b.
[0055] The sources of the left data length a and the right data length b can be: in the auxiliary picture of the standard scale, each unit area has a center dividing line, and the data lengths on both sides of the center dividing line are marked, and the marked data is read by the text reading model; another way is: store the data length representation a and data length representation b on both sides of the center divider corresponding to the next unit area of the integer part T in the model database, and after the integer part T is read, obtain the data length representation a and data length representation b on both sides of the center divider corresponding to the unit area where the pointer is located based on the integer part T.
[0056] S502, selecting the area where the pointer is located from the two areas formed after the center separation in step S501 as a second unit area, and repeating step S501 within the second unit area;
[0057] S503, similarly perform step S502 N-1 times to obtain the path binary sequence (S1, S2, ..., S N ), S i ∈{0,1};
[0058] S504, calculating the decimal part X;
[0059] ①;
[0060] In formula ①, if the path binary sequence (S1, S2, ..., S N ) in the If the number of digits is 0, ; If the path binary sequence (S1, S2, ..., S N ) in the The number of digits is 1, then ;
[0061] In formula ①, N represents the binary sequence of the path of the area where the pointer is located (S1, S2, ..., S N ), The binary sequence of paths representing the region where the pointer is located (S1, S2, ..., S N ) in which the serial number is The specific value of a is that the data length when the record on the left is "0", b is that the data length when the record on the left is "1", and a+b=1.
[0062] For example, with a=1 / 3, b=2 / 3, N=2;
[0063] The path binary sequence of the pointer area is (1,1), X=1 / 3+1 / 3*2 / 3=0.5556;
[0064] The path binary sequence of the pointer area is (1,0), X=0.3333.
[0065] Generally, the number of layers of binary separation estimation is 6-10 layers (the binary sequence of the path in the pointer area (S1, S2, ..., S N The higher the number of layers of binary separation estimation, the higher the accuracy of the fractional part X.
[0066] For example, the number of layers of binary separation estimation is 2, which is equivalent to the last segmentation into 4 regions (2 2 ), the number of layers of binary separation estimation is 10 layers, the last one is equivalent to segmentation into 1024 regions (2 10 ), since this method is essentially an estimate, it makes little sense if the number of layers of binary separation estimation exceeds 10.
[0067] In one embodiment, step S501 performs center division in the unit area where the pointer is located. The data on the left is recorded as "0", and the data length is a; the data on the right is recorded as "1", and the data length is b. Specifically,
[0068] a. Identify the unit area where the pointer is located, then convert the image into a single-channel grayscale image, and crop the unit area where the pointer is located into two first unit areas symmetrically;
[0069] b. Identify the second unit area with a pointer in the two first unit areas based on the YOLOv5 model.
[0070] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.
Claims
1. A method for identifying the reading of a pointer meter with uneven scale, characterized in that: The following steps are involved: S1. Acquire the image of the instrument to be read based on the visual module and preprocess the image of the instrument to be read; S2, performing rectangular expansion processing on the image of the instrument to be read to obtain a histogram; S3, fusing the histogram and the auxiliary image with a standard scale to form a reading graph; S4, reading the integer part T in the reading graph; S5, estimating the fractional part X in the reading graph based on binary separation; S6. Add the integer part T and the decimal part X and output the result as the final data. The decimal part of the estimated reading graph based on binary separation in step S5 specifically includes: S501. Perform a center split in the unit area where the pointer is located, record "0" on the left side, and the data length is a; The record on the right is "1", and the data length is b; S502, selecting the area where the pointer is located from the two areas formed after the center separation in step S501 as a second unit area, and repeating step S501 within the second unit area; S503, similarly perform step S502 N-1 times to obtain the path binary sequence (S1, S2, ..., S N ), S i ∈{0,1}; S504, calculating the decimal part X; ①; In formula ①, if the path binary sequence (S1, S2, ..., S N ) in the If the number of digits is 0, ; If the path binary sequence (S1, S2, ..., S N ) in the The number of digits is 1, then ; In formula ①, N represents the binary sequence of the path of the area where the pointer is located (S1, S2, ..., S N ), The binary sequence of paths representing the region where the pointer is located (S1, S2, ..., S N ) in which the serial number is The specific value of a is that the data length when the record on the left is "0", b is that the data length when the record on the left is "1", and a+b=1.
2. The method for identifying readings of a pointer meter with uneven scale according to claim 1, characterized in that: The image of the instrument to be read is an image obtained with a lens perpendicular to the dial plane, uniform lighting, and a resolution of not less than 1280×720.
3. The method for identifying the reading of a pointer meter with uneven scale according to claim 2, characterized in that: The preprocessing of the instrument image to be read includes: color space conversion to reduce computational complexity, highlighting shape features, Gaussian blur and median filtering to eliminate noise, and histogram equalization to enhance global contrast.
4. The method for identifying readings of a pointer meter with uneven scale according to claim 1, characterized in that: The number of layers of binary separation estimation is 6-10. The higher the number of layers of binary separation estimation, the higher the accuracy of the decimal part X.
5. The method for identifying the reading of a pointer meter with uneven scale according to claim 1, characterized in that: Step S501 performs center separation in the unit area where the pointer is located, and the left side is recorded as "0", and the data length is a; The record on the right is "1", and the data length b specifically includes: a. Identify the unit area where the pointer is located, then convert the image into a single-channel grayscale image, and crop the unit area where the pointer is located into two first unit areas symmetrically; b. Identify the first unit area where the pointer exists in the two first unit areas based on the YOLOv5 model.
6. The method for identifying the reading of a pointer meter with uneven scale according to claim 1, characterized in that: In step S2, the image of the instrument to be read is subjected to rectangular expansion processing to obtain a histogram. Specifically, the process includes: using contour analysis to confirm the center of the image of the instrument to be read, setting the radius of the image of the instrument to be read, and expanding the image of the instrument to be read into a rectangle based on the center and radius of the image of the instrument to be read to obtain a histogram.
7. The method for identifying readings of a pointer meter with uneven scale according to claim 1, characterized in that: In step S3, the histogram is integrated with the auxiliary image with a standard scale to form a reading graph, which specifically includes: Identify the scale zero point of the histogram, then align the scale zero point of the histogram with the scale zero point of the auxiliary image with the standard scale, scale the histogram / auxiliary image with the standard scale in the length direction, so that the histogram and the auxiliary image with the standard scale are fused to form a reading image.
8. The method for identifying readings of a pointer meter with uneven scale according to claim 1, characterized in that: Also includes: Error correction of the final data output: Process the multiple images of the instrument to be read that are acquired continuously, and exclude the ones with obvious jumps in the final data results; Then calculate the average value of multiple final data results that meet the requirements.
Citation Information
Patent Citations
Automatic pointer type instrument reading identification method based on scale searching
CN109993166A
Non-uniform scale pointer meter reading identification method
CN115205863A