Electric energy meter image intelligent acquisition method and system based on multi-source data
Through multi-angle light source acquisition and Gaussian filtering, Canny edge detection and SIFT feature extraction methods, the energy meter image recognition process is optimized, and the feature extraction blur problem caused by ambient light changes and equipment deviations is solved, and the recognition accuracy and efficiency are improved.
Patent Information
- Application Number
- CN202510739267.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-04
- Publication Date
- 2025-07-08
- Estimated Expiration
- 2045-06-04
AI Technical Summary
The existing power meter image recognition technology can easily lead to blurred or misjudgment of contour feature extraction under ambient light changes or equipment installation deviations, difficult character segmentation, high maintenance costs, and lack the ability to collaboratively analyze multi-angle reflective contours, resulting in low processing efficiency.
The multi-angle reflective profile image is collected by preset incident angle light source, the difference is calculated and Gaussian filtered, the edge segments are filtered three consecutive times, the acquisition angle and focal length are adjusted, and the dynamic adjustment path instructions are generated, and edge detection and feature abnormal detection are optimized.
It improves the robustness and efficiency of the image recognition of the electricity meter, reduces recognition errors, reduces maintenance costs, and improves data integrity and acquisition efficiency through the closed-loop correction mechanism.
Smart Images

Figure CN120279539A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image recognition, and in particular, to an intelligent acquisition method and system for electric energy meter images based on multi-source data. Background Art
[0002] The technical field of image recognition includes related technologies for recognizing and analyzing specific targets or patterns in images. The core content of this technical field mainly focuses on extracting meaningful information from static or dynamic images, including key links such as character recognition, object detection, image segmentation, and feature extraction. In systematic applications, image recognition is widely used in scenarios such as autonomous driving, medical image analysis, industrial inspection, and intelligent meter reading. Its technical implementation relies on computer vision, image processing, and machine learning methods to complete the parsing and recognition tasks of image data through the establishment of algorithm models. The technology in this field continues to develop in the direction of recognition accuracy, processing speed, and data adaptability.
[0003] Among them, the intelligent acquisition method for electric energy meter images refers to the patent theme of image acquisition and recognition processing for the display information of electric energy meters. This patent theme covers links such as the acquisition of electric energy meter dial images, image preprocessing, character segmentation, and character recognition. Specifically, after obtaining the electric energy meter image through a camera device, character recognition methods are used to extract and analyze the digital information in the image. Its recognition method is mainly based on the small-class methods for character or digit recognition in image analysis, locating the character area in the image and matching the character feature template to achieve automatic reading of the dial value.
[0004] Existing electric energy meter image recognition relies on fixed light sources and acquisition angles. Changes in ambient light or equipment installation deviations easily cause reflection interference, resulting in blurred contour feature extraction or misjudgment. In the character segmentation link, global threshold segmentation is used, ignoring the local feature density difference, and it is difficult to distinguish highly similar characters in low-resolution images. The acquisition parameters of existing methods are fixed, and frequent manual calibration is required when the equipment ages or the dial is damaged, resulting in high maintenance costs. The recognition of abnormal areas relies on single-feature analysis and does not combine the distribution differences of multi-source features for joint determination. Glass reflections or stains are easily misjudged as character abnormalities. The existing process is executed linearly in sequence, lacking a real-time feedback adjustment mechanism, and redundant acquisition or ineffective calculations lead to low processing efficiency. The ability to synergistically analyze multi-angle reflection contours is insufficient, and effective edge segments cannot be screened through difference statistics, increasing the storage and calculation burden due to data redundancy. Summary of the Invention
[0005] The purpose of the present invention is to solve the deficiencies existing in the prior art, and to propose an intelligent acquisition method and system for electric energy meter images based on multi-source data.
[0006] To achieve the above purpose, the present invention adopts the following technical scheme: An intelligent acquisition method for electric energy meter images based on multi-source data, comprising the following steps: S1: Collect the multi - angle reflection profile images of the electricity meter with a preset incident - angle light source, calculate the differences point - by - point based on the standard reference profile point coordinates, process the maximum value, minimum value and mean value with the Gaussian filtering algorithm after dividing the edge segments, and generate the multi - angle difference statistical results; S2: Screen the edge segments that exceed the limit three times continuously according to the multi - angle difference statistical results, adjust the acquisition angle with a step of 0.5 degrees and compensate the focal length by 2 mm, extract the edge region based on the Canny edge - detection algorithm, calculate the change rate of the edge contrast of three frames, and generate the dynamic - adjustment path instruction; S3: Divide the image into 64×64 pixel regions, obtain the high - frequency feature - point density of each region through the SIFT feature - extraction algorithm, extract the edge - direction angle data in combination with the histogram of oriented gradients, adjust the region - scanning order based on the dynamic - adjustment path instruction, calculate the standard deviation of the feature - point density and the variance of the gradient, and generate the multi - source feature anomaly distribution map.
[0007] As a further solution of the present invention, the multi - angle difference statistical results are specifically the maximum value of the edge - segment difference, the minimum value of the edge - segment difference, and the mean value of the edge - segment difference. The dynamic - adjustment path instruction includes the angle - adjustment step, the focal - length compensation step, and the edge - contrast change rate. The multi - source feature anomaly distribution map includes the standard deviation of the high - frequency feature - point density, the variance of the direction gradient, and the region - scanning order.
[0008] As a further solution of the present invention, the window size of the Gaussian filtering algorithm is 5×5 pixels and the standard deviation σ = 1.2; The over - limit determination threshold is the upper limit of the difference fluctuation and the probability threshold based on the Gaussian distribution is set as μ±3σ; The ratio of the high and low double thresholds of the Canny edge - detection algorithm is 1:3 and is dynamically adjusted through the gradient - magnitude histogram; The number of layers of the Gaussian - difference pyramid for the SIFT feature extraction is 4 layers and the scale factor k = 1.6; The histogram of oriented gradients divides 360 degrees into 8 fixed intervals and statistically calculates the weighted frequencies.
[0009] As a further solution of the present invention, the specific steps for obtaining the multi - angle difference statistical results are as follows: S101: Collect the reflection profile image of the electricity meter under the incident - angle of the light source, establish a contour - point positioning model through the mapping relationship between the image pixel coordinates and the physical - space coordinates, import the standard reference profile point coordinates into the model, match the corresponding regions in the multi - angle reflection profile image, calculate the horizontal and vertical coordinate offsets of the reflection profile points and the standard reference points in a point - to - point manner, and generate the reflection - profile difference matrix; S102: Based on the reflection profile difference matrix, split the difference data into independent edge segments according to the contour curvature change nodes. Use the Gaussian filtering algorithm to suppress the noise of the difference data within each edge segment. Set the filtering window size and standard deviation parameters, traverse the filtered data in multiple segments, identify and record the maximum and minimum values, and calculate the mean value by combining the moving average to generate an edge segment filtered extreme value set; S103: Call the edge segment filtered extreme value sets corresponding to all incident angles, classify and summarize the maximum, minimum, and mean values of each segment according to the light source incident angle, perform weighted superposition on all statistical items under the same type of angle, and eliminate the influence of angle differences through normalization to generate a multi-angle difference statistical result; The mapping relationship realizes the linear conversion from pixel coordinates to physical coordinates based on the affine transformation matrix; The ratio of the moving average window length to the edge segment length is 1:5; The weighted superposition weight has a non-linear relationship with the incident angle, and the weight distribution formula is w = sin²(θ).
[0010] As a further solution of the present invention, the specific steps for obtaining the dynamic adjustment path instruction are as follows: S201: Call the multi-angle difference statistical result, set the edge segment overrun determination threshold as the upper limit of the difference fluctuation for three consecutive times, traverse all the edge segment data, count the frequency of each segment where the difference exceeds the threshold for three consecutive times, screen the qualified segments according to the frequency value, extract the angle parameter and focal length parameter of the corresponding acquisition angle, and generate a continuously overrun edge segment set; S202: Based on the continuously overrun edge segment set, incrementally adjust the light source incident angle in steps of 0.5 degrees, synchronously superimpose a 2mm focal length compensation amount, collect the adjusted reflection image, call the Canny edge detection algorithm, through gradient magnitude calculation and non-maximum suppression in the direction, combine high and low double thresholds to screen out effective edge pixel points, extract the coordinate set of the target edge area, and generate an edge area detection sequence; S203: Based on the continuously overrun edge segment set, incrementally adjust the light source incident angle in steps of 0.5 degrees, synchronously superimpose a 2mm focal length compensation amount, collect the adjusted reflection image, call the Canny edge detection algorithm, through gradient magnitude calculation and non-maximum suppression in the direction, combine high and low double thresholds to screen out effective edge pixel points, extract the coordinate set of the target edge area, and generate an edge area detection sequence.
[0011] As a further solution of the present invention, the specific steps for obtaining the multi-source feature anomaly distribution map are as follows: S301: Divide the image into 64×64 pixel regions, construct a Difference of Gaussian (DoG) pyramid to traverse multiple layers of pixel points, detect local extreme points as feature points, calculate the ratio of the number of feature points to the area in each region, and generate a feature point density distribution map; S302: Based on the feature point density distribution map, perform horizontal and vertical difference operations on each region's pixel points, calculate the gradient magnitude and direction angle, divide the 360-degree direction into a fixed number of intervals, count the frequency of gradient directions in multiple intervals, and generate a gradient direction angle set; S303: Invoke the dynamic adjustment path instruction, rearrange the region scanning order according to the instruction priority, extract the feature point density distribution map and the gradient direction angle set of the currently scanned region, calculate the standard deviation of the dispersion of density values and the distribution variance of gradient angles, perform normalized weighted summation on the two types of statistics, and generate a multi-source feature anomaly distribution map; The weights for the normalized weighted summation are assigned according to the contribution degree of the anomaly indicators, with the density standard deviation weight being 0.6 and the gradient variance weight being 0.4.
[0012] As a further aspect of the present invention, the method further includes: S4: Screen the abnormal regions according to the multi-source feature anomaly distribution map, invoke the local focusing mechanism to increase the exposure by 20% for re-acquisition, perform stitching and replacement based on the edge pixel gray-scale consistency ratio, combine the dynamic adjustment path instruction and past data to generate a multi-source response optimization table, and drive the closed-loop correction of the subsequent acquisition path.
[0013] As a further aspect of the present invention, the method further includes: S4: Screen the abnormal regions according to the multi-source feature anomaly distribution map, invoke the local focusing mechanism to increase the exposure by 20% for re-acquisition, perform stitching and replacement based on the edge pixel gray-scale consistency ratio, combine the dynamic adjustment path instruction and past data to generate a multi-source response optimization table, and drive the closed-loop correction of the subsequent acquisition path.
[0014] As a further aspect of the present invention, the steps for obtaining the multi-source response optimization table are specifically as follows: S401: Invoke the multi-source feature anomaly distribution map, calculate the mean and standard deviation of the comprehensive indicators of all regions, set the anomaly recognition boundary based on the mean plus twice the standard deviation, screen the regions whose comprehensive indicator values exceed the boundary, activate the local focusing mechanism to set the exposure increase ratio, re-perform image acquisition on the screened regions, and generate a high-exposure acquisition image set; S402: Based on the high-exposure acquired image set, extract the pixel gray values at the region edges, calculate the difference ratios between the gray values of multiple adjacent pixels, set the consistency ratio threshold with the average of the adjacent pixel gray values, replace the pixels with gray ratios exceeding the threshold with the gray average of their adjacent regions, and generate a gray consistency corrected image set; S403: Integrate the gray consistency corrected image set and the dynamic adjustment path instruction, call the angle, focal length, and exposure parameter values in the previously acquired data, calculate the Euclidean distance values between the multi-parameters of the current path instruction and the previous parameters, and perform superposition correction on the path execution parameters by assigning weighted coefficients according to the distance values to generate a multi-source response optimization table.
[0015] An intelligent electric energy meter image acquisition system based on multi-source data, the intelligent electric energy meter image acquisition system based on multi-source data is used to execute the above-mentioned intelligent electric energy meter image acquisition method based on multi-source data, and the system includes: A reflection profile analysis module, which is used to obtain multi-angle reflection images of the electric energy meter through a preset incident angle light source, calculate the differences point by point based on the standard reference profile point coordinates, perform filtering processing on the maximum value, minimum value, and average value using the Gaussian filtering algorithm after dividing the edge segments, generate a multi-angle difference statistical result, and transfer the multi-angle difference statistical result to the path dynamic generation module; A path dynamic generation module, which is used to screen the edge segments that exceed the limit three times continuously according to the multi-angle difference statistical result, adjust the acquisition angle in 0.5-degree steps and compensate the focal length by 2mm, extract the edge region through the Canny edge detection algorithm, calculate the change rate of the edge contrast of three frames, generate a dynamic adjustment path instruction, and transfer the dynamic adjustment path instruction to the feature anomaly recognition module and the acquisition optimization feedback module; A feature anomaly recognition module, which is used to divide the image into 64×64 pixel regions, obtain the high-frequency feature point density of multiple regions through the SIFT feature extraction algorithm, extract the edge direction angle data in combination with the histogram of oriented gradients, adjust the region scanning order based on the dynamic adjustment path instruction, calculate the standard deviation of the feature point density and the gradient variance, generate a multi-source feature anomaly distribution map, and transfer the multi-source feature anomaly distribution map to the acquisition optimization feedback module; An acquisition optimization feedback module, which is used to screen the abnormal regions according to the multi-source feature anomaly distribution map, call the local focusing mechanism to increase the exposure by 20% to re-acquire images, perform stitching and replacement based on the edge pixel gray consistency ratio, combine the dynamic adjustment path instruction and the previous data to generate a multi-source response optimization table, and drive the multi-source response optimization table to the acquisition path closed-loop correction process; The acquisition path closed-loop correction process iteratively optimizes the path parameters through the PID control algorithm and feeds them back to the path dynamic generation module.
[0016] Compared with the prior art, the advantages and positive effects of the present invention are as follows: In the present invention, by presetting the incident angle light source to collect multi-angle reflection contour images, calculating the difference point by point and dividing the edge segments, and combining the Gaussian filtering algorithm to process the extreme values and the mean value, the noise interference is reduced and the stability of the contour features is improved. After screening the continuous over-limit edge segments, the angle and focal length compensation are adjusted with a step size. Based on the Canny edge detection algorithm, the edge region is extracted and the change rate of the contrast of three frames is calculated to generate a dynamic path instruction, optimizing the robustness of edge detection in a complex environment. After dividing the image region, the SIFT is used to extract the high-frequency feature point density, and the edge direction angle is analyzed in combination with the histogram of oriented gradients. The scanning order is adjusted and the standard deviation and gradient variance are calculated to generate an anomaly distribution map, enhancing the sensitivity of local feature anomaly detection. The local focusing mechanism is called to increase the exposure and re-collect the abnormal region. Based on the gray consistency ratio, splicing and replacement are performed, and the table-driven closed-loop correction is optimized in combination with multi-source responses, reducing the recognition error caused by blurring or distortion, and improving the data integrity and acquisition efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 It is a schematic diagram of the working process of the present invention; Figure 2 It is a flowchart of the steps for obtaining the multi-angle difference statistical results of the present invention; Figure 3 It is a flowchart of the steps for obtaining the multi-angle difference statistical results of the present invention; Figure 4 It is a flowchart of the steps for obtaining the multi-source feature anomaly distribution map of the present invention; Figure 5 It is a flowchart of the steps for obtaining the multi-source response optimization table of the present invention. DETAILED DESCRIPTION OF THE INVENTION
[0018] In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0019] In the description of the present invention, it should be understood that the orientation or positional relationship indicated by the terms "length", "width", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc. is based on the orientation or positional relationship shown in the accompanying drawings, and is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus should not be construed as limiting the present invention. In addition, in the description of the present invention, the meaning of "a plurality" is two or more unless otherwise specifically defined.
[0020] Embodiment 1
[0021] See also Figure 1 The present invention provides a technical solution: an intelligent acquisition method of electric energy meter images based on multi-source data, comprising the following steps: S1: Collect multi-angle reflection profile images of the electric energy meter through a preset incident angle light source, calculate the difference point by point based on the coordinates of the standard reference profile points, divide the edge segments, and use the Gaussian filter algorithm to process the maximum, minimum and mean values to generate multi-angle difference statistics; S2: Filter three consecutive over-limit edge segments based on the multi-angle difference statistics, adjust the acquisition angle and 2mm focal length compensation with a step size of 0.5 degrees, extract the edge area based on the Canny edge detection algorithm, calculate the edge contrast change rate of three frames, and generate dynamic adjustment path instructions; S3: Divide the image into 64×64 pixel regions, obtain the high-frequency feature point density of each region through the SIFT feature extraction algorithm, extract the edge direction angle data in combination with the directional gradient histogram, adjust the region scanning order based on the dynamic adjustment path instruction, calculate the feature point density standard deviation and gradient variance, and generate a multi-source feature anomaly distribution map; S4: Filter abnormal areas according to the multi-source feature abnormal distribution map, call the local focus mechanism to increase the exposure by 20% and re-collect, perform splicing and replacement based on the grayscale consistency ratio of edge pixels, combine the dynamic adjustment path instructions with past data to generate a multi-source response optimization table, and drive the closed-loop correction of subsequent acquisition paths.
[0022] The statistical results of multi-angle difference are specifically the maximum edge segment difference, the minimum edge segment difference, and the mean edge segment difference. The dynamic adjustment path instructions include angle adjustment step, focal length compensation step, and edge contrast change rate. The multi-source feature anomaly distribution map includes the standard deviation of high-frequency feature point density, directional gradient variance, and regional scanning order. The multi-source response optimization table specifically includes local exposure adjustment parameters, image stitching replacement area, and historical acquisition data response weights.
[0023] The window size of the Gaussian filter algorithm is 5 × 5 pixels and the standard deviation σ = 1.2; The over-limit judgment threshold is the upper limit of the difference fluctuation and the probability threshold based on Gaussian distribution is set to μ±3σ; The high and low double threshold ratio of the Canny edge detection algorithm is 1:3 and is dynamically adjusted through the gradient amplitude histogram; The Gaussian difference pyramid for SIFT feature extraction has 4 layers and the scale factor k=1.6; The directional gradient histogram divides 360 degrees into 8 fixed intervals and counts the weighted frequencies; The local focus mechanism controls the lens focal length through a stepper motor and links the light source compensation module; The gray - level consistency ratio is the ratio of the absolute value of the gray - level difference between adjacent pixels to the mean, and the threshold is set at 15%.
[0024] Please refer to Figure 2 , and the steps for obtaining the statistical results of the multi - angle difference are specifically as follows: S101: Collect the reflected contour image of the watt - hour meter under the incident angle of the light source. Establish a contour point positioning model through the mapping relationship between the image pixel coordinates and the physical space coordinates. Import the standard reference contour point coordinates into the model, match the corresponding area in the multi - angle reflected contour image, and calculate the horizontal and vertical offsets of the reflected contour points and the standard reference points in a point - to - point manner to generate a reflected contour difference matrix; This step starts with collecting the reflected contour image of the watt - hour meter under a specific incident angle of the light source. To accurately describe the contour, a contour point positioning model is constructed through the pre - established mapping relationship between the image pixel coordinates and the physical space coordinates. This mapping relationship realizes the linear conversion from pixel coordinates to physical coordinates based on an affine transformation matrix: for any pixel point in the image , its corresponding physical space coordinates are calculated through and . Among them, the six parameters of the affine transformation matrix are determined through a calibration process. This process uses a set (at least three) of calibration points with known coordinates in the physical space and known corresponding pixel coordinates in the image, and is obtained by least - squares fitting. The specific assignments are as follows: , , , , , . The units of these parameters ensure that when the pixel coordinates (unitless) are substituted, the output physical coordinates are in millimeters.
[0025] Subsequently, the standard reference contour point coordinates are imported into this positioning model. These standard reference points are points pre - measured on a standard watt - hour meter sample by a high - precision 3D scanner, and their three - dimensional coordinates in the physical space are accurately known.
[0026] Table 1: Example table of physical coordinates of standard reference contour points and physical coordinates mapped by an image at a specific angle
[0027] As shown in Table 1, some of the standard reference points and their corresponding physical space coordinates calculated through the model after collecting the image under a specific incident angle of the light source (such as ) are listed. For example, the standard physical coordinates of reference point 1 are .
[0028] When the light source is at After irradiating the electricity meter at the incident angle and taking an image, the area corresponding to the reference point 1 in the image is identified by a template matching algorithm (this algorithm uses small image patches around the standard reference point as templates and searches for the area with the highest normalized cross-correlation coefficient near the predicted position of the acquired image to locate), and its pixel coordinates are . Substitute these pixel coordinates into the above affine transformation model: (Here, correct the example mapping coordinates in Table 1 to match the calculation: the image mapping X coordinate is , and the image mapping Y coordinate is ).
[0029] For the reflected contour images of the electricity meter collected at different light source incident angles (such as , , ), this matching process is performed respectively to find the areas corresponding to all standard reference contour points. Next, calculate the horizontal and vertical coordinate offsets of each image reflected contour point and its corresponding standard reference point (here, considering the two-dimensional plane projection, the difference in the Z coordinate is not calculated in this step) in a point-to-point manner. For reference point 1, its standard two-dimensional projection is , and in the incident light image, the physical coordinates calculated are .
[0030] Therefore, the horizontal coordinate offset , and the vertical coordinate offset . This offset calculation is performed for all 100 standard reference points at this angle. Repeat this process for each image at each incident angle to generate a matrix containing the horizontal and vertical coordinate offsets of each reference point, which is the reflected contour difference matrix. For example, for the incident angle, some data in its difference matrix are: point 1 , point 2 , point 3 , and the remaining 97 rows of data are filled in sequentially. This series of operations finally generates multiple groups (each group corresponding to an incident angle) of reflected contour difference matrices.
[0031] S102: Based on the reflected contour difference matrix, divide the difference data into independent edge segments according to the contour curvature change nodes, use the Gaussian filtering algorithm to suppress the noise of the difference data within each edge segment, set the filtering window size and standard deviation parameters, traverse the filtered data within multiple segments, identify and record the maximum and minimum values, and calculate the mean value in combination with the moving average to generate an edge segment filtered extreme value set; Take the generated in S101 for a specific incident angle (such as Reflection profile difference matrix, which records the differences. First, according to the change of curvature of each point on the original contour line, these difference data points are segmented into multiple independent edge segments. The identification of the contour curvature change nodes is estimated by calculating the coordinates of three consecutive points that make up the original contour to calculate the curvature at point (such as using the Menger curvature formula ). When the absolute change amount of the curvature value of a certain point compared with the curvature value of the previous point exceeds the preset curvature change threshold (the unit is the reciprocal of the length unit. If the coordinate unit is mm, it is ), or the positive and negative signs of the curvature value change (indicating the transition of concavity and convexity), then this point is marked as a curvature change node. The setting of this value is obtained by analyzing a large number of standard electricity meter contour samples, statistically calculating the curvature change amplitude of their smooth areas and sharp bend transition areas, and selecting the typical change amount that can effectively distinguish the two quantile value. For example, if the curvature sequence is , since , the points between 0.03 and 0.25 are regarded as nodes; similarly , the points between 0.28 and 0.05 are also regarded as nodes. In this way, the original 100 difference point data are segmented into several segments, and here they are segmented into 5 independent edge segments, each segment containing an unequal number of consecutive difference data points.
[0032] Next, Gaussian filtering is applied to the difference data in each independent edge segment (for the sequence and the sequence respectively) to suppress noise. Specifically, when executing, for a difference data point in a certain edge segment, its filtered value is obtained by weighted averaging according to the weights determined by the Gaussian function of itself and adjacent data points. The filtering window size is fixed at 5 data points, which means that when calculating , these five points will be considered. The standard deviation parameter of the Gaussian kernel is set to . These two parameters (window size 5, ) are determined through experiments: several groups of simulated contour difference data segments with different levels of Gaussian noise added are selected, and the combinations of window size and standard deviation are used for filtering respectively, and the root mean square error (RMSE) between the filtered data and the original noise-free data is calculated, and the parameter combination that minimizes the average RMSE is selected, that is, 5 and 1.0. Weights According to the distance from a point to the center of the window, and the standard deviation of the Gaussian distribution calculate , and then normalize . After filtering, traverse the denoised and data within these 5 independent edge segments, and respectively identify and record the maximum and minimum values for each segment. Taking the filtered data of the first segment as an example, if its value is mm (a total of 10 points), then its maximum value is mm, and its minimum value is mm.
[0033] Meanwhile, combine the moving average to calculate the mean value of the difference data for each segment. The ratio of the moving average window length to the edge segment length is . For the first segment containing 10 data points above, the moving average window length is data points. Calculate the arithmetic mean of all possible subsequences of length 2 within this segment: the first moving average value is , the second is , and so on. A total of moving average values are calculated. The arithmetic mean of these 9 moving average values is the mean value of this segment. If these 9 mean values are respectively mm, then the mean value of this segment is the sum of these values divided by 9, and the result is mm. Perform the same processing on data. Finally, generate the corresponding for each edge segment. Combine the statistical values of all 5 edge segments to form the edge segment filtering extreme value set at this incident angle.
[0034] Table 2: Example of the edge segment filtering extreme value set at a certain incident angle (unit: mm)
[0035] Table 2 lists the extreme value and mean value data of each edge segment obtained after filtering and statistical processing at a specific incident angle.
[0036] S103: Call the edge segment filtering extreme value sets corresponding to all incident angles, classify and summarize the maximum, minimum, and mean values of each segment according to the light source incident angle, perform weighted superposition on all statistical items under the same type of angle, and eliminate the influence of angle differences through normalization to generate the multi-angle difference statistical result; This step integrates data from all observed incident angles ( , , ) the set of edge segment filtering extreme values output in step S102. Each set contains six statistics of five edge segments ( ). First, the same type of statistical data of each edge segment is summarized according to the light source incident angle. Taking the of edge segment 1 as an example, we have three values: from of (from Table 2), from of , and from of .
[0037] Then, these same type of statistical items are weighted and superimposed. The weight is assigned related to the light source incident angle (unit: degree), and is calculated by the formula . Here is the incident angle of the light source. When calculating , the angle mode is directly used. The weights are calculated as follows: for , . For , . For , . These angle values are accurately set by the experimental equipment. The basis for setting the weights is the difference in the quality of obtaining contour information at different incident angles. The function is monotonically increasing in the range from to , which means that under this setting, a larger incident angle (closer to ) is given a higher weight, which is based on the consideration that these angles can provide clearer or less geometrically distorted contour information in a specific application scenario.
[0038] The weighted superposition maximum value of edge segment 1 is calculated as follows: All values are in the unit of , and the weight has no unit, so the result unit is .
[0039] ; ; This calculation result is the weighted average maximum obtained by edge segment 1 after integrating three angle information sources.Value. This weighted superposition operation is performed on all six statistics of all edge segments.
[0040] Finally, the amplitude differences between the statistical values are eliminated through normalization. For each weighted superposed statistic of all edge segments (such as the set of all segments), min-max normalization is performed to map its value to the interval. Let the set of weighted superposed maximum values (a total of 5 values) of all edge segments be . Calculate the minimum value and the maximum value of this set. For any value (such as ), its normalized value . Assume that through calculation, the set of weighted maximum values of all edge segments is mm. Then , . Therefore, the normalized weighted maximum value of edge segment 1 is: . In this calculation, the units of both the numerator and the denominator are , and the division results in a unitless normalized value. This normalization process is performed on all six weighted statistics of all edge segments, and finally, a multi-angle difference statistical result is generated, which is a data structure containing the normalized statistical values of each edge segment.
[0041] The mapping relationship is based on an affine transformation matrix to achieve a linear conversion from pixel coordinates to physical coordinates; The ratio of the sliding average window length to the edge segment length is 1:5; The weighted superposition weight has a non-linear relationship with the incident angle and the weight distribution formula is w = sin²(θ).
[0042] Please refer to Figure 3 , and the specific steps for dynamically adjusting the acquisition of path instructions are as follows: S201: Call the multi-angle difference statistical result, set the edge segment overrun determination threshold as the upper limit of the difference fluctuation for three consecutive times, traverse all edge segment data, count the frequency of the difference exceeding the threshold for three consecutive times for each segment, screen the eligible segments according to the frequency value, extract the angle parameters and focal length parameters of the corresponding acquisition angles, and generate a set of continuously overrun edge segments; This step uses the multi-angle difference statistical result generated by S103, which contains the maximum, minimum, and mean values of each edge segment after multi-angle information fusion and normalization. First, set a core index for edge segment overrun determination: the upper limit of the difference fluctuation for three consecutive times The "difference value" here refers to the absolute difference between adjacent data points in the normalized mean value sequence output by S103 arranged in the original order of the contour points within a certain edge segment. is set based on the analysis of the normalized mean value sequences of each edge segment obtained after performing S103 processing on a large number of qualified electricity meter samples. The distribution of the differences between adjacent points in these normal sample sequences is statistically analyzed, and the 99th percentile is taken as If the analysis shows that the normal fluctuation difference does not exceed (unitless as the data has been normalized) in a certain case, then is set. The definition of the event of "the difference value exceeding the threshold for three consecutive times" is as follows: in the normalized mean value sequence of an edge segment (such as the mean value sequence ), if there are three consecutive differences, namely , and , all greater than , then it is recorded that such an event has occurred once.
[0043] Subsequently, traverse the normalized mean value sequences of all edge segments (statistically analyze separately or comprehensively for the mean value sequence and the mean value sequence). Count the frequency of the event of "the difference value exceeding the threshold for three consecutive times" within each edge segment. For example, the normalized mean value sequence of edge segment A contains 15 points, and the three consecutive differences formed between the 3rd, 4th, 5th, and 6th points are all greater than 0.05, which is recorded as one event; the three consecutive differences formed between the 10th, 11th, 12th, and 13th points are also all greater than 0.05, which is recorded as the second event. Then the frequency of edge segment A is 2. According to the preset frequency value threshold screen the edge segments that meet the conditions. is set to identify the paragraphs where abnormal fluctuations are relatively concentrated, and its value is set to 1. This means that if there is at least 1 time (i.e., the frequency ) of such continuous large-amplitude fluctuation events within an edge segment, this segment is considered to have a relatively high risk and requires further attention. If the frequency of edge segment A is 2, the frequency of edge segment B is 0, and the frequency of edge segment C is 1, since , then edge segments A and C are screened as the segments that meet the conditions.
[0044] Finally, from these screened "qualified segments" (i.e., continuous over-limit edge segments), extract the light source incident angle parameters and camera focal length parameters recorded during the initial S101 data acquisition. These parameters are stored together with the original contour data. If edge segment A is at a light source incident angle of , and the focal length is Those finally identified from the data collected at that time, then extract parameter pairs Organize all the selected consecutive over-limit edge segments and their corresponding original acquisition parameters to form a set of consecutive over-limit edge segments.
[0045] S202: Based on the set of consecutive over-limit edge segments, incrementally adjust the light source incident angle in 0.5-degree steps, synchronously superimpose a 2-mm focal length compensation amount, collect the adjusted reflection images, call the Canny edge detection algorithm, through gradient magnitude calculation and non-maximum suppression in the direction, combine high and low double thresholds to screen effective edge pixel points, extract the coordinate set of the target edge area, and generate an edge area detection sequence; Based on the set of consecutive over-limit edge segments generated by S201, this set contains edge segments determined to have significant continuous difference fluctuations and their original acquisition parameters. Select one of the elements for processing, such as {edge segment A, original angle , original focal length }. For the light source incident angle corresponding to this edge segment, perform incremental adjustment in -degree steps. The adjustment strategy is to try 4 steps in each direction based on the original angle , that is, the newly tried angles are , specifically . While performing the angle adjustment, synchronously superimpose a fixed focal length compensation amount. That is, if the original focal length is , then the focal lengths at all newly tried angles are set to . This focal length compensation amount is determined through a series of preliminary experiments: Select a variety of representative over-limit edge segment samples, and when performing -degree step adjustments at their original acquisition angles, respectively test the influence of the focal length compensation amount of on the imaging clarity. By calculating the average gradient magnitude of the target edge area in the adjusted image, it is found that compensation amount can make most samples obtain the highest average gradient magnitude.
[0046] For each new angle and focal length combination, such as , drive the light source and camera system to re-collect the reflection image of the area where the over-limit edge segment A is located. In this way, a series of (here 8) adjusted reflection images are obtained. For each newly collected image, perform the edge detection process. First, calculate the gradient magnitude and direction of each pixel point in the image. Use the Sobel operator to calculate the horizontal gradient and the vertical gradient . The gradient magnitude , the gradient direction 。Next, perform directional non-maximum suppression: For each pixel, check whether its gradient magnitude is the largest among two adjacent pixels in its gradient direction (discretized to one of 8 directions). If not, set the gradient magnitude of this pixel to zero. Subsequently, use high and low double thresholds and to screen and connect edge pixel points. is set to (in gray scale units, range 0 - 255), is set to . The selection of these two values is based on testing 100 electricity meter images containing clear edges and various noises, systematically changing from to (step size 10), and letting . By manually evaluating the integrity, continuity, and noise suppression degree of the edge detection results, finally select as a combination with better robustness. Pixel points with gradient magnitude greater than are marked as strong edge points; pixel points with gradient magnitude between and are marked as weak edge points. Only when a weak edge point is connected to any strong edge point through its 8-neighborhood, it is finally confirmed as an edge point. From the binary edge map obtained after double-threshold processing, extract the coordinate set of pixel points belonging to the target edge region (i.e., the new region corresponding to the original continuous over-limit edge segment A). Generate such a coordinate set for each adjusted combination of acquisition parameters. These coordinate sets are arranged in the order of angle adjustment (e.g., from to ) to form an edge region detection sequence for edge segment A.
[0047] S203: Based on the set of continuous over-limit edge segments, incrementally adjust the light source incident angle in steps of 0.5 degrees, synchronously superimpose a 2-mm focal length compensation amount, collect the adjusted reflection images, call the Canny edge detection algorithm, calculate the gradient magnitude and perform directional non-maximum suppression, combine high and low double thresholds to screen valid edge pixel points, extract the coordinate set of the target edge region, and generate an edge region detection sequence.
[0048] This step processes other continuous over-limit edge segments identified in S201 in parallel with or following S202. Take another element in the set {edge segment C, original angle , original focal length } as an example. Similarly, incrementally adjust the light source incident angle in steps of degrees, but the adjustment range is determined according to the historical experience or preset rules of this type of edge segment. Here, the adjustment range is , that is, the trial angle is . The synchronized superimposed focal length compensation amount is still , so the new focal length is set to . For each new parameter pair, such as , the reflected image of the edge segment C area is recollected. Apply the edge information extraction process to each new image. Calculate the gradient magnitude and direction , and adopt the Prewitt operator. Perform non-maximum suppression in the gradient direction. Then, use the high and low double-threshold method to screen out valid edge pixels, where the high threshold is set to , and the low threshold is set to . The setting of these thresholds is slightly lower than that of in S202. This is because when processing areas such as edge segment C that may have a slightly lower contrast itself, through experiments (testing on similar area samples in cooperation with , and evaluating the recall and precision of edge extraction), it is found that a slightly lower threshold combination can better retain valid weak edge information without introducing excessive noise. The processing logic is the same as that of S202: strong edge points are directly retained, and weak edge points need to be connected to strong edge points to be retained. Collect the pixel coordinates of all finally marked edge points, and generate a coordinate set for each parameter setting (such as ). Organize these coordinate sets in the acquisition order to form an edge region detection sequence of edge segment C. Through S202 and S203, one or more "path instructions" containing optimized acquisition parameters (angle, focal length) and corresponding edge point coordinate sets are generated for each initial continuous overrun edge segment. These instructions contain the parameter combinations that make the edge most clearly distinguishable.
[0049] Please refer to Figure 4 , the steps for obtaining the multi-source feature anomaly distribution map are specifically as follows: S301: Divide the image into 64×64 pixel regions, construct a Gaussian difference pyramid to traverse multiple layers of pixel points, detect local extreme points as feature points, and count the ratio of the number of feature points in each region to the area of the region to generate a feature point density distribution map; This step processes other continuous overrun edge segments identified in S201 in parallel with or following S202. Take another element in the set {edge segment C, original angle , original focal length } as an example. Similarly, according to The degree step size is used to incrementally adjust the incident angle of the light source, but the adjustment range is determined according to the historical experience or preset rules of this type of edge segment. Here, the adjustment range is of the original angle, that is, the trial angle is . The synchronously superimposed focal length compensation amount is still , so the new focal length is set to . For each new parameter pair, such as , a reflected image of region C of the edge segment is recollected. The edge information extraction process is applied to each new image. The gradient magnitude and direction of each pixel point are calculated, and the Prewitt operator is used. Non-maximum suppression in the gradient direction is performed. Then, the high and low double-threshold method is used to screen out valid edge pixel points, where the high threshold is set to , and the low threshold is set to . The setting of these thresholds is slightly lower compared to in S202. This is because when processing regions such as edge segment C that may have a slightly lower contrast itself, through experiments (testing on similar region samples in cooperation with and evaluating the recall and precision of edge extraction), it is found that a slightly lower threshold combination can better retain valid weak edge information without introducing excessive noise. The processing logic is the same as that of S202: strong edge points are directly retained, and weak edge points are retained only if they are connected to strong edge points. The pixel coordinates of all finally marked edge points are collected, and a coordinate set is generated for each parameter setting (such as ). These coordinate sets are organized in the acquisition order to form an edge region detection sequence of edge segment C. Through S202 and S203, one or more "path instructions" containing optimized acquisition parameters (angle, focal length) and corresponding edge point coordinate sets are generated for each initial continuous overrun edge segment. These instructions contain the parameter combinations that make the edge most clearly distinguishable.
[0050] S302: Based on the feature point density distribution map, perform horizontal and vertical differential operations on each regional pixel point, calculate the gradient magnitude and direction angle, divide the 360-degree direction into a fixed number of intervals, count the frequency of occurrence of the gradient direction in multiple intervals, and generate a gradient direction angle set; Based on each pixel region of the original image in S301 (or the adjusted image in S202 / S203, here referring to the initial analysis of the original image), calculate the gradient information of the pixels in this region. For any pixel point in the region and its gray value , whose horizontal gradient component and vertical gradient component are obtained by convolving with the Sobel operator. The gradient magnitude , and the gradient direction angle , whose return value is in radians, needs to be converted to degrees. Divide the direction space of into 8 equally wide intervals (bins), each interval spanning . The intervals are respectively , , , , , , , .
[0051] Statistically calculate the cumulative magnitude of the gradient directions (weighted according to their gradient magnitudes) of all pixels in this region that fall into these 8 intervals. Specifically: for each pixel in the region, calculate its gradient magnitude and direction . Determine the interval to which it belongs . Then the cumulative count value of this interval is incremented by . After traversing all pixel points in the region, an array containing 8 cumulative gradient magnitudes (or simple frequencies) is obtained, where is the cumulative gradient magnitude of the th direction interval. This array is the set of gradient direction angles for this region. Perform this operation on all such regions to generate their respective sets of gradient direction angles.
[0052] S303: Call the dynamic adjustment path instruction, rearrange the region scanning order according to the instruction priority, extract the feature point density distribution map and the set of gradient direction angles of the current scanned region, calculate the standard deviation of the dispersion of the density values and the distribution variance of the gradient angles, perform normalized weighted summation on the two types of statistics, and generate a multi-source feature anomaly distribution map; Call the dynamic adjustment path instructions generated in step S202 or S203. These instructions specify the optimized acquisition parameters for specific high-risk regions (determined by S201). When performing feature analysis on the entire image to generate an anomaly distribution map, if the currently analyzed If the area was previously identified as an out-of-limit section by S201 and there are optimization instructions from S202 / S203, then the image data re-collected under the optimized parameters is preferentially used for feature extraction in S301 and S302; otherwise, the original collected image data is used. If the instruction contains priority information (certain areas have a higher analysis priority due to repeated adjustments still being unsatisfactory), then the areas are processed in this priority order.
[0053] Extract the -th scanning area ( pixels) corresponding to the feature point density value generated by S301 (e.g., points / pixel) and the set of gradient direction angles generated by S302 (a histogram containing 8 values , where is the cumulative gradient magnitude of the j-th direction bin).
[0054] Calculate two types of statistics: 1. Regional feature point density index : That is, the feature point density value of this area .
[0055] 2. Regional gradient angle distribution variance : Calculate the variance of its distribution for the gradient direction histogram . First, convert the count values of the histogram to frequencies . Use the central angle of the interval (e.g., ) or the interval index (1 to 8) as the values of the random variable. Here, the interval index is used. Calculate the mean , and then calculate the variance . For example, if the gradient direction frequencies of area are , then ; ; ; ; .
[0056] For all areas, the calculated (i.e., ) and are subjected to min-max normalization and mapped to the interval respectively. First, determine the range of the values for all areas and the range of the values for all areas 。It is assumed that through the statistics of 300 regions, it is obtained that: points / pixel, points / pixel. And , . Then the normalized value is: For region of , its normalized value . For region of , its normalized value .
[0057] Then, the weighted sum of these two normalized statistics is calculated to obtain the comprehensive anomaly index of region . The weight assignment is as follows: the weight of the normalized density index , the weight of the normalized gradient variance . The setting of these weights is based on the analysis of a large number of defect samples, and it is found that when identifying anomalies such as printing defects, stains, or slight scratches on the meter dial, the change in the density of feature points (weight 0.6) usually provides a more direct and primary indication than the degree of chaos of the direção gradient (weight 0.4).
[0058] Substitute the example values: This value is the comprehensive anomaly score of multi-source features of region . Performing this calculation for all 300 regions and organizing the obtained values into a matrix gives the multi-source feature anomaly distribution map.
[0059] The normalized weighted sum weights are assigned according to the contribution degree of the anomaly index, and the density standard deviation weight is 0.6 and the gradient variance weight is 0.4.
[0060] Please refer to Figure 5 , and the specific steps for obtaining the multi-source response optimization table are as follows: S401: Call the multi-source feature anomaly distribution map, calculate the mean and standard deviation of the comprehensive indicators of all regions, set the anomaly recognition boundary based on the mean plus twice the standard deviation, screen the regions whose comprehensive indicator values exceed the boundary, activate the local focusing mechanism to set the exposure increase ratio, and re-perform image acquisition on the screened regions to generate a high-exposure acquisition image set; Call the multi-source feature anomaly distribution map generated by S303. This map gives a comprehensive anomaly index for each of the 300 regions respectively. First, calculate the comprehensive indicators of all these regions Arithmetic mean and standard deviation 。For 300 values, statistics are carried out and and are obtained. Anomaly recognition boundaries are set based on the mean plus twice the standard deviation 。
[0061] 。
[0062] The selection of the rule is based on that if the data is approximately normally distributed, then approximately of the data falls within the range. Therefore, values exceeding this upper boundary are regarded as outliers with a high probability of anomaly.
[0063] Filter out those regions where the comprehensive index value exceeds the boundary . If the of the region , due to , then the region is screened as an abnormal region that needs further optimization. For these screened abnormal regions, activate the local focusing (using the optimized focal length determined by S202 / S203 if applicable) and exposure adjustment mechanism. Set the exposure increase ratio 。
[0064] The determination process of this ratio is as follows: Select 50 region samples that previously had a high S303 score due to insufficient exposure or low contrast, and re-acquire images at times the original exposure amount respectively. Then evaluate the feature sharpness of the new images (such as local contrast, edge intensity), and it is found that times the increase can significantly improve the visibility of details in most cases without overexposure. If the exposure time used for originally acquiring these regions is , then the new exposure time . For all the screened abnormal regions, re-perform the image acquisition operation using the new exposure parameters (and the optimized angle and focal length determined by S202 / S203 if any) to obtain high-exposure (optimized exposure) images of these regions, and form a high-exposure acquisition image set.
[0065] S402: Based on the high-exposure acquisition image set, extract the pixel gray values at the region edges, calculate the difference ratio between multiple adjacent pixel gray values, set the consistency ratio threshold based on the mean of the adjacent pixel gray values, replace the pixels with gray ratios exceeding the threshold with the gray mean of their adjacent regions, and generate a gray consistency correction image set; Based on the high-exposure acquisition image set generated by S401, each re-acquired abnormal region image is processed. First, the gray values of the edge pixels within the region image are extracted. These edges can be directly located by using the edge point coordinates detected under this optimization parameter recorded in the S202 / S203 dynamic adjustment path instruction, or obtained by running a fast Sobel edge detection on the current high-exposure image and performing simple thresholding. For a pixel point on a certain edge its gray value is , and for another pixel point directly adjacent to it on the edge the gray value is The difference ratio between the gray values of these two adjacent pixels is calculated defined as: If . If , (gray value range 0 - 255), then . . Set a gray-scale consistency ratio threshold . The setting basis of this threshold is: for the smooth edge segments in 100 high-quality and clear electricity meter images, calculate the values between adjacent pixels on them, count the distribution of these values, and take the 90th percentile value as , that is, under normal circumstances the adjacent pixels the value is lower than . If the calculated is less than , it is considered that the gray-scale transition between pixels is smooth and no processing is required. If the gray values of another pair of adjacent edge pixels are , then .
[0066] . Since , the gray-scale ratio of this pair of pixels exceeds the threshold. At this time, the pixels with a large gray-scale jump need to be corrected. The correction rule is: replace the gray value of the pixel that contributes more to the gray-scale change (or both) (in this example, assume that is determined as the main jump point) with the average gray value of all pixels within its own and surrounding neighborhood (excluding which is directly compared with it). Let the neighborhood of pixel (excluding and including The sum of the pixel grayscale values of itself and its seven neighbors is , the number of pixels in the neighborhood is , then the average grayscale value is . If , then 's value is changed from to . Such comparisons and selective corrections are performed on all adjacent pixel pairs on the detected edges within the region. This process can be iteratively executed 1 - 2 times until no pixel values change or the maximum number of iterations is reached. Finally, a set of grayscale consistency corrected images for all abnormal regions is generated.
[0067] S403: Integrate the set of grayscale consistency corrected images and the dynamic adjustment path instructions, call the angle, focal length, and exposure amount parameters in the previously collected data, calculate the Euclidean distance value between the multi-parameters of the current path instruction and the previous parameters, and allocate a weighting coefficient based on the distance value to perform superposition correction on the path execution parameters, generating a multi-source response optimization table.
[0068] Integrate the set of grayscale consistency corrected images generated in S402 (these images are collected under optimized parameters and have undergone grayscale smoothing processing) and the dynamic adjustment path instructions determined in steps S202 / S203 that led to these high-quality images. These instructions contain the light source angle for each optimized region, the camera focal length , and combine with the optimized exposure amount determined in S401. Form the current successful parameter set. Call a historical database that stores previously collected data. This database records various historical parameter combinations used when detecting the same type of electricity meters in the past for similar types of abnormal regions (which can be classified according to the value in S303 or its derived features) and the evaluation of their acquisition effects (such as whether the problem was successfully solved, or the subsequent score). Calculate the multi-parameter Euclidean distance between the current successful parameter set and each relevant previous parameter set in the historical database. Before calculating the distance, to ensure that the contributions of each parameter to the distance are balanced, a unified scale processing is required. The min - max normalization method is used to convert each parameter to the interval. The conversion rule is based on the empirical range of various parameters in actual applications: the angle range , the focal length range . For a parameter value , its normalized value .
[0069] For example, .
[0070] ; ; ; Therefore, . A historical record .
[0071] ; ; Therefore, . Euclidean distance ; The parameter normalization here is the conversion process of parameters with different physical meanings and numerical ranges to a unified comparable scale. Its rationality lies in ensuring that the contribution degrees of various parameters in distance calculation will not be biased due to their original numerical sizes.
[0072] According to the calculated distance value allocate the weighting coefficient . The parameter controls the attenuation speed of the weight with distance and is set to . The setting of this value is based on the observation of the distribution in historical data, aiming to give significant weights to historical records that are relatively close to the current successful parameters ( or so), while the weights of farther records decrease rapidly. For , . Select the records in the historical database that are closest to the distance (or all records with weights greater than a certain threshold such as ), together with the current (assign it a relatively high fixed weight, such as ), perform weighted averaging on these parameter records (the original unnormalized values) to update or generate the recommended parameters in the multi-source response optimization table. For example, the updated recommended angle is: .
[0073] Similar weighted average corrections are also performed on the focal length and exposure. These updated parameters will be stored in the multi-source response optimization table and used to guide the initial parameter settings when encountering similar detection scenarios in the future.
[0074] Table 3: Multi-source Response Optimization Parameter Table
[0075] Table 3 lists some example contents of the multi-source response optimization table. This table stores the recommended acquisition parameter combinations (light source angle, camera focal length, exposure) after learning and dynamic correction according to different abnormal area features (identified by a unique feature ID, which is associated with a more detailed feature description), and at the same time records the confidence score of this parameter combination (which can be calculated based on historical success rates and update times) and the most recent update time, so as to continuously optimize the detection strategy.
[0076] An intelligent acquisition system for electric energy meter images based on multi-source data, the intelligent acquisition system for electric energy meter images based on multi-source data is used to execute the above-mentioned intelligent acquisition method for electric energy meter images based on multi-source data. The system includes: A reflection profile analysis module, which is used to obtain multi-angle reflection images of the electric energy meter through a preset incident angle light source, calculate the difference point by point based on the standard reference profile point coordinates, filter the maximum value, minimum value and mean value using the Gaussian filter algorithm after dividing the edge segments, generate a multi-angle difference statistical result, and transfer the multi-angle difference statistical result to the path dynamic generation module; A path dynamic generation module, which is used to screen out continuously three over-limit edge segments according to the multi-angle difference statistical result, adjust the acquisition angle in 0.5-degree steps and compensate the focal length by 2mm, extract the edge area through the Canny edge detection algorithm, calculate the change rate of the edge contrast of three frames, generate a dynamic adjustment path instruction, and transfer the dynamic adjustment path instruction to the feature anomaly recognition module and the acquisition optimization feedback module; A feature anomaly recognition module, which is used to divide the image into 64×64 pixel areas, obtain the high-frequency feature point density of multiple areas through the SIFT feature extraction algorithm, extract the edge direction angle data in combination with the histogram of oriented gradients, adjust the area scanning order based on the dynamic adjustment path instruction, calculate the standard deviation of the feature point density and the variance of the gradient, generate a multi-source feature anomaly distribution map, and transfer the multi-source feature anomaly distribution map to the acquisition optimization feedback module; An acquisition optimization feedback module, which is used to screen out abnormal areas according to the multi-source feature anomaly distribution map, call the local focusing mechanism to increase the exposure by 20% to re-acquire images, perform stitching and replacement based on the edge pixel gray consistency ratio, generate a multi-source response optimization table in combination with the dynamic adjustment path instruction and previous data, and drive the multi-source response optimization table to the acquisition path closed-loop correction process; The closed-loop correction process of the acquisition path iteratively optimizes the path parameters through the PID control algorithm and feeds them back to the path dynamic generation module.
[0077] The above are only the preferred embodiments of the present invention, and there are no other forms of limitation to the present invention. Any person skilled in the art may use the technical content disclosed above to make changes or modifications into equivalent embodiments with equivalent changes and apply them to other fields. However, as long as it does not depart from the technical solution content of the present invention, any simple modification, equivalent change, and modification made to the above embodiments based on the technical essence of the present invention still fall within the protection scope of the technical solution of the present invention.
Claims
1. An intelligent acquisition method for electricity meter images based on multi-source data, characterized in that, It includes the following steps: S1: Collect the multi-angle reflection profile images of the watt-hour meter with a preset incident angle light source, calculate the differences point by point based on the standard reference profile point coordinates, process the maximum value, minimum value and mean value with the Gaussian filtering algorithm after dividing the edge segments, and generate the multi-angle difference statistical results; S2: Screen the edge segments that exceed the limit three times continuously according to the multi-angle difference statistical results, adjust the collection angle in 0.5-degree steps and compensate the focal length by 2 mm, extract the edge region based on the Canny edge detection algorithm, calculate the change rate of the edge contrast of three frames, and generate the dynamic adjustment path instruction; S3: Divide the image into 64×64 pixel regions, obtain the high-frequency feature point density of each region through the SIFT feature extraction algorithm, extract the edge direction angle data in combination with the histogram of oriented gradients, adjust the region scanning order based on the dynamic adjustment path instruction, calculate the standard deviation of the feature point density and the gradient variance, and generate the multi-source feature anomaly distribution map.
2. The intelligent acquisition method of the electric energy meter image based on multi-source data according to claim 1, wherein, The multi-angle difference statistical results are specifically the maximum value of the edge segment difference, the minimum value of the edge segment difference, and the mean value of the edge segment difference. The dynamic adjustment path instruction includes the angle adjustment step size, the focal length compensation step size, and the edge contrast change rate. The multi-source feature anomaly distribution map includes the standard deviation of the high-frequency feature point density, the gradient variance, and the region scanning order.
3. The intelligent acquisition method of the electric energy meter image based on multi-source data according to claim 2, wherein, The window size of the Gaussian filtering algorithm is 5×5 pixels and the standard deviation σ = 1.2; The ratio of the high and low double thresholds of the Canny edge detection algorithm is 1:3 and is dynamically adjusted through the gradient amplitude histogram; The number of layers of the Gaussian difference pyramid for SIFT feature extraction is 4 layers and the scale factor k = 1.6; The histogram of oriented gradients divides 360 degrees into 8 fixed intervals and statistically calculates the weighted frequency.
4. The intelligent acquisition method of the electricity meter image based on multi-source data according to claim 3, characterized in that, The specific steps for obtaining the multi-angle difference statistical results are as follows: S101: Collect the reflection profile image of the watt-hour meter at the incident angle of the light source, establish a profile point positioning model through the mapping relationship between the image pixel coordinates and the physical space coordinates, import the standard reference profile point coordinates into the model, match the corresponding region in the multi-angle reflection profile image, calculate the horizontal and vertical coordinate offsets of the reflection profile points and the standard reference points in a point-to-point manner, and generate the reflection profile difference matrix; S102: Based on the reflection profile difference matrix, divide the difference data into independent edge segments according to the contour curvature change nodes, use the Gaussian filtering algorithm to suppress the noise of the difference data in each edge segment, set the filtering window size and standard deviation parameters, traverse the filtered data in multiple segments, identify and record the maximum value and minimum value, and calculate the mean value in combination with the moving average to generate the edge segment filtering extreme value set; S103: Call the edge segment filtering extreme value sets corresponding to all incident angles, classify and summarize the maximum value, minimum value and mean value of each segment according to the light source incident angle, perform weighted superposition on all statistical items under the same type of angle, and eliminate the influence of angle differences through normalization to generate the multi-angle difference statistical results; The mapping relationship realizes the linear conversion from pixel coordinates to physical coordinates based on the affine transformation matrix; The ratio of the moving average window length to the edge segment length is 1:5; The weighted superposition weight has a non-linear relationship with the incident angle, and the weight distribution formula is w = sin²(θ).
5. The intelligent acquisition method of the electricity meter image based on multi-source data according to claim 4, wherein The specific steps for obtaining the dynamically adjusted path instruction are as follows: S201: Invoke the multi-angle difference statistical result, set the overrun determination threshold for the edge segment as the upper limit of the difference fluctuation for three consecutive times, traverse all edge segment data, count the frequency of the difference exceeding the threshold for each segment for three consecutive times, screen the qualified segments according to the frequency value, extract the angle parameter and focal length parameter corresponding to the acquisition angle, and generate a set of continuously overrun edge segments; The overrun determination threshold is the upper limit of the difference fluctuation, and the probability threshold based on the Gaussian distribution is set as μ ± 3σ; S202: Based on the set of continuously overrun edge segments, incrementally adjust the light source incident angle in steps of 0.5 degrees, synchronously superimpose a 2mm focal length compensation amount, collect the adjusted reflection image, invoke the Canny edge detection algorithm, calculate the gradient magnitude and suppress non-maximum values in the direction, combine high and low double thresholds to screen effective edge pixel points, extract the coordinate set of the target edge region, and generate an edge region detection sequence; S203: Based on the set of continuously overrun edge segments, incrementally adjust the light source incident angle in steps of 0.5 degrees, synchronously superimpose a 2mm focal length compensation amount, collect the adjusted reflection image, invoke the Canny edge detection algorithm, calculate the gradient magnitude and suppress non-maximum values in the direction, combine high and low double thresholds to screen effective edge pixel points, extract the coordinate set of the target edge region, and generate an edge region detection sequence.
6. The intelligent acquisition method of the electric energy meter image based on multi-source data according to claim 5, characterized in that, The specific steps for obtaining the multi-source feature anomaly distribution map are as follows: S301: Divide the image into 64×64 pixel regions, construct a Gaussian difference pyramid to traverse multiple layers of pixel points, detect local extreme points as feature points, count the ratio of the number of feature points to the area in each region, and generate a feature point density distribution map; S302: Based on the feature point density distribution map, perform horizontal and vertical difference operations on each region pixel point, calculate the gradient magnitude and direction angle, divide the 360-degree direction into a fixed number of intervals, count the frequency of the gradient direction appearing in multiple intervals, and generate a gradient direction angle set; S303: Invoke the dynamically adjusted path instruction, rearrange the region scanning order according to the instruction priority, extract the feature point density distribution map and the gradient direction angle set of the current scanning region, calculate the standard deviation of the dispersion degree of the density value and the distribution variance of the gradient angle, perform normalized weighted summation on the two types of statistics, and generate a multi-source feature anomaly distribution map; The normalized weighted summation weight is allocated according to the contribution degree of the anomaly index, and the density standard deviation weight is 0.6 and the gradient variance weight is 0.
4.
7. The intelligent acquisition method for electricity meter images based on multi-source data according to claim 6, characterized in that, The method further includes: S4: Screen the abnormal region according to the multi-source feature anomaly distribution map, invoke the local focusing mechanism to increase the exposure by 20% and re-collect, perform splicing and replacement based on the edge pixel gray consistency ratio, combine the dynamically adjusted path instruction and historical data to generate a multi-source response optimization table, and drive the closed-loop correction of the subsequent acquisition path.
8. The intelligent acquisition method for electricity meter images based on multi-source data according to claim 7, characterized in that The multi-source response optimization table specifically includes local exposure adjustment parameters, image splicing and replacement regions, and historical acquisition data response weights; The local focus mechanism controls the focal length of the lens through a stepper motor and links the light source compensation module; The grayscale consistency ratio is the ratio of the absolute value of the grayscale difference between adjacent pixels to the mean value, and the threshold is set to 15%.
9. The intelligent acquisition method of the electric energy meter image based on multi-source data according to claim 8, characterized in that, The steps for obtaining the multi-source response optimization table are specifically as follows: S401: calling the multi-source feature anomaly distribution map, calculating the mean and standard deviation of the comprehensive index of all regions, setting the anomaly recognition boundary according to the mean plus two times the standard deviation, screening the area where the comprehensive index value exceeds the boundary, activating the local focus mechanism to set the exposure increase ratio, re-performing image acquisition for the screened area, and generating a high-exposure acquisition image set; S402: Based on the high-exposure acquired image set, extract the pixel grayscale value of the edge of the region, calculate the difference ratio between the grayscale values of multiple adjacent pixels, set the consistency ratio threshold value with the average of the grayscale values of adjacent pixels, replace the pixels whose grayscale ratio exceeds the threshold with the grayscale average of their adjacent regions, and generate a grayscale consistency correction image set; S403: Integrate the grayscale consistency correction image set and the dynamic adjustment path instruction, call the angle, focal length and exposure parameters in the previous acquisition data, calculate the Euclidean distance value between the current path instruction multi-parameters and the previous parameters, assign weighted coefficients according to the distance value, perform superimposed correction on the path execution parameters, and generate a multi-source response optimization table.
10. An intelligent acquisition system for electric energy meter images based on multi-source data, characterized in that, The system is used to implement the method for intelligently collecting electric energy meter images based on multi-source data according to any one of claims 1 to 9, and the system comprises: A reflection profile analysis module is used to obtain a multi-angle reflection image of the electric energy meter through a preset incident angle light source, calculate the difference point by point based on the coordinates of the standard reference profile points, and use a Gaussian filter algorithm to filter the maximum value, minimum value and mean value after dividing the edge segment to generate a multi-angle difference statistical result, and transmit the multi-angle difference statistical result to the path dynamic generation module; A path dynamic generation module is used to select three consecutive over-limit edge segments according to the multi-angle difference statistical results, adjust the acquisition angle and 2mm focal length compensation in 0.5 degree steps, extract the edge area through the Canny edge detection algorithm, calculate the edge contrast change rate of three frames, generate a dynamic path adjustment instruction, and transmit the dynamic path adjustment instruction to the feature anomaly recognition module and the acquisition optimization feedback module; A feature anomaly recognition module is used to divide the image into 64×64 pixel areas, obtain the high-frequency feature point density of multiple areas through the SIFT feature extraction algorithm, extract the edge direction angle data in combination with the directional gradient histogram, adjust the area scanning order based on the dynamic adjustment path instruction, calculate the feature point density standard deviation and gradient variance, generate a multi-source feature anomaly distribution map, and pass the multi-source feature anomaly distribution map to the acquisition optimization feedback module; An acquisition optimization feedback module is used to screen abnormal areas according to the multi-source feature abnormal distribution map, call the local focus mechanism to increase the exposure by 20% to re-acquire the image, perform splicing and replacement based on the grayscale consistency ratio of edge pixels, combine the dynamic adjustment path instruction with previous data to generate a multi-source response optimization table, and drive the multi-source response optimization table to the acquisition path closed-loop correction process; The closed-loop correction process of the acquisition path iteratively optimizes the path parameters through the PID control algorithm and feeds them back to the path dynamic generation module.
Citation Information
Patent Citations
Intelligent sea surface garbage detection method, system and storage medium
CN109472200A
Strong reflection surface image highlight removing method
CN112884689A
Ammeter information extraction method and equipment
CN116524504A
ETFE film cutting control method and system based on image recognition
CN120088366A
Polarization measuring device, method for measuring polarization, and method for aligning light
JP2019144237A
Cited By
System and method for improving operation reliability of display liquid crystal of electric energy meter
CN120912594A
A system and method for improving the operational reliability of an LCD display in an energy meter.
CN120912594B
Ship sight line compensation monitoring system based on multi-source perception
CN121280985A
Electric energy meter appearance defect detection method and system based on AI automatic identification
CN121612894A
Method and system for detecting working condition of automatic emptying valve of drying kettle based on multi-view image fusion
CN121810663A