Pointer meter reading identification method and device and electronic equipment
By detecting and sorting the key points of the pointer table image, the scale lines and pointer lines are obtained, which solves the problem of unsatisfactory accuracy of the pointer table reading detection and recognition in the prior art, and achieves higher detection accuracy and precision.
Patent Information
- Application Number
- CN202510115271.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-24
- Publication Date
- 2025-05-16
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art has poor recognition accuracy in pointer meter reading detection, making it difficult to effectively identify abnormal reading problems of pointer meter dial.
By detecting the key point point in the pointer table image, we obtain the pointer key point and the scale key point within the effective range. After sorting, we obtain the scale line and pointer line, and then obtain the counting reading recognition results of the pointer table.
The recognition accuracy of pointer meter reading detection is improved, and more refined detection is achieved to ensure the accuracy of meter reading recognition.
Smart Images

Figure CN120014616A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing, and in particular to a method, device and electronic equipment for identifying pointer meter readings. Background Art
[0002] Substations are an important part of the power system, mainly responsible for the conversion, distribution and control of electric energy. In substations, pointer meters of various power equipment are used to monitor and record the operating status of the equipment. These pointer meters usually require manual reading of data, but due to the low efficiency and low accuracy of manual reading, in recent years, automatic recognition technology for pointer meters has been developed, such as the use of image processing and computer vision technology to achieve automatic reading of pointer meters. This method can improve the efficiency and accuracy of monitoring and reduce fatigue and errors in manual operation.
[0003] In order to ensure the accuracy of automatic readings, each pointer meter is regularly tested to identify whether there is an abnormal reading problem on the pointer meter dial. Commonly, the dial in the picture is predicted to be a normal dial or an abnormal dial through target detection. However, the recognition accuracy of this method is not ideal. Summary of the invention
[0004] In view of this, the purpose of the present application is to provide a pointer meter reading recognition method, device and electronic equipment, which effectively improves the recognition accuracy of pointer meter reading detection.
[0005] In order to achieve the above purpose, the technical solution adopted in this application is as follows:
[0006] In a first aspect, the present application provides a method for identifying a pointer meter reading, the method comprising:
[0007] Perform key point detection on the pointer meter image to obtain the pointer key points and scale key points within the effective range;
[0008] Sorting the key points of the scale, and obtaining scale lines according to the sorting results;
[0009] Based on the pointer key point, a pointer line is obtained;
[0010] According to the scale lines and the pointer lines, a reading recognition result of the pointer meter is obtained.
[0011] Optionally, the step of sorting the key points of the scale includes:
[0012] According to the coordinates of each of the scale key points, obtain the scale center point and the radius of the fitting circle corresponding to each of the scale key points;
[0013] For each of the key points of the scale, taking the center point of the scale as the pole of the polar coordinate system, and obtaining the angle value of the key point of the scale in the polar coordinate system according to the coordinates of the key point of the scale;
[0014] The scale key points are sorted according to the angle values.
[0015] Optionally, the step of obtaining the scale center point and the radius of the fitting circle corresponding to each of the scale key points according to the coordinates of each of the scale key points comprises:
[0016] Combining the coordinates of the key points of the scale and the characteristics of the circle, obtaining a matrix equation of the fitted circle;
[0017] The matrix equation is solved to obtain the center and radius of the fitting circle, and the center of the fitting circle is used as the scale center point.
[0018] Optionally, the step of sorting the scale key points according to the angle values includes:
[0019] According to the magnitude of each angle value, an initial sequence of each scale key point is obtained;
[0020] According to the angle value, obtaining the angle difference between every two adjacent scale key points;
[0021] Obtaining the maximum angle difference from the angle differences, and taking the two scale key points corresponding to the maximum angle difference as candidate starting points;
[0022] According to the initial sequence, taking the candidate starting point in the latter order as the starting point of the sequence;
[0023] According to the starting point of the sequence, the order of the scale key points in the initial sequence is adjusted.
[0024] Optionally, the step of performing key point detection on the pointer meter image to obtain pointer key points and scale key points within the effective range includes:
[0025] Inputting the pointer meter image into the dial detection model to obtain the dial frame in the pointer meter image;
[0026] According to the dial frame, the pointer meter image is cropped to obtain a dial image;
[0027] The dial image is input into a key point detection model to obtain the pointer key points and the scale key points within the effective range; wherein the key point detection model is trained to identify the pointer key points of the dial and the scale key points within the effective range.
[0028] Optionally, the sorting result includes the scale center point of each of the scale key points;
[0029] The step of obtaining a pointer line based on the pointer key point comprises:
[0030] For each of the pointer key points, according to the coordinates, obtain the distance value between the scale center point and the pointer key point;
[0031] According to the distance value, obtaining a pointer inner point and a pointer outer point from each of the pointer key points;
[0032] Based on the pointer inner point and the pointer outer point, a pointer line is obtained.
[0033] Optionally, the sorting result further includes the radius of the fitting circle of each of the scale key points;
[0034] The step of obtaining a pointer line based on the pointer inner point and the pointer outer point comprises:
[0035] Based on the pointer inner point and the pointer outer point, obtaining an initial line segment;
[0036] The initial line segment is extended by the length of the radius toward the direction of the pointer outer point to obtain a pointer line.
[0037] Optionally, the step of obtaining a reading recognition result of the pointer meter according to the scale line and the pointer line includes:
[0038] Detecting whether the scale line intersects with the pointer line;
[0039] If not, it is determined that the reading of the pointer meter is abnormal;
[0040] If so, it is determined that there is no abnormality in the reading of the pointer meter.
[0041] In a second aspect, the present application provides a pointer meter reading recognition device, including a detection module, a point processing module and a recognition module;
[0042] The detection module is used to perform key point detection on the pointer meter image to obtain the pointer key points and the scale key points within the effective range;
[0043] The point processing module is used to sort the key points of the scale and obtain the scale lines according to the sorting results;
[0044] The point processing module is further used to obtain a pointer line based on the pointer key point;
[0045] The identification module is used to obtain the reading identification result of the pointer meter according to the scale line and the pointer line.
[0046] In a third aspect, the present application provides an electronic device, including a processor and a memory, wherein the memory stores a computer program that can be executed by the processor, and the processor can execute the computer program to implement the pointer meter reading recognition method as described in the first aspect.
[0047] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the pointer meter reading recognition method as described in the first aspect.
[0048] The present application provides a method, device and electronic device for identifying the readings of a pointer meter, the method comprising: performing key point detection on a pointer meter image to obtain pointer key points and scale key points within an effective range; sorting each scale key point and obtaining scale lines according to the sorting result; obtaining pointer lines based on the pointer key points; and obtaining the reading identification result of the pointer meter according to the scale lines and the pointer lines. In this way, after the pointer key points of the dial and the scale key points within the effective range are obtained through preliminary detection, the pointer lines and scale lines are further processed to obtain the reading identification result, and the reading identification result is obtained based on this, so as to achieve more precise detection, thereby improving the accuracy of pointer meter detection.
[0049] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0051] Figure 1 A schematic diagram of the system architecture of a pointer meter reading recognition system provided in an embodiment of the present application is shown.
[0052] Figure 2 A schematic diagram of the module architecture of an electronic device provided in an embodiment of the present application is shown.
[0053] Figure 3 A schematic flow chart of a pointer meter reading identification method provided in an embodiment of the present application is shown.
[0054] Figure 4 Shows Figure 3 Schematic diagram of the process flow of some sub-steps of step 11.
[0055] Figure 5 Shows Figure 3 Schematic diagram of the process flow of some sub-steps of step 13.
[0056] Figure 6 Shows Figure 5 A flowchart of some sub-steps of step 131 in FIG.
[0057] Figure 7 Shows Figure 5 Flow diagram of some sub-steps of step 135.
[0058] Figure 8 Shows Figure 3 Schematic diagram of the process flow of some sub-steps of step 15.
[0059] Fig. 9 Shows Figure 8 A flowchart of some sub-steps of step 155.
[0060] Fig.10 A schematic diagram of the module architecture of a pointer meter reading recognition device provided in an embodiment of the present application is shown.
[0061] Icons: 10 - pointer meter reading recognition system; 110 - inspection equipment; 120 - recognition equipment; 20 - electronic equipment; 210 - memory; 220 - processor; 230 - communication module; 30 - pointer meter reading recognition device; 310 - detection module; 320 - point processing module; 330 - recognition module. DETAILED DESCRIPTION
[0062] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various different configurations.
[0063] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for which protection is sought, but merely represents selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.
[0064] It should be noted that relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0065] The pointer meter reading recognition method provided in the embodiment of the present application can be applied to Figure 1 The pointer meter reading recognition system 10 shown includes an inspection device 110 and an identification device 120. The inspection device 110 can be connected to the identification device 120 in a wired or wireless manner.
[0066] The inspection device 110 is used to photograph the pointer meter to obtain a pointer meter image, and transmit the pointer meter image to the recognition device 120 .
[0067] The pointer meter may be a pointer meter used in a substation or any other scenario.
[0068] The identification device 120 is used to implement the pointer meter reading identification method provided in the embodiment of the present application, including: performing key point detection on the pointer meter image to obtain pointer key points and scale key points within the effective range; sorting each scale key point and obtaining scale lines according to the sorting results; obtaining pointer lines based on the pointer key points; and obtaining the pointer meter reading identification result according to the scale lines and the pointer lines.
[0069] The inspection device 110 may be an inspection robot, a drone, a camera, a mobile phone or any device capable of capturing images, and the recognition device 120 may be a personal computer, a laptop computer, a tablet computer, a server cluster, an independent server or any programmable computer device.
[0070] Please refer to Figure 2 , is a block diagram of an electronic device 20, which may be Figure 1The identification device 120 in the pointer meter reading identification system 10 is shown. The electronic device 20 includes a memory 210, a processor 220 and a communication module 230. The memory 210, the processor 220 and the communication module 230 are electrically connected to each other directly or indirectly to achieve data transmission or interaction. For example, these components can be electrically connected to each other through one or more communication buses or signal lines.
[0071] The memory 210 is used to store programs or data and can be, but not limited to, a random access memory, a read-only memory, a programmable read-only memory, an erasable read-only memory, an electrically erasable read-only memory, and the like.
[0072] The processor 220 is used to read / write data or programs stored in the memory 210 and execute corresponding functions. For example, Figure 1 In the pointer meter reading recognition system 10 shown, the processor 220 of the recognition device 120 executes the computer program stored in the memory 210 to implement the pointer meter reading recognition method provided in the embodiment of the present application.
[0073] The communication module 230 is used to establish a communication connection between the electronic device 20 and other communication terminals through the network, and to send and receive data through the network. Figure 1 In the pointer meter reading recognition system 10 shown, the communication module 230 of the recognition device 120 transmits and receives data with the inspection device 110 through the network.
[0074] It should be understood that Figure 2 The structure shown is only a schematic diagram of the structure of the electronic device 20. The electronic device 20 may also include Figure 2 More or fewer components as shown, or with Figure 2 Different configurations are shown. Figure 2 Each component shown in the figure can be implemented by hardware, software or a combination thereof.
[0075] In order to improve the common pointer meter detection method, such as using the target detection method to perform binary classification judgment on the dial state to predict whether the image is a normal dial or an abnormal dial, the existing recognition accuracy problem is low. This application attempts to provide a pointer meter reading recognition method, referring to Figure 3 , including steps 11 to 17. And, Figure 1 In the pointer meter reading recognition system 10 shown, the recognition device 120 can Figure 2 The structure shown implements the execution of steps 11 to 17 when the processor 220 reads the computer program stored in the memory 210.
[0076] Step 11, perform key point detection on the pointer meter image to obtain pointer key points and scale key points within the effective range.
[0077] Step 13, sorting the key points of the scale, and obtaining the scale lines according to the sorting results.
[0078] Step 15, based on the pointer key points, obtain the pointer line.
[0079] Step 17, obtaining the reading recognition result of the pointer meter according to the scale lines and the pointer lines.
[0080] For example, in combination Figure 1 In the pointer meter reading recognition system 10 shown, the inspection device 110 periodically inspects a target scene (such as a substation), collects images of each pointer meter in the target scene, and transmits the collected pointer meter images to the recognition device 120.
[0081] After receiving the pointer meter image, the recognition device 120 performs key point detection on each pointer meter image to obtain the pointer key points and the scale key points within the effective range, and then sorts the scale key points, obtains the scale lines according to the sorting results, and obtains the pointer lines based on the pointer key points. Furthermore, for each pointer meter image, the recognition device 120 obtains the pointer meter reading recognition result based on the scale lines and pointer lines obtained therefrom, that is, determines whether the pointer meter is abnormal.
[0082] In common dial detection methods, such as predicting whether a dial in an image is a normal dial or an abnormal dial through target detection, it is only possible to simply determine whether the pointer exceeds the dial range. For dials that are not within the specified range, the recognition accuracy is low.
[0083] In steps 11 to 17 of the pointer meter reading method provided in the embodiment of the present application, after preliminary detection to obtain the pointer key points of the dial and the scale key points within the effective range, further fine processing is performed to obtain the pointer lines and scale lines, and the meter reading recognition results are obtained based on this, so as to achieve more precise detection, thereby improving the accuracy of pointer meter detection.
[0084] In the above step 11, the traditional image processing technology can be used to detect the pointer meter image to obtain the pointer key points of the dial and the scale key points within the effective range in the pointer meter image. The target detection model can also be used to infer the pointer meter image to obtain the pointer key points of the dial and the scale key points within the effective range in the pointer meter image. The above two methods are examples, and the implementation method of key point detection on the pointer meter image is not limited.
[0085] In one example, in order to make the pointer key points and the scale key points within the effective range more accurate, the concept of dual model detection is introduced. Figure 4 The process of obtaining the pointer key points and the scale key points in step 11 may include steps 111 to 115.
[0086] Step 111, input the pointer meter image into the dial detection model to obtain the dial frame in the pointer meter image.
[0087] Step 113, cropping the pointer meter image according to the dial frame to obtain the dial image.
[0088] Step 115, input the dial image into the key point detection model to obtain the pointer key points and the scale key points within the effective range.
[0089] The key point detection model is trained to identify the pointer key points of the dial and the scale key points within the effective range. In step 115, the pointer key points and the scale key points, as well as the coordinates of the pointer key points and the coordinates of the scale key points are obtained.
[0090] The dial detection model and key point detection model used in the above steps 111 to 115 can be obtained in the following way.
[0091] (1) Data collection.
[0092] Plan the drone inspection route of the target scene (such as a substation), and collect images of each pointer meter in the target scene under different lighting, weather, background and angles.
[0093] (2) Data processing
[0094] According to the position of the dial in the image, each pointer meter image is annotated, and the image samples obtained after the annotation are put into the first data set.
[0095] A dial image is cropped from the pointer meter image, and the dial image is annotated according to the pointer key points and the scale key points within the effective range, and a second data set of image samples is obtained after annotation.
[0096] The effective range is not the range on the dial, but the range marked with a special color (usually green). If it is not marked, the full range is used.
[0097] (3) Model training.
[0098] Based on the YOLOv11 framework, the first data set is used to train the model to obtain a dial detection model. Based on the YOLOv11 framework, the second data set is used to train the model to obtain a key point detection model.
[0099] Through the above method, the dial detection model is first used to detect the pointer meter image to obtain an accurate dial image, and then the key point detection model is used to infer the pointer key points in the dial image and the scale key points within the effective range to achieve more precise detection, thereby making the pointer key points and scale key points more accurate.
[0100] After obtaining the pointer key points and the scale key points, there are many ways to implement the sorting of the scale key points in step 13. For example, the scale values corresponding to the scale key points can be identified, and the scale key points can be sorted according to the order of the scale values in the dial. It is also possible to obtain the common center point of each scale key point and sort them by their angle relative to the common center point. It can also be considered that the sorting is performed. The above methods are all examples, and their implementation methods are not limited.
[0101] In one example, in order to achieve accurate sorting when the scale value is fuzzy and unrecognizable, or when the scale value is not considered, the idea of obtaining a fitting circle of each scale key point and sorting according to the angle between the scale key point and the center of the fitting circle is introduced in step 13. Figure 5 The process of sorting each scale key point in step 13 includes steps 131 to 135.
[0102] Step 131, according to the coordinates of each scale key point, obtain the scale center point and the radius of the fitting circle corresponding to each scale key point.
[0103] Step 133, for each key point of the scale, take the center point of the scale as the pole of the polar coordinate system, and obtain the angle value of the key point of the scale in the polar coordinate system according to the coordinates of the key point of the scale.
[0104] Step 135, sorting the key points of each scale according to the angle value.
[0105] For step 131, the scale line radius of the dial can be queried, and the standard equation of the circle can be constructed with the scale line radius and the coordinates of each scale key point, and then solved to obtain the fitted circle. Alternatively, the fitted circle of each scale key point can be obtained according to a preset rule. Then, the center of the fitted circle is used as the scale center point. The above methods are all examples, and the methods for obtaining the scale center point and the radius of the fitted circle are not limited.
[0106] In one example, in order to make the scale center point and the radius of the fitting circle more accurate, a matrix equation of the fitting circle is constructed based on the characteristics of the circle and the key points of the scale to solve the concept of the scale center point and radius. Figure 6 , the process of step 131 may include steps 1311 to 1313.
[0107] Step 1311, combining the coordinates of each scale key point and the characteristics of the circle, obtain the matrix equation of the fitted circle.
[0108] Step 1313, solving the matrix equation to obtain the center and radius of the fitting circle, and using the center of the fitting circle as the scale center point.
[0109] For example, the standard equation of a circle is: (xa) 2 +(yb) 2 =r 2 , where (a,b) is the center of the circle and r is the radius. Transforming the standard equation of a circle, it can be rewritten as: 2 +y 2 +Dx+Ey+F=0,D=-2a,E=-2b,F=a 2 +b 2 -r 2 .
[0110] Therefore, based on the relevant equation of the circle, the coordinates of each key point of the scale are substituted into the above equation to obtain the matrix equation of the fitting circle.
[0111] The matrix equation of the fitted circle can be expressed as: (x n ,y n ) represents the coordinates of the scale key points.
[0112] In step 1313, the coordinates of the center points of each scale are substituted into the matrix equation of the fitted circle and solved to obtain the values of D, E, and F. Then, according to the formula D = -2a, E = -2b, F = a 2 +b 2 -r 2 By solving, we can get the radius and center of the fitted circle.
[0113] Through the above steps 1311 to 1313, a circle is fitted according to the arc formed by the scale key points, so as to find the radius and center of the circle, so as to obtain a more accurate scale center point of the scale key points.
[0114] After obtaining the scale center point, in step 133, the scale center point is taken as the pole of the polar coordinate system to obtain the angle value of the scale key point in the polar coordinate system. The angle value can be understood as the angle value of the scale key point on the fitting circle.
[0115] The coordinates of the scale center point (i.e., the center of the fitting circle C) are expressed as (x c ,y c ), in the polar coordinate system, for each scale key point (x i ,y i ), the vector relative to the center point of the scale is expressed as:
[0116] Therefore, the calculation formula of the angle value can be expressed as: θ i =arctan(y i -y c ,x i -x c ).
[0117] After obtaining the angle values of each scale key point on the fitting circle in the polar coordinate system with the scale center point as the pole, in step 135, the scale center points can be sorted in the order of angle values from small to large, that is, in the order of -π to π. Alternatively, the scale center points can be sorted in the order of angle values from large to small, that is, in the order of π to -π. The above methods are all examples, and the implementation method of step 135 is not limited.
[0118] Ideally, the scale points within the effective range of the dial are continuous points. When the effective range is equal to the scale range of the entire dial, the angle difference between the scale points within the effective range is equal, and there is no large jump. When the effective range is less than the scale range of the entire dial, the scale start point and scale end point within the effective range are not adjacent, and there is a large jump.
[0119] In one example, considering that the number of each scale key point is less than the total number of scale points on the dial, there will be large jumps between the scale key points, which can easily interfere with the sorting, resulting in inaccurate subsequent scale lines, thereby affecting the reading recognition result in step 17.
[0120] Therefore, in order to eliminate the interference of large jumps and sort the key points of each scale more accurately, the idea of first sorting according to the angle value and then adjusting the initial sequence according to the angle difference of adjacent key points of the scale is introduced in step 135. Figure 7 In step 135, the following steps 1351 to 1359 are used to sort the key points of each scale.
[0121] Step 1351, according to the size of each angle value, obtain the initial sequence of each scale key point.
[0122] Step 1353, according to the angle value, obtain the angle difference between every two adjacent scale key points.
[0123] Step 1355, obtaining the maximum angle difference from the angle differences, and taking the two scale key points corresponding to the maximum angle difference as candidate starting points.
[0124] Step 1357, based on the initial sequence, the candidate starting point in the latter order is used as the starting point of the sequence.
[0125] Step 1359, adjusting the order of the key points of each scale in the initial sequence according to the starting point of the sequence.
[0126] Take a total of 5 scale key points, whose angle values are θ1, θ2, θ3, θ4, and θ5, as an example. Assume that after sorting by the size of each angle value, the initial sequence of each scale key point is θ1→θ2→θ3→θ4→θ5. After calculating the angle difference, the largest angle difference is θ2 and θ3 (i.e., the second and third scale key points), indicating that there is a large jump between the two and they are not actually adjacent points. Then, the second and third scale key points become candidate key points.
[0127] Since the third scale key point is later in the initial sequence than the second scale key point, and the scale points on the dial of the pointer meter are arranged in a clockwise manner, the third scale key point is the starting point of the sequence of the effective range, and the second scale key point is the end point of the sequence of the effective range on both sides.
[0128] After adjusting the initial sequence according to the starting point of the sequence and adjusting the order of the key points of each scale in the initial sequence, the sorting result is: θ3→θ4→θ5→θ1→θ2.
[0129] When there is no value with a larger angle difference, that is, when the angle difference is the mean value, it means that the effective range is the entire range of the pointer meter dial, and the initial sequence is the sorting result.
[0130] Through the above steps 1351 to 1359, the situation where the number of key points of each scale is less than the total number of scale points on the dial is taken into consideration. On the basis of the initial sorting, adjustments are made again according to the angle difference to eliminate the interference of large jumps and make the sorting result more accurate.
[0131] After the ranking results of the scale key points are obtained in the above manner, in step 13, for each two adjacent scale key points, straight line fitting or curve fitting is performed based on the two scale key points to obtain the scale line formed by the two scale key points.
[0132] In one example, the radius of the fitted circle is used as the radius of the scale line, and curve fitting is performed on two scale key points to obtain scale lines of the two scale key points.
[0133] The scale line formed by every two scale key points can be expressed as: L2(s) = P i +s(P i+1 -P i ), s∈[0,1],P i Indicates a scale key point.
[0134] In another example, the radius of the fitted circle is used as the radius of the scale line, and curve fitting is performed on each scale key point to obtain the scale line.
[0135] The above methods of obtaining scale lines are all examples, and the implementation methods are not limited.
[0136] The method of obtaining the pointer line in step 15 can be flexibly set. For example, each pointer key point can be directly fitted with a straight line to obtain the pointer line. A pre-trained model can also be used to fit each pointer key point to obtain the pointer line. The implementation method is not limited.
[0137] In one example, in order to make the pointer line more accurate, in step 15, the idea of first taking the scale center point as a reference, finding the pointer inner point and the pointer outer point from the pointer key points, and then fitting the pointer line based on the pointer inner point and the pointer outer point is introduced. Figure 8 The process of obtaining the pointer line in step 15 includes steps 151 to 155.
[0138] Step 151, for each pointer key point, obtain the distance value between the scale center point and the pointer key point according to the coordinates.
[0139] Step 153, obtaining the pointer inner point and the pointer outer point from each pointer key point according to the distance value.
[0140] Step 155, obtaining a pointer line based on the pointer inner point and the pointer outer point.
[0141] Taking the pointer key points as an example, the Euclidean distance between the three pointer key points and the scale center point is calculated to obtain the distance value. The pointer key point with the largest distance value is taken as the outermost point of the pointer, and the pointer key point with the smallest distance value is taken as the inner point of the pointer. Then, the pointer line is obtained based on the inner point and the outer point of the pointer.
[0142] In the above steps 151 to 155, the pointer line is obtained only by using the inner point of the pointer and the outer point of the pointer, thereby eliminating the interference of other key points of the pointer and further improving the accuracy of the pointer line.
[0143] In step 155, based on the principle of Bezier curve, the inner point and the outer point of the pointer are directly fitted to obtain the pointer line. At this time, the pointer line can be expressed as: L1(t) = P in +t(P ou -P in ), t∈[0,1], P in Indicates the inner point of the pointer, P ou Indicates a pointer outside the point.
[0144] Considering that when the line segment obtained by directly fitting the inner and outer points of the pointer is used as the pointer line, it is easy to cause the reading recognition result of step 17 to be wrong due to insufficient length of the pointer line.
[0145] Therefore, in order to avoid the result of the meter reading recognition being caused by the insufficient length of the pointer line, fitting is first performed in step 155, and then the initial line segment obtained by fitting is extended. Fig. 9 The process of obtaining the pointer line in step 155 includes steps 1551 to 1553.
[0146] Step 1551, based on the inner point of the pointer and the outer point of the pointer, obtain the initial line segment.
[0147] Step 1553, extending the initial line by the length of the radius toward the outer point of the pointer to obtain the pointer line.
[0148] The implementation process of the above step 1553 is: first, according to the radius of the fitting circle, the outer point of the pointer is extended to obtain a new pointer point, and then fitting is performed based on the new pointer point and the initial point to obtain the pointer line.
[0149] For example, the direction vector of the pointer line is obtained by given the inner point and the outer point of the pointer, and the direction vector is expressed as: Furthermore, the direction vector is normalized so that the pointer line can be easily extended to any length. The normalized direction vector is expressed as:
[0150] According to the normalized direction vector, the radius of the fitted circle and the outer point of the pointer, the new pointer point N is obtained. The new pointer point N is expressed as (x new ,y new ),in, L represents the length of the radius. In other embodiments, L can be set to any other value, and its value is not limited.
[0151] At this time, the pointer line is essentially composed of the pointer inner point and the pointer new point. Therefore, the pointer line can be expressed as: L1(t) = P in +t(P new -P in ), t∈[0,1], P im Indicates the inner point of the pointer, P new Indicates the new point of the pointer.
[0152] Through the above steps 1551 to 1553, the length of the pointer line is extended along the direction of the outer point of the pointer to prevent the pointer from being too short to intersect the scale, thereby further improving the accuracy of pointer meter reading recognition.
[0153] After obtaining the pointer line and the scale line in the above manner, the implementation process of step 17 may be: detecting whether the scale line intersects with the pointer line; if not, determining that the reading of the pointer meter is abnormal; if so, determining that the reading of the pointer meter is not abnormal.
[0154] For example, L1(t)=L2(s), even if the linear equation to be solved is: in +t(P new -P in )=P i +s(P i+1 -P i ), and solve it. If the values of t and s after the solution are t, s∈[0,1], it means that they intersect, and there is no abnormality in the reading of the pointer table. Otherwise, it means that they do not intersect, and there is an abnormality in the reading of the pointer table.
[0155] Based on the same concept as the above pointer meter reading identification method, refer to Fig.10 The embodiment of the present application also provides a pointer meter reading recognition device 30, including a detection module 310, a point processing module 320 and an recognition module 330.
[0156] The detection module 310 is used to perform key point detection on the pointer meter image to obtain the pointer key points and the scale key points within the effective range.
[0157] The point processing module 320 is used to sort the key points of the scale and obtain the scale lines according to the sorting results.
[0158] The point processing module 320 is further used to obtain a pointer line based on the pointer key points.
[0159] The identification module 330 is used to obtain the reading identification result of the pointer meter according to the scale lines and the pointer lines.
[0160] The above-mentioned pointer meter reading recognition device 30, under the coordinated action of the detection module 310, the point processing module 320 and the recognition module 330, after preliminary detection to obtain the pointer key points of the dial and the scale key points within the effective range, further refines the processing to obtain the pointer lines and scale lines, and obtains the meter reading recognition result based on this, so as to achieve more precise detection, thereby improving the accuracy of pointer meter detection.
[0161] For the specific implementation and effect of the pointer meter reading recognition device 30, please refer to the description of the implementation of the pointer meter reading recognition method in the above text. For example, for the specific implementation and effect of the detection module 310, please refer to the description of the relevant content of step 11 in the above text, for the specific implementation and effect of the point processing module 320, please refer to the description of the relevant content of steps 13 to 15 in the above text, and for the specific implementation and effect of the recognition module 330, please refer to the description of the relevant content of step 17 in the above text, which will not be repeated here.
[0162] In addition, each module of the pointer meter reading recognition device 30 can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of the processor 220 in the electronic device 20 in the form of hardware, or can be stored in the memory 210 of the electronic device 20 in the form of software, so that the processor 220 can call and execute the operations corresponding to each module to implement the pointer meter reading recognition method provided above.
[0163] The embodiment of the present application also provides an electronic device 20, including a processor 220 and a memory 210, wherein the memory 210 stores a computer program that can be executed by the processor 220, and the processor 220 can execute the computer program to implement the pointer meter reading recognition method provided above.
[0164] The embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by the processor 220, the pointer meter reading recognition method proposed in the embodiment of the present application is implemented.
[0165] In summary, the pointer meter reading recognition method, device and electronic device provided in the embodiments of the present application have at least the following beneficial effects:
[0166] To solve the problem of abnormal dial readings in substations, it is not only necessary to check whether the pointer is within the full range. The existing solutions make it difficult to learn the spatial relationship between the pointer and the effective range. The present application can directly determine the relationship between the two by directly identifying the two, which is far superior to the existing solutions in terms of accuracy.
[0167] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0168] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0169] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory, a random access memory, a magnetic disk or an optical disk.
[0170] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for identifying pointer meter readings, characterized in that: The method comprises: Perform key point detection on the pointer meter image to obtain the pointer key points and scale key points within the effective range; Sorting the key points of the scale, and obtaining scale lines according to the sorting results; Based on the pointer key point, a pointer line is obtained; According to the scale lines and the pointer lines, a reading recognition result of the pointer meter is obtained.
2. The method for identifying pointer meter readings according to claim 1, characterized in that: The step of sorting the key points of the scale comprises: According to the coordinates of each of the scale key points, obtain the scale center point and the radius of the fitting circle corresponding to each of the scale key points; For each of the key points of the scale, taking the center point of the scale as the pole of the polar coordinate system, and obtaining the angle value of the key point of the scale in the polar coordinate system according to the coordinates of the key point of the scale; The scale key points are sorted according to the angle values.
3. The method for identifying pointer meter readings according to claim 2, characterized in that: The step of obtaining the scale center point and the radius of the fitting circle corresponding to each of the scale key points according to the coordinates of each of the scale key points comprises: Combining the coordinates of the key points of the scale and the characteristics of the circle, obtaining a matrix equation of the fitted circle; The matrix equation is solved to obtain the center and radius of the fitting circle, and the center of the fitting circle is used as the scale center point.
4. The method for identifying pointer meter readings according to claim 2, characterized in that: The step of sorting the scale key points according to the angle values comprises: According to the magnitude of each angle value, an initial sequence of each scale key point is obtained; According to the angle value, obtaining the angle difference between every two adjacent scale key points; Obtaining the maximum angle difference from the angle differences, and taking the two scale key points corresponding to the maximum angle difference as candidate starting points; According to the initial sequence, taking the candidate starting point in the latter order as the starting point of the sequence; According to the starting point of the sequence, the order of the scale key points in the initial sequence is adjusted.
5. The method for identifying pointer meter readings according to claim 1, characterized in that: The step of detecting key points of the pointer meter image to obtain the pointer key points and the scale key points within the effective range includes: Inputting the pointer meter image into the dial detection model to obtain the dial frame in the pointer meter image; According to the dial frame, the pointer meter image is cropped to obtain a dial image; The dial image is input into a key point detection model to obtain the pointer key points and the scale key points within the effective range; wherein the key point detection model is trained to identify the pointer key points of the dial and the scale key points within the effective range.
6. The method for identifying pointer meter readings according to any one of claims 1 to 5, characterized in that: The sorting result includes the scale center point of each of the scale key points; The step of obtaining a pointer line based on the pointer key point comprises: For each of the pointer key points, according to the coordinates, obtain the distance value between the scale center point and the pointer key point; According to the distance value, obtaining a pointer inner point and a pointer outer point from each of the pointer key points; Based on the pointer inner point and the pointer outer point, a pointer line is obtained.
7. The method for identifying pointer meter readings according to claim 6, characterized in that: The sorting result also includes the radius of the fitting circle of each of the scale key points; The step of obtaining a pointer line based on the pointer inner point and the pointer outer point comprises: Based on the pointer inner point and the pointer outer point, obtaining an initial line segment; The initial line segment is extended by the length of the radius toward the direction of the pointer outer point to obtain a pointer line.
8. The method for identifying pointer meter readings according to any one of claims 1 to 5, characterized in that: The step of obtaining the reading recognition result of the pointer meter according to the scale line and the pointer line comprises: Detecting whether the scale line intersects with the pointer line; If not, it is determined that the reading of the pointer meter is abnormal; If so, it is determined that there is no abnormality in the reading of the pointer meter.
9. A pointer meter reading recognition device, characterized in that: It includes a detection module, a point processing module and a recognition module; The detection module is used to perform key point detection on the pointer meter image to obtain the pointer key points and the scale key points within the effective range; The point processing module is used to sort the key points of the scale and obtain the scale lines according to the sorting results; The point processing module is further used to obtain a pointer line based on the pointer key point; The identification module is used to obtain the reading identification result of the pointer meter according to the scale line and the pointer line.
10. An electronic device, characterized in that: The invention comprises a processor and a memory, wherein the memory stores a computer program executable by the processor, and the processor can execute the computer program to implement the pointer meter reading recognition method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Pointer instrument automatic reading method based on key point detection
CN110909738A
Pointer instrument reading identification method and device of transformer substation, medium and electronic equipment
CN113705350A
Method and system for identifying reading of pointer instrument in inspection scene
CN114255458A
Pointer instrument identification method based on text area reading
CN114399677A
Automatic reading identification method for reading of pointer type instrument in power distribution room
CN115601743A