Pointer type meter reading identification method, device, system and product

By extracting and correcting the target image of the pointer meter, converting the dial to a front angle, and building a relational array to identify the readings, the problem of inaccurate readings of irregular scale meters is solved, and high-accurate meter reading recognition is achieved.

CN119672685APending Publication Date: 2025-03-21CHINA TELECOM ARTIFICIAL INTELLIGENCE TECHNOLOGY (BEIJING) CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411630559.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-14
Publication Date
2025-03-21

AI Technical Summary

Technical Problem

The prior art is difficult to accurately read pointer meters with irregular scales, and images taken from non-front angles lead to inaccurate readings.

Method used

By extracting the target image from the original image, detect whether the dial is a perfect circle and correct it if necessary to convert the dial to a front angle. Then, identify the pointers and tick marks in the dial and build a relational array to determine the reading.

Benefits of technology

Accurate reading recognition of irregular scale pointer meters is realized, and the accuracy of reading recognition of meter shot from non-front angles is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119672685A_ABST
    Figure CN119672685A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of artificial intelligence, and discloses a pointer type meter reading identification method, device, system and product. The method comprises the following steps: extracting a target image of a target meter from an original image; the target image is an image generated based on the outer contour of the target meter; detecting whether a dial plate in the target image is a perfect circle; under the condition that the dial plate in the target image is not a perfect circle, correcting the target image so as to convert the dial plate into a front angle; identifying a pointer in the dial plate, a plurality of scale marks adjacent to a position pointed by the pointer and corresponding readings under the condition that the dial plate in the target image is a perfect circle; and constructing a relational array based on the angle of each scale line and the corresponding reading, and determining the reading of the target meter based on the relational array. By adopting the method, the accurate reading of the irregular scale pointer type meter which is shot at a non-front angle can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a method, device, system and product for identifying readings of pointer-type meters. Background Art

[0002] Pointer meters are usually used in many fields such as electricity, water, industrial scenarios and building management, such as pointer-type electricity meters, water meters, gas meters, etc. With the development of artificial intelligence, technologies that can automatically read pointer-type meters have emerged, aiming to reduce the workload of manual meter reading. The current automatic reading solution usually uses a camera or inspection robot to capture an image of the meter, and uses computer vision and deep learning technology to identify the pointer position of the meter in the image, determine the sector angle occupied by the pointer in the overall range, and estimate the reading of the pointer pointing to the position.

[0003] However, the angle of the camera or inspection robot is not the standard front angle, and the meter in the captured image is deformed to a certain extent, resulting in inaccurate readings. In addition, the current solution cannot read meters with irregular scales, which have scale lines with unequal reading intervals. There is a large error in reading using the current solution. Therefore, it is necessary to find a method to achieve accurate reading of irregular scale pointer meters. Summary of the invention

[0004] In view of this, the present application aims to propose a method, device, system and product for identifying the reading of a pointer-type meter, so as to achieve accurate reading of a pointer-type meter with irregular scale.

[0005] To achieve the above objectives, the technical solution of this application is as follows:

[0006] A first aspect of an embodiment of the present application provides a method for identifying a pointer-type meter reading, the method comprising:

[0007] Extracting a target image of a target meter from an original image; the target image is an image generated based on an outer contour of the target meter;

[0008] Detecting whether the dial in the target image is a perfect circle; if the dial in the target image is not a perfect circle, correcting the target image so that the dial is converted to a front angle;

[0009] In the case where the dial in the target image is a perfect circle, identifying a pointer in the dial, a plurality of scale lines adjacent to a position pointed by the pointer, and corresponding readings;

[0010] A relation array is constructed based on the angles of each scale line and the corresponding readings, and the reading of the target meter is determined based on the relation array.

[0011] Optionally, correcting the target image so that the dial is converted to a front angle includes:

[0012] Determine the original coordinates of all corner points of the target image, and determine the expected coordinates of all corner points of the target image after correction according to either the length or the width of the target image;

[0013] A flip model is established by mathematical modeling, and a flip variable is calculated based on the original coordinates, the expected coordinates and the flip model;

[0014] The target image is corrected according to the flip variable so that the dial in the target image is converted to a front angle.

[0015] Optionally, identifying a pointer on the dial, a plurality of scale lines adjacent to a position pointed by the pointer, and corresponding readings, comprises:

[0016] Obtaining the edge of the dial and determining the center position of the dial;

[0017] Identifying a pointer in the dial according to the pointer outline and determining the position pointed by the pointer;

[0018] Detecting the scale lines in the dial, and selecting a plurality of scale lines adjacent to the position pointed by the pointer as key scale lines according to a first threshold;

[0019] Identify the readings corresponding to each key scale mark.

[0020] Optionally, a relation array is constructed based on the angles of each scale line and the corresponding readings, including:

[0021] Determine the interval angle based on the center position of the dial and all key scale lines; the key scale lines include: a plurality of scale lines adjacent to the position pointed by the pointer;

[0022] According to the interval angle, determine the angle value corresponding to each key scale line;

[0023] Construct a relational array based on the readings and angle values ​​corresponding to each key scale line.

[0024] Optionally, determining the reading of the target meter based on the relationship array includes:

[0025] Obtaining a first reading corresponding to two adjacent scale lines of the pointer, and a second reading corresponding to two next adjacent scale lines;

[0026] Determine a first angle between the two adjacent scale lines, and a second angle between the two next adjacent scale lines;

[0027] Determine a first ratio of the angle corresponding to the position pointed by the pointer in the first angle, and calculate a first target reading based on the first ratio;

[0028] Determine a second proportion of the angle corresponding to the position pointed by the pointer in the second angle, and calculate a second target reading based on the second proportion;

[0029] An average value of the first target reading and the second target reading is calculated as the reading of the target meter.

[0030] Optionally, determining the reading of the target meter based on the relationship array includes:

[0031] Perform curve fitting on the relationship array using the target polynomial to obtain a fitting expression;

[0032] Determine a third proportion of the angle corresponding to the position pointed by the pointer in the interval angle, and determine a third angle value according to the third proportion and the reading range of the interval angle;

[0033] Based on the fitting expression and the third angle value, a third target reading corresponding to the position pointed by the pointer is determined as the reading of the target meter.

[0034] Optionally, extracting a target image of a target meter from the original image includes:

[0035] Detecting the original image to obtain the bounding boxes of all target meters in the original image;

[0036] Based on the bounding box of each target meter, a corresponding area image is extracted as a target image;

[0037] Preprocess each target image, including: noise removal, grayscale and binarization.

[0038] According to a second aspect of an embodiment of the present application, a pointer-type meter reading recognition device is provided, which is used to implement the steps in the method provided in the first aspect of an embodiment of the present application, and the device includes:

[0039] A preprocessing module is configured to extract a target image of a target meter from an original image; the target image is an image generated based on an outer contour of the target meter;

[0040] A first detection module is configured to detect whether the dial in the target image is a perfect circle;

[0041] An image correction module is configured to correct the target image if the dial in the target image is not a perfect circle, so as to convert the dial into a front angle;

[0042] A second detection module is configured to identify a pointer in the dial, a plurality of scale lines adjacent to a position pointed by the pointer, and corresponding readings when the dial in the target image is a perfect circle;

[0043] The reading module is configured to construct a relationship array based on the angles of each scale line and the corresponding readings, and determine the reading of the target meter based on the relationship array.

[0044] According to a third aspect of an embodiment of the present application, a pointer-type meter reading recognition system is provided, comprising:

[0045] At least one acquisition device, used for acquiring an original image; the original image includes at least one target meter photographed at an oblique angle;

[0046] A second aspect of an embodiment of the present application provides a device for obtaining readings of each target meter;

[0047] Display device, used to display the readings of each target meter.

[0048] According to a fourth aspect of an embodiment of the present application, a computer program product is provided, including a computer program, which, when executed by a processor, implements the steps in the method provided in the first aspect of the embodiment of the present application.

[0049] According to a fifth aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the method provided in the first aspect of the embodiment of the present application are implemented.

[0050] According to the sixth aspect of an embodiment of the present application, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the steps in the method provided in the first aspect of an embodiment of the present application are implemented.

[0051] The pointer-type meter reading recognition method provided in the present application, after acquiring the original image containing the target meter (with irregular readings), identifies and extracts the target image of each target meter, detects the dial contour of the target meter, determines whether the dial is a perfect circle, and thus determines whether the target image is an image taken at a standard frontal angle. In the case where the dial is not a perfect circle, it is determined that the target image is not taken at a frontal angle, and then the target image is corrected so that the dial is converted to a frontal angle. Furthermore, the pointer and scale lines in the dial are detected, and the readings of the scale lines are identified. A relational array is constructed based on the scale lines and the corresponding readings, and automatic reading of the mark is achieved based on the relational array.

[0052] The method provided in the present application pre-corrects the target image taken at a non-frontal angle so that the dial is turned to a frontal angle, which facilitates the subsequent identification and positioning of the position of the pointer and scale lines in the dial, thereby improving the accuracy of reading identification of pointer-type meters taken at non-frontal angles. In addition, the present solution constructs a relationship array based on the information of the scale lines in a small range near the pointer, without considering the readings and angles of other interval areas in the dial. Since the readings in a small range of each interval in the dial of an irregular meter vary uniformly, constructing a relationship array for the scale line information in a small range near the pointer can reduce the error in reading identification and achieve accurate reading of irregular meters. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0054] Figure 1 is a flow chart of a method for identifying pointer-type meter readings proposed in one embodiment of the present application;

[0055] Figure 2 is a flow chart of reading a pointer-type meter in one embodiment of the present application;

[0056] Figure 3 It is a partial schematic diagram of the dial of an irregular scale pointer type meter in one embodiment of the present application;

[0057] Figure 4 It is a schematic diagram of a pointer-type meter reading identification device proposed in an embodiment of the present application;

[0058] Figure 5 It is a schematic diagram of an electronic device proposed in an embodiment of the present application. DETAILED DESCRIPTION

[0059] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0060] It should be understood that the references to "one embodiment" or "an embodiment" throughout the specification mean that the specific features, structures, or characteristics associated with the embodiment are included in at least one embodiment of the present application. Therefore, the references to "in one embodiment" or "in an embodiment" appearing throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

[0061] In the various embodiments of the present application, it should be understood that the size of the serial numbers of the following processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0062] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects as detailed in the present application.

[0063] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application may be combined with each other.

[0064] The traditional meter recognition method is to simply estimate the proportion of the sector angle of the pointer's position in the overall range of the dial based on the sector angle of the pointer's position, thereby calculating the pointer's reading. This method is only applicable to meters with uniform scale readings. For meters with irregular scales, the reading intervals of each scale interval are not equal, so there is a large error between the reading obtained using the traditional recognition method and the actual reading. Secondly, the image acquisition device is usually a camera set at a fixed position or a mobile inspection robot, which uniformly shoots multiple meters in the scene. The images it captures contain some meters shot at non-frontal angles, which further increases the difficulty of meter reading.

[0065] In this embodiment, the original image collected by the device is processed to extract the target image corresponding to a single meter, and the dial is converted to a front angle through image correction to facilitate the recognition of the meter reading, and the correct reading of irregular scale meters is achieved by constructing a relational array.

[0066] The present application will be described in detail below with reference to the accompanying drawings and in combination with embodiments.

[0067] Figure 1 1 is a flow chart of a method for identifying pointer-type meter readings proposed in one embodiment of the present application. Figure 1 As shown, the method includes:

[0068] S1: extracting a target image of a target meter from an original image; the target image is an image generated based on the outer contour of the target meter;

[0069] S2: Detecting whether the dial in the target image is a perfect circle; if the dial in the target image is not a perfect circle, correcting the target image so that the dial is converted to a front angle;

[0070] S3: When the dial in the target image is a perfect circle, identifying a pointer in the dial, a plurality of scale lines adjacent to the position pointed by the pointer, and corresponding readings;

[0071] S4: constructing a relation array based on the angles of each scale line and the corresponding readings, and determining the reading of the target meter based on the relation array.

[0072] In this embodiment, a plurality of meters in a scene are photographed simultaneously by a collection device (such as a camera or a patrol robot) to obtain an original image. The collection device may be a fixed camera or a mobile patrol robot, which obtains images of a plurality of meters at one time by snapping. First, the original image is detected to obtain the positions of all meters therein, and a detection frame is generated, and then the target image of each meter is extracted according to the detection frame. The meter reading recognition method provided in the present application is also applicable to the reading recognition of pointer-type meters with irregular scales or uniform scales. The target meter may be a pointer-type meter with irregular scales or a pointer-type meter with uniform scales. According to the dial in the target image, it is detected to determine whether the dial is a perfect circle, and then determine whether the dial is a standard front angle. If the dial is not a perfect circle, it means that the dial is not a front angle. Therefore, the target image is corrected to convert the dial to a front angle. Further, the pointer and scale lines in the dial are identified to obtain the reading on the dial. The angles of each scale line are detected, and a relation array is constructed in combination with the corresponding readings. The reading corresponding to the position pointed to by the pointer is determined based on the relation array, that is, the reading of the target meter is determined.

[0073] In this embodiment, the target image of the target meter is corrected and the dial in the image is converted to a front angle to improve the accuracy of subsequent identification and positioning of the scale lines and pointers, thereby improving the accuracy of reading identification of pointer-type meters photographed at non-front angles. Multiple scale lines adjacent to the position pointed by the pointer are obtained and a relationship array is constructed, and then, based on the relationship array, the accurate reading of the position pointed by the pointer is determined.

[0074] Compared with the traditional method of estimating the reading based on the sector angle occupied by the pointer in the overall range, this solution only establishes a relationship array for the measured angles and readings corresponding to multiple scale lines in a small range near the pointer, without considering the scale line information in other interval areas. Since the readings in a small range of each interval in the dial of an irregular meter change evenly, establishing a relationship array for a small range near the pointer can reduce the reading error and achieve accurate reading of irregular meters.

[0075] As an implementation manner of the present application, extracting a target image of a target meter from an original image includes:

[0076] Detecting the original image to obtain the bounding boxes of all target meters in the original image;

[0077] Based on the bounding box of each target meter, a corresponding area image is extracted as a target image;

[0078] Preprocess each target image, including: noise removal, grayscale and binarization.

[0079] In one embodiment, before extracting the target image, the original image is first detected to identify all target meters in the image and generate a bounding box (detection box) for each target meter. Based on the bounding box, the corresponding area image is extracted as the target image. Since the deployment position and orientation of each dial in the scene are different, each target meter is separated from the original image to form a target image, so as to facilitate the subsequent correction of the target image according to the actual tilt angle of each meter and convert the dial into an image with a standard front angle.

[0080] In addition, due to the environmental factors (such as outdoor and low light) of the original image shooting, the extracted target image needs to be preprocessed to make the image clear and readable, so as to improve the accuracy of meter recognition. Specifically, the target image is preprocessed, including:

[0081] Process blurry and noisy low-quality images, remove noise data from the image, and improve contrast and clarity through sharpening and other methods;

[0082] The target image is gray-scaled and binarized to remove data irrelevant to reading recognition (such as color data), reduce the amount of calculation required to detect and locate the pointer and scale on the dial, and improve recognition efficiency.

[0083] Figure 2 This is a flow chart of reading a pointer type meter in one embodiment of the present application. Figure 2As shown, the target image is extracted from the original image, and the target image is used for detection after preprocessing. During the detection process, it is first determined whether the dial is at a standard front angle. Specifically, the dial of the meter photographed at a front angle is a perfect circle. Therefore, in this embodiment, the outer contour of the dial is determined by edge detection and a detection frame is generated, and the ellipticity of the dial is calculated according to the length and width of the detection frame. Then, the ellipticity threshold is used to determine whether the dial in the target image is a perfect circle. If the dial is not a perfect circle, it means that the dial is photographed at an inclined angle. Therefore, the target image is further corrected to convert the dial into a perfect circle, and then the scale lines and pointer positioning of the dial are realized under the front shooting angle. The reading on the dial is identified based on the position of the scale lines, and a relationship array is constructed according to the reading and angle of the scale lines. Then, the reading corresponding to the position pointed by the pointer is determined according to the relationship array, that is, the meter reading.

[0084] As an implementation manner of the present application, correcting the target image so that the dial is converted to a front angle includes:

[0085] Determine the original coordinates of all corner points of the target image, and determine the expected coordinates of all corner points of the target image after correction according to either the length or the width of the target image;

[0086] A flip model is established by mathematical modeling, and a flip variable is calculated based on the original coordinates, the expected coordinates and the flip model;

[0087] The target image is corrected according to the flip variable so that the dial in the target image is converted to a front angle.

[0088] In one embodiment, a YOLO (You Only Look Once, a real-time object detection algorithm) model is used to detect the target image, obtain the outer frame of the dial, and determine whether the dial is a perfect circle by calculating the ellipticity, that is, whether the dial is a standard front angle. For dials that are not perfect circles, mathematical modeling is used to correct the target image so that the dial is converted to a front angle.

[0089] In this embodiment, the target image is a square image generated based on the outer contour of the dial of the target meter. The target image is corrected in the following specific steps:

[0090] (1) Determine the original coordinates of the four corner points of the target image;

[0091] (2) Based on the original coordinates, the larger of the length and width of the target image is determined as a reference, and the expected coordinates of the four corner points of the corrected target image are calculated;

[0092] (3) Using mathematical modeling, a flip model is constructed based on all corner points of the target image to obtain a flip matrix;

[0093] (4) Based on the flip matrix, the original coordinates of all corner points and the expected coordinates, the flip variable is calculated. Specifically, the flip variable H = {h1, h2, h3, h4, h5, h6, h7, h8} satisfies the following expression:

[0094]

[0095] Among them, (x1, y1), (x2, y2), (x3, y3), and (x4, y4) are the original coordinates of the four corner points; (x′1, y′1), (x′2, y′2), (x′3, y′3), and (x′4, y′4) are the expected coordinates of the four corner points.

[0096] (5) After the flipping variables are calculated, the target image is corrected according to the flipping variables so that the dial is converted to a standard front angle, which facilitates the subsequent accurate identification of the position and angle of the pointer and scale lines.

[0097] As an implementation manner of the present application, identifying a pointer on the dial, a plurality of scale lines adjacent to a position pointed by the pointer, and corresponding readings, includes:

[0098] Obtaining the edge of the dial and determining the center position of the dial;

[0099] Identifying a pointer in the dial according to the pointer outline and determining the position pointed by the pointer;

[0100] Detecting the scale lines in the dial, and selecting a plurality of scale lines adjacent to the position pointed by the pointer as key scale lines according to a first threshold;

[0101] Identify the readings corresponding to each key scale mark.

[0102] In this embodiment, an edge detection method is used to identify the boundary of the meter in the image, and the edge is located by detecting the change in image intensity, and the meter edge and center position information is extracted. Then, the Hough line transform algorithm is used to detect the pointer outline through pointer shape analysis or template matching, and the slender shape and tip features are extracted to determine the position of the pointer. Specifically, before using the template matching method, images of different pointer shapes are needed as training data to train the matching model. For example, a CNN (Convolutional Neural Network) model or a YOLO model. The trained matching model searches for the area in the target image that is most similar to the known template, and performs feature detection (for example: feature point detection) based on this area to determine the pointer position and pointing direction.

[0103] Further, the straight line in the dial is determined by the scale positioning, and the scale lines are screened out by comparing with the scale length threshold. In this embodiment, the pointer reading is performed according to the adjacent scale lines of the pointer pointing position, so the scale lines are also screened according to the first threshold, and only multiple scale lines adjacent to the pointer pointing position are recorded as key scale lines. Finally, the readings corresponding to the pointer adjacent scale lines are identified by the OCR (Optical Character Recognition) algorithm.

[0104] Figure 3 FIG. 1 is a partial schematic diagram of a dial of an irregular scale pointer type meter in one embodiment of the present application. Figure 3 As shown in FIG. 1 , after identifying the pointer and the position it points to on the dial, the position of the scale lines on the dial is determined and the outline of the scale lines is depicted. A plurality of scale lines (including scale lines with readings and scale lines without readings) adjacent to the pointer position are screened out through a first threshold as key scale lines. The readings corresponding to the scale lines with readings adjacent to the pointer are identified (such as Figure 3 (medium 150, 200).

[0105] As an implementation mode of the present application, a relation array is constructed based on the angles of each scale line and the corresponding readings, including:

[0106] Determine the interval angle based on the center position of the dial and all key scale lines; the key scale lines include: a plurality of scale lines adjacent to the position pointed by the pointer;

[0107] According to the interval angle, determine the angle value corresponding to each key scale line;

[0108] Construct a relational array based on the readings and angle values ​​corresponding to each key scale line.

[0109] In the above embodiment, the interval angle is determined based on the positions of the multiple key scale lines that have been screened out and the positions of the center of the circle. Specifically, the interval is determined based on the two scale lines with readings adjacent to the pointer, the minimum reading (for example, 150) and the maximum reading (for example, 200) of the interval are read, and the angle between the scale line corresponding to the minimum value and the scale line corresponding to the maximum value is used as the interval angle, and the angle of the interval angle is detected (for example, 60°). A mapping pair is generated based on the readings and angles corresponding to the minimum and maximum values ​​of the interval, and an initial relationship array is constructed. Let the angle of the first mapping pair in the relationship array be 0°. For example, Figure 3 The initial relationship array constructed based on the interval [150, 200] is: {(0°, 150), (60°, 200)}.

[0110] In view of the fact that the range in the area between each scale line with readings in the irregular scale meter changes uniformly, this embodiment interpolates the interval by uniform subdivision. Specifically, multiple key points are determined in the interval and the corresponding readings are calculated. The angle value corresponding to each key point is detected, and a new mapping pair is formed with the corresponding reading and added to the relationship array to obtain a complete relationship array. When interpolating, the key point is first selected in the interval according to the preset subdivision number. For example, when the subdivision number is 2, the midpoint on the arc enclosed by the interval is selected as the key point.

[0111] Alternatively, the adjacent scale line with the reading in the meter (such as Figure 3 There are multiple unread scale lines between the long scale lines in Figure 3 Therefore, the positions of all scale lines without readings are determined as key points, the readings corresponding to each scale line without readings are calculated based on the reading range of the interval, and the actual angle value of each scale line without readings is detected.

[0112] like Figure 3 As shown, there are 9 scale lines without readings in the interval [150,200]. The positions of these 9 scale lines without readings are determined as key points, that is, the interval is evenly divided into 10 small intervals, and the reading increment of each small interval is calculated to be 5. The angle value of each scale line without readings is detected, and a mapping pair is formed with the calculated reading, and the mapping pair is added to the relationship array. The final relationship array is shown in Table 1 below.

[0113] Table 1

[0114] Angle (measured) reading 0 150 6 155 12 160 18 165 23 170 29 175 37 180 42 185 48 190 54 195 60 200

[0115] As an implementation manner of the present application, determining the reading of the target meter based on the relationship array includes:

[0116] Obtaining a first reading corresponding to two adjacent scale lines of the pointer, and a second reading corresponding to two next adjacent scale lines;

[0117] Determine a first angle between the two adjacent scale lines, and a second angle between the two next adjacent scale lines;

[0118] Determine a first ratio of the angle corresponding to the position pointed by the pointer in the first angle, and calculate a first target reading based on the first ratio;

[0119] Determine a second proportion of the angle corresponding to the position pointed by the pointer in the second angle, and calculate a second target reading based on the second proportion;

[0120] An average value of the first target reading and the second target reading is calculated as the reading of the target meter.

[0121] In one embodiment, the reading of the target meter is determined by angle estimation. Considering that the target image has been corrected, pixel offset (such as scale line pixel offset) may occur during the image correction process, resulting in the introduction of new errors and causing the meter reading accuracy to decrease. In this case, the reading corresponding to the pointer determined based on a single scale range is not accurate enough. In order to improve the accuracy of the meter reading, the reading corresponding to the pointer is determined based on two different reading ranges in this embodiment, thereby improving the error caused by the scale line pixel offset and improving the accuracy of the meter reading.

[0122] A first reading range formed by adjacent scale lines of the pointer and a second reading range formed by next adjacent scale lines are obtained, and an accurate reading of the position pointed by the pointer is calculated based on the two reading ranges.

[0123] Specifically, the first readings corresponding to two adjacent scale lines of the pointer are determined from the relationship array, and the corresponding first reading interval value (i.e., the reading difference between the two adjacent scale lines) and the first angle formed by the two adjacent scale lines are calculated. The second readings corresponding to the two sub-adjacent scale lines of the pointer are determined from the relationship array, and the corresponding second reading interval value (i.e., the reading difference between the two sub-adjacent scale lines) and the second angle between the two sub-adjacent scale lines are calculated. Based on the first angle and the second angle, the proportion of the angle corresponding to the position pointed by the pointer in the angle is estimated respectively, and the first proportion and the second proportion are obtained. Then the first target reading and the second target reading are calculated:

[0124] First target reading = first reading interval value × first proportion + starting value of first reading range;

[0125] The second target reading=the second reading interval value×the second proportion+the starting value of the second reading range.

[0126] Furthermore, the average of the first target reading and the second target reading is calculated as the reading of the position pointed by the pointer (ie, the reading of the target meter).

[0127] like Figure 3 As shown, according to the relationship array, the two adjacent scale lines of the pointer are determined, and the first reading range [175, 180] is determined, and the corresponding first angle is 8°. The two next adjacent scale lines of the pointer are determined, and the second reading range [170, 185] is obtained, and the corresponding second angle is 19°. According to the proportion of the angle corresponding to the position pointed by the pointer in the first angle and the second angle, the two target readings are calculated to be 178 and 177 respectively. Further, the average of the two target readings is calculated as the reading of the position pointed by the pointer, that is, the reading of the target meter is 177.5.

[0128] As an implementation manner of the present application, determining the reading of the target meter based on the relationship array includes:

[0129] Perform curve fitting on the relationship array using the target polynomial to obtain a fitting expression;

[0130] Determine a third proportion of the angle corresponding to the position pointed by the pointer in the interval angle, and determine a third angle value according to the third proportion and the reading range of the interval angle;

[0131] Based on the fitting expression and the third angle value, a third target reading corresponding to the position pointed by the pointer is determined as the reading of the target meter.

[0132] In one embodiment, a curve fitting method is used to determine the reading of the target meter. In this embodiment, all mapping pairs in the relationship array are obtained, and a polynomial is used to perform curve fitting.

[0133] In the initial stage, a quadratic polynomial is used as the target polynomial. The target polynomial is used to perform curve fitting on the relational array to determine the parameters of the polynomial. The error value is calculated after each fitting is completed. When the error value is greater than the error threshold, the number of terms of the target polynomial is increased and refitted to finally obtain the fitting expression after the fitting is completed.

[0134] The third proportion of the angle corresponding to the position pointed by the pointer in the interval angle is detected, and the corresponding third angle value is further determined. The reading corresponding to the third angle value is calculated according to the fitting expression, which is the reading of the target meter.

[0135] In this embodiment, the relationship between the reading and the angle of the interval formed by the scale lines with readings adjacent to the pointer is fitted into a function curve, so that any angle in the interval can find a unique and determined reading on the function curve. Therefore, according to the angle corresponding to the position pointed by the pointer and the target fitting expression, a higher precision reading (for example: 177.426) can be read.

[0136] Based on the same inventive concept, an embodiment of the present application provides a pointer-type meter reading recognition device. Figure 4 , Figure 4 FIG. 1 is a schematic diagram of a pointer-type meter reading recognition device 100 proposed in one embodiment of the present application. Figure 4 As shown, the device comprises:

[0137] The preprocessing module 101 is configured to extract a target image of a target meter from an original image; the target image is an image generated based on an outer contour of the target meter;

[0138] The first detection module 102 is configured to detect whether the dial in the target image is a perfect circle;

[0139] The image correction module 103 is configured to correct the target image if the dial in the target image is not a perfect circle, so as to convert the dial into a front angle;

[0140] The second detection module 104 is configured to identify a pointer in the dial, a plurality of scale lines adjacent to a position pointed by the pointer, and corresponding readings when the dial in the target image is a perfect circle;

[0141] The reading module 105 is configured to construct a relationship array based on the angles of each scale line and the corresponding readings, and determine the reading of the target meter based on the relationship array.

[0142] As an implementation manner of the present application, the image correction module 103 is configured to correct the target image so that the dial is converted to a front angle, specifically including:

[0143] Determine the original coordinates of all corner points of the target image, and determine the expected coordinates of all corner points of the target image after correction according to either the length or the width of the target image;

[0144] A flip model is established by mathematical modeling, and a flip variable is calculated based on the original coordinates, the expected coordinates and the flip model;

[0145] The target image is corrected according to the flip variable so that the dial in the target image is converted to a front angle.

[0146] As an implementation manner of the present application, the second detection module 104 is configured to identify the pointer on the dial, a plurality of scale lines adjacent to the position pointed by the pointer, and corresponding readings, including:

[0147] Obtaining the edge of the dial and determining the center position of the dial;

[0148] Identifying a pointer in the dial according to the pointer outline and determining the position pointed by the pointer;

[0149] Detecting the scale lines in the dial, and selecting a plurality of scale lines adjacent to the position pointed by the pointer as key scale lines according to a first threshold;

[0150] Identify the readings corresponding to each key scale mark.

[0151] As an implementation of the present application, the reading module 105 is configured to construct a relationship array based on the angles of each scale line and the corresponding readings, specifically including:

[0152] Determine the interval angle based on the center position of the dial and all key scale lines; the key scale lines include: a plurality of scale lines adjacent to the position pointed by the pointer;

[0153] According to the interval angle, determine the angle value corresponding to each key scale line;

[0154] Construct a relational array based on the readings and angle values ​​corresponding to each key scale line.

[0155] As an implementation manner of the present application, the reading module 105 is configured to determine the reading of the target meter based on the relationship array, specifically including:

[0156] Obtaining a first reading corresponding to two adjacent scale lines of the pointer, and a second reading corresponding to two next adjacent scale lines;

[0157] Determine a first angle between the two adjacent scale lines, and a second angle between the two next adjacent scale lines;

[0158] Determine a first ratio of the angle corresponding to the position pointed by the pointer in the first angle, and calculate a first target reading based on the first ratio;

[0159] Determine a second proportion of the angle corresponding to the position pointed by the pointer in the second angle, and calculate a second target reading based on the second proportion;

[0160] An average value of the first target reading and the second target reading is calculated as the reading of the target meter.

[0161] As an implementation manner of the present application, the reading module 105 is configured to determine the reading of the target meter based on the relationship array, specifically including:

[0162] Perform curve fitting on the relationship array using the target polynomial to obtain a fitting expression;

[0163] Determine a third proportion of the angle corresponding to the position pointed by the pointer in the interval angle, and determine a third angle value according to the third proportion and the reading range of the interval angle;

[0164] Based on the fitting expression and the third angle value, a third target reading corresponding to the position pointed by the pointer is determined as the reading of the target meter.

[0165] As an implementation manner of the present application, the preprocessing module 101 is configured to extract a target image of a target meter from an original image, specifically including:

[0166] Detecting the original image to obtain the bounding boxes of all target meters in the original image;

[0167] Based on the bounding box of each target meter, a corresponding area image is extracted as a target image;

[0168] Preprocess each target image, including: noise removal, grayscale and binarization.

[0169] Based on the same inventive concept, an embodiment of the present application provides a pointer-type meter reading recognition system, comprising:

[0170] At least one acquisition device, used for acquiring an original image; the original image includes at least one target meter photographed at an oblique angle;

[0171] The pointer-type meter reading identification device provided in the above embodiment is used to obtain the reading of each target meter;

[0172] Display device, used to display the readings of each target meter.

[0173] Based on the same inventive concept, an embodiment of the present application provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the steps in the pointer meter reading recognition method described in any of the above embodiments of the present application are implemented.

[0174] Based on the same inventive concept, an embodiment of the present application provides a readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps in the pointer meter reading identification method described in any of the above embodiments of the present application are implemented.

[0175] Based on the same inventive concept, an embodiment of the present application provides an electronic device. Figure 5 is a schematic diagram of an electronic device proposed in one embodiment of the present application. Figure 5 The electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the steps in the pointer-type meter reading identification method described in any of the above embodiments of the present application are implemented.

[0176] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0177] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.

[0178] For the method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the order of the actions described, because according to the present application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and components involved are not necessarily required by the present application.

[0179] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the embodiments of 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.

[0180] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, terminal 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 terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal 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.

[0181] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including 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.

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

[0183] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they are aware of the basic creative concepts. Therefore, the present application is interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.

[0184] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0185] The pointer meter reading recognition method, device, system and product provided by the present application are introduced in detail above. The principles and implementation methods of the present application are explained in this article using specific examples. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A method for identifying readings of a pointer type meter, characterized in that: include: Extracting a target image of a target meter from an original image; The target image is an image generated based on the outer contour of the target meter; Detecting whether the dial in the target image is a perfect circle; if the dial in the target image is not a perfect circle, correcting the target image so that the dial is converted to a front angle; In the case where the dial in the target image is a perfect circle, identifying a pointer in the dial, a plurality of scale lines adjacent to a position pointed by the pointer, and corresponding readings; A relation array is constructed based on the angles of each scale line and the corresponding readings, and the reading of the target meter is determined based on the relation array.

2. The method for identifying pointer-type meter readings according to claim 1, characterized in that: Correcting the target image so that the dial is converted to a front angle includes: Determine the original coordinates of all corner points of the target image, and determine the expected coordinates of all corner points of the target image after correction according to either the length or the width of the target image; A flip model is established by mathematical modeling, and a flip variable is calculated based on the original coordinates, the expected coordinates and the flip model; The target image is corrected according to the flip variable so that the dial in the target image is converted to a front angle.

3. The method for identifying pointer-type meter readings according to claim 1, characterized in that: Identifying a pointer on the dial, a plurality of scale lines adjacent to a position pointed by the pointer, and corresponding readings, including: Obtaining the edge of the dial and determining the center position of the dial; Identifying a pointer in the dial according to the pointer outline and determining the position pointed by the pointer; Detecting the scale lines in the dial, and selecting a plurality of scale lines adjacent to the position pointed by the pointer as key scale lines according to a first threshold; Identify the readings corresponding to each key scale mark.

4. The method for identifying pointer-type meter readings according to claim 1, characterized in that: Construct a relational array based on the angles of each scale line and the corresponding readings, including: Determine the interval angle based on the center position of the dial and all key scale lines; the key scale lines include: a plurality of scale lines adjacent to the position pointed by the pointer; According to the interval angle, determine the angle value corresponding to each key scale line; Construct a relational array based on the readings and angle values ​​corresponding to each key scale line.

5. The method for identifying pointer-type meter readings according to claim 4, characterized in that: Determining the reading of the target meter based on the relationship array includes: Obtaining a first reading corresponding to two adjacent scale lines of the pointer, and a second reading corresponding to two next adjacent scale lines; Determine a first angle between the two adjacent scale lines, and a second angle between the two next adjacent scale lines; Determine a first ratio of the angle corresponding to the position pointed by the pointer in the first angle, and calculate a first target reading based on the first ratio; Determine a second proportion of the angle corresponding to the position pointed by the pointer in the second angle, and calculate a second target reading based on the second proportion; An average value of the first target reading and the second target reading is calculated as the reading of the target meter.

6. The method for identifying pointer-type meter readings according to claim 4, characterized in that: Determining the reading of the target meter based on the relationship array includes: Perform curve fitting on the relation array using the target polynomial to obtain a fitting expression; Determine a third proportion of the angle corresponding to the position pointed by the pointer in the interval angle, and determine a third angle value according to the third proportion and the reading range of the interval angle; Based on the fitting expression and the third angle value, a third target reading corresponding to the position pointed by the pointer is determined as the reading of the target meter.

7. The method for identifying pointer-type meter readings according to claim 1, characterized in that: Extracting a target image of a target meter from an original image includes: Detecting the original image to obtain the bounding boxes of all target meters in the original image; Based on the bounding box of each target meter, a corresponding area image is extracted as a target image; Preprocess each target image, including: noise removal, grayscale and binarization.

8. A pointer-type meter reading recognition device, used to implement the method according to any one of claims 1 to 7, comprising: A preprocessing module is configured to extract a target image of a target meter from an original image; The target image is an image generated based on the outer contour of the target meter; A first detection module is configured to detect whether the dial in the target image is a perfect circle; An image correction module is configured to correct the target image if the dial in the target image is not a perfect circle, so as to convert the dial into a front angle; A second detection module is configured to identify a pointer in the dial, a plurality of scale lines adjacent to a position pointed by the pointer, and corresponding readings when the dial in the target image is a perfect circle; The reading module is configured to construct a relationship array based on the angles of each scale line and the corresponding readings, and determine the reading of the target meter based on the relationship array.

9. A pointer type meter reading recognition system, comprising: At least one acquisition device, used for acquiring an original image; the original image includes at least one target meter photographed at an oblique angle; The apparatus of claim 8, for obtaining readings of each target meter; Display device, used to display the readings of each target meter.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

11. A 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 the method according to any one of claims 1 to 7 are implemented.

12. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Visual monitoring system and method for component perpendicularity based on plumb line

    CN120333348A

  • A plumb line-based component perpendicularity visual monitoring system and method

    CN120333348B