A method for reading a pointer water meter
By identifying the positional relationship of the sub-dials of the water meter and performing perspective transformation, combined with a neural network model and historical water usage data, the problems of large computational load and large error in pointer-type water meter recognition are solved, achieving efficient and accurate water meter reading recognition.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-23
- Publication Date
- 2026-03-03
Smart Images

Figure CN115496893B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of instrument reading recognition, specifically to a method for recognizing the readings of a pointer-type water meter. Background Technology
[0002] With the advent of the 5G era, smart supermarkets, smart parking lots, and smart water systems are developing rapidly. However, in the field of smart water systems, the traditional manual method of reading pointer-type water meters is still in use. This method cannot guarantee real-time performance and often results in incorrect or missed readings. Smart water systems have extremely stringent requirements for the real-time accuracy of water usage data. The method of meter readers visiting homes to read meters is no longer sufficient. Users now read their meters themselves, take photos, and upload them. The system then requires manual review of the photographed images by the backend. However, regardless of the method used for meter reading, errors are unavoidable. Due to these errors, especially large ones, improper handling can lead to serious economic losses.
[0003] Currently, the common processing method for pointer-type mechanical water meters mostly adopts feature matching algorithms. This involves matching feature points from the image of the water meter to be read with feature points from a template image. To automatically locate the water meter dial, clustering algorithms are used to classify the feature points, and then a pointer model is used to identify the sub-dial pointers in the image to be read. Since water meters have multiple sub-dials with different digits, it is necessary to determine the corresponding positional relationship between the image and each sub-dial in the actual water meter when identifying the readings from the image, in order to determine the number of digits to be calculated for each sub-dial reading. The area occupied by the water meter dial in the entire image is variable during the shooting process, and the feature matching algorithm has a relatively weak feature extraction capability, making it difficult to obtain good results. If additional image feature extraction and recognition are introduced to identify the corresponding position and number of digits of each sub-dial, it will not only increase the probability of image recognition errors but also increase the computational load.
[0004] For example, Chinese patent application CN201711443684.2 discloses a water meter reading method and system. The method includes: a water meter monitoring device uploading a first water meter image to a server; the server obtaining pointer position information and rotation angle of the first water meter image; sending the pointer position information of the first water meter image to the water meter monitoring device; the water meter monitoring device performing image recognition on an i-th water meter image to obtain pointer position information in the i-th water meter image; obtaining pointer position change information of the i-th water meter image relative to the first water meter image; sending the pointer position change information to the server; and the server obtaining the readings corresponding to each pointer in the i-th water meter image based on the rotation angle and pointer position change information of the first water meter image. Since the water meter has multiple sub-dials with different digits, it is necessary to determine the number of digits in each sub-dial when reading the image. In this scheme, a water meter image at a preset reference position is constructed, and the pre-determined dial angle markers in the water meter image to be processed are identified and compared with the coordinates and shape data of the dial angle markers in the water meter image at the preset reference position to obtain the rotation angle of the water meter image to be processed. The rotation angle of the dial angle markers is then obtained. Based on the rotation angle, the corresponding sub-dials and their values for the units, tens, hundreds, and thousands digits of the water meter are determined. It is evident that, in order to achieve water meter reading recognition, this scheme not only needs to identify each sub-dial to read its value, but also needs to preset angle markers and compare them to determine the number of digits for each sub-dial. This increases the computational load of image processing, leading to time and potential hardware costs. Therefore, after identifying each sub-dial, it is of great significance to analyze and determine the correspondence between the original image and each sub-dial in the actual water meter, as well as the corresponding number of digits, by utilizing the inherent positional relationship of each sub-dial in the actual water meter, in order to reduce the computational workload. Summary of the Invention
[0005] To quickly and efficiently identify the correspondence between the original image of a pointer-type water meter and the sub-dials in the actual water meter, and to avoid introducing additional image feature recognition and computational load, this application provides a pointer-type water meter reading recognition method. Based on the identified sub-dials, this method analyzes the positional relationship of the sub-dials to determine the correspondence between the original image and the actual water meter. It then uses image correction to recognize the readings of each sub-dial, thereby reducing computational workload, saving time and improving image processing efficiency. Simultaneously, it avoids image recognition errors and recognition failure risks caused by excessive feature recognition.
[0006] The technical solution adopted by this application to solve its technical problem is: a method for identifying the reading of a pointer-type water meter, including the following steps:
[0007] S1. Acquire the original image of the water meter and identify the position of each sub-dial in the original image;
[0008] S2. Sort each sub-dial in the original water meter image according to its positional relationship in the actual water meter and establish a corresponding relationship;
[0009] S3. Perform perspective transformation on the original water meter image to obtain the corrected image;
[0010] S4. Identify the readings of each sub-dial in the calibration image and calculate the water meter reading.
[0011] In one specific implementation, step S2 includes the following steps:
[0012] S201. Select markers on the original image to determine the position of each identified sub-dial, and establish at least one reference point and at least one reference axis on the original image.
[0013] S202. According to the positional relationship of the labels of each sub-dial relative to the reference number axis, and sort them according to their coordinate values in the reference number axis, establish the relative sorting of the labels of each sub-dial.
[0014] S203. Based on relative sorting, calculate the angle between the line connecting the identifier and reference point of each adjacent sub-dial in the original image;
[0015] S204. Based on the positional relationship of each sub-dial in the actual meter, determine the sub-dial that constitutes the maximum angle in the original image and its correspondence in the actual water meter, thereby establishing the correspondence between each sub-dial in the original image and the actual water meter.
[0016] In one specific implementation, in step S201, the corresponding pixel coordinates (X, X, Y) of the identifier of each sub-dial on the original image are determined. child-Center-i Y child-Center-i The pixel coordinates (X) of the reference point basis Y basis It is composed of the average pixel coordinate values of each sub-dial:
[0017] Where i and n are the sub-dial number and quantity, respectively.
[0018] In one specific implementation, the reference axis passes through the pixel coordinates of the reference point and is parallel to one of the coordinate axes of the pixel coordinate system.
[0019] In one specific implementation, the method for calculating the angle α between the lines connecting the identifiers and reference points of adjacent sub-dials in the original image in step S203 is as follows:
[0020]
[0021] The pixel coordinates of the identifiers of adjacent sub-dials are respectively (X... child-Center-k1 Y child-Center-k1 ), (X child-Center-k2 Y child-Center-k2 The slopes of the lines connecting the labels and reference points of adjacent sub-dials are k1 and k2, respectively.
[0022] In one specific implementation, in step S3, a perspective transformation matrix is established by the geometric position parameters identified by the sub-dial and their corresponding pixel coordinates in the original image, and the original image is mapped through the perspective transformation matrix to obtain the corrected image.
[0023] In one specific implementation, in step S1, the sub-dials are classified to obtain a sub-dial positioning dataset. Then, a first deep neural network model trained on the sub-dial positioning dataset is used to identify and locate each sub-dial in the original image.
[0024] In one specific implementation, in step S4, the sub-dial readings are classified to obtain a sub-dial reading dataset, and a second deep neural network model trained on the sub-dial reading dataset is used to identify the sub-dial readings in the correction image.
[0025] In one specific implementation, during step S4, when recognizing the readings of the sub-dial in the calibrated image:
[0026] When the pointer of the last digit of the sub-dial is indistinguishable between two adjacent scale values, the larger reading represented by those two adjacent scale values is selected.
[0027] When the pointer of a sub-dial that is not the last digit is indistinguishable between two adjacent scale values, if the pointer of the next digit is in the first half of the range, the reading represented by the scale value in the increasing direction of the count is selected; if the pointer of the next digit is in the second half of the range, the reading represented by the scale value in the decreasing direction of the count is selected.
[0028] In one specific implementation, the pointer-type water meter reading identification method further includes judging the reasonableness of the water meter reading: the monthly water consumption m calculated from the water meter reading in step S4 is compared with the average water consumption M of the previous k months. If the absolute value of mM is not greater than the error λE, the water meter reading is judged to be reasonable, wherein:
[0029] k is the number of historical reference months selected as needed, m jLet λ represent the water consumption in the j-th month out of k months, and λ be the correction coefficient set based on the reasonableness of water meter readings in actual application to account for missed and incorrect judgments.
[0030] The advantages of the embodiments of this application are:
[0031] 1. The pointer-type water meter reading recognition method utilizes the positional relationship of each sub-dials in the actual water meter. By constructing a geometric analysis model of each sub-dial identified in the original image, the correspondence between each sub-dial in the original image and the actual water meter is determined, reducing the workload of calculation and avoiding image recognition errors and recognition failure risks caused by excessive feature recognition.
[0032] 2. The pointer-type water meter reading recognition method constructs a geometric analysis model for each sub-dial identified in the original image. It can set reference points and reference number axes for the sub-dial layout of different dials, establish the correspondence between each sub-dial in the original image and the actual water meter, realize the absolute order of each sub-dial relative to its position in the actual water meter, and thus expand the applicability of this method.
[0033] 3. The pointer-type water meter reading recognition method uses the geometric position parameters of the sub-dial and its pixel coordinates in the original image to construct a perspective transformation matrix, which can realize the orthographic projection of the original image to obtain a corrected image, thereby improving the accuracy of reading recognition of the sub-dial in the corrected image.
[0034] 4. The proposed method for identifying pointer-type water meter readings provides a solution when the pointers on the sub-dial are indistinguishable between two adjacent graduations. This facilitates the selection and processing during image recognition program execution, improving the efficiency and accuracy of water meter reading identification.
[0035] 5. The pointer-type water meter reading identification method introduces historical water consumption data analysis and compares it with the water consumption of the currently identified water meter reading to determine whether the error is within a reasonable range, thereby determining whether the water meter reading identification is reasonable and further improving the reliability of the water meter reading identification method. Attached Figure Description
[0036] Figure 1 This is a flowchart illustrating the process of a pointer-type water meter reading identification method according to this application;
[0037] Figure 2 This is a schematic diagram of the sorting process of the sub-dial of the pointer water meter in a pointer water meter identification and reading method of this application;
[0038] Figure 3 This is a schematic diagram of the original image correction process of a pointer-type water meter in the present application for identifying and reading water meters;
[0039] Figure 4This is a flowchart of the reading output process in a pointer-type water meter reading identification method according to this application;
[0040] Figure 5 This is a flowchart of a reasonable reading judgment method in a pointer-type water meter reading identification method of this application. Detailed Implementation
[0041] This application provides a pointer-type water meter reading recognition method that can identify each sub-dials of the water meter in the original image. By analyzing the positional relationship of the sub-dials, the correspondence between each sub-dial in the original image and the actual water meter is determined. Reading recognition of each sub-dial is performed by correcting the image, reducing computational workload, saving time, and improving image processing efficiency. It also avoids image recognition errors and recognition failure risks caused by excessive feature recognition. The overall approach is as follows:
[0042] Please see Figure 1 A method for identifying the reading of a pointer-type water meter, comprising the following steps:
[0043] S1. Acquire the original image of the water meter and identify the position of each sub-dial in the original image;
[0044] S2. Sort each sub-dial in the original water meter image according to its positional relationship in the actual water meter and establish a corresponding relationship;
[0045] S3. Perform perspective transformation on the original water meter image to obtain the corrected image;
[0046] S4. Identify the readings of each sub-dial in the calibration image and calculate the water meter reading.
[0047] This scheme identifies the position of each sub-dial in the original image and combines their actual positional relationship with their positional relationship in the original image to distinguish each sub-dial in the original image, thereby determining its corresponding number of digits. Furthermore, it uses the positional relationship of the sub-dial in different coordinate systems to perform perspective transformation on the original image to obtain an orthographically corrected image that is easy to recognize. The sub-dial readings in the corrected image are then identified, and finally the water meter reading is calculated.
[0048] In step S1, the sub-dials are classified to obtain a sub-dial location dataset. A first deep neural network model trained on this dataset is then used to identify and locate each sub-dial in the original image. Specifically, the dataset is created primarily to identify the location of each sub-dial in the water meter. For water meters with sub-dials sharing common shape features, all sub-dials are labeled into the same category, resulting in a sub-dial location dataset with only one category. Using the first deep neural network model trained on this dataset, bounding box regression is used to obtain more positive prediction boxes. The intersection-union loss function is used to make the predicted box width and height more consistent with the actual target location. A non-maximum suppression algorithm is then applied to traverse all target prediction boxes. The prediction box with the highest confidence level is the final prediction box returned to the original image, thus enabling the location and storage of relevant information for each sub-dial region on the pointer-type water meter in the original image.
[0049] In some embodiments, step S2 may specifically include the following sub-steps:
[0050] S201. Select markers on the original image to determine the position of each identified sub-dial, and establish at least one reference point and at least one reference axis on the original image.
[0051] S202. According to the positional relationship of the labels of each sub-dial relative to the reference number axis, and sort them according to their coordinate values in the reference number axis, establish the relative sorting of the labels of each sub-dial.
[0052] S203. Based on relative sorting, calculate the angle between the line connecting the identifier and reference point of each adjacent sub-dial in the original image;
[0053] S204. Based on the positional relationship of each sub-dial in the actual meter, determine the sub-dial that constitutes the maximum angle in the original image and its correspondence in the actual water meter, thereby establishing the correspondence between each sub-dial in the original image and the actual water meter.
[0054] Please see Figure 2Since each sub-dial region was identified using the first deep neural network model in step S1, in order to further construct a geometric model and perform related calculations, in step S201, markers are selected on the original image to determine the position of each identified sub-dial. For example, in this case, the water meter has 8 sub-dials, and the center of each sub-dial can be used as the marker. To achieve a correspondence between each sub-dial in the original image and its position in the actual water meter, the geometric analysis model can be further improved by establishing at least one reference point and at least one reference axis on the original image. The establishment of the reference point and reference axis can be based on the specific arrangement of the sub-dials of different water meters. For example, in this case, the 8 sub-dials are arranged around the water meter dial. Therefore, for ease of calculation, the pixel coordinates (X, X, Y) of the reference point are determined in the original image. basis Y basis The pixel coordinates (X) identified by each sub-dial child-Center-i Y child-Center-i The coordinates of the sub-dial markings are used to construct an angle analysis model for each sub-dial marking. Specifically:
[0055] Where i and n are the sub-dial number and quantity, respectively.
[0056] The reference axis is established based on the specific layout of the sub-dials of different water meters. Through the reference axis, different geometric positional relationships can be constructed between the sub-dial identifiers and the reference axis. Furthermore, the coordinates of the relevant sub-dial identifiers on the reference axis are used for sorting. In this example, eight sub-dials are arranged around the water meter. The reference axis can be chosen to pass through the pixel coordinates of a reference point and be parallel to one of the axes of the pixel coordinate system. For ease of calculation, preferably, the reference axis is chosen to be parallel to and in the same direction as the horizontal axis of the pixel coordinate system, with its origin located on the vertical axis of the pixel coordinate system. This ensures that the coordinates of the relevant sub-dial identifiers on the reference axis are the same as their coordinates on the horizontal axis of the pixel coordinate system. In addition, since the sub-dials are arranged in a ring in this example, the reference axis can be set up so that sub-dial identifiers are distributed on both sides, avoiding the situation where the identifiers of the sub-dials to be sorted have the same coordinates on the reference axis when sorting based on the position of the sub-dial identifiers relative to the reference axis, thus affecting the sorting process.
[0057] Specifically, in this example, when determining the positional relationship of each sub-dial's marker relative to the reference number axis in the original image, according to Y... child-Center-i and Y basis The value is divided into two parts, upper and lower, Y. child-Center-i Less than Y basis The pixel coordinates (X) of the sub-dial identifier child-Center-i Y child-Center-i Store in a List child-Center-top In, the corresponding X child-Center-iValues are stored in a list ListX child-Center-top The pixel coordinates of the sub-dial markers in the middle and lower parts are stored in a list. child-Center-bottom In, the corresponding X child-Center-i Values are stored in a list ListX child-Center-bottom In the middle, the list ListX child-Center-bottom ListX from largest to smallest child-Center-top By sorting from smallest to largest, the corresponding sub-dial labels can be ordered in a relative manner.
[0058] Based on the relative order of the markings on each sub-dial, a geometric analysis model is further constructed to calculate (X). basis Y basis ) and (X child-Center-i Y child-Center-i The slope of the connecting lines is calculated using the slopes of adjacent lines and the arctangent function, following the same angle calculation direction. The angle α between each adjacent line can be obtained as follows:
[0059]
[0060] The pixel coordinates of the identifiers of adjacent sub-dials are respectively (X... child-Center-k1 Y child-Center-k1 ), (X child-Center-k2 Y child-Center-k2 The slopes of the lines connecting the labels and reference points of adjacent sub-dials are k1 and k2, respectively.
[0061] The algorithm iterates through and calculates the angle α between the line connecting the pixel coordinates of each pair of adjacent sub-dial markers and the reference point. Based on the structural characteristics of the pointer-type water meter in this example and the constructed geometric model, the sub-dial that constitutes the maximum angle in the original image corresponds to the sub-dial with the maximum and minimum number of counting digits in the actual water meter. This allows for the absolute sorting of each sub-dial in the original image and establishes the correspondence between each sub-dial in the original image and the actual water meter, so as to facilitate reading recognition and calculation based on its corresponding number of counting digits.
[0062] Since the original images often have different shooting angles, which may cause difficulties or errors in image recognition, this example further performs perspective transformation on the original image to obtain the orthographic projection image of the water meter: In step S3, a perspective transformation matrix is established based on the geometric position parameters of the sub-dial markings and their corresponding pixel coordinates in the original image. The original image is then mapped through the perspective transformation matrix to obtain the corrected image. Specifically, the perspective transformation matrix M can be solved by using the geometric position coordinates of at least four sub-dial markings in the actual water meter, combined with their pixel coordinates in the original image. For example, in this example, the correspondence between each sub-dial in the original image and the actual water meter is established. The sub-dials in the original image are absolutely sorted, starting with the thousands sub-dial with the largest number of digits, and numbered sequentially in a clockwise direction. The corresponding markings A, D, C, and B of the 1st, 4th, 5th, and 8th sub-dials are selected. Based on their geometric coordinates in the coordinate system set in the actual water meter and their pixel coordinates in the original image, the corresponding perspective transformation matrix is obtained.
[0063]
[0064] (X, Y) represent the pixel coordinates of the original image, and (x = x′ / w′, y = y′ / w′) represent the pixel coordinates of the corrected image after transformation. The formula for the perspective transformation matrix is as follows:
[0065]
[0066] The original matrix is split into four lower-order matrices, namely:
[0067] This represents a linear transformation of the original image of the pointer-type water meter, which can perform operations such as rotation, scaling, and cropping.
[0068] T2 = [a 13 a 23 ] T It is used to generate perspective transformation of the original image of a pointer-type water meter.
[0069] T3 = [a 31 a 32 ] indicates the translation of the original image of the pointer-type water meter.
[0070] Based on this, the mathematical expression for the transformation relationship between corresponding points in the original image and the corrected image after perspective transformation of the pointer water meter is as follows:
[0071]
[0072]
[0073] After conversion, the result is as follows: Figure 3 The image shown is a calibrated pointer-type water meter image projected onto an orthographic projection.
[0074] In this example, since pointer-type water meters do not need to retain precision when reading sub-dial readings, only rounding is required, the pointer-type water meter dataset has ten categories for sub-dial readings: 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. Therefore, when recognizing sub-dial readings in the calibration image, the sub-dial readings can be categorized to create a dataset. The annotation principle used is that the category is the reading, resulting in a dataset of ten categories of sub-dial readings. A second deep neural network model trained on the sub-dial reading dataset is then used to recognize sub-dial readings in the calibration image. When identifying the readings of sub-dials in the calibration image, if the pointer of the last digit of the sub-dial is indistinguishable between two adjacent scale values, the larger reading represented by those two adjacent scale values is selected. If the pointer of a sub-dial that is not the last digit is indistinguishable between two adjacent scale values, and the pointer of the next digit is in the first half of the range, the reading represented by the scale value in the direction of increasing count is selected; if the pointer of the next digit is in the second half of the range, the reading represented by the scale value in the direction of decreasing count is selected.
[0075] In this example, the pointer water meter has 8 sub-dials (n sub-dials). The scale value of each sub-dial represents a reading that increases clockwise. The reference point coordinates (X...) are based on the obtained original image of the water meter dials. basis Y basis ) and the coordinates of the eight sub-dials (X) child-Center-i Y child-Center-i The original water meter image's eight sub-dials are sorted and numbered in the same direction, starting with the sub-dial representing the maximum range. The sorting order is based on the thousands, hundreds, tens, and units digits, from largest to smallest. The sub-dials of the pointer-type water meter are then output according to this positional order for sub-dial recognition. Based on this sorting and numbering, the reading rules for each sub-dial in the calibration image are as follows: Figure 4 As shown:
[0076] If the sub-dial number i is greater than the maximum number of sub-dials (8), then the reading recognition ends.
[0077] If sub-dial number i is not greater than 8, then check if i equals 8. If not, check if the pointer of the i-th sub-dial happens to point between the graduations of two adjacent readings (i.e., in this example, the middle of the sub-dial number), thus causing indistinguishability. If indistinguishable: if the (i+1)-th sub-dial pointer points to 0-5, select the larger reading to the right of the two adjacent readings; otherwise, select the smaller reading to the left of the two adjacent readings. If distinguishable, directly select the reading of the i-th sub-dial.
[0078] If sub-dial number i equals 8, it is necessary to determine whether the pointer of the i-th sub-dial happens to point to two indistinguishable readings. If they can be distinguished, the reading of the i-th sub-dial is directly selected; otherwise, the larger reading is selected.
[0079] Based on the above reading rules, the readings of each sub-dial can be identified one by one.
[0080] Furthermore, to verify the reasonableness of water meter readings, historical water usage data is analyzed to assess the reasonableness of pointer-type water meter readings for the current month, identifying data with significant errors. Please refer to [link / reference]. Figure 5 Before detecting the water meter image, the following operations are performed on the user's historical monthly water meter readings: The user's monthly water consumption over the past few years is obtained; inaccurate water consumption data is discarded; then, based on the accurate water consumption data, the average water consumption of the user is calculated. The monthly water consumption m is calculated using the water meter readings from step S4, where M is the average monthly water consumption of the previous k months. j Let be the water consumption in the j-th month out of the previous k months, and E be the monthly water consumption error over the previous k months. Then we get:
[0081]
[0082] Since reading errors are unavoidable, as long as the error is controlled within a certain range, the water meter reading for the current month is considered reasonable. If the absolute value of mM is not greater than the error λE, the water meter reading is judged to be reasonable. λ is a correction coefficient set according to the omission and misjudgment of the reasonableness of water meter readings in actual application. For example, in actual application, when the initial value of the correction coefficient is set to 1, if the omission rate of the reasonableness judgment of water meter readings is high, that is, if unreasonable water meter readings are judged to be reasonable, the correction coefficient can be corrected to a value greater than 1; if the misjudgment rate of the reasonableness judgment of water meter readings is high, that is, if reasonable water meter readings are judged to be unreasonable, the correction coefficient can be corrected to a value less than 1. If the absolute value of mM is less than or equal to the error value λE, it indicates that the water meter reading for that month is reasonable. The reading can be directly stored in the database and the result can be returned to the mobile phone or webpage as historical data for accurate water meter readings in subsequent months. If the absolute value of mM is greater than the error value λE, it indicates that the water meter reading for that month is unreasonable. The suspicious data is stored in an abnormal database. Then, the data records in the abnormal database are manually checked and the abnormal data is modified. After processing, the meter reader enters the reading into the system as historical data for accurate water meter readings in subsequent months and returns the result to the mobile phone or webpage.
[0083] In summary, this application provides a pointer-type water meter reading recognition method that can quickly and efficiently identify and confirm the correspondence between the original image of the pointer-type water meter and each sub-dials in the actual water meter, avoiding the introduction of additional image feature recognition and computational load. Based on the identified sub-dials, this application analyzes the positional relationship of the sub-dials to determine the correspondence between each sub-dial in the original image and the actual water meter, and performs reading recognition for each sub-dial by correcting the image. This reduces computational workload, saves time, improves image processing efficiency, and avoids image recognition errors and recognition failure risks caused by excessive feature recognition.
[0084] Finally, it should be noted that the above embodiments are merely examples for clearly illustrating this application and are not intended to limit the implementation. Those skilled in the art can make other variations or modifications based on the above description. It is neither necessary nor possible to exhaustively list all possible implementations here. However, obvious variations or modifications derived therefrom are still within the scope of protection of this application.
Claims
1. A method for recognizing the readings of a pointer-type water meter, characterized in that, Including the following steps: S1. Acquire the original image of the water meter and identify the position of each sub-dial in the original image; S2. Sort each sub-dial in the original water meter image according to its positional relationship in the actual water meter and establish a corresponding relationship; S3. Perform perspective transformation on the original water meter image to obtain the corrected image; S4. Identify the readings of each sub-dial in the calibration image and calculate the water meter reading; In step S4, the sub-dial readings are classified to obtain a sub-dial reading dataset. The second deep neural network model trained on the sub-dial reading dataset is used to identify the sub-dial readings in the correction image. In step S4, when recognizing the readings of the sub-dial in the calibrated image: When the pointer of the last digit of the sub-dial is indistinguishable between two adjacent scale values, the larger reading represented by those two adjacent scale values is selected. When the pointer of a sub-dial that is not the last digit is indistinguishable between two adjacent scale values, if the pointer of the next digit is in the first half of the range, the reading represented by the scale value in the direction of increasing count is selected from the two adjacent scale values; if the pointer of the next digit is in the second half of the range, the reading represented by the scale value in the direction of decreasing count is selected from the two adjacent scale values. Step S2 includes the following steps: S201. Select markers on the original image to determine the position of each identified sub-dial, and establish at least one reference point and at least one reference axis on the original image. S202. According to the positional relationship of the labels of each sub-dial relative to the reference number axis, and sort them according to their coordinate values in the reference number axis, establish the relative sorting of the labels of each sub-dial. S203. Based on relative sorting, calculate the angle between the line connecting the identifier and reference point of each adjacent sub-dial in the original image; S204. Based on the positional relationship of each sub-dials in the actual meter, determine the sub-dials that constitute the maximum angle in the original image and their correspondence in the actual water meter, thereby establishing the correspondence between each sub-dial in the original image and the actual water meter.
2. The pointer-type water meter reading identification method as described in claim 1, characterized in that, In step S201, the corresponding pixel coordinates (X, X, Y) of the identifier of each sub-dial on the original image are determined. child-Center-i Y child-Center-i The pixel coordinates (X) of the reference point basis Y basis It is composed of the average pixel coordinate values of each sub-dial: Where i and n are the sub-dial number and quantity, respectively.
3. The pointer-type water meter reading identification method as described in claim 2, characterized in that, The reference axis passes through the pixel coordinates of the reference point and is parallel to one of the coordinate axes of the pixel coordinate system.
4. The pointer-type water meter reading identification method as described in claim 3, characterized in that, In step S203, the method for calculating the angle α between the lines connecting the identifiers and reference points of each adjacent sub-dial in the original image is as follows: The pixel coordinates of the identifiers of adjacent sub-dials are respectively (X... child-Center-k1 , Y child-Center-k1 ), (X child-Center-k2 Y child-Center-k2 The slopes of the lines connecting the labels and reference points of adjacent sub-dials are k1 and k2, respectively.
5. A method for identifying the reading of a pointer-type water meter as described in any one of claims 2-4, characterized in that, In step S3, a perspective transformation matrix is established by the geometric position parameters identified by the sub-dial and their corresponding pixel coordinates in the original image, and the original image is mapped through the perspective transformation matrix to obtain the corrected image.
6. The pointer-type water meter reading identification method as described in claim 5, characterized in that, In step S1, the sub-dials are classified to obtain a sub-dial positioning dataset. The first deep neural network model trained on the sub-dial positioning dataset is used to identify and locate each sub-dial in the original image.
7. The method for identifying the reading of a pointer-type water meter as described in claim 1, characterized in that, The pointer-type water meter reading recognition method also includes judging the reasonableness of the water meter reading: the monthly water consumption m calculated from the water meter reading in step S4 is compared with the average water consumption M of the previous k months. If the absolute value of mM is not greater than the error λE, the water meter reading is judged to be reasonable, where: k is the number of historical reference months selected as needed, m j Let λ represent the water consumption in the j-th month out of k months, and λ be the correction coefficient set based on the reasonableness of water meter readings in actual application to account for missed and incorrect judgments.
Citation Information
Patent Citations
Water meter reading method and system
CN109977725A
Pointer type instrument image tilt correction method
CN112801094A
Multi-pointer water meter reading identification method
CN113205001A