Method, device and storage medium for identifying pointer meter readings

By identifying and fitting the image of the pointer table, combining the arc length and angle methods, the reading of the pointer table is determined, and the accuracy and reliability of the reading recognition of the pointer table in the prior art is solved, and higher recognition accuracy and stability are achieved.

CN114359573BActive Publication Date: 2025-03-14新奥新智科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111476077.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-06
Publication Date
2025-03-14
Estimated Expiration
2041-12-06

AI Technical Summary

Technical Problem

The prior art has problems with accuracy and reliability in the process of pointer table reading recognition, especially due to the approximate estimation of pointer deflection angle, resulting in large errors.

Method used

By identifying the image containing the pointer table, the simulated range and simulated pointer are obtained, and fitting is performed to obtain the simulated pointer table. Then, based on the intersection point of the analog point and the arc length of the range start point of the analog pointer and the analog range, the reading of the first pointer table is determined; based on the angle between the analog center of the analog pointer and the analog pointer, the starting point of the range and the end point of the range, the reading of the second pointer table is determined, and finally the target reading of the pointer table is determined by the mean of the two.

Benefits of technology

The accuracy and reliability of the pointer table in the reading recognition process is improved, and the error is reduced and the stability of the recognition is enhanced through the combination of arc length and angle.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114359573B_ABST
    Figure CN114359573B_ABST
Patent Text Reader

Abstract

The present disclosure relates to the field of computers, and discloses a pointer meter reading recognition method, device and storage medium. The method comprises the following steps: recognizing an image containing a pointer meter to obtain an analog range and an analog pointer, fitting the analog range and the analog pointer to obtain an analog pointer meter, and obtaining an intersection of the analog pointer and the analog range; determining a first pointer meter reading based on an arc length formed on the analog pointer meter by the intersection and a starting point of the range, and determining a second pointer meter reading based on angles between a simulated circle center of the analog pointer meter and lines connecting the analog pointer, the starting point of the range and an end point of the range; determining a target reading of the pointer meter based on the first pointer meter reading and the second pointer meter reading; in the above pointer meter reading recognition process, methods of determining the pointer meter reading according to the arc length and the angle are respectively adopted, and the average of the pointer meter readings in the above two methods is used as the final target reading of the pointer meter, thereby ensuring the accuracy and reliability of the pointer meter reading.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology and provides a pointer meter reading recognition method, device and storage medium. Background Art

[0002] Meters are common measuring tools in all walks of life. For example, the consumption of water, electricity, gas, etc. can be obtained through meters. In actual applications, usually, images of water, electricity, gas, pressure gauges, etc. are first collected through terminal devices such as cameras, and then image recognition technology is used to identify the meter photos and obtain readings. The above recognition process has the characteristics of wide application range, simple installation, and easy use.

[0003] However, since the instruments are divided into two types: numerical meters and pointer meters, compared to numerical meters, which can directly perform OCR character detection to obtain the reading through reading recognition, the difficulty of pointer meter recognition is that the pointer meter reading needs to be estimated based on the approximate deflection angle of the pointer. Therefore, it is necessary to accurately locate the dial, pointer, and instrument range and perform relative position relationship calculations. The algorithm chain is long and there is a high possibility of introducing errors.

[0004] At present, there are two main solutions for pointer meter reading recognition: 1. Methods based on traditional image processing. This solution has high environmental requirements, insufficient precision, and low reliability. 2. Modeling using deep learning combined with image processing methods. The main disadvantage of the existing solution of applying deep learning combined with image processing is unreasonable modeling, that is, the solution uses scales as points of polygons, and the lines between scale points as edges of polygons, which approximate the range major arc. Then, the greater the distance between the two end points of the straight line, the greater the approximation error, which will result in low robustness, large errors, low reliability, etc., which ultimately do not meet the actual application scenarios.

[0005] In summary, there is currently no effective solution to ensure the accuracy and reliability of the pointer meter during the reading recognition process. Summary of the invention

[0006] The embodiments of the present disclosure provide a pointer meter reading recognition method, device and storage medium, which are used to improve the accuracy and reliability of the pointer meter in the reading recognition process.

[0007] The specific technical solutions provided by this disclosure are as follows:

[0008] In a first aspect, an embodiment of the present disclosure provides a method for identifying a pointer meter reading, the method being applied to a computing device, comprising:

[0009] Recognize the image containing the pointer meter to obtain the analog range and the analog pointer, and fit the analog range and the analog pointer to obtain the analog pointer meter, wherein the analog range is an arc used to characterize the range start point, range end point and range length of the pointer meter, and the analog pointer is used to characterize the direction of the pointer head of the pointer meter on the analog range;

[0010] Obtaining the intersection of the analog pointer and the analog range, and determining the first pointer meter reading based on the length of the arc formed by the intersection and the starting point of the range on the analog pointer meter;

[0011] Determine the second pointer meter reading based on the angles between the analog circle center of the analog pointer meter and the lines connecting the analog pointer, the range start point and the range end point;

[0012] Based on the first pointer meter reading and the second pointer meter reading, a target reading of the pointer meter is determined.

[0013] Optionally, the image containing the pointer table is identified to obtain the analog range and the analog pointer, including:

[0014] Recognize the image containing the pointer table through the semantic segmentation model to obtain the analog range; and

[0015] The image containing the pointer table is recognized by the pointer target detection model to obtain a simulated pointer.

[0016] Optionally, before identifying the image containing the pointer table to obtain the analog range and the analog pointer, the method further includes:

[0017] The instrument image collected by the front-end device is obtained, and the target detection of the instrument image is performed through the pointer meter target detection model, and the image containing the pointer meter is intercepted based on the target detection result.

[0018] Optionally, the analog range and the analog pointer are fitted to obtain an analog pointer table, including:

[0019] Performing graphic image operations on the analog range and the analog pointer respectively to obtain the analog range and the analog pointer after removing noise points;

[0020] Connect the simulated circle center and the intersection point to obtain the adjusted simulated pointer;

[0021] Use Thomas corner point detection to simulate the measuring range and obtain the measuring range starting point, measuring range end point and measuring range length;

[0022] The analog range, the adjusted analog pointer, the range start point, the range end point and the range length are fitted using the cumulative probability Hough transform to obtain an analog pointer table.

[0023] Optionally, obtaining the intersection of the analog pointer and the analog range, and determining the first pointer meter reading based on the arc length formed by the intersection and the starting point of the range on the analog pointer meter, comprises:

[0024] Determine a first connection line based on the simulated circle center and the measuring range start point, and determine a second connection line based on the simulated circle center and the measuring range end point;

[0025] Determine a first arc between the intersection of the analog pointer and the start point of the range on the range length, and determine a second arc between the intersection of the analog pointer and the end point of the range on the range length, and calculate the arc sum of the first arc and the second arc;

[0026] respectively determining a first positional relationship between an intersection point of the simulated pointer and the first connecting line, and a second positional relationship between an intersection point of the simulated pointer and the second connecting line;

[0027] If the first positional relationship and the second positional relationship indicate that the distance between the analog pointer and the starting point of the measuring range is smaller than the distance between the analog pointer and the end point of the measuring range, then determining a first pointer meter reading based on the first arc and the arc sum;

[0028] If the first position relationship and the second position relationship indicate that the distance between the analog pointer and the starting point of the measuring range is greater than the distance between the analog pointer and the end point of the measuring range, the first pointer meter reading is determined based on the second arc and the arc sum.

[0029] Optionally, determining the second pointer meter reading based on the angles between the analog circle center of the analog pointer meter and the lines connecting the analog pointer, the range start point and the range end point, respectively, comprises:

[0030] Calculate the first angle between the first line segment and the second line segment, the second angle between the first line segment and the third line segment, and the third angle between the second line segment and the third line segment respectively; wherein the first line segment is the line segment between the analog circle center of the analog pointer meter and the intersection of the analog pointer, the second line segment is the line segment between the analog circle center of the analog pointer meter and the starting point of the measuring range, and the third line segment is the line segment between the analog circle center of the analog pointer meter and the end point of the measuring range;

[0031] If the first angle is greater than or equal to the second angle, determining a second pointer meter reading based on the second angle, the third angle, the error offset corresponding to the first angle, and the error offset corresponding to the second angle;

[0032] If the first angle is less than or equal to the second angle, determining a second pointer meter reading based on the first angle, the third angle, the error offset corresponding to the first angle, and the error offset corresponding to the second angle;

[0033] The error offset corresponding to the first angle represents the angle offset corresponding to the position difference between the analog pointer and the adjusted analog pointer on the analog range, and the error offset corresponding to the second angle represents the angle offset corresponding to the analog range.

[0034] Optionally, determining a target reading of the pointer meter based on the first pointer meter reading and the second pointer meter reading includes:

[0035] The average of the first pointer meter reading and the second pointer meter reading is determined as the target reading of the pointer meter.

[0036] In a second aspect, the present disclosure also provides a pointer meter reading recognition device, including:

[0037] The recognition unit is used to recognize the image containing the pointer meter, obtain the analog range and the analog pointer, and fit the analog range and the analog pointer to obtain the analog pointer meter, wherein the analog range is an arc used to characterize the range start point, the range end point and the range length of the pointer meter, and the analog pointer is used to characterize the direction of the pointer head of the pointer meter on the analog range;

[0038] A first reading unit, used to obtain the intersection of the analog pointer and the analog range, and determine the first pointer meter reading based on the arc length formed by the intersection and the starting point of the range on the analog pointer meter;

[0039] A second reading unit, used to determine the second pointer meter reading based on the angles between the analog circle center of the analog pointer meter and the lines connecting the analog pointer, the range start point and the range end point;

[0040] The reading determination unit is used to determine a target reading of the pointer meter based on the first pointer meter reading and the second pointer meter reading.

[0041] Optionally, the image containing the pointer table is identified to obtain the analog range and the analog pointer, and the identification unit is used to:

[0042] Recognize the image containing the pointer table through the semantic segmentation model to obtain the analog range; and

[0043] The image containing the pointer table is recognized by the pointer target detection model to obtain a simulated pointer.

[0044] Optionally, before identifying the image containing the pointer table to obtain the analog range and the analog pointer, the method further includes:

[0045] The instrument image collected by the front-end device is obtained, and the target detection of the instrument image is performed through the pointer meter target detection model, and the image containing the pointer meter is intercepted based on the target detection result.

[0046] Optionally, the analog range and the analog pointer are fitted to obtain an analog pointer table, an identification unit, for:

[0047] Performing image graphics operations on the analog range and the analog pointer respectively to obtain the analog range and the analog pointer after removing noise points;

[0048] Connect the simulated circle center and the intersection point to obtain the adjusted simulated pointer;

[0049] Use Thomas corner point detection to simulate the measuring range and obtain the measuring range starting point, measuring range end point and measuring range length;

[0050] The analog range, the adjusted analog pointer, the range start point, the range end point and the range length are fitted using the cumulative probability Hough transform to obtain an analog pointer table.

[0051] Optionally, the intersection of the analog pointer and the analog range is obtained, and the first pointer meter reading is determined based on the arc length formed by the intersection and the starting point of the range on the analog pointer meter. The first reading unit is used to:

[0052] Determine a first connection line based on the simulated circle center and the measuring range start point, and determine a second connection line based on the simulated circle center and the measuring range end point;

[0053] Determine a first arc between the intersection of the analog pointer and the start point of the range on the range length, and determine a second arc between the intersection of the analog pointer and the end point of the range on the range length, and calculate the arc sum of the first arc and the second arc;

[0054] respectively determining a first positional relationship between an intersection point of the simulated pointer and the first connecting line, and a second positional relationship between an intersection point of the simulated pointer and the second connecting line;

[0055] If the first positional relationship and the second positional relationship indicate that the distance between the analog pointer and the starting point of the measuring range is smaller than the distance between the analog pointer and the end point of the measuring range, then determining a first pointer meter reading based on the first arc and the arc sum;

[0056] If the first position relationship and the second position relationship indicate that the distance between the analog pointer and the starting point of the measuring range is greater than the distance between the analog pointer and the end point of the measuring range, the first pointer meter reading is determined based on the second arc and the arc sum.

[0057] Optionally, based on the angles between the analog circle center of the analog pointer meter and the lines connecting the analog pointer, the range start point and the range end point, the second pointer meter reading is determined, and the second reading unit is used to:

[0058] Calculate the first angle between the first line segment and the second line segment, the second angle between the first line segment and the third line segment, and the third angle between the second line segment and the third line segment respectively; wherein the first line segment is the line segment between the analog circle center of the analog pointer meter and the intersection of the analog pointer, the second line segment is the line segment between the analog circle center of the analog pointer meter and the starting point of the measuring range, and the third line segment is the line segment between the analog circle center of the analog pointer meter and the end point of the measuring range;

[0059] If the first angle is greater than or equal to the second angle, determining a second pointer meter reading based on the second angle, the third angle, the error offset corresponding to the first angle, and the error offset corresponding to the second angle;

[0060] If the first angle is less than or equal to the second angle, determining a second pointer meter reading based on the first angle, the third angle, the error offset corresponding to the first angle, and the error offset corresponding to the second angle;

[0061] The error offset corresponding to the first angle represents the angle offset corresponding to the position difference between the analog pointer and the adjusted analog pointer on the analog range, and the error offset corresponding to the second angle represents the angle offset corresponding to the analog range.

[0062] Optionally, based on the first pointer meter reading and the second pointer meter reading, a target reading of the pointer meter is determined, and the reading determination unit is used to:

[0063] The average of the first pointer meter reading and the second pointer meter reading is determined as the target reading of the pointer meter.

[0064] According to a third aspect, a computing device includes:

[0065] A memory for storing executable instructions;

[0066] A processor is used to read and execute executable instructions stored in a memory to implement any method as described in the first aspect.

[0067] In a fourth aspect, a computer-readable storage medium is provided. When instructions in the storage medium are executed by a processor, the processor is enabled to execute any method described in the first aspect.

[0068] The beneficial effects of the present disclosure are as follows:

[0069] In summary, in an embodiment of the present disclosure, a pointer meter reading recognition method, device and storage medium are provided. The pointer meter reading recognition method includes: recognizing an image including a pointer meter to obtain an analog range and an analog pointer, fitting the analog range and the analog pointer to obtain an analog pointer meter, wherein the analog range is an arc used to characterize the range starting point, range end point and range length of the pointer meter, and the analog pointer is used to characterize the direction of the pointer head of the pointer meter on the analog range, obtaining the intersection of the analog pointer and the analog range, determining a first pointer meter reading based on the arc length formed on the analog pointer meter by the intersection and the range starting point, determining a second pointer meter reading based on the angles between the analog circle center of the analog pointer meter and the lines connecting the analog pointer, the range starting point and the range end point, and determining a target reading of the pointer meter based on the first pointer meter reading and the second pointer meter reading. In the above pointer meter reading recognition process, the pointer meter reading is determined according to the arc length and the angle, and the average of the above two methods is used as the final target reading of the pointer meter, thereby ensuring the accuracy and reliability of the pointer meter in the reading recognition process.

[0070] Other features and advantages of the present disclosure will be described in the following description, and partly become apparent from the description, or be understood by practicing the present disclosure. The purpose and other advantages of the present disclosure can be realized and obtained by the structures particularly pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0071] The drawings described herein are used to provide a further understanding of the present disclosure and constitute a part of the present disclosure. The illustrative embodiments of the present disclosure and their descriptions are used to explain the present disclosure and do not constitute an improper limitation on the present disclosure. In the drawings:

[0072] Figure 1 A schematic diagram of a system architecture for identifying pointer meter readings in an embodiment of the present disclosure;

[0073] Figure 2 It is a schematic diagram of a process of identifying a pointer meter reading in an embodiment of the present disclosure;

[0074] Figure 3 A schematic diagram of a process for obtaining an analog pointer table in an embodiment of the present disclosure;

[0075] Figure 4 A schematic diagram of a process for obtaining a first pointer meter reading in an embodiment of the present disclosure;

[0076] Figure 5 A schematic diagram of a process for obtaining a second pointer meter reading in an embodiment of the present disclosure;

[0077] Figure 6 It is a schematic diagram of the logical architecture of the pointer meter reading recognition device in the embodiment of the present disclosure;

[0078] Figure 7 Schematic diagram of the physical architecture of a computing device in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0079] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the technical solution of the present disclosure, rather than all the embodiments. Based on the embodiments recorded in the present disclosure document, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the technical solution of the present disclosure.

[0080] The terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented using sequences other than those illustrated or described herein.

[0081] The preferred embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.

[0082] See also Figure 1 As shown, in the embodiment of the present disclosure, the system includes at least one instrument, a front-end device and a computing device. Figure 1 In the present invention, various instruments with pointers in industrial applications are exemplified by instruments, such as pressure gauges, water meters, etc. In the implementation process, the front-end device is used to collect images of the above-mentioned instruments. Common front-end devices are cameras, cameras, video recorders, etc. After the front-end device collects the above-mentioned instrument image, the instrument image is sent to the computing device for recognition to obtain the pointer meter reading.

[0083] The following specifically describes the case where the pointer meter reading recognition method is executed by a computing device. Figure 2 As shown, in the embodiment of the present disclosure, the specific process of the computing device identifying the pointer meter reading is as follows:

[0084] Step 201: Identify the image containing the pointer meter to obtain the analog range and the analog pointer, and fit the analog range and the analog pointer to obtain the analog pointer meter, wherein the analog range is an arc used to characterize the range starting point, range end point and range length of the pointer meter, and the analog pointer is used to characterize the direction of the pointer head of the pointer meter on the analog range.

[0085] Considering the various types of instruments in industrial production, the installation locations and functions of the instruments in the production equipment are also different. In order to unify the image containing the pointer meter to be processed obtained by the computing device, the implementation process includes recognizing the image containing the pointer meter and obtaining the analog range and analog pointer before:

[0086] The instrument image collected by the front-end device is obtained, and the target detection of the instrument image is performed through the pointer meter target detection model, and the image containing the pointer meter is intercepted based on the target detection result.

[0087] It should be noted here that the instrument image collected by the front-end device is the original image containing a complex background obtained by the front-end device directly photographing the instrument. Due to factors such as the different integrity of the instrument, the different models of the instrument, the different models of the front-end device, and the different distances between the front-end device and the instrument, the instrument images collected by the front-end device vary greatly.

[0088] During the implementation process, the pointer meter target detection model based on yolov5 can be used to perform target detection on the instrument image, so as to remove the influence of other components in the instrument image (for example, the instrument support rod, etc.) and obtain an instrument image containing only the original dial and the original pointer.

[0089] After obtaining the image including the pointer table, the image including the pointer table is identified to obtain the analog range and the analog pointer, including:

[0090] (1) recognizing the image containing the pointer table through the semantic segmentation model to obtain the analog range; and

[0091] Since the dials in industrial instruments are mostly arcs with a starting point and an end point, in the process of identifying the pointer meter reading, the dial and the dial range contained in the instrument image must be determined first. In the specific implementation process, the image containing the pointer meter is identified through the semantic segmentation model to obtain the analog range, that is, the arc included in the image containing the pointer meter is distinguished. Usually, the arc obtained after semantic segmentation has a width, that is, the above-mentioned analog range is usually composed of at least two corresponding arcs and the filling area between the arcs.

[0092] (2) The image containing the pointer table is recognized through the target detection model to obtain the pointer target simulation pointer.

[0093] In the process of identifying the pointer meter reading, in addition to determining the analog range of the pointer meter, it is also necessary to determine the specific direction of the pointer on the pointer meter dial. During the implementation process, the image containing the pointer meter is identified through the target detection model to obtain the simulated pointer. The target detection model here is a pre-trained model set for the location of the pointer. For the pointer target, the pointer area is separated from the background by using the adaptive threshold segmentation method.

[0094] Based on the obtained analog range and analog pointer, the analog range and analog pointer are fitted to obtain the analog pointer table, see Figure 3 As shown, specifically including:

[0095] Step 211: Perform graphic image operations on the analog range and the analog pointer respectively to obtain the analog range and the analog pointer after noise is removed.

[0096] Considering that the analog range and analog pointer detected above may contain multiple noise points due to damage or stains on the original pointer table, etc. Therefore, in the implementation process, graphic image operations are performed on the analog range and analog pointer respectively. Specifically, after opening and closing operations are performed on the graphic area where the analog range and analog pointer are located, the maximum connected domain is found to remove the noise points, thereby obtaining the analog range and analog pointer after the noise points are removed.

[0097] Step 2012: Connect the simulated circle center and the intersection point to obtain the adjusted simulated pointer.

[0098] During the implementation process, in order to ensure the integrity of the analog pointer, the complete pointing of the analog pointer can be further determined based on the acquisition of the above analog pointer. Specifically: first obtain the intersection of the above analog pointer and the analog range, that is, lock the pointing point of the analog pointer, and then connect the obtained analog circle center and the intersection to obtain the adjusted analog pointer, that is, use the line segment between the above intersection and the analog circle center as the complete analog pointer.

[0099] Step 2013: Use Thomas corner point detection to simulate the range and obtain the range start point, range end point and range length.

[0100] Since the instruments in industry are all scaled, and most of the instruments used in industry are sector-shaped dials, based on this, in the implementation process, the Thomas corner point is used to detect the above analog range, that is, the function cv.goodFeaturesToTrack() is used to detect the starting point and range of the analog range to obtain the range starting point, range end point and range length on the analog range.

[0101] Step 2014: Use cumulative probability Hough transform to fit the analog range, the adjusted analog pointer, the range start point, the range end point and the range length to obtain an analog pointer table.

[0102] After going through steps 2012 and 2013, the analog pointer, analog range, and the range starting point, range end point, and range length on the analog range are obtained respectively, and they need to be further combined into an analog pointer table. During the implementation process, the cumulative probability Hough transform is used to fit the analog range, the adjusted analog pointer, the range starting point, the range end point, and the range length, that is, the function cv2.HoughLinesP() is used to fit the above-mentioned analog pointer and analog range, etc., to obtain the analog pointer table.

[0103] In order to obtain accurate pointer meter readings, in the embodiment of the present application, arc length and angle are used to obtain pointer meter readings respectively, and finally the final pointer meter readings are determined based on the pointer meter readings obtained in the above two ways. The following first introduces a solution for obtaining pointer meter readings using arc length.

[0104] Step 202: Obtain the intersection point of the analog pointer and the analog range, and determine the first pointer meter reading based on the arc length formed by the intersection point and the starting point of the range on the analog pointer meter.

[0105] Since the recognized analog pointer is usually an irregular rectangle including the pointer head, that is, the analog pointer at least includes the direction of the pointer head on the analog range, and it is not possible to determine whether the analog pointer has an intersection with the center of the analog circle corresponding to the analog range. Therefore, the analog pointer or the extension line of the analog pointer is intersected with the analog range to obtain the intersection of the analog pointer and the analog range.

[0106] In the implementation process, the steps for using arc length to obtain the pointer meter reading are as follows: Figure 4 As shown, specifically including:

[0107] Step 2021: Determine a first connecting line based on the center of the simulated circle and the starting point of the range, and determine a second connecting line based on the center of the simulated circle and the end point of the range.

[0108] Taking into account that the arc ranges are of different lengths, during the implementation process, the dividing lines of different arcs are first determined by the simulated circle center, the range starting point and the range end point on the simulated range.

[0109] Specifically, the simulated circle center and the starting point of the range are connected to obtain a first connecting line, which is usually used as a reference line for obtaining an arc for indicating a reading when rotating clockwise from the starting point of the range. Also, the simulated circle center and the end point of the range are connected to obtain a second connecting line, which is usually used as a reference line for obtaining an arc for indicating a reading when rotating counterclockwise from the end point of the range.

[0110] Step 2022: Determine a first arc between the intersection of the analog pointer and the start point of the range on the range length, and determine a second arc between the intersection of the analog pointer and the end point of the range on the range length, and calculate the sum of the first arc and the second arc.

[0111] Since the intersection of the analog pointer falls on the analog range, in the implementation process, the arc between the intersection of the analog pointer and the starting point of the range on the analog range can be used to represent the range that the analog pointer has traveled, that is, the pointer meter reading.

[0112] Considering that the analog range is a shape that approximates a circle, in order to simplify the calculation, in the implementation process, it is first determined whether the analog pointer is close to the starting point of the range or closer to the end point of the range, and then the pointer meter reading is calculated based on the arc length formed by the intersection of the analog pointer on the analog range. Specifically, the first arc formed between the intersection of the analog pointer and the starting point of the range is determined on the analog range, and the second arc formed between the intersection of the analog pointer and the end point of the range is determined on the analog range. In addition, it is also necessary to calculate the arc sum of the first arc and the second arc, and use the arc sum as the angle corresponding to the first arc or the second arc on the analog range.

[0113] Step 2023: respectively determine a first positional relationship between the intersection point of the simulated pointer and the first connection line, and a second positional relationship between the intersection point of the simulated pointer and the second connection line.

[0114] During the implementation, the coordinates of the intersection of the analog pointer are substituted into the first connecting line to determine whether the intersection of the analog pointer is on the first connecting line, or on the left or right side of the first connecting line, so as to further determine the first positional relationship between the intersection of the analog pointer and the first connecting line. For example, if the intersection of the analog pointer is on the first connecting line, it means that the pointer is still at the starting point of the range, and the pointer meter reading is zero.

[0115] Similarly, the coordinates of the intersection of the analog pointer are substituted into the second connecting line to determine whether the intersection of the analog pointer is on the second connecting line, or on the left or right side of the second connecting line, so as to further determine the second positional relationship between the intersection of the analog pointer and the second connecting line. For example, if the intersection of the analog pointer is on the second connecting line, it means that the pointer is still at the end of the range, and the pointer meter reading is the scale value corresponding to the full range.

[0116] Step 2024: If the first position relationship and the second position relationship indicate that the distance between the analog pointer and the starting point of the measuring range is smaller than the distance between the analog pointer and the end point of the measuring range, determine the first pointer meter reading based on the first arc and the arc sum.

[0117] During the implementation process, if the first position relationship and the second position relationship represent that the distance between the analog pointer and the starting point of the range is smaller than the distance between the analog pointer and the end point of the range, that is, when the intersection of the analog pointer in step 2023 is closer to the first connecting line, it means that the analog pointer has not traveled more than half of the range from the starting point of the range. In this case, the first arc formed by the intersection of the analog pointer and the starting point of the range is used to calculate the first pointer meter reading.

[0118] For example, the coordinates of the center of the above simulation circle are P c =(x c ,y c ), the coordinates of the starting point of the above range are P 1 =(x 1 ,y 1 ), the coordinates of the end point of the above range are P 2 =(x 2 ,y 2 ), the first connecting line is The second connecting line is The first arc is l 1 , the second arc is l 2 , the sum of the arcs is l 1 +l 2 .

[0119] After determining that the distance between the analog pointer and the start point of the range is less than the distance between the analog pointer and the end point of the range, based on the first arc l 1 and arc and l 1 +l 2 , determine the first pointer meter reading is

[0120] Step 2025: If the first position relationship and the second position relationship indicate that the distance between the analog pointer and the starting point of the measuring range is greater than the distance between the analog pointer and the end point of the measuring range, determine the first pointer meter reading based on the second arc and the arc sum.

[0121] During the implementation process, if the first position relationship and the second position relationship indicate that the distance between the analog pointer and the starting point of the range is greater than the distance between the analog pointer and the end point of the range, that is, when the intersection of the analog pointer in step 2023 is closer to the second connecting line, it means that the analog pointer has traveled more than half of the range from the starting point of the range. In this case, the second arc formed by the intersection of the analog pointer and the starting point of the range is used to calculate the first pointer meter reading.

[0122] Let's use the above example to illustrate that the coordinates of the center of the simulated circle are P c =(x c ,y c ), the coordinates of the starting point of the above range are P 1 =(x 1 ,y 1), the coordinates of the end point of the above range are P 2 =(x 2 ,y 2 ), the first connecting line is The second connecting line is The first arc is l 1 , the second arc is l 2 , the sum of the arcs is l 1 +l 2 .

[0123] After determining that the distance between the analog pointer and the start point of the range is greater than the distance between the analog pointer and the end point of the range, based on the second arc l 2 and arc and l 1 +l 2 , determine the first pointer meter reading is

[0124] After introducing the above-mentioned solution of using arc length to obtain the reading of the pointer meter, another solution of determining the second pointer meter reading based on the angle is introduced below.

[0125] Step 203: Determine the second pointer meter reading based on the angles between the analog circle center of the analog pointer meter and the lines connecting the analog pointer, the range start point and the range end point.

[0126] It should be noted that, in the process of determining the second pointer meter reading, the influence of the width of each connecting line on the formed angle is ignored.

[0127] See also Figure 5 As shown, specifically including:

[0128] Step 2031: Calculate respectively the first angle between the first line segment and the second line segment, the second angle between the first line segment and the third line segment, and the third angle between the second line segment and the third line segment; wherein the first line segment is the line segment between the analog center of the analog pointer meter and the intersection of the analog pointer, the second line segment is the line segment between the analog center of the analog pointer meter and the starting point of the range, and the third line segment is the line segment between the analog center of the analog pointer meter and the end point of the range.

[0129] During the implementation process, the first line segment, the second line segment and the third line segment are first determined. Specifically, the first line segment is obtained by connecting the intersection of the analog center of the analog pointer meter and the analog pointer; the second line segment is obtained by connecting the intersection of the analog center of the analog pointer meter and the starting point of the range; the third line segment is obtained by connecting the intersection of the analog center of the analog pointer meter and the end point of the range.

[0130] Afterwards, the size of the angle between the first line segment and the second line segment is calculated to obtain the first angle; the size of the angle between the first line segment and the third line segment is calculated to obtain the second angle; and the size of the angle between the second line segment and the third line segment is calculated to obtain the third angle.

[0131] Step 2032: If the first angle is greater than or equal to the second angle, determine the second pointer meter reading based on the second angle, the third angle, the error offset corresponding to the first angle, and the error offset corresponding to the second angle.

[0132] In order to determine whether the analog pointer meter has traveled more than half of the range on the analog range, it can be determined by comparing the size of the first angle and the second angle. During implementation, if the first angle is greater than or equal to the second angle, it means that the analog pointer meter is closer to the starting point of the analog range. In this case, the second pointer meter reading is determined based on the second angle, the third angle, the error offset corresponding to the first angle, and the error offset corresponding to the second angle.

[0133] It should be additionally explained here that in the above steps 2032 and 2033, the error offset corresponding to the first angle represents the angle offset corresponding to the position difference between the analog pointer and the adjusted analog pointer on the analog range, and the error offset corresponding to the second angle represents the angle offset corresponding to the analog range.

[0134] For example, the coordinates of the center of the above simulation circle are P c =(x c ,y c ), the coordinates of the starting point of the above range are P 1 =(x 1 ,y 1 ), the coordinates of the end point of the above range are P 2 =(x 2 ,y 2 ), the coordinates of the intersection of the above simulated pointers are P t =(x t ,y t ), the length of the first line segment is l c-1 , the length of the second line segment is l c-2 , the length of the third line segment is l c-t According to the cosine theorem, the first angle is calculated as θ 1-c-t , the second angle is calculated to be θ 2-c-t The third angle is calculated as θ 1-c-2 The error offset corresponding to the first angle is bias_s, and the error offset corresponding to the second angle is bias_m.

[0135] Calculate the second pointer meter reading as

[0136] Step 2033: If the first angle is less than or equal to the second angle, determine the second pointer meter reading based on the first angle, the third angle, the error offset corresponding to the first angle, and the error offset corresponding to the second angle.

[0137] During the implementation process, if the first angle is less than or equal to the second angle, it means that the analog pointer meter is closer to the end point of the analog range. In this case, the second pointer meter reading is determined based on the first angle, the third angle, the error offset corresponding to the first angle, and the error offset corresponding to the second angle.

[0138] It should be additionally explained here that in the above steps 2032 and 2033, the error offset corresponding to the first angle represents the angle offset corresponding to the position difference between the analog pointer and the adjusted analog pointer on the analog range, and the error offset corresponding to the second angle represents the angle offset corresponding to the analog range.

[0139] For example, the coordinates of the center of the above simulation circle are P c =(x c ,y c ), the coordinates of the starting point of the above range are P 1 =(x 1 ,y 1 ), the coordinates of the end point of the above range are P 2 =(x 2 ,y 2 ), the coordinates of the intersection of the above simulated pointers are P t =(x t ,y t ), the length of the first line segment is l c-1 , the length of the second line segment is l c-2 , the length of the third line segment is l c-t According to the cosine theorem, the first angle is calculated as θ 1-c-t , the second angle is calculated to be θ 2-c-t The third angle is calculated as θ 1-c-2 The error offset corresponding to the first angle is bias_s, and the error offset corresponding to the second angle is bias_m.

[0140] Calculate the second pointer meter reading as

[0141] Step 204: Determine a target reading of the pointer meter based on the first pointer meter reading and the second pointer meter reading.

[0142] During the implementation, the average of the first pointer meter reading and the second pointer meter reading is determined as the target reading of the pointer meter. Compared with the method of calculating the pointer meter reading only according to the arc length or only according to the included angle, the pointer meter reading calculated by the method of using the average of the first pointer meter reading and the second pointer meter reading is more accurate.

[0143] Based on the same inventive concept, refer to Figure 6 As shown, in an embodiment of the present disclosure, a pointer meter reading recognition device is provided, comprising:

[0144] The recognition unit 601 is used to recognize the image containing the pointer meter, obtain the analog range and the analog pointer, and fit the analog range and the analog pointer to obtain the analog pointer meter, wherein the analog range is an arc used to characterize the range start point, the range end point and the range length of the pointer meter, and the analog pointer is used to characterize the direction of the pointer head of the pointer meter on the analog range;

[0145] A first reading unit 602 is used to obtain the intersection of the analog pointer and the analog range, and determine the first pointer meter reading based on the arc length formed by the intersection and the starting point of the range on the analog pointer meter;

[0146] The second reading unit 603 is used to determine the second pointer meter reading based on the angles between the analog circle center of the analog pointer meter and the lines connecting the analog pointer, the range start point and the range end point;

[0147] The reading determination unit 604 is used to determine a target reading of the pointer meter based on the first pointer meter reading and the second pointer meter reading.

[0148] Optionally, the image containing the pointer table is identified to obtain the analog range and the analog pointer, and the identification unit 601 is used to:

[0149] Recognize the image containing the pointer table through the semantic segmentation model to obtain the analog range; and

[0150] The image containing the pointer table is recognized by the pointer target detection model to obtain a simulated pointer.

[0151] Optionally, before identifying the image containing the pointer table to obtain the analog range and the analog pointer, the method further includes:

[0152] The instrument image collected by the front-end device is obtained, and the target detection of the instrument image is performed through the pointer meter target detection model, and the image containing the pointer meter is intercepted based on the target detection result.

[0153] Optionally, the analog range and the analog pointer are fitted to obtain an analog pointer table, and the identification unit 601 is used to:

[0154] Performing graphic image operations on the analog range and the analog pointer respectively to obtain the analog range and the analog pointer after removing noise points;

[0155] Connect the simulated circle center and the intersection point to obtain the adjusted simulated pointer;

[0156] Use Thomas corner point detection to simulate the measuring range and obtain the measuring range starting point, measuring range end point and measuring range length;

[0157] The analog range, the adjusted analog pointer, the range start point, the range end point and the range length are fitted using the cumulative probability Hough transform to obtain an analog pointer table.

[0158] Optionally, the intersection of the analog pointer and the analog range is obtained, and the first pointer meter reading is determined based on the arc length formed by the intersection and the starting point of the range on the analog pointer meter. The first reading unit 602 is used to:

[0159] Determine a first connection line based on the simulated circle center and the measuring range start point, and determine a second connection line based on the simulated circle center and the measuring range end point;

[0160] Determine a first arc between the intersection of the analog pointer and the start point of the range on the range length, and determine a second arc between the intersection of the analog pointer and the end point of the range on the range length, and calculate the arc sum of the first arc and the second arc;

[0161] respectively determining a first positional relationship between an intersection point of the simulated pointer and the first connecting line, and a second positional relationship between an intersection point of the simulated pointer and the second connecting line;

[0162] If the first positional relationship and the second positional relationship indicate that the distance between the analog pointer and the starting point of the measuring range is smaller than the distance between the analog pointer and the end point of the measuring range, then determining a first pointer meter reading based on the first arc and the arc sum;

[0163] If the first position relationship and the second position relationship indicate that the distance between the analog pointer and the starting point of the measuring range is greater than the distance between the analog pointer and the end point of the measuring range, the first pointer meter reading is determined based on the second arc and the arc sum.

[0164] Optionally, based on the angles between the analog circle center of the analog pointer meter and the lines connecting the analog pointer, the range start point and the range end point, the second pointer meter reading is determined, and the second reading unit 603 is used to:

[0165] Calculate the first angle between the first line segment and the second line segment, the second angle between the first line segment and the third line segment, and the third angle between the second line segment and the third line segment respectively; wherein the first line segment is the line segment between the analog circle center of the analog pointer meter and the intersection of the analog pointer, the second line segment is the line segment between the analog circle center of the analog pointer meter and the starting point of the measuring range, and the third line segment is the line segment between the analog circle center of the analog pointer meter and the end point of the measuring range;

[0166] If the first angle is greater than or equal to the second angle, determining a second pointer meter reading based on the second angle, the third angle, the error offset corresponding to the first angle, and the error offset corresponding to the second angle;

[0167] If the first angle is less than or equal to the second angle, determining a second pointer meter reading based on the first angle, the third angle, the error offset corresponding to the first angle, and the error offset corresponding to the second angle;

[0168] The error offset corresponding to the first angle represents the angle offset corresponding to the position difference between the analog pointer and the adjusted analog pointer on the analog range, and the error offset corresponding to the second angle represents the angle offset corresponding to the analog range.

[0169] Optionally, based on the first pointer meter reading and the second pointer meter reading, a target reading of the pointer meter is determined, and the reading determination unit 604 is used to:

[0170] The average of the first pointer meter reading and the second pointer meter reading is determined as the target reading of the pointer meter.

[0171] Based on the same inventive concept, refer to Figure 7 As shown, a computing device is provided in an embodiment of the present disclosure, including: a memory 702 for storing executable instructions; a processor 701 for reading and executing the executable instructions stored in the memory 702, and executing any one of the methods of the first aspect above.

[0172] Based on the same inventive concept, an embodiment of the present disclosure provides a computer-readable storage medium. When instructions in the storage medium are executed by a processor, the processor is enabled to execute any method described in the first aspect above.

[0173] In summary, in an embodiment of the present disclosure, a pointer meter reading recognition method, device and storage medium are provided. The pointer meter reading recognition method includes: recognizing an image including a pointer meter to obtain an analog range and an analog pointer, fitting the analog range and the analog pointer to obtain an analog pointer meter, wherein the analog range is an arc used to characterize the range starting point, range end point and range length of the pointer meter, and the analog pointer is used to characterize the direction of the pointer head of the pointer meter on the analog range, obtaining the intersection of the analog pointer and the analog range, determining a first pointer meter reading based on the arc length formed on the analog pointer meter by the intersection and the range starting point, determining a second pointer meter reading based on the angles between the analog circle center of the analog pointer meter and the lines connecting the analog pointer, the range starting point and the range end point, and determining a target reading of the pointer meter based on the first pointer meter reading and the second pointer meter reading. In the above pointer meter reading recognition process, the pointer meter reading is determined according to the arc length and the angle, and the average of the above two methods is used as the final target reading of the pointer meter, thereby ensuring the accuracy and reliability of the pointer meter in the reading recognition process.

[0174] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, systems, or computer program product systems. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present disclosure may take the form of a computer program product system 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.

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

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

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

[0178] Obviously, those skilled in the art can make various changes and modifications to the present disclosure without departing from the spirit and scope of the present disclosure. Thus, if these modifications and variations of the present disclosure fall within the scope of the claims of the present disclosure and their equivalents, the present disclosure is also intended to include these modifications and variations.

Claims

1. A method for identifying pointer meter readings, characterized in that: The method is applied to a computing device, comprising: Recognize the image containing the pointer meter to obtain an analog range and an analog pointer, and fit the analog range and the analog pointer to obtain an analog pointer meter, wherein the analog range is an arc used to characterize the range start point, range end point and range length of the pointer meter, and the analog pointer is used to characterize the direction of the pointer head of the pointer meter on the analog range; Obtaining the intersection of the analog pointer and the analog range, and determining a first pointer meter reading based on the length of an arc formed by the intersection and the starting point of the range on the analog pointer meter; Determine a second pointer meter reading based on the angles between the analog circle center of the analog pointer meter and the lines connecting the analog pointer, the range start point and the range end point; Based on the first pointer meter reading and the second pointer meter reading, a target reading of the pointer meter is determined.

2. The method according to claim 1, characterized in that The step of identifying the image containing the pointer table to obtain the analog range and the analog pointer includes: Recognize the image containing the pointer table through the semantic segmentation model to obtain the analog range; and The image containing the pointer table is recognized through the pointer table target detection model to obtain a simulated pointer.

3. The method according to claim 1, characterized in that Before the image containing the pointer table is identified to obtain the analog range and the analog pointer, the method further includes: The instrument image collected by the front-end device is acquired, and target detection is performed on the instrument image through a pointer meter target detection model, and the image containing the pointer meter is intercepted based on the target detection result.

4. The method according to claim 1, characterized in that The step of fitting the analog range and the analog pointer to obtain an analog pointer table includes: Performing graphic and image operations on the analog range and the analog pointer respectively to obtain the analog range and the analog pointer after noise is removed; Connecting the simulated circle center and the intersection point to obtain the adjusted simulated pointer; Using Thomas corner points to detect the analog range, obtaining the range start point, the range end point and the range length; The analog range, the adjusted analog pointer, the range starting point, the range end point and the range length are fitted using cumulative probability Hough transform to obtain the analog pointer table.

5. The method according to claim 4, characterized in that The method of obtaining the intersection of the analog pointer and the analog range and determining the first pointer meter reading based on the arc length formed by the intersection and the starting point of the range on the analog pointer meter comprises: Determine a first connection line based on the simulated circle center and the measuring range start point, and determine a second connection line based on the simulated circle center and the measuring range end point; Determine a first arc between the intersection of the analog pointer and the start point of the measuring range on the measuring range length, and determine a second arc between the intersection of the analog pointer and the end point of the measuring range on the measuring range length, and calculate the arc sum of the first arc and the second arc; respectively determining a first positional relationship between the intersection point of the analog pointer and the first connecting line, and a second positional relationship between the intersection point of the analog pointer and the second connecting line; If the first position relationship and the second position relationship indicate that the distance between the analog pointer and the starting point of the measuring range is smaller than the distance between the analog pointer and the end point of the measuring range, determining the first pointer meter reading based on the first arc and the arc sum; If the first position relationship and the second position relationship indicate that the distance between the analog pointer and the starting point of the measuring range is greater than the distance between the analog pointer and the end point of the measuring range, the first pointer meter reading is determined based on the second arc and the arc sum.

6. The method according to claim 1, characterized in that The determining of the second pointer meter reading based on the angles between the analog circle center of the analog pointer meter and the lines connecting the analog pointer, the range start point and the range end point respectively comprises: Calculate respectively a first angle between a first line segment and a second line segment, a second angle between the first line segment and a third line segment, and a third angle between the second line segment and the third line segment; wherein the first line segment is a line segment between the analog circle center of the analog pointer meter and the intersection of the analog pointer, the second line segment is a line segment between the analog circle center of the analog pointer meter and the starting point of the measuring range, and the third line segment is a line segment between the analog circle center of the analog pointer meter and the end point of the measuring range; If the first angle is greater than or equal to the second angle, determining the second pointer meter reading based on the second angle, the third angle, the error offset corresponding to the first angle, and the error offset corresponding to the second angle; If the first angle is less than or equal to the second angle, determining the second pointer meter reading based on the first angle, the third angle, the error offset corresponding to the first angle, and the error offset corresponding to the second angle; Among them, the error offset corresponding to the first angle represents the angle offset corresponding to the position difference between the analog pointer and the adjusted analog pointer on the analog range, and the error offset corresponding to the second angle represents the angle offset corresponding to the analog range.

7. The method according to any one of claims 1 to 6, characterized in that: The step of determining a target reading of a pointer meter based on the first pointer meter reading and the second pointer meter reading comprises: An average of the first pointer meter reading and the second pointer meter reading is determined as a target reading of the pointer meter.

8. A pointer meter reading recognition device, characterized in that: include: an identification unit, used for identifying an image including a pointer meter, obtaining an analog range and an analog pointer, fitting the analog range and the analog pointer, and obtaining an analog pointer meter, wherein the analog range is an arc used to characterize a range start point, a range end point, and a range length of the pointer meter, and the analog pointer is used to characterize the direction of a pointer head of the pointer meter on the analog range; A first reading unit, used to obtain the intersection of the analog pointer and the analog range, and determine the first pointer meter reading based on the arc length formed by the intersection and the starting point of the range on the analog pointer meter; A second reading unit, used to determine a second pointer meter reading based on the angles between the analog circle center of the analog pointer meter and the lines connecting the analog pointer, the range start point and the range end point; A reading determination unit is used to determine a target reading of a pointer meter based on the first pointer meter reading and the second pointer meter reading.

9. A computing device, characterized in that include: A memory for storing executable instructions; A processor, configured to read and execute the executable instructions stored in the memory to implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: When the instructions in the storage medium are executed by a processor, the processor is enabled to perform the method as described in any one of claims 1-7.

Citation Information

Patent Citations

  • An electric power inspection method and device for identifying analog pointer instrument readings

    CN109711400A

  • Pointer instrument reading identification method based on neural network

    CN110543878A