A method for detecting wrong wiring of electric energy meter
By constructing the electric energy meter image dataset and training object detection model, combining the HSV color space and cumulative probability Hoff transformation, the rapid and intuitive detection of the wrong wire of the electric energy meter is realized, solving the problem of low traditional manual detection efficiency and improving detection efficiency and accuracy.
Patent Information
- Application Number
- CN202211274472.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-18
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2042-10-18
AI Technical Summary
Traditional power meter connection error detection relies on manual detection, which has a large workload and low efficiency, and the existing automatic detection methods are not intuitive enough.
Build an energy meter image dataset, train the object detection model, identify the wires and wiring sequence through image detection, determine whether the wiring is correct, and use image processing technologies such as HSV color space and cumulative probability Hoff transformation to filter and verify the wire position.
It realizes fast and intuitive detection of the wrong wire of the power meter, reduces manpower and material investment, and improves detection efficiency and accuracy.
Smart Images

Figure CN115690012B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electric energy meter detection, and in particular to a method for detecting wrong wiring of an electric energy meter. Background Art
[0002] The wiring of the electricity meter is an important part of the electricity meter. Wrong wiring of the electricity meter is one of the common defects of the electricity metering device. Once the wrong wiring defect occurs in the metering circuit of the electricity meter, it will seriously affect the accuracy of the electricity metering device, which will not only bring huge economic losses to electricity users and enterprises, but also cause unnecessary economic disputes between users and power companies.
[0003] Traditional meter miswiring detection requires regular on-site inspections by trained electricians. This manual labor-intensive method is labor-intensive and inefficient. Existing automated detection methods primarily utilize traditional power electronics technology to obtain multiple circuit values and perform circuit analysis to infer the meter's wiring condition. However, circuit analysis requires the collection of numerous circuit parameters and is less intuitive. Summary of the Invention
[0004] The technical problem to be solved and the technical task proposed by the present invention are to improve and perfect the existing technical solutions and provide a method for detecting the misconnection of an electric energy meter, so as to realize fast and intuitive wiring detection and improve detection efficiency. To this end, the present invention adopts the following technical solutions.
[0005] A method for detecting a wrongly connected electric energy meter comprises the following steps:
[0006] 1) Constructing an electricity meter dataset: Images of the interior of the meter box were collected on-site using an image acquisition device. For each photo of the interior of the meter box, annotation tools were used to annotate the data, including the location, size, and type of all electricity meters, as well as the location and size of each meter's wiring area. The annotated photos were then divided into training, test, and evaluation sets based on their proportions.
[0007] 2) Training the object detection model: The objects detected by the model are divided into three categories: single-phase electricity meters, three-phase electricity meters, and electricity meter wiring areas. The model outputs the location and size of the corresponding object and draws a bounding box. The model is trained on the training set and tested on the test set. The model parameters with good fitting and generalization performance are selected, and the trained model is fixed for the electricity meter wiring detection process.
[0008] 3) Wiring area detection: When an energy meter wiring test is required, an image of the interior of the meter box is input into the target detection model. The model identifies the type of each energy meter and the size and location of its wiring area. It then crops the original image to obtain an image of the energy meter wiring area and marks the correct wiring sequence for each area according to the meter type.
[0009] 4) Identifying wires and wiring sequence: Processing the image obtained in step 3) includes:
[0010] 41) Using color clustering to obtain the wire pixels corresponding to the target wire color and generate a binary image;
[0011] 42) Using image preprocessing and contour detection methods to extract wire contours;
[0012] 43) Detect straight lines based on wire contours;
[0013] 44) Filtering straight lines based on their slopes and similarities to obtain wire positions; obtaining the ammeter wiring sequence by segmenting wire pixels, extracting wire outlines, and detecting wire positions;
[0014] 5) Wiring Correctness: The correctness of the wiring is determined by combining the wire positions corresponding to all target wire colors. This color sequence is then compared with the correct wiring color sequence for the current meter type to determine if the wiring is correct. This method uses image detection to quickly and intuitively determine the correctness of the wiring. Compared to traditional manual inspection methods, this method requires less manpower and material resources, significantly reducing the workload of on-site inspectors and improving inspection efficiency.
[0015] As a preferred technical approach: In step 41), based on the HSV color space, the k-means algorithm is used to perform color clustering on the cropped image of the electricity meter wiring area. For the color-quantized image, for each target wire color, the corresponding pixels are selected within the tolerance to obtain a binary image representing the color pixels. Considering that images captured on-site are easily affected by lighting, occlusion, and shadows, and exhibit different brightness, and the three color components of the RGB color space used in the original image are sensitive to brightness, the image should first be converted to the HSV color space. The HSV color space is composed of three components: hue, saturation, and lightness. The components expressed in this space are more suitable for tracking object colors, and therefore perform better in the task of segmenting objects of specified colors. Based on the three color channels of the cropped image of the wiring area, the k-means algorithm is used to perform color clustering on them. This method can achieve good clustering results. For each wire color to be detected, the image pixels are traversed and the clustering results of the H, S, and V channels are used to determine whether they belong to the current color. Pixels of the target wire color are extracted, and a binary image representing the color pixels is obtained.
[0016] As a preferred technical approach, in step 42), image preprocessing is performed on the binary image corresponding to each target wire color. Contour detection is then performed on the preprocessed image to extract the wire contour, thereby obtaining a binary image representing the contour of the target wire color. Pixels on the target wire may be missed due to occlusion, shadows, and other factors. For pixels on non-target wires, since only color information is considered during detection, the pixel extraction results may include redundant and scattered areas of similar color. Therefore, preprocessing is necessary to reduce interference from these factors and improve contour detection accuracy.
[0017] As a preferred technical approach, in step 42), during image preprocessing, first perform two consecutive closing operations based on morphological methods. Each closing operation includes a dilation operation and an erosion operation. The dilation operation retains the maximum value of each image pixel in the pixel neighborhood determined by the specified structuring element, and the erosion operation retains the minimum value of each image pixel in the pixel neighborhood determined by the specified structuring element. The dilation operation fills small areas and connects the edges of adjacent objects, while the erosion operation eliminates small, redundant objects. Continuous dilation and erosion closing operations are performed to bridge disconnected areas and smooth object edges. This achieves image preprocessing.
[0018] As a preferred technical approach, during contour detection in step 42), small contour regions are eliminated by calculating the contour area. Specifically, a contour detection algorithm is first executed, and the area of each contour region is calculated. When the area of a region is less than a preset threshold, the corresponding region of the original binary image is filled with zeros, thereby eliminating small pixel regions. The contour detection algorithm is a boundary tracking algorithm based on binary image topology analysis, and the contour area is calculated using Green's formula. This eliminates scattered pixel regions to facilitate contour calculation.
[0019] As a preferred technical approach, in step 43), the wire contour image after wire contour extraction is subjected to a cumulative probability Hough transform and dynamic thresholds are set to detect straight lines. Lines are then screened based on line slope and line similarity. The Hough transform is a classic method for image transformation, often used to separate geometric shapes with certain common features from an image. However, the calculation of the Hough transform requires traversing points in the image, resulting in high computational complexity, long processing time, and poor real-time performance. The cumulative probability Hough transform algorithm is an improvement on the standard Hough transform algorithm. It performs the Hough transform within a certain range and calculates the direction and range of individual line segments, thereby reducing the amount of computation and shortening calculation time. When performing the cumulative probability Hough transform, several thresholds need to be set, including the accumulator threshold for detecting straight lines, the minimum line length, and the maximum line segment interval. Due to the different sizes of cropped images, these thresholds should be set to a certain ratio of the image size. This technical solution uses the cumulative probability Hough transform to detect straight line segments, greatly reducing the computational complexity. The detection result is a line segment determined by two endpoints, which is more accurate.
[0020] As a preferred technical approach, in step 44, during line slope screening, interfering wires with smaller slopes are removed by calculating the line slopes. This calculation uses the two line endpoints obtained from line segment detection to calculate the line segment slope, retaining only those line segments with slopes greater than a threshold. Considering that target wires are generally approximately vertical, while interfering wires are not, calculating the line slopes can be used to remove interfering wires with smaller slopes. This reduces bias and redundancy in line detection results.
[0021] As a preferred technical approach, in step 44, line similarity screening is performed by calculating the distance between the line and the origin in polar coordinates and the inclination of the connecting line. When both values are less than a threshold, the lines are considered similar, and only one is retained. Because the target wire has curvature, line detection on its contour may result in multiple similar lines being detected for a single contour. Therefore, line similarity screening is performed to remove these similar lines and retain only one. This operation significantly reduces the redundancy of line detection results.
[0022] As a preferred technical approach, in step 44), when determining the wire location, the wire connection portion in the wiring area is detected at the top of the image, and the wire location is represented by the coordinates of the intersection of the straight lines with the top of the image. When determining the specific location of the wire, the straight lines are matched pairwise to obtain a set of straight lines representing a single wire. During the matching process, some redundant straight lines are eliminated, and the specific location of the wire is determined. Invalid straight lines are further eliminated to obtain the precise location of the target wire.
[0023] As a preferred technical approach, when characterizing wire locations, the coordinates of each line's intersection with the top of the region are first calculated. From left to right, the distance between the current intersection and its adjacent intersection to the right is determined to be within a certain threshold. If the distance between the two points meets the requirement, the two points are determined to be the intersection of the two sides of the wire's contour and the top, and the left endpoint is selected to represent the wire's location. This operation generates a set of lines representing a wire by pairwise matching. This matching process eliminates some redundant lines and determines the specific location of the wire.
[0024] Beneficial effects: This method uses image detection to quickly and intuitively obtain detection results. Compared with traditional manual inspection methods, it requires less manpower and material resources, greatly reduces the workload of on-site inspection personnel, and improves detection efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 It is a schematic flow chart of the present invention.
[0026] Figure 2 It is a flow chart of step S4 of the present invention. DETAILED DESCRIPTION
[0027] The technical solution of the present invention is further described in detail below with reference to the accompanying drawings.
[0028] like Figure 1 As shown, a method for detecting a wrongly connected electric energy meter includes the following steps:
[0029] S1: Constructing an electric energy meter dataset: Using an image acquisition device, collect photos of the interior of the electric meter box on-site. The image acquisition device uses a mobile phone. The photos are required to be taken from the front. The number of images collected ranges from 8,000 to 12,000. In this embodiment, the number of images collected is 10,000. Each image of the interior of the electric meter box may contain multiple electric energy meters. For each photo of the interior of the electric meter box, use an annotation tool to annotate the data, including the location, size, and type of all electric energy meters, as well as the location and size of the wiring area of each electric energy meter. The annotated photo set is divided into a training set, a test set, and an evaluation set in a ratio of 6:2:2;
[0030] S2: Training the target detection model: The targets detected by the model are divided into three categories, including single-phase electricity meters, three-phase electricity meters, and electricity meter wiring areas. The model outputs the location and size of the corresponding target and draws a bounding box. The model is trained on the training set and tested on the test set. The model parameters with good fitting effect and generalization ability are selected, and the trained model is fixed for the electricity meter wiring detection process.
[0031] S3: Wiring area detection: When an energy meter wiring test is required, an image of the interior of the meter box is input into the target detection model. The model identifies the type of each energy meter and the size and location of its wiring area. The model then crops the original image to obtain an image of the energy meter wiring area and marks the correct wiring sequence for each area according to the energy meter type.
[0032] S4: Identify wires and wiring sequence: Process the image obtained in step S3. The specific steps are as follows: Figure 2 As shown, it includes:
[0033] S41: Using color clustering, obtain wire pixels corresponding to the target wire color and generate a binary image. Specifically, color segmentation is performed using color clustering to process each target wire color separately. For a certain target wire color, the corresponding pixels are extracted to generate a binary image representing the color pixels.
[0034] Based on the HSV color space, the k-means algorithm is used to perform color clustering on the cropped image of the electricity meter wiring area to extract the target wire pixels.
[0035] Considering that images captured on-site are easily affected by lighting, occlusion, and shadows, resulting in varying brightness, and that the three color components of the RGB color space used in the original image are sensitive to brightness, the image should first be converted to the HSV color space. The HSV color space consists of three components: hue, saturation, and value. The components expressed in this space are more suitable for tracking object color, and therefore perform better in color-specific object segmentation tasks.
[0036] Then, based on the three color channels of the cropped image in the wiring area, the k-means algorithm is used to perform color clustering. This method can achieve better clustering effect.
[0037] For each wire color to be detected, the image pixels are traversed and the clustering results of the H, S, and V channels are used to determine whether they belong to the current color. The pixels of the target wire color are then extracted and a binary image representing the color pixels is obtained.
[0038] S42: Using image preprocessing and contour detection methods to extract wire contours;
[0039] Specifically, for each target wire color binary image obtained in S41, the wire contour is extracted using image preprocessing and contour detection. The first preprocessing step is to perform two consecutive closing operations based on a morphological method. A closing operation includes a dilation operation and an erosion operation. The dilation operation refers to retaining the maximum value of each image pixel in the pixel neighborhood determined by the specified structural element, while the erosion operation refers to retaining the minimum value of each image pixel in the pixel neighborhood determined by the specified structural element. Dilation can fill small areas and connect the edges of adjacent objects, while erosion can eliminate small and redundant objects. Continuously performing dilation and erosion closing operations can achieve the effect of bridging disconnected areas and smoothing object edges. The second preprocessing step is to eliminate small contour areas by calculating the area of the contour area. Specifically, the contour detection algorithm is first executed and the area of each contour area is calculated. When the area of the area is less than a preset threshold, the corresponding area of the original binary image is filled with zeros to eliminate the small pixel area. The contour detection algorithm is based on the boundary tracking algorithm of binary image topology analysis, and the contour area is calculated using Green's formula. When performing the final contour detection, the contour detection algorithm is executed again on the color region binary image after the two-step preprocessing to obtain an optimized binary image representing the wire contour.
[0040] Pixels on the target wires may be missed due to occlusion, shadows, and other factors. For pixels on non-target wires, since only color information is considered during detection, the pixel extraction results may contain redundant and scattered areas of similar color. Therefore, preprocessing is necessary to reduce the interference of these factors and improve the accuracy of contour detection. In the preprocessing stage, based on morphological methods, an opening operation is first applied, which involves continuous dilation and erosion operations to close disconnected areas and smooth object edges. Next, contours are detected and their areas are calculated. Contour areas with an area smaller than a threshold are filled with zeros to eliminate scattered pixel areas.
[0041] S43: Detect straight lines based on wire contours;
[0042] Specifically, to further quantify the location of the wires, the cumulative probability Hough transform is used for the contour image obtained in S42, with a dynamic threshold set to detect straight lines. Lines are then screened using line slope and line similarity. Line detection is performed on the binary image representing the wire contour using the cumulative probability Hough transform. The Hough line detection algorithm allows for gaps between feature edges and is less affected by noise, achieving good detection results. However, the traditional Hough line detection algorithm requires traversing the entire image space, resulting in high computational complexity and poor real-time performance. Furthermore, its detection results are straight lines in polar coordinates, which cannot accurately locate the target line segment. In contrast, the cumulative probability Hough transform only performs the Hough transform within a certain range and considers the direction and extent of the line segment during the detection process. Using the cumulative probability Hough transform to detect straight line segments can significantly reduce the computational complexity, and its detection result is a line segment determined by two endpoints, resulting in more accurate detection results.
[0043] The Hough transform is a classic technique for image transformation, often used to isolate geometric shapes sharing common features. However, its calculation requires traversing all points in the image, resulting in high computational complexity, long processing time, and poor real-time performance. The cumulative probabilistic Hough transform (PPHT) algorithm is an improvement on the standard Hough transform (SHT) algorithm. It performs the Hough transform within a specific range, calculating the direction and range of individual line segments, thereby reducing computational complexity and time. When performing the cumulative probabilistic Hough transform, several thresholds must be set, including the accumulator threshold for detecting lines, the minimum line length, and the maximum line segment spacing. Due to the varying sizes of cropped images, these thresholds should be set to a certain ratio of the image size.
[0044] For the initially detected straight lines, line screening is required in two steps. First, considering that in general, the target wire is approximately vertical while the interfering wire is not vertical, some interfering wires with smaller slopes can be deleted by calculating the slope of the straight line. Therefore, the slope of the straight line segment is calculated using the two line segment endpoints obtained by the straight line segment detection, and only the straight line segments with a slope greater than the threshold are retained. The second step is similar straight line screening. Since the target wire has a curvature, when performing straight line detection on its contour, multiple similar straight lines may be detected for one contour. Therefore, by calculating the distance of the straight line from the origin and the inclination of the connecting line under the polar coordinate expression, when both are less than the threshold, it is judged to be a similar straight line, and only one of them is retained.
[0045] The above operation detects and selects straight lines so that each wire to be detected corresponds to two straight lines, which respectively represent the contours of its two perpendicular sides.
[0046] S44: Filter the straight lines according to their slopes and similarities to obtain the wire positions; obtain the ammeter connection sequence by segmenting the wire pixels, extracting the wire outlines, and detecting the wire positions;
[0047] Specifically, because the lines obtained from the aforementioned line detection have a high degree of redundancy, the detection results need to be further screened so that the screened lines can represent the position and direction of the wires in the connection area. Since the target wire is generally vertical in the connection area, while the tail of the target wire is generally horizontal, and other interfering wires have different directions, some interfering lines can be eliminated by calculating the line slope. When filtering the line slope, interfering lines are deleted by calculating the line slope using the two line segment endpoints obtained from the line segment detection, and only line segments with slopes greater than the threshold are retained. When determining the specific location of the wire, the lines are matched pairwise to obtain a line group representing a wire. During the matching process, some redundant lines can be eliminated and the specific location of the wire can be determined.
[0048] Furthermore, when detecting the wiring area, the actual connection is at the top of the image. Therefore, the wire location can be represented by the coordinates of the intersection of the straight line and the top of the image. First, the coordinates of the intersection of each straight line obtained in S43 and the top of the area are calculated. From left to right, the distance between the current intersection and its adjacent intersection to the right is determined to be within a certain threshold. If the distance between the two points meets the required range, the two points are determined to be the intersection of the two sides of the wire and the top, and the left endpoint is selected to represent the wire location.
[0049] Since the wire itself has a certain curvature, several similar straight line results will be obtained for a curved contour during straight line detection. Therefore, it is necessary to screen similar straight lines to reduce redundancy. When screening straight line similarity, the distance d between the straight line and the origin and the angle θ between the straight line and the x-axis are calculated. It is defined that when the d and θ of two straight lines are similar, the two straight lines are similar. In the specific operation, two thresholds are first set to represent the minimum distance difference and the minimum angle difference, respectively. When the difference between the d of the two straight lines is less than the minimum distance difference, and the difference between the θ is less than the minimum angle difference, the two straight lines are considered redundant, and only the first traversed straight line is retained. This operation can greatly reduce the redundancy of the straight line detection results.
[0050] S5: Combine the wire positions corresponding to all target wire colors to obtain the color sequence of the meter wiring. Different meter types have different standard wiring modes. The normal wiring mode can be queried according to the identified meter type. The detected wire color sequence is compared with the correct wiring color sequence of the current ammeter type to determine whether the wiring is correct.
[0051] In this example, the first stage of detection employed the YOLOv3 object detection model to identify wiring areas. This model strikes a good balance between accuracy and detection speed, enabling real-time and highly accurate detection without sacrificing significant precision. In the second stage, based on features such as wiring color and shape, this example employed image processing techniques including color clustering, line detection, and dynamic thresholding to quantify wiring locations. Furthermore, by comparing the wiring color sequence, this method enabled intuitive judgment of the correct ammeter wiring.
[0052] This technical solution combines target detection deep learning algorithms and image processing technology, and can quickly and intuitively obtain the detection results of the correctness of the ammeter wiring through the internal image of the ammeter box. Compared with traditional manual troubleshooting methods, it requires less manpower and material resources, greatly reduces maintenance costs, improves detection efficiency and accuracy, and has high practical value.
[0053] The above-mentioned method for detecting misconnected wiring of an electric energy meter is a specific embodiment of the present invention, which has embodied the outstanding substantial features and significant progress of the present invention. According to actual use needs and under the guidance of the present invention, equivalent modifications in shape, structure, etc. can be made to the method, which are all within the scope of protection of this scheme.
Claims
1. A method for detecting wrong connection of an electric energy meter, characterized in that The following steps are involved: 1) Constructing an electricity meter dataset: Images of the interior of the meter box were collected on-site using an image acquisition device. For each photo of the interior of the meter box, annotation tools were used to annotate the data, including the location, size, and type of all electricity meters, as well as the location and size of each meter's wiring area. The annotated photos were then divided into training, test, and evaluation sets based on their proportions. 2) Training the object detection model: The objects detected by the model are divided into three categories: single-phase electricity meters, three-phase electricity meters, and electricity meter wiring areas. The model outputs the location and size of the corresponding object and draws a bounding box. The model is trained on the training set and tested on the test set. The model parameters with good fitting and generalization performance are selected, and the trained model is fixed for the electricity meter wiring detection process. 3) Wiring area detection: When an energy meter wiring test is required, an image of the interior of the meter box is input into the target detection model. The model identifies the type of each energy meter and the size and location of its wiring area. It then crops the original image to obtain an image of the energy meter wiring area and marks the correct wiring sequence for each area according to the meter type. 4) Identifying wires and wiring sequence: Processing the image obtained in step 3) includes: 41) Using color clustering to obtain the wire pixels corresponding to the target wire color and generate a binary image; 42) Using image preprocessing and contour detection methods to extract wire contours; 43) Detect straight lines based on wire contours; 44) Filtering straight lines based on their slopes and similarities to obtain wire positions; obtaining the ammeter wiring sequence by segmenting wire pixels, extracting wire outlines, and detecting wire positions; 5) Determine the correctness of the wiring: Combine the wire positions corresponding to all target wire colors to obtain the color sequence of the meter wiring. Compare the detected wire color sequence with the correct wiring color sequence for the current ammeter type to determine whether the wiring is correct.
2. The method for detecting a wrong connection of an electric energy meter according to claim 1, characterized in that: In step 41), based on the HSV color space, the k-means algorithm is used to perform color clustering on the cropped image of the electricity meter wiring area; for the color quantized image, for each target wire color, the corresponding pixel is selected within the tolerance to obtain a binary image representing the color pixel.
3. The method for detecting a wrong connection of an electric energy meter according to claim 2, characterized in that: In step 42), image preprocessing is performed on the binary image corresponding to each target wire color, and contour detection is performed on the preprocessed image to extract the wire contour and obtain a binary image representing the target color wire contour.
4. The method for detecting a wrong connection of an electric energy meter according to claim 3, wherein: In step 42), during image preprocessing, first, based on a morphological method, two closing operations are performed consecutively; one closing operation includes a dilation operation and an erosion operation, wherein the dilation operation is to retain the maximum value of each image pixel in the pixel neighborhood determined by the specified structural element; the erosion operation is to retain the minimum value of each image pixel in the pixel neighborhood determined by the specified structural element; the dilation operation fills small areas and connects the edges of adjacent objects, and the erosion operation eliminates small redundant objects. The closing operations of dilation and erosion are performed consecutively to bridge disconnected areas and smooth object edges.
5. The method for detecting a wrong connection of an electric energy meter according to claim 3, characterized in that: In step 42), during contour detection, small contour areas are eliminated by calculating the area of the contour area; specifically, a contour detection algorithm is first executed, and the area of each contour area is calculated. When the area of the area is less than a preset threshold, the corresponding area of the original binary image is filled with zeros, thereby eliminating the small pixel area; wherein, the contour detection algorithm is a boundary tracking algorithm based on binary image topology analysis, and the calculation of the contour area is implemented by Green's formula.
6. The method for detecting a wrong connection of an electric energy meter according to claim 3, characterized in that: In step 43), the wire contour image after the wire contour is extracted is subjected to cumulative probability Hough transform and a dynamic threshold is set to detect straight lines, and then the straight lines are screened by the straight line slope and the straight line similarity.
7. The method for detecting a wrong connection of an electric energy meter according to claim 6, characterized in that: In step 44), when filtering the straight line slope, some interfering wires with smaller slopes are deleted by calculating the straight line slope. The straight line slope method is to calculate the straight line segment slope using the two line segment endpoints obtained by straight line segment detection, and only retain the straight line segments with a slope greater than a threshold.
8. The method for detecting a wrong connection of an electric energy meter according to claim 6, characterized in that: In step 44), when screening the straight line similarity, the distance between the straight line and the origin and the inclination of the connecting line are calculated in polar coordinate expression. When both are less than the threshold, they are judged as similar straight lines and only one of them is retained.
9. The method for detecting a wrong connection of an electric energy meter according to claim 6, characterized in that: In step 44), when determining the position of the wire, the wiring connection part in the wiring area is detected at the top of the image, and the wire position is represented according to the coordinates of the intersection of the straight line and the top of the image; when determining the specific position of the wire, a group of straight lines representing a wire is obtained by matching the straight lines in pairs. During the matching process, some redundant straight lines can be eliminated, and the specific position of the wire is obtained.
10. The method for detecting a wrong connection of an electric energy meter according to claim 9, characterized in that: When characterizing the position of wires: first calculate the coordinates of the intersection of each straight line and the top of the area, and determine from left to right whether the distance between the current intersection and its adjacent intersection to the right is within a certain threshold range. If the distance between the two points meets the requirements, the two points are judged to be the intersection of the two side contours and the top of a wire, and the left endpoint position is selected to represent the wire position.
Citation Information
Patent Citations
A machine vision method for minitype wiring terminal quality testing
CN107895362A
Wiring detection method, device, equipment, frequency conversion control circuit and system
CN113281677A