Electric energy meter wiring identification and judgment method and storage medium

Automatically identifying and wiring of referee power meter through image recognition technology, the high workload and subjectivity problems of traditional manual referees are solved, and the referee efficiency and quality are improved.

CN119964071APending Publication Date: 2025-05-09QUANZHOU ELECTRIC POWER TECH INST OF FUJIAN ELECTRIC POWER +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411879250.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-19
Publication Date
2025-05-09

AI Technical Summary

Technical Problem

The wiring of traditional manual referee electric energy meters has problems such as high workload, high human resources consumption, and poor subjectivity, which affects the efficiency and quality of referees.

Method used

Image recognition technology is adopted to obtain wiring images from the appearance of the power meter, and to identify wiring edges using edge detection algorithms, combining linear detection, corner point detection and wiring direction analysis to achieve automatic judgment of the wiring layout of the power meter.

Benefits of technology

It reduces the human resources required for refereeing the wiring results of the electricity meter, reduces the workload of staff, improves the efficiency and quality of referees, and achieves a more objective and accurate judgment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119964071A_ABST
    Figure CN119964071A_ABST
Patent Text Reader

Abstract

The invention provides a method for identifying and judging an electric energy meter and a storage medium. The method comprises the following steps: acquiring a wiring image of the electric energy meter from an appearance acquisition image of the electric energy meter; identifying a target image containing a wiring edge from the wiring image by using an edge detection algorithm; acquiring a target image including the wiring edge of the electric energy meter; detecting the relationship between the straight line in the target image and the edge of the backboard where the electric energy meter wiring is located, the angle of a corner point and the wiring direction, and judging the wiring layout of the electric energy meter; according to the invention, the wiring image of the electric energy meter is identified based on the image identification technology, and then the wiring of the electric energy meter is judged, so that manpower resources required by the judgment of the wiring result of the electric energy meter are reduced, the workload of workers is reduced, and the efficiency and quality of the judgment of the wiring result of the electric energy meter are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image recognition, and in particular to a method and storage medium for identifying and judging wiring of an electric energy meter. Background Art

[0002] In today's power sector, energy meters, as key equipment for measuring and recording electric energy consumption, are widely used in various places. The accuracy and standardization of their wiring are of vital importance to the accuracy of power metering and the safe and stable operation of the power system.

[0003] With the continuous development of the power industry and the continuous growth of electricity demand, the training and assessment of electricity meter wiring technology has also received increasing attention. In the traditional electricity meter wiring training process, the relevant training staff mainly rely on visual observation and experience to score and evaluate the wiring results. However, this manual judging method has many limitations.

[0004] On the one hand, the workload of manual referees is extremely high. With the increase in the number of trainees and the frequency of practical training, the staff needs to check the wiring results of each trainee one by one, which takes a lot of time and energy. Long-term and high-intensity work can easily lead to fatigue of the staff, which may affect the accuracy and fairness of the refereeing.

[0005] On the other hand, manual refereeing requires a huge amount of human resources. In order to ensure that a large number of wiring training results are judged within the specified time, a sufficient number of professional staff are often required. This not only increases labor costs, but also may lead to untimely judgments when human resources are tight, affecting the progress and effect of training.

[0006] In addition, manual evaluation is subjective to a certain extent. Different staff members may have slightly different understandings and grasps of wiring standards, which means that different referees may give different evaluations for the same wiring results. The lack of unified and objective evaluation standards is not conducive to the standardization and regularization of training work.

[0007] Therefore, in response to the above problems, an efficient, accurate, objective and human resource-saving electricity meter wiring identification and judgment method is needed to overcome the drawbacks of traditional manual judgment methods and improve the judgment efficiency and quality of electricity meter wiring. Summary of the invention

[0008] The technical problem to be solved by the present invention is to provide a method and storage medium for identifying and judging the wiring of an electric energy meter, which can replace the traditional manual judgment method, reduce human resource consumption and improve the judgment efficiency and quality of the wiring of the electric energy meter.

[0009] In order to solve the above technical problems, the technical solution adopted by the present invention is: A method for identifying wiring of an electric energy meter, comprising the steps of: A1. Acquire a wiring image of the electric energy meter from an appearance acquisition image of the electric energy meter; A2. Using an edge detection algorithm, a target image containing a wiring edge is identified from the wiring image.

[0010] In order to solve the above technical problems, another technical solution adopted by the present invention is: A method for judging the connection of an electric energy meter comprises the following steps: S1, acquiring a target image including the edge of the electric energy meter connection; The target image is determined based on the above-mentioned method for identifying the wiring of an electric energy meter; S2. Detect the relationship between the straight line in the target image and the edge of the back panel where the electric energy meter is connected, the angle of the corner point and the direction of the connection, and judge the connection layout of the electric energy meter.

[0011] In order to solve the above technical problems, another technical solution adopted by the present invention is: A storage medium stores a computer program thereon, which, when executed, implements the steps in the above-mentioned method for identifying the wiring of an electric energy meter, or the steps in the above-mentioned method for judging the wiring of an electric energy meter.

[0012] The beneficial effects of the present invention are as follows: the present invention provides a method and storage medium for identifying and judging the wiring of an electric energy meter, obtains a wiring image of the electric energy meter, identifies a target image containing the wiring edge from the wiring image, and determines whether the wiring layout meets the requirements based on the target image, thereby realizing the recognition of the wiring image of the electric energy meter based on image recognition technology, and then completing the judgment of the wiring of the electric energy meter, thereby reducing the human resources required for judging the wiring results of the electric energy meter, reducing the workload of the staff, and improving the efficiency and quality of judging the wiring results of the electric energy meter. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] Figure 1 A flowchart of a method for identifying wiring of an electric energy meter according to an embodiment of the present invention; Figure 2 A flow chart of obtaining a target image in a method for identifying wiring of an electric energy meter according to an embodiment of the present invention; Figure 3 A flow chart of a method for judging the connection of an electric energy meter according to an embodiment of the present invention; Figure 4 A schematic diagram of the structure of an electronic device according to an embodiment of the present invention; Description of labels: 301, computing unit; 302, ROM; 303, RAM; 304, bus; 305, I / O interface; 306, input unit; 307, output unit; 308, storage unit; 309, communication unit. DETAILED DESCRIPTION

[0014] In order to explain the technical content, achieved objectives and effects of the present invention in detail, the following is an explanation in conjunction with the implementation modes and the accompanying drawings.

[0015] Please refer to Figure 1 , a method for identifying the wiring of an electric energy meter, comprising the steps of: A1. Acquire a wiring image of the electric energy meter from an appearance acquisition image of the electric energy meter; A2. Using an edge detection algorithm, a target image containing a wiring edge is identified from the wiring image.

[0016] From the above description, it can be seen that the beneficial effects of the present invention are: by acquiring an image of the wiring of the electric energy meter through the appearance acquisition image of the electric energy meter, and using the edge detection algorithm to identify the target image containing the wiring edge, it is possible to accurately outline the key features such as the contour of the wiring, which is more conducive to accurately judging the wiring situation and reducing the probability of misjudgment. It realizes automatic processing based on image recognition technology to obtain the target image, improves the quality and acquisition efficiency of the target image, and facilitates the subsequent processing of the target image according to different actual needs.

[0017] Further, step A2 includes: A21, converting the wiring image into a grayscale image, and performing noise reduction processing on the grayscale image; A22, determining an edge detection operator, and using the edge detection operator to calculate the gradient amplitude of each pixel in the grayscale image; A23, determining a target image including a connection edge according to the gradient amplitude, specifically: If the gradient amplitude of the pixel point is greater than a first preset threshold, the pixel point is determined as a strong edge; Otherwise, if the gradient amplitude of the pixel point is less than or equal to the first preset threshold and greater than or equal to the second preset threshold, and the pixel point is connected to any of the strong edges, the pixel point is determined as an edge; A target image including a connection edge is determined according to the strong edge and the edge.

[0018] From the above description, it can be seen that converting the wiring image into a grayscale image and performing noise reduction processing can help simplify the subsequent calculation process, while reducing the interference of noise on edge detection, making the recognition result more accurate and reliable; by determining the appropriate edge detection operator to calculate the pixel gradient amplitude, it is possible to effectively capture areas with large brightness changes in the image, which often correspond to wiring edges; accurately distinguish between strong edges and edge pixels, and include pixels that are connected to strong edges and within a reasonable amplitude range into the edge category, thereby more completely outlining the wiring edge, and obtaining a clearer and continuous wiring edge image, further improving the accuracy and reliability of recognition.

[0019] Please refer to Figure 3 , a method for judging the connection of an electric energy meter, comprising the steps of: S1, acquiring a target image including the edge of the electric energy meter connection; The target image is determined based on the above-mentioned method for identifying the wiring of an electric energy meter; S2. Detect the relationship between the straight line in the target image and the edge of the back panel where the electric energy meter is connected, the angle of the corner point and the direction of the connection, and judge the connection layout of the electric energy meter.

[0020] From the above description, it can be seen that the beneficial effects of the present invention are: obtaining a target image containing the wiring edge, determining whether the wiring layout meets the requirements based on the target image, realizing the recognition of the wiring image of the electric energy meter based on image recognition technology, and then completing the judgment of the electric energy meter wiring, thereby reducing the human resources required for judging the electric energy meter wiring results, reducing the workload of the staff, and improving the efficiency and quality of judging the electric energy meter wiring results.

[0021] Further, step S2 includes the steps of: S21, detecting a straight line in the target image, and determining whether the straight line is parallel or perpendicular to an edge of a back plate where the electric energy meter is connected; S22, detecting a corner point in the target image, calculating an angle corresponding to the corner point, and determining whether the angle meets a preset angle requirement; S23, identifying the wiring direction in the target image, and determining whether the wiring of the electric energy meter is crossed or overlapped according to the wiring direction.

[0022] From the above description, it can be seen that by detecting the parallel or vertical relationship between the straight line in the target image and the edge of the backplane, whether the angle of the corner point meets the preset requirements, and whether the wiring direction crosses or overlaps, it is possible to accurately judge the rationality of the wiring layout, detect the accuracy of the wiring connection, and promptly discover the problem of wiring cross-overlapping, which helps to discover potential hidden dangers at an early stage, ensure the normal measurement of the electricity meter, stable power transmission, and safe and reliable operation of the entire power system.

[0023] Furthermore, step S21 is specifically as follows: Detecting a straight line in the target image by using the Hough transform method, and determining whether the straight line is parallel or perpendicular to the edge of the back plate where the electric energy meter connection is located; If the straight line is parallel or perpendicular to the edge of the back plate where the electric energy meter is connected, the wiring layout meets the requirements; otherwise, the wiring layout does not meet the requirements.

[0024] From the above description, it can be seen that due to the strong robustness of Hough transform for straight line detection, by detecting the straight line of the target image through Hough transform and judging the relationship with the edge of the backplane, the straight line information of the electric energy meter wiring can be accurately extracted, the wiring layout standardization can be accurately evaluated, and the error can be located and adjusted in time when it does not meet the requirements.

[0025] Further, step S22 is specifically as follows: Calculating the gradient of each pixel in the target image in the x direction and the y direction respectively, and constructing the structure tensor of each pixel according to the gradient of each pixel in the x direction and the y direction; Calculating the eigenvalues ​​of the matrix corresponding to the structure tensor, selecting a minimum eigenvalue from the eigenvalues ​​as the response value of the corner point response function, and determining the pixel point whose response value is greater than a preset threshold as a corner point; It is determined whether the corner point meets the preset angle. If the corner point meets the preset angle, the wiring layout meets the requirement; otherwise, the wiring layout does not meet the requirement.

[0026] From the above description, it can be seen that by calculating the gradients of pixel points in the x and y directions to construct a structural tensor and selecting the minimum eigenvalue as the corner point response value, the corner point can be accurately located, effectively overcoming interference such as noise and blur in the image, and ensuring the accuracy of corner point recognition; secondly, by judging the corner point according to the preset angle, the wiring layout standardization can be strictly evaluated, and problems such as loose wiring and incorrect connection caused by abnormal corners can be discovered in time.

[0027] Further, step S23 is specifically as follows: Based on the Kalman filter, the wiring direction is identified in the target image, and according to the wiring direction, it is determined whether the wiring of the electric energy meter is crossed or overlapped; If the wiring of the electric energy meter is crossed or overlapped, it is determined that the wiring layout does not meet the requirements; otherwise, the wiring layout meets the requirements.

[0028] From the above description, it can be seen that the Kalman filter can make effective predictions and corrections based on previous state information and current observation data. In the presence of certain noise interference and incomplete information, it can still accurately track the direction of the wiring. By accurately identifying the direction of the wiring to determine whether it crosses or overlaps, it can promptly detect wiring layout defects and prevent problems such as short circuits and signal interference caused by crossing and overlapping.

[0029] Furthermore, step S2 further includes: Determining the phase to which the electric energy meter belongs according to the matching degree between the electric energy meter and the preset template image; Detect the relationship between the straight line in the target image and the edge of the backboard where the electric energy meter wiring is located, the angle of the corner point and the wiring direction, judge the wiring layout of the electric energy meter, and find the scoring level corresponding to the wiring layout in the current wiring image based on the corresponding relationship between the wiring layout of electric energy meters of different phases and the scoring level; Wherein, the preset template image includes a feature area template image of a single-phase electric energy meter and a feature area template image of a three-phase electric energy meter; The steps of obtaining the feature area template image of the single-phase electric energy meter and the feature area template image of the three-phase electric energy meter are: By analyzing the appearance acquisition images of the single-phase electric energy meter and the three-phase electric energy meter, the wheel display button area images of the single-phase electric energy meter and the three-phase electric energy meter are selected as the feature area template image of the single-phase electric energy meter and the feature area template image of the three-phase electric energy meter respectively.

[0030] From the above description, it can be seen that by matching the captured image of the electric energy meter's appearance with the preset single-phase and three-phase electric energy meter feature area template images, the phase to which the electric energy meter belongs can be accurately determined, which facilitates the subsequent targeted wiring layout evaluation and scoring according to different phases, ensuring that the evaluation process is consistent with the actual type of the electric energy meter, and improving the accuracy and effectiveness of the entire identification and evaluation system.

[0031] Furthermore, the phase to which the electric energy meter belongs is determined according to the degree of matching with the preset template image, specifically: Collecting an appearance image of the electric energy meter and performing grayscale and binarization processing on the appearance image to obtain a corresponding binary image; The appearance image is tilt-corrected for the binary image based on the Hough transform method, and the corrected appearance image is matched with a preset template image to determine the phase to which the electric energy meter corresponding to the appearance image belongs.

[0032] From the above description, it can be seen that grayscale and binarization processing of the collected appearance image of the electric energy meter can simplify the image information, highlight the key features, reduce unnecessary detail interference in the image, and be more conducive to subsequent analysis and matching operations, thereby improving the accuracy and efficiency of recognition; at the same time, the use of the Hough transform method for tilt correction can effectively solve the problem of tilt in the shooting angle that may exist in the appearance image, making the image posture regular, ensuring that it can be compared with the preset template image under standard conditions, and further enhancing the accuracy of the matching, thereby more reliably determining the phase to which the electric energy meter belongs.

[0033] A storage medium stores a computer program thereon, which, when executed, implements the steps in the above-mentioned method for identifying the wiring of an electric energy meter, or the steps in the above-mentioned method for judging the wiring of an electric energy meter.

[0034] From the above description, it can be seen that by acquiring the wiring image of the electric energy meter, identifying the target image containing the wiring edge from the wiring image, and determining whether the wiring layout meets the requirements based on the target image, the wiring image of the electric energy meter is recognized based on image recognition technology, and then the wiring of the electric energy meter is judged, thereby reducing the human resources required for judging the wiring results of the electric energy meter, reducing the workload of the staff, and improving the efficiency and quality of judging the wiring results of the electric energy meter.

[0035] Please refer to Figure 1 , Embodiment 1 of the present invention is: a method for identifying the connection of an electric energy meter, comprising the steps of: A1. Acquire a wiring image of the electric energy meter from an appearance acquisition image of the electric energy meter.

[0036] In this embodiment, an energy meter (also known as a watt-hour meter, kilowatt-hour meter or power meter) is a device used to measure and record the amount of electrical energy consumed. It is widely used in home, commercial and industrial environments to monitor and bill electricity consumption. Energy meters can be divided into many types, including traditional mechanical energy meters and modern electronic energy meters.

[0037] In this embodiment, a high-resolution camera is used to capture images of the front and back of the electric energy meter, especially the terminal part, ensuring good lighting conditions and avoiding shadows and reflections to improve image quality, and then the image of the wiring part is selected from all the collected images.

[0038] A2. Using an edge detection algorithm, a target image containing a wiring edge is identified from the wiring image.

[0039] In this embodiment, edge detection is a technique in computer vision for identifying areas in an image where brightness changes dramatically, which generally correspond to the boundaries of an object. In wiring detail recognition, edge detection algorithms can help locate the position and shape of wiring.

[0040] like Figure 2 As shown, step A2 includes: A21. Convert the wiring image into a grayscale image, and perform noise reduction processing on the grayscale image.

[0041] In this example, the obtained wiring image needs to be converted into a grayscale image first, because edge detection is usually performed on a single-channel (grayscale) image. At the same time, in order to reduce the impact of noise on edge detection, a smoothing filter (such as a Gaussian filter) can be used to blur the image.

[0042] A22. Determine an edge detection operator, and use the edge detection operator to calculate the gradient amplitude of each pixel in the grayscale image.

[0043] In this embodiment, a suitable edge detection operator is used to calculate the gradient magnitude and gradient direction of each pixel in the image. Common edge detection operators include Sobel operator, Prewitt operator, Roberts crossover operator and Canny edge detector. Since the wiring may have straight line features, the Canny edge detector has good noise suppression ability and accurate edge positioning ability, and can be used as a preferred choice.

[0044] On this basis, the local maximum is found based on the gradient direction. If a pixel is not the maximum value along the gradient direction in its neighborhood, its gradient amplitude is set to 0, that is, it is considered not to be part of the edge.

[0045] A23, determining a target image including a connection edge according to the gradient amplitude, specifically: If the gradient amplitude of the pixel point is greater than a first preset threshold, the pixel point is determined as a strong edge; Otherwise, if the gradient amplitude of the pixel point is less than or equal to the first preset threshold and greater than or equal to the second preset threshold, and the pixel point is connected to any of the strong edges, the pixel point is determined to be an edge.

[0046] In this embodiment, the pixels between the two thresholds are retained or not depending on whether they are connected to a strong edge. If they are connected to any strong edge (i.e., there is a strong edge in the 8-connected or 4-connected area), these pixels are also marked as edges; otherwise, these pixels are discarded.

[0047] A target image including a connection edge is determined according to the strong edge and the edge.

[0048] In this embodiment, the final edge map containing strong edges and their connected parts is initially obtained, and further processing is required to remove unnecessary edge fragments and ensure that the connection edges are continuous and complete. Morphological operations (such as expansion and corrosion) or path-based connection methods can be used to fill gaps and strengthen edges. Through the above steps, the target image containing the connection edges can be accurately determined while effectively removing noise, and the continuity and integrity of the edges can be guaranteed.

[0049] Please refer to Figure 3 , Embodiment 2 of the present invention is: a method for judging the connection of an electric energy meter, comprising the steps of: S1, acquiring a target image including the edge of the electric energy meter connection; The target image is determined based on the method for identifying wiring of an electric energy meter described in the first embodiment.

[0050] S2. Detect the relationship between the straight line in the target image and the edge of the back panel where the electric energy meter is connected, the angle of the corner point and the direction of the connection, and judge the connection layout of the electric energy meter.

[0051] Step S2 comprises the steps of: S21, detecting a straight line in the target image, and determining whether the straight line is parallel or perpendicular to an edge of a back plate where the electric energy meter is connected; Specifically, the straight line in the target image is detected by the Hough transform method, and it is determined whether the straight line is parallel or perpendicular to the edge of the back plate where the electric energy meter is connected; If the straight line is parallel or perpendicular to the edge of the back plate where the electric energy meter is connected, the wiring layout meets the requirements; otherwise, the wiring layout does not meet the requirements.

[0052] In this embodiment, Hough transform is a feature extraction technology, which is used in image processing to detect objects with specific shapes, such as straight lines and circles. The straight lines in the target image are detected by methods such as Hough transform to determine whether the wiring is parallel or perpendicular to the edge of the backplane. If the wiring is parallel or perpendicular to the edge of the backplane, it can be determined that the layout of the wiring line meets the requirements; otherwise, it is determined that the layout of the wiring does not meet the requirements.

[0053] In this embodiment, the pixel points corresponding to the edge in the target image are mapped to the parameter space, wherein the parameter space is represented in polar coordinate form; and the straight line is finally determined by counting the points in the parameter space.

[0054] Specifically, we first define the parameter space. For a straight line, polar coordinates are usually used to represent it. ,in, is the distance from the origin to the line, is the angle between this line and the positive direction of the x-axis. Then create a two-dimensional accumulator array (Accumulator Array) whose dimensions correspond to and The discrete value range of , with each element initialized to zero.

[0055] Second, for each non-zero (edge) pixel (x, y) in the binary image, calculate all possible ( , ) and increase the count at the corresponding position in the accumulator array. This process actually maps points in the image space to curves in the parameter space and "votes" on these curves. Look for local maxima or global maxima in the accumulator array. These peaks represent important straight lines that may exist in the image. In order to reduce false positive results, a threshold can be set. Only when the value in the accumulator exceeds the threshold is it considered a valid straight line. Based on the peak position found, you can trace back to the corresponding and value, thereby determining the equation of the line.

[0056] S22, detecting a corner point in the target image, calculating an angle corresponding to the corner point, and determining whether the angle meets a preset angle requirement; Specifically, the gradient of each pixel in the target image in the x direction and the y direction is calculated respectively, and the structure tensor of each pixel is constructed according to the gradient of each pixel in the x direction and the y direction; Calculating the eigenvalues ​​of the matrix corresponding to the structure tensor, selecting a minimum eigenvalue from the eigenvalues ​​as the response value of the corner point response function, and determining the pixel point whose response value is greater than a preset threshold as a corner point; It is determined whether the corner point meets the preset angle. If the corner point meets the preset angle, the wiring layout meets the requirement; otherwise, the wiring layout does not meet the requirement.

[0057] In this embodiment, a corner detection algorithm or a contour-based curvature analysis is used to find the corner point of the wiring. The angle of the corner is calculated to determine whether it meets the 90-degree requirement. If the corner angle of the wiring meets the 90-degree requirement, it can be determined that the layout of the wiring meets the requirement; otherwise, it is determined that the layout of the wiring does not meet the requirement. In other equivalent embodiments, it is not limited to the corner detection algorithm or the contour-based curvature analysis.

[0058] In this embodiment, the detection of wiring corners is described in detail by taking the corner detection method as an example, wherein corner detection is an important task in computer vision, which can help identify feature points with high information content in the image. These feature points are usually where two edges meet, or where the curvature changes significantly. Common corner detection algorithms include Harris corner detection, Shi-Tomasi corner detection, and FAST (Features from Accelerated Segment Test).

[0059] The following uses the Shi-Tomasi corner point detection method as an example to illustrate the calculation process of the corner points of the docking line: 1. Calculate the gradient of the target image in the x and y directions and .

[0060] 2. Construct the structure tensor: The structure tensor M is a 2x2 matrix consisting of the product of gradients: ]; This matrix can be regarded as the grayscale change statistics in the local area of ​​the image.

[0061] 3. Calculate eigenvalues: Calculate the eigenvalues ​​of the structure tensor and The eigenvalue reflects the degree of change in the local area of ​​the image.

[0062] 4. Calculate the response value: Select the smaller eigenvalue min ( ) as the response value R. If the response value R exceeds the preset threshold, the point is considered to be a corner point.

[0063] In this embodiment, the corner points may also be found based on the curvature analysis of the contour, and the positions where the curvature changes significantly are identified by calculating the curvature value of each point on the contour. These positions usually correspond to the corner points.

[0064] S23, identifying the wiring direction in the target image, and determining whether the wiring of the electric energy meter crosses or overlaps according to the wiring direction; Specifically, the wiring direction is identified in the target image based on a Kalman filter, and whether the wiring of the electric energy meter is crossed or overlapped is determined according to the wiring direction; If the wiring of the electric energy meter is crossed or overlapped, it is determined that the wiring layout does not meet the requirements; otherwise, the wiring layout meets the requirements.

[0065] In this embodiment, the Kalman filter is an efficient recursive filter designed for processing linear dynamic systems containing noise. It can estimate the internal state of the system from a series of incomplete and noisy measurements. By combining the prediction and observation data of the system, the Kalman filter can connect the state estimates at adjacent moments to obtain the trend curve of the wiring, and further analyze its slope, curvature and other geometric features based on the obtained wiring trend curve to determine whether the wiring has intersections, overlaps, etc. For example, if the slope of the wiring trend curve suddenly changes significantly, it may indicate that the wiring has a bend or turn; if the trend curves of two wirings intersect, there may be intersection or overlap problems.

[0066] Please refer to Figure 3 The third embodiment of the present invention is: a method for judging the connection of an electric energy meter, which is different from the second embodiment in that step S2 is: Determining the phase to which the electric energy meter belongs according to the matching degree between the electric energy meter and the preset template image; Detect the relationship between the straight line in the target image and the edge of the backplane where the electric energy meter wiring is located, the angle of the corner point and the wiring direction, judge the wiring layout of the electric energy meter, and based on the correspondence between the wiring layouts of electric energy meters of different phases and the scoring levels, find the scoring level corresponding to the wiring layout in the current wiring image.

[0067] In this embodiment, the electric energy meter can be divided into a single-phase electric energy meter and a three-phase electric energy meter according to the number of phases. The single-phase electric energy meter is mainly used for ordinary residential users, and the three-phase electric energy meter is mainly used for large industrial and commercial users. Different types of electric energy meters have different judging and evaluation standards for electric energy meter wiring. Therefore, before recognizing the wiring image of the electric energy meter, it is necessary to recognize the appearance acquisition image of the electric energy meter to determine whether the electric energy meter in the image is a single-phase electric energy meter or a three-phase electric energy meter.

[0068] In this embodiment, after determining the phase to which the appearance acquisition image belongs, the corresponding scoring data (including the correspondence between the wiring layout of different types of electric energy meters and the scoring level) is obtained. It can be understood that the wiring of a three-phase electric energy meter is generally more complicated than that of a single-phase electric energy meter. Therefore, for the same evaluation items, the scoring indicators of a three-phase electric energy meter are generally more relaxed than those of a single-phase electric energy meter. For example, when judging the turning angle of the connection line, the scoring level of a single-phase electric energy meter with a turning angle of 90 degrees is Class A, but for a three-phase electric energy meter, considering the difficulty of wiring, the scoring level of a turning angle of 85-90 degrees is Class A.

[0069] Wherein, the preset template image includes a feature area template image of a single-phase electric energy meter and a feature area template image of a three-phase electric energy meter; The steps of obtaining the feature area template image of the single-phase electric energy meter and the feature area template image of the three-phase electric energy meter are: By analyzing the appearance acquisition images of the single-phase electric energy meter and the three-phase electric energy meter, the wheel display button area images of the single-phase electric energy meter and the three-phase electric energy meter are selected as the feature area template image of the single-phase electric energy meter and the feature area template image of the three-phase electric energy meter respectively.

[0070] In this embodiment, the rotary display button area of ​​the electric energy meter refers to a group of buttons or keys on the electric energy meter used to switch the display of different information (such as power, voltage, current, etc.), which has significant characteristics. Therefore, the rotary display button areas of the single-phase electric energy meter and the three-phase electric energy meter are selected as their respective feature template images.

[0071] The step of determining the phase to which the electric energy meter belongs according to the degree of matching with the preset template image is specifically as follows: Collecting an appearance image of the electric energy meter and performing grayscale and binarization processing on the appearance image to obtain a corresponding binary image; The appearance image is tilt-corrected for the binary image based on the Hough transform method, and the corrected appearance image is matched with a preset template image to determine the phase to which the electric energy meter corresponding to the appearance image belongs.

[0072] In this embodiment, considering that the captured image may be rotated or changed in size, the SIFT feature point matching algorithm (not limited to the SIFT feature point matching algorithm) can be used to match the corrected electric energy meter captured image with the single-phase electric energy meter and the three-phase electric energy meter feature area template images respectively; the feature area template image with the most matching feature points is selected as the phase to which the captured image belongs.

[0073] Embodiment 4 of the present invention is: a storage medium having a computer program stored thereon, wherein when the computer program is executed, the steps in a method for identifying the wiring of an electric energy meter described in embodiment 1 above, or the steps in a method for judging the wiring of an electric energy meter described in embodiments 2 or 3 are implemented.

[0074] Please refer to Figure 4 , an electronic device is also provided below, including: at least one processor and a memory in communication with the at least one processor. The memory stores a computer program that can be executed by the at least one processor, and when the computer program is executed by the at least one processor, the steps in the method for identifying the connection of an electric energy meter described in the first embodiment above, or the steps in the method for judging the connection of an electric energy meter described in the second or third embodiment above are implemented.

[0075] like Figure 4As shown, the electronic device includes a computing unit 301, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 302 or a computer program loaded from a storage unit 308 into a random access memory (RAM) 303. In the RAM 303, various programs and data required for the operation of the electronic device can also be stored. The computing unit 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.

[0076] Multiple components in the electronic device are connected to the I / O interface 305, including: an input unit 306, an output unit 307, a storage unit 308, and a communication unit 309. The input unit 306 can be any type of device that can input information to the electronic device, and the input unit 306 can receive input digital or character information, and generate key signal input related to user settings and / or function control of the electronic device. The output unit 307 can be any type of device that can present information, and can include but is not limited to a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 308 can include but is not limited to a disk, an optical disk. The communication unit 309 allows the electronic device to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks, and can include but is not limited to a modem, a network card, an infrared communication device, a wireless communication transceiver, and / or a chipset, such as a Bluetooth device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.

[0077] The computing unit 301 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 301 include, but are not limited to, a CPU, a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 301 performs the various methods and processes described above. For example, in some embodiments, the method embodiments of the present application may be implemented as a computer program, which is tangibly contained in a machine-readable medium, such as a storage unit 308. In some embodiments, part or all of the computer program may be loaded and / or installed on an electronic device via a ROM 302 and / or a communication unit 309. In some embodiments, the computing unit 301 may be configured to perform the methods in the above-mentioned embodiments one to three by any other appropriate means (e.g., by means of firmware).

[0078] In summary, the present invention provides a method and storage medium for identifying and judging an electric energy meter, which obtains a wiring image of the electric energy meter, identifies a target image containing a wiring edge from the wiring image, and determines whether the wiring layout meets the requirements based on the target image. The method realizes the recognition of the wiring image of the electric energy meter based on image recognition technology, and then completes the judgment of the electric energy meter wiring, thereby reducing the human resources required for judging the electric energy meter wiring results, reducing the workload of the staff, and improving the efficiency and quality of judging the electric energy meter wiring results.

[0079] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent transformations made using the contents of the present invention's specification and drawings, or directly or indirectly applied in related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A method for identifying the connection of an electric energy meter, characterized in that: Includes steps: A1. Acquire a wiring image of the electric energy meter from an appearance acquisition image of the electric energy meter; A2. Using an edge detection algorithm, a target image containing a wiring edge is identified from the wiring image.

2. A method for identifying electric energy meter wiring according to claim 1, characterized in that: Step A2 includes: A21, converting the wiring image into a grayscale image, and performing noise reduction processing on the grayscale image; A22, determining an edge detection operator, and using the edge detection operator to calculate the gradient amplitude of each pixel in the grayscale image; A23, determining a target image including a connection edge according to the gradient amplitude, specifically: If the gradient amplitude of the pixel point is greater than a first preset threshold, the pixel point is determined as a strong edge; Otherwise, if the gradient amplitude of the pixel point is less than or equal to the first preset threshold and greater than or equal to the second preset threshold, and the pixel point is connected to any of the strong edges, the pixel point is determined as an edge; A target image including a connection edge is determined according to the strong edge and the edge.

3. A method for judging the connection of an electric energy meter, characterized in that: Includes steps: S1, acquiring a target image including the edge of the electric energy meter connection; The target image is determined based on a method for identifying wiring of an electric energy meter according to any one of claims 1-2; S2. Detect the relationship between the straight line in the target image and the edge of the back panel where the electric energy meter is connected, the angle of the corner point and the direction of the connection, and judge the connection layout of the electric energy meter.

4. The method for judging the connection of an electric energy meter according to claim 3, characterized in that: Step S2 comprises the steps of: S21, detecting a straight line in the target image, and determining whether the straight line is parallel or perpendicular to an edge of a back plate where the electric energy meter is connected; S22, detecting a corner point in the target image, calculating an angle corresponding to the corner point, and determining whether the angle meets a preset angle requirement; S23, identifying the wiring direction in the target image, and determining whether the wiring of the electric energy meter is crossed or overlapped according to the wiring direction.

5. The method for judging the connection of an electric energy meter according to claim 4, characterized in that: Step S21 is specifically as follows: Detecting a straight line in the target image by using the Hough transform method, and determining whether the straight line is parallel or perpendicular to the edge of the back plate where the electric energy meter connection is located; If the straight line is parallel or perpendicular to the edge of the back plate where the electric energy meter is connected, the wiring layout meets the requirements; otherwise, the wiring layout does not meet the requirements.

6. A method for judging the connection of electric energy meters according to claim 4, characterized in that: Step S22 is specifically as follows: Calculating the gradient of each pixel in the target image in the x direction and the y direction respectively, and constructing the structure tensor of each pixel according to the gradient of each pixel in the x direction and the y direction; Calculating the eigenvalues ​​of the matrix corresponding to the structure tensor, selecting a minimum eigenvalue from the eigenvalues ​​as the response value of the corner point response function, and determining the pixel point whose response value is greater than a preset threshold as a corner point; It is determined whether the corner point meets the preset angle. If the corner point meets the preset angle, the wiring layout meets the requirement; otherwise, the wiring layout does not meet the requirement.

7. The method for judging the connection of an electric energy meter according to claim 4, characterized in that: Step S23 is specifically as follows: Based on the Kalman filter, the wiring direction is identified in the target image, and according to the wiring direction, it is determined whether the wiring of the electric energy meter is crossed or overlapped; If the wiring of the electric energy meter is crossed or overlapped, it is determined that the wiring layout does not meet the requirements; otherwise, the wiring layout meets the requirements.

8. The method for judging the connection of an electric energy meter according to claim 3, characterized in that: Step S2 also includes: Determining the phase to which the electric energy meter belongs according to the matching degree between the electric energy meter and the preset template image; Detect the relationship between the straight line in the target image and the edge of the backboard where the electric energy meter wiring is located, the angle of the corner point and the wiring direction, judge the wiring layout of the electric energy meter, and find the scoring level corresponding to the wiring layout in the current wiring image based on the corresponding relationship between the wiring layout of electric energy meters of different phases and the scoring level; Wherein, the preset template image includes a feature area template image of a single-phase electric energy meter and a feature area template image of a three-phase electric energy meter; The steps of obtaining the feature area template image of the single-phase electric energy meter and the feature area template image of the three-phase electric energy meter are: By analyzing the appearance acquisition images of the single-phase electric energy meter and the three-phase electric energy meter, the wheel display button area images of the single-phase electric energy meter and the three-phase electric energy meter are selected as the feature area template image of the single-phase electric energy meter and the feature area template image of the three-phase electric energy meter respectively.

9. The method for judging the connection of an electric energy meter according to claim 8, characterized in that: The step of determining the phase to which the electric energy meter belongs according to the degree of matching with the preset template image is specifically as follows: Collecting an appearance image of the electric energy meter and performing grayscale and binarization processing on the appearance image to obtain a corresponding binary image; The appearance image is tilt-corrected for the binary image based on the Hough transform method, and the corrected appearance image is matched with a preset template image to determine the phase to which the electric energy meter corresponding to the appearance image belongs.

10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed, the steps in the method for identifying the wiring of an electric energy meter described in any one of claims 1-2 or the steps in the method for judging the wiring of an electric energy meter described in any one of claims 3-9 are implemented.