An intelligent acquisition method and system for electric energy meter images based on multi-source data
Through the statistics of the difference value of multi-angle reflective contour image and dynamic adjustment path instructions, combined with Canny edge detection and SIFT feature extraction, the feature extraction blur problem caused by ambient light changes and equipment deviations in the electricity meter image recognition is solved, and efficient and robust electricity meter image acquisition and recognition are achieved.
Patent Information
- Application Number
- CN202510739267.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-04
- Publication Date
- 2025-08-26
- 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, difficulty in character segmentation, and lack the ability to collaboratively analyze multi-angle reflective contours, resulting in low processing efficiency and high maintenance costs.
The multi-angle reflective contour image is collected by preset incident angle light source, the difference is calculated point by point and edge segment is divided, combined with the Gaussian filtering algorithm to process extreme values, filter continuous overlimited edge segments, adjust the acquisition angle and focal length, extract edge areas based on the Canny edge detection algorithm, calculate the change rate of edge contrast in three frames, generate dynamic adjustment path instructions, combine with the SIFT feature extraction algorithm to obtain high-frequency feature point density and direction gradient histogram, generate multi-source feature anomaly distribution map, call the local focus mechanism to increase exposure and re-acquire the abnormal area, and perform splicing and replacement based on the grayscale consistency ratio to drive the closed-loop correction of the acquisition path.
It improves the robustness and efficiency of the image recognition of the electricity meter, reduces recognition errors, enhances the sensitivity of local feature abnormal detection, optimizes edge detection in complex environments, reduces recognition errors caused by blur or distortion, and improves data integrity and acquisition efficiency.
Smart Images

Figure CN120279539B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image recognition, and in particular to a method and system for intelligently acquiring electric energy meter images based on multi-source data. Background Art
[0002] The field of image recognition technology encompasses technologies for identifying and analyzing specific targets or patterns within images. The core of this technology focuses on extracting meaningful information from static or dynamic images, including key aspects such as character recognition, target detection, image segmentation, and feature extraction. In systemic applications, image recognition is widely used in scenarios such as autonomous driving, medical image analysis, industrial testing, and intelligent instrument reading. Its implementation relies on computer vision, image processing, and machine learning methods, completing image data parsing and recognition tasks by establishing algorithmic models. Technologies in this field continue to advance toward improved recognition accuracy, processing speed, and data adaptability.
[0003] The patented method for intelligently capturing electricity meter images refers to the process of capturing and recognizing information displayed on an electricity meter. This patent covers image preprocessing, including character segmentation and recognition, for capturing the meter's dial image. Specifically, after capturing the meter image using a camera, character recognition methods are used to extract and analyze the digital information within the image. This recognition method is primarily based on a subset of methods used for character or number recognition within image analysis. Character regions are located within the image and matched to character feature templates to automatically read the meter's dial value.
[0004] Existing electricity meter image recognition relies on fixed light sources and acquisition angles. Ambient light changes or equipment installation deviations can easily lead to reflection interference, resulting in blurred contour feature extraction or misjudgment. The character segmentation process uses global threshold segmentation, ignoring local feature density differences, making it difficult to distinguish highly similar characters in low-resolution images. Existing methods have fixed acquisition parameters, requiring frequent manual calibration when the equipment ages or the dial is soiled, resulting in high maintenance costs. Abnormal area identification relies on single feature analysis and does not combine multi-source feature distribution differences for joint judgment. Glass reflections or stains can easily be misjudged as character anomalies. The existing process uses linear sequential execution and lacks a real-time feedback adjustment mechanism. Redundant acquisition or invalid calculations lead to low processing efficiency. The collaborative analysis capabilities of multi-angle reflection profiles are insufficient, making it impossible to filter valid edge segments through difference statistics. Data redundancy increases the storage and computational burden. Summary of the Invention
[0005] The purpose of the present invention is to solve the shortcomings of 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 objectives, the present invention adopts the following technical solution: a method for intelligently collecting electric energy meter images based on multi-source data, comprising the following steps:
[0007] S1: Collect multi-angle reflection profile images of the electric energy meter using a light source with a preset incident angle. Calculate the difference point by point based on the coordinates of the standard reference profile points. After dividing the edge segments, use the Gaussian filter algorithm to process the maximum, minimum, and mean values to generate multi-angle difference statistics.
[0008] S2: Filter three consecutive out-of-limit edge segments based on the multi-angle difference statistical results, adjust the acquisition angle and 2mm focal length compensation in 0.5 degree steps, extract the edge area based on the Canny edge detection algorithm, calculate the edge contrast change rate of three frames, and generate a dynamic path adjustment instruction;
[0009] 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 regional 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.
[0010] As a further solution of the present invention, the multi-angle difference statistical results 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 high-frequency feature point density standard deviation, directional gradient variance, and area scanning order.
[0011] 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;
[0012] The over-limit judgment threshold is the upper limit of the difference fluctuation and the probability threshold based on the Gaussian distribution is set to μ±3σ;
[0013] The Canny edge detection algorithm has a high and low threshold ratio of 1:3 and is dynamically adjusted by the gradient amplitude histogram;
[0014] The Gaussian difference pyramid for SIFT feature extraction has 4 layers and a scale factor k=1.6;
[0015] The directional gradient histogram divides 360 degrees into 8 fixed intervals and counts the weighted frequencies.
[0016] As a further solution of the present invention, the steps of obtaining the multi-angle difference statistical results are specifically as follows:
[0017] S101: Acquire a reflection profile image of the electric energy meter under the incident angle of the light source, establish a profile point positioning model based on the mapping relationship between the image pixel coordinates and the physical space coordinates, import the coordinates of the standard reference profile points into the model, match the corresponding areas in the multi-angle reflection profile image, calculate the horizontal and vertical coordinate offsets between the reflection profile points and the standard reference points in a point-to-point manner, and generate a reflection profile difference matrix;
[0018] S102: Based on the reflection profile difference matrix, the difference data is divided into independent edge segments according to the profile curvature change nodes, and the Gaussian filtering algorithm is used to suppress noise in the difference data in each edge segment. The filter window size and standard deviation parameters are set, and the filtered data in multiple segments are traversed to identify and record the maximum and minimum values. The mean is calculated by combining the sliding average to generate an edge segment filter extreme value set;
[0019] S103: calling the edge segment filter extreme value set corresponding to all incident angles, classifying and summarizing the maximum value, minimum value and mean value of each segment according to the incident angle of the light source, performing weighted superposition on all statistical items under the same angle, eliminating the influence of angle differences through normalization, and generating multi-angle difference statistical results;
[0020] The mapping relationship realizes linear conversion from pixel coordinates to physical coordinates based on an affine transformation matrix;
[0021] The ratio of the sliding average window length to the edge segment length is 1:5;
[0022] The weighted superposition weight is nonlinearly related to the incident angle and the weight distribution formula is w=sin²(θ).
[0023] As a further solution of the present invention, the step of obtaining the dynamic path adjustment instruction is specifically as follows:
[0024] S201: Calling the multi-angle difference statistical results, setting the edge segment over-limit judgment threshold to the upper limit of three consecutive difference fluctuations, traversing all edge segment data, counting the frequency of three consecutive difference values exceeding the threshold for each segment, filtering out qualified segments based on the frequency value, extracting the angle parameters and focal length parameters of the corresponding acquisition angles, and generating a set of continuous over-limit edge segments;
[0025] S202: Based on the set of continuous over-limit edge segments, the incident angle of the light source is incrementally adjusted in steps of 0.5 degrees, a 2mm focal length compensation is simultaneously superimposed, and the adjusted reflected image is collected. The Canny edge detection algorithm is invoked to filter valid edge pixels through gradient amplitude calculation and directional non-maximum suppression, combined with high and low dual thresholds, to extract the coordinate set of the target edge region and generate an edge region detection sequence;
[0026] S203: Based on the set of continuous out-of-limit edge segments, the incident angle of the light source is incrementally adjusted in steps of 0.5 degrees, and a 2mm focal length compensation is simultaneously superimposed. The adjusted reflected image is collected, and the Canny edge detection algorithm is called. Through gradient amplitude calculation and directional non-maximum suppression, combined with high and low dual thresholds, valid edge pixel points are screened, and the coordinate set of the target edge area is extracted to generate an edge area detection sequence.
[0027] As a further solution of the present invention, the steps of obtaining the multi-source characteristic anomaly distribution map are specifically as follows:
[0028] S301: Divide the image into 64×64 pixel regions, construct a Gaussian difference pyramid to traverse multiple layers of pixels, detect local extreme points as feature points, count the ratio of the number of feature points to the area of each region, and generate a feature point density distribution map;
[0029] S302: Based on the feature point density distribution map, perform horizontal and vertical difference operations on each pixel in the region to calculate the gradient amplitude 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;
[0030] S303: Calling the dynamic path adjustment instruction, rearranging the region scanning order according to the instruction priority, extracting the feature point density distribution map and the gradient direction angle set of the current scanning area, calculating the standard deviation of the density value dispersion and the distribution variance of the gradient angle, performing normalized weighted summation on the two types of statistics, and generating a multi-source feature anomaly distribution map;
[0031] The normalized weighted sum weight is allocated according to the contribution of the abnormal index, and the density standard deviation weight is 0.6 and the gradient variance weight is 0.4.
[0032] As a further embodiment of the present invention, the method further comprises:
[0033] S4: Filter abnormal areas according to the multi-source feature abnormality 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 previous data to generate a multi-source response optimization table, and drive the subsequent closed-loop correction of the acquisition path.
[0034] As a further embodiment of the present invention, the method further comprises:
[0035] S4: Filter abnormal areas according to the multi-source feature abnormality 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 previous data to generate a multi-source response optimization table, and drive the subsequent closed-loop correction of the acquisition path.
[0036] As a further solution of the present invention, the step of obtaining the multi-source response optimization table is specifically as follows:
[0037] S401: calling the multi-source feature anomaly distribution map, calculating the mean and standard deviation of the comprehensive indicators of all regions, setting an anomaly identification boundary based on the mean plus twice the standard deviation, screening areas where the comprehensive indicator values exceed the boundary, activating the local focus mechanism to set the exposure boost ratio, and re-performing image acquisition for the screened areas to generate a high-exposure acquisition image set;
[0038] S402: Based on the high-exposure acquired image set, extract the pixel grayscale values at the edge of the region, calculate the difference ratio between the grayscale values of multiple adjacent pixels, set a consistency ratio threshold using the average of the grayscale values of the adjacent pixels, replace pixels whose grayscale ratio exceeds the threshold with the grayscale average of their adjacent regions, and generate a grayscale consistency corrected image set;
[0039] 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 based on the distance value, perform superimposed correction on the path execution parameters, and generate a multi-source response optimization table.
[0040] An intelligent energy meter image acquisition system based on multi-source data, the intelligent energy meter image acquisition system based on multi-source data is used to execute the above-mentioned intelligent energy meter image acquisition method based on multi-source data, the system comprising:
[0041] A reflection profile analysis module 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 coordinates of the standard reference profile points, divide the edge segments, and use a Gaussian filter algorithm to filter the maximum, minimum, and mean values to generate multi-angle difference statistics, which are then passed to the dynamic path generation module;
[0042] A dynamic path generation module is used to select three consecutive out-of-limit edge segments based on the multi-angle difference statistical results, adjust the acquisition angle and 2mm focal length compensation in 0.5 degree steps, extract the edge area using the Canny edge detection algorithm, calculate the edge contrast change rate of three frames, generate dynamic path adjustment instructions, and transmit the dynamic path adjustment instructions to the feature anomaly recognition module and the acquisition optimization feedback module;
[0043] 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 edge direction angle data in combination with the directional gradient histogram, adjust the regional 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 pass the multi-source feature anomaly distribution map to the acquisition optimization feedback module;
[0044] An acquisition optimization feedback module is used to screen abnormal areas based on the multi-source feature abnormality distribution map, invoke a local focus mechanism to increase 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 into the acquisition path closed-loop correction process;
[0045] The acquisition path closed-loop correction process iteratively optimizes the path parameters through the PID control algorithm and feeds back to the path dynamic generation module.
[0046] Compared with the prior art, the advantages and positive effects of the present invention are:
[0047] In the present invention, a multi-angle reflection profile image is collected by a preset incident angle light source, the difference is calculated point by point and the edge segment is divided, and the extreme value and mean are processed in combination with the Gaussian filtering algorithm to reduce noise interference and improve the stability of the profile feature. After screening the continuous over-limit edge segments, the angle and focal length compensation are adjusted in steps, the edge area is extracted based on the Canny edge detection algorithm and the three-frame contrast change rate is calculated to generate dynamic path instructions to optimize the robustness of edge detection in complex environments. After dividing the image area, SIFT is used to extract the density of high-frequency feature points, and the edge direction angle is analyzed in combination with the directional gradient histogram. The scanning order is adjusted and the standard deviation and gradient variance are calculated to generate an abnormal distribution map to enhance the sensitivity of local feature abnormality detection. The local focus mechanism is called to increase the exposure and re-collect the abnormal area, and the grayscale consistency ratio is spliced and replaced. The closed-loop correction is driven by the multi-source response optimization table to reduce the recognition error caused by blur or distortion and improve data integrity and acquisition efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 It is a schematic diagram of the workflow of the present invention;
[0049] Figure 2 Flowchart of the steps for obtaining the multi-angle difference statistical results of the present invention;
[0050] Figure 3 Flowchart of the steps for obtaining the multi-angle difference statistical results of the present invention;
[0051] Figure 4Flowchart of the steps for obtaining the multi-source characteristic anomaly distribution map of the present invention;
[0052] Figure 5 Flowchart of the steps for obtaining the multi-source response optimization table of the present invention. DETAILED DESCRIPTION
[0053] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, 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 intended to limit the present invention.
[0054] In the description of the present invention, it should be understood that the terms "length," "width," "up," "down," "front," "back," "left," "right," "vertical," "horizontal," "top," "bottom," "inside," "outside," and the like, indicating positions or relationships, are based on the positions or relationships shown in the accompanying drawings and are intended only to facilitate the description of the present invention and simplify the description. They do not indicate or imply that the devices or elements referred to must have a specific orientation, be constructed, or operate in a specific orientation. Therefore, they should not be construed as limiting the present invention. Furthermore, in the description of the present invention, "plurality" means two or more, unless otherwise expressly and specifically defined.
[0055] Example 1
[0056] See also Figure 1 The present invention provides a technical solution: a method for intelligently collecting electric energy meter images based on multi-source data, comprising the following steps:
[0057] S1: Collect multi-angle reflection profile images of the electric energy meter using a light source with a preset incident angle. Calculate the difference point by point based on the coordinates of the standard reference profile points. After dividing the edge segments, use the Gaussian filter algorithm to process the maximum, minimum, and mean values to generate multi-angle difference statistics.
[0058] S2: Filter out three consecutive edge segments that exceed the limit based on the statistical results of multi-angle difference values, adjust the acquisition angle and 2mm focal length compensation in 0.5 degree steps, extract the edge area based on the Canny edge detection algorithm, calculate the edge contrast change rate of three frames, and generate dynamic path adjustment instructions;
[0059] S3: Divide the image into 64×64 pixel regions, obtain the high-frequency feature point density in each region using the SIFT feature extraction algorithm, extract edge direction angle data based on 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;
[0060] S4: Filter abnormal areas based on the multi-source feature anomaly distribution map, call the local focus mechanism to increase the exposure by 20% and re-acquire, perform splicing and replacement based on the grayscale consistency ratio of edge pixels, combine dynamic adjustment path instructions with previous data to generate a multi-source response optimization table, and drive the closed-loop correction of subsequent acquisition paths.
[0061] 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 weight.
[0062] The window size of the Gaussian filter algorithm is 5 × 5 pixels and the standard deviation σ = 1.2;
[0063] 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σ;
[0064] The high and low threshold ratio of the Canny edge detection algorithm is 1:3 and is dynamically adjusted through the gradient amplitude histogram;
[0065] The Gaussian difference pyramid for SIFT feature extraction has 4 layers and a scale factor k=1.6;
[0066] The histogram of directional gradients divides 360 degrees into 8 fixed intervals and counts the weighted frequencies;
[0067] The local focus mechanism controls the lens focal length through a stepper motor and links the light source compensation module;
[0068] The grayscale consistency ratio is the ratio of the absolute value of the grayscale difference between adjacent pixels to the mean, and the threshold is set at 15%.
[0069] See also Figure 2 , the specific steps for obtaining the multi-angle difference statistical results are:
[0070] S101: Acquire a reflection profile image of the electric energy meter under the incident angle of the light source, establish a profile point positioning model based on the mapping relationship between the image pixel coordinates and the physical space coordinates, import the coordinates of the standard reference profile points into the model, match the corresponding areas in the multi-angle reflection profile image, calculate the horizontal and vertical coordinate offsets between the reflection profile points and the standard reference points in a point-to-point manner, and generate a reflection profile difference matrix;
[0071] This step begins with collecting the reflected contour image of the electric energy meter under a specific light source incident angle. To accurately describe the contour, a contour point positioning model is constructed by using the pre-established mapping relationship between image pixel coordinates and physical space coordinates. This mapping relationship is based on the affine transformation matrix to achieve a linear conversion from pixel coordinates to physical coordinates: for any pixel point in the image , its corresponding physical space coordinates pass and Calculated. Among them, the six parameters of the affine transformation matrix It is determined through a calibration process that uses a set of (at least three) calibration points whose coordinates in physical space are known and whose corresponding pixel coordinates in the image are also known, and is fitted using the least squares method. The specific assignment is as follows: , , , , , The units of these parameters ensure that when pixel coordinates (unitless) are substituted in, the output physical coordinates are in millimeters.
[0072] Subsequently, the coordinates of the standard reference contour points are imported into this positioning model. These standard reference points are points previously measured on a standard energy meter sample using a high-precision 3D scanner, and their 3D coordinates in physical space are precisely known.
[0073] Table 1: Physical coordinates of standard reference contour points and physical coordinates of a specific angle image mapping
[0074]
[0075] As shown in Table 1, some standard reference points and their specific light source incident angles (such as ) After collecting images under , the corresponding physical space coordinates are calculated by the model. For example, the standard physical coordinates of reference point 1 are .
[0076] In the light source After the electric energy meter is illuminated at an incident angle and an image is captured, the area in the image corresponding to reference point 1 is identified using a template matching algorithm (the algorithm uses small image patches around a standard reference point as templates and searches for the area with the highest normalized cross-correlation coefficient near the predicted position in the captured image to locate it). Its pixel coordinates are . Substitute this pixel coordinate into the above affine transformation model:
[0077] (The example mapping coordinates in Table 1 are corrected here to match the calculation: the image mapping X coordinate is , the image map Y coordinate is ).
[0078] For different light source incident angles (such as 、 、 ) respectively collected the energy meter reflection contour image, and perform this matching process to find the area corresponding to all the standard reference contour points. Next, calculate the horizontal and vertical coordinate offsets of each image reflection contour point and its corresponding standard reference point (here considering the two-dimensional plane projection, the difference in Z coordinate is not calculated in this step) in a point-to-point manner. For reference point 1, its standard two-dimensional projection is ,exist The physical coordinates calculated in the incident light image are .
[0079] Therefore, the horizontal axis offset , vertical coordinate offset This offset calculation is performed for all 100 standard reference points at this angle. This process is repeated for each image at each incident angle to generate a table containing the horizontal and vertical offsets of each reference point. Matrix, which is the reflection profile difference matrix. For example, The angle of incidence, part of the difference matrix data is: point 1 , point 2 , point 3 , and the remaining 97 rows of data are filled in sequentially. This series of operations ultimately generates multiple sets of reflection profile difference matrices (each set corresponds to one incident angle).
[0080] S102: Based on the reflection profile difference matrix, the difference data is divided into independent edge segments according to the profile curvature change nodes. The Gaussian filtering algorithm is used to suppress noise in the difference data in each edge segment. The filter window size and standard deviation parameters are set. The filtered data in multiple segments are traversed, and the maximum and minimum values are identified and recorded. The mean is calculated by combining the sliding average to generate the edge segment filter extreme value set.
[0081] Take S101 for a specific incident angle (such as ) generated Reflection profile difference matrix, which records 100 contour points First, according to the change of curvature of each point on the original contour line, these difference data points are divided into multiple independent edge segments. The identification of the contour curvature change node is achieved by calculating the three consecutive points that constitute the original contour. The coordinates of the point are used to estimate The curvature at (e.g. using the Menger curvature formula When the absolute change of the curvature value of a 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, then ), or the sign of the curvature value changes (indicating a transition in concavity), the point Marked as a curvature change node. The value is set by analyzing a large number of standard electric energy meter profile samples, counting the curvature variation of the smooth area and the sharp bend transition area, and selecting the typical variation that can effectively distinguish the two. Percentile. For example, if the curvature series is ,because , then the points between 0.03 and 0.25 are considered nodes; similarly , points between 0.28 and 0.05 are also considered as nodes. In this way, the original 100 difference point data are divided into several segments, here divided into 5 independent edge segments, each containing a different number of continuous difference data points.
[0082] Next, the difference data within each independent edge segment (respectively sequence sum Sequence) to suppress noise. When executing, for a difference data point in a certain edge segment, , and its filtered value The filter window size is fixed to 5 data points, which means that the calculation When considering These five points. The standard deviation parameter of the Gaussian kernel Set to These two parameters (window size 5, ) is determined by experiments: a number of simulated contour difference data segments with different levels of Gaussian noise added are selected, and the window size and standard deviation , calculate the root mean square error (RMSE) between the filtered data and the original noise-free data, and select the parameter combination that minimizes the average RMSE, i.e., 5 and 1.0. according to (the distance from the point to the center of the window, ) and standard deviation Gaussian distribution calculate , then normalize After filtering, traverse the denoised edges of these five independent edge segments. and Data, identify and record the maximum and minimum values of each segment. For example, if the value is mm (10 points in total), then its maximum value is mm, minimum value mm.
[0083] At the same time, the mean of the difference data of each segment is calculated by combining the sliding average. The ratio of the sliding average window length to the edge segment length is For the first segment containing 10 data points, the sliding average window length is data points. Calculate the arithmetic mean of all possible subsequences of length 2 within the segment: the first sliding mean is , the second one is , and so on, a total of The arithmetic mean of these 9 sliding averages is the Mean. If these 9 means are mm, then the segment The mean is the sum of these values divided by 9, which is mm. Yes The data is processed in the same way. Finally, the corresponding These statistical values of all five edge segments are combined to form the edge segment filtering extreme value set at the incident angle.
[0084] Table 2: Example of the filter extreme value set at the edge segment under a certain incident angle (unit: mm)
[0085]
[0086] 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.
[0087] S103: Calling the edge segment filter extreme value set corresponding to all incident angles, classifying and summarizing the maximum, minimum, and mean values of each segment by light source incident angle, performing weighted superposition on all statistical items at similar angles, eliminating the influence of angle differences through normalization, and generating multi-angle difference statistical results;
[0088] This step integrates the data from all observed incident angles ( 、 、 ) of the edge segment filtering extreme value set output in step S102. Each set contains 6 statistics of 5 edge segments ( ). First, summarize the similar statistical data of each edge segment according to the incident angle of the light source. For example, we have three values: of (from Table 2), from of , and from of .
[0089] Then, these similar statistical items are weighted and superimposed. The distribution of light source incident angle (Unit: degree) related, through the formula Calculate. Here is the incident angle of the light source, calculate When , use the angle mode directly. The weight is calculated as follows: , .for , .for , These angle values The weights are set precisely by experimental equipment. The weights are set based on the quality differences in profile information obtained at different incident angles. Function in arrive It increases monotonically within the range, which means that under this setting, larger incident angles (closer to ) are given higher weights based on the consideration that these angles can provide clearer or less geometrically distorted contour information in specific application scenarios.
[0090] The weighted superposition of edge segment 1 is the largest value The calculation is as follows: all The units of the values are , weight It has no units, so the result is in .
[0091] ;
[0092] ;
[0093] The calculation result It is the weighted average maximum obtained by integrating the three angle information sources of edge segment 1 This weighted overlay operation is performed on all 6 statistics for all edge segments.
[0094] Finally, the amplitude differences between the statistical values are eliminated by normalization. Set) performs minimum-maximum normalization and maps its value to Interval. Assume that the weighted superposition of all edge segments The set of maximum values (5 values in total) is . Calculate the minimum value of the set and maximum value For any value (like ), its normalized value . Assume that all edge segments are weighted by calculation The set of maximum values is mm. Then , Therefore, the normalized weight of edge segment 1 is The maximum value is: In this calculation, the units of the numerator and 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 the final result is the multi-angle difference statistics, which is a data structure containing the normalized statistics of each edge segment.
[0095] The mapping relationship realizes the linear conversion from pixel coordinates to physical coordinates based on the affine transformation matrix;
[0096] The ratio of the sliding average window length to the edge segment length is 1:5;
[0097] The weight of weighted superposition has a nonlinear relationship with the incident angle and the weight distribution formula is w=sin²(θ).
[0098] See also Figure 3 ,The specific steps for obtaining the dynamic adjustment path instruction are:
[0099] S201: Calling the multi-angle difference statistics results, setting the edge segment over-limit judgment threshold to the upper limit of three consecutive difference fluctuations, traversing all edge segment data, counting the frequency of three consecutive difference values exceeding the threshold for each segment, filtering out qualified segments based on the frequency value, extracting the angle parameters and focal length parameters of the corresponding acquisition angles, and generating a set of consecutive over-limit edge segments;
[0100] This step uses the multi-angle difference statistical results generated in S103, which include the maximum, minimum and mean data of each edge segment after multi-angle information fusion and normalization. First, set a core indicator for edge segment over-limit judgment: the upper limit of three consecutive difference fluctuations The “difference” here refers to the absolute difference between adjacent data points in a normalized mean sequence output by S103 and arranged in the original order of the contour points within a certain edge segment. The setting is based on the analysis of the normalized mean sequence of each edge segment obtained after S103 processing of a large number of qualified electric energy meter samples. The distribution of the difference between adjacent points in these normal sample sequences is counted, and the 99th percentile is taken as If the analysis shows the normal fluctuation difference In the case of no more than (no unit, because the data has been normalized), then set The event of "three consecutive differences exceeding the threshold" is defined as: the normalized mean sequence of an edge segment (such as The mean sequence of ), if there are three consecutive differences, that is, 、 and , are greater than , it is recorded as one such event occurring.
[0101] Then, the normalized mean sequence of all edge segments is traversed (for Mean series and The frequency of the event "three consecutive times the difference exceeds the threshold" in each edge segment is counted. For example, the normalization of edge segment A is The mean sequence contains 15 points. The three consecutive differences between the 3rd, 4th, 5th, and 6th points are all greater than 0.05, which is recorded as one event. The three consecutive differences between the 10th, 11th, 12th, and 13th points are also greater than 0.05, which is recorded as the second event. The frequency of edge segment A is 2. According to the preset frequency value threshold Filter edge segments that meet the conditions. The setting is designed to identify segments with more concentrated abnormal fluctuations, and its value is set to 1. This means that if an edge segment appears at least once (i.e., the frequency ) Such continuous large fluctuation events, the segment is considered to have 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, , then edge segments A and C are filtered as eligible segments.
[0102] Finally, from these selected "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 , the focal length is The parameters are extracted from the data collected at the time of final recognition. All the screened continuous over-limit edge segments and their corresponding original acquisition parameters are organized to form a continuous over-limit edge segment set.
[0103] S202: Based on the set of continuous over-limit edge segments, the incident angle of the light source is incrementally adjusted in 0.5-degree steps, and a 2mm focal length compensation is simultaneously superimposed. The adjusted reflected image is collected, and the Canny edge detection algorithm is called. By calculating the gradient amplitude and suppressing the directional non-maximum, combined with high and low dual thresholds, valid edge pixels are screened, and the coordinate set of the target edge area is extracted to generate an edge area detection sequence.
[0104] Based on the continuous over-limit edge segment set generated in S201, this set includes edge segments that are determined to have significant continuous difference fluctuations and their original acquisition parameters. Select one element for processing, such as {edge segment A, original angle , original focal length }. For the incident angle of the light source corresponding to this edge segment, press The adjustment strategy is to adjust the original angle Based on this, we try 4 steps in each direction, that is, the angle of the new attempt is , specifically While adjusting the angle, a fixed That is, if the original focal length is , then the focal length at all new attempted angles is set to .this The focal length compensation is determined through a series of preliminary experiments: a variety of representative samples of over-limit edge segments are selected and the focal length is determined by the original acquisition angle. When adjusting the step length, the focal length compensation is tested as follows: The effect on imaging clarity is calculated by calculating the average gradient amplitude of the target edge area in the adjusted image. The compensation amount can make most samples obtain the highest average gradient amplitude.
[0105] For each new angle and focal length combination, e.g. , drive the light source and camera system to re-collect the reflected image of the area where the over-limit edge segment A is located. In this way, a series of (here 8) adjusted reflected images are obtained. For each newly collected image, the edge detection process is executed. First, the gradient amplitude and direction of each pixel in the image are calculated. Use The Sobel operator calculates the horizontal gradient and vertical gradient Gradient amplitude , gradient direction Next, directional non-maximum suppression is performed: for each pixel, check whether its gradient amplitude is the largest among the two adjacent pixels in its gradient direction (discretized to one of the 8 directions). If not, the gradient amplitude of the pixel is set to zero. Then, use high and low double thresholds to and To filter and connect edge pixels. Set to (grayscale unit, range 0-255), Set to The selection of these two values is based on testing 100 images of electric energy meters containing clear edges and various types of noise, systematically changing from arrive (step length 10), and let , and finally selected the edge detection results by manually evaluating their integrity, continuity, and noise suppression. As a combination with better robustness. The gradient amplitude is greater than The pixel points with a gradient between and The pixels between are marked as weak edge points. A weak edge point is only confirmed as an edge point when it is connected to any strong edge point through its 8-neighborhood. From the binary edge map obtained after double threshold processing, the coordinate set of the pixel points belonging to the target edge area (i.e., the new area corresponding to the original continuous over-limit edge segment A) is extracted. Such a coordinate set is generated for each adjusted acquisition parameter combination. These coordinate sets are arranged in the order of angle adjustment (e.g. arrive ) to form an edge region detection sequence for edge segment A.
[0106] S203: Based on the set of continuous out-of-limit edge segments, the incident angle of the light source is incrementally adjusted in steps of 0.5 degrees, and a 2mm focal length compensation is simultaneously superimposed. The adjusted reflected image is collected, and the Canny edge detection algorithm is called. Through gradient amplitude calculation and directional non-maximum suppression, combined with high and low dual thresholds, valid edge pixels are screened, and the coordinate set of the target edge area is extracted to generate an edge area detection sequence.
[0107] This step is parallel to or continues with S202 to process other continuous overrun edge segments identified in S201. , original focal length } as an example. The angle of incidence of the light source is incrementally adjusted with a step size of 1 / 4. However, the adjustment range is determined based on historical experience or preset rules for this type of edge segment. Here, the adjustment range is the original angle. , that is, the try angle is The focal length compensation amount of the synchronous superposition is still , so the new focal length is set to For each new parameter pair, such as , re-collect the reflected image of the edge segment C area. Apply the edge information extraction process to each new image. Calculate the gradient amplitude of each pixel and direction ,use Prewitt operator. Perform non-maximum suppression in the gradient direction. Then, a high-low double threshold method is used to screen effective edge pixels, where the high threshold Set as , low threshold Set as These threshold settings are different from those in S202. , slightly reduced. This is because when processing areas such as edge segment C, which may have a slightly lower contrast, after experiments (testing on samples in similar areas) Cooperate , and evaluate the recall and precision of edge extraction) found that a slightly lower threshold combination It can better preserve effective weak edge information without excessively introducing noise. The processing logic is the same as S202: strong edge points are directly retained, and weak edge points are retained only after they are connected to strong edge points. Collect the pixel coordinates of all pixels that are finally marked as edge points , for each parameter setting (such as ) generates a coordinate set. These coordinate sets are organized in the acquisition order to form the edge region detection sequence for 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 over-limit edge segment. These instructions include parameter combinations that maximize edge clarity.
[0108] See also Figure 4 ,The specific steps for obtaining the multi-source characteristic anomaly distribution map are:
[0109] S301: Divide the image into 64×64 pixel regions, construct a Gaussian difference pyramid to traverse multiple layers of pixels, detect local extreme points as feature points, count the ratio of the number of feature points to the area of each region, and generate a feature point density distribution map;
[0110] This step is parallel to or continues with S202 to process other continuous overrun edge segments identified in S201. , original focal length } as an example. The angle of incidence of the light source is incrementally adjusted with a step size of 1 / 4. However, the adjustment range is determined based on historical experience or preset rules for this type of edge segment. Here, the adjustment range is the original angle. , that is, the try angle is The focal length compensation amount of the synchronous superposition is still , so the new focal length is set to For each new parameter pair, such as , re-collect the reflected image of the edge segment C area. Apply the edge information extraction process to each new image. Calculate the gradient amplitude of each pixel and direction ,use Prewitt operator. Perform non-maximum suppression in the gradient direction. Then, a high-low double threshold method is used to screen effective edge pixels, where the high threshold Set as , low threshold Set as These threshold settings are different from those in S202. , slightly reduced. This is because when processing areas such as edge segment C, which may have a slightly lower contrast, after experiments (testing on samples in similar areas) Cooperate , and evaluate the recall and precision of edge extraction) found that a slightly lower threshold combination It can better preserve effective weak edge information without excessively introducing noise. The processing logic is the same as S202: strong edge points are directly retained, and weak edge points are retained only after they are connected to strong edge points. Collect the pixel coordinates of all pixels that are finally marked as edge points , for each parameter setting (such as ) generates a coordinate set. These coordinate sets are organized in the acquisition order to form the edge region detection sequence for 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 over-limit edge segment. These instructions include parameter combinations that maximize edge clarity.
[0111] S302: Based on the feature point density distribution map, perform horizontal and vertical differential operations on each pixel in the region to calculate the gradient amplitude 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;
[0112] Based on each of the original image (or the image adjusted in S202 / S203, here refers to the initial analysis of the original image) in S301 Pixel area, calculate the gradient information of the pixels in the area. and its grayscale value , its transverse gradient component and the longitudinal gradient component pass The gradient magnitude is calculated by convolution of Sobel operator. , gradient direction angle , its return value is Radians, need to be converted to Degrees. The directional space is divided into 8 equal-width bins, each spanning The intervals are , , , , , , , .
[0113] Statistics The gradient direction of all pixels in the region (weighted by their gradient magnitude) falls into the cumulative magnitude of these 8 intervals. Specifically: for each pixel in the region, calculate its gradient magnitude and direction .Sure The interval . Then the interval The cumulative count value increases . Traverse all the After 8 pixels are accumulated, an array of 8 cumulative gradient magnitudes (or simple frequencies) is obtained. ,in It is The cumulative gradient amplitude of the direction interval. This array is the gradient direction angle set of the area. indivual This operation is performed on each region to generate their own set of gradient direction angles.
[0114] S303: Calling a dynamic path adjustment instruction to rearrange the region scanning order according to the instruction priority, extracting the feature point density distribution map and the gradient direction angle set of the current scanning area, calculating the standard deviation of the density value dispersion and the distribution variance of the gradient angle, performing a normalized weighted summation on the two types of statistics, and generating a multi-source feature anomaly distribution map;
[0115] The dynamic adjustment path instructions generated by step S202 or S203 are called. These instructions specify the optimized acquisition parameters for the specific high-risk area (determined by S201). When performing feature analysis on the entire image to generate an abnormal distribution map, if the currently analyzed If an area was previously identified as out-of-range by S201 and has optimization instructions for S202 / S203, the re-acquired image data under the optimized parameters will be prioritized for feature extraction in S301 and S302; otherwise, the original image data will be used. If the instructions include priority information (such as certain areas receiving higher analysis priority due to multiple adjustments still not being ideal), the areas will be processed in this order.
[0116] Extract the currently processed -thScan area ( pixel) corresponding to the feature point density value generated by S301 (For example points / pixels) and the gradient direction angle set generated by S302 (a histogram containing 8 values ,in is the cumulative gradient magnitude of the j-th direction bin).
[0117] Two types of statistics are calculated:
[0118] 1. Regional feature point density index :It is the density value of the feature points in the area .
[0119] 2. Regional gradient angle distribution variance : Histogram of gradient directions Calculate the variance of its distribution. First convert the count values of the histogram to frequencies . The center angle of the interval (such as ) or interval index (1 to 8) as the value of the random variable. Here, interval index is used Calculate the mean , then calculate the variance For example, if the area The gradient direction frequency is ,but ;
[0120] ;
[0121] ;
[0122] ;
[0123] .
[0124] Calculated for all regions (Right now )and Perform minimum-maximum normalization and map them to First, determine the range of all areas Range of values and all regions Range of values . Assume that by counting 300 regions, we get: Points / pixel, dots / pixels. and , . Then the normalized value is: For the region of , its normalized value For the region of , its normalized value .
[0125] Then the two normalized statistics are weighted summed to obtain the area Comprehensive abnormal index The weight distribution is: normalized density index Weight , normalized gradient variance Weight The setting of these weights is based on the analysis of a large number of defect samples. It was found that when identifying anomalies such as printing defects, stains or slight scratches on the surface of electricity meters, the change in feature point density (weight 0.6) usually provides a more direct and important indicator than the chaotic degree of the direção gradient (weight 0.4).
[0126] Substituting example values: This value That is the region This calculation is performed on all 300 regions, and the obtained The values are organized into a The matrix is the multi-source feature anomaly distribution map.
[0127] The normalized weighted sum weight is allocated according to the contribution of the anomaly indicator, and the density standard deviation weight is 0.6 and the gradient variance weight is 0.4.
[0128] See also Figure 5 ,The specific steps for obtaining the multi-source response optimization table are:
[0129] S401: Calling a multi-source feature anomaly distribution map, calculating the mean and standard deviation of the comprehensive indicators of all regions, setting an anomaly identification boundary based on the mean plus twice the standard deviation, screening areas where the comprehensive indicator values exceed the boundary, activating the local focus mechanism to set the exposure boost ratio, and re-performing image acquisition for the screened areas to generate a high-exposure acquisition image set;
[0130] Call the multi-source feature anomaly distribution map generated by S303, which contains 300 A comprehensive anomaly index is given for each region First, all these regional composite indicators are calculated The arithmetic mean of and standard deviation . For 300 The values are statistically calculated and and The anomaly identification boundary is set based on the mean plus twice the standard deviation. .
[0131] .
[0132] The choice of rule is based on the assumption that if the data are approximately normally distributed, then The data falls on range, so values outside this upper boundary are considered outliers with a high probability of being abnormal.
[0133] Filter out those comprehensive indicator values Beyond the Boundary If the area of ,because , then the region The abnormal areas that need further optimization are screened out. For these screened abnormal areas, the local focus (if applicable, using the optimized focus determined by S202 / S203) and exposure adjustment mechanism are activated. Set the exposure boost ratio .
[0134] The process of determining this ratio is as follows: 50 samples of areas with high S303 scores due to underexposure or low contrast are selected. The image is re-captured with a multiple of the original exposure, and then the new image is evaluated for feature clarity (such as local contrast and edge strength). The multiple increase can significantly improve the visibility of details without overexposure in most cases. If these areas were originally acquired with an exposure time of , the new exposure time For all the abnormal areas that have been screened out, the image acquisition operation is re-executed using the new exposure parameters (and the optimized angle and focal length determined in S202 / S203, if any) to obtain high-exposure (optimized exposure) images of these areas, forming a high-exposure acquisition image set.
[0135] S402: Based on the high-exposure captured image set, extract the pixel grayscale values at the edge of the region, calculate the difference ratio between the grayscale values of multiple adjacent pixels, set the consistency ratio threshold based on the average of the grayscale values of the adjacent pixels, replace the pixels whose grayscale ratio exceeds the threshold with the grayscale average of their adjacent regions, and generate a grayscale consistency corrected image set;
[0136] Based on the high-exposure image set generated in S401, each of the re-collected abnormal area images is processed. First, the grayscale values of the edge pixels in the image of the area are extracted. These edges can be directly located using the edge point coordinates detected under the optimized parameters recorded in the S202 / S203 dynamic adjustment path instruction, or by running a fast Sobel edge detection on the current high-exposure image and performing a simple thresholding. For a pixel on a certain edge, Its gray value is , another pixel directly adjacent to it on the edge The gray value is . Calculate the difference ratio between the grayscale values of these two adjacent pixels Defined as: ,like ,but .like , (Grayscale value range 0-255), then . . Set a grayscale consistency ratio threshold The threshold is set based on the following: for the smooth edge segments in 100 high-quality, clear energy meter images, calculate the distance between adjacent pixels on them. Values, statistics of these The distribution of values, take its 90th percentile value as , that is, under normal circumstances Neighboring pixels Value lower than If the calculated Less than , then the pixel The grayscale transition between them is smooth and no processing is done. The gray value is ,but .
[0137] .because , the grayscale ratio of the pair of pixels exceeds the threshold. At this time, it is necessary to correct the pixels with larger grayscale value jumps. The correction rule is: the pixels that contribute more to the grayscale value change (or both) (in this example, assuming that the judgment is the main jump point), its grayscale value is replaced by its own and surrounding Neighborhood (excluding directly compared ) is the grayscale mean of all pixels. Let pixel of Neighborhood (excluding After, including The sum of the pixel grayscale values of itself and its 7 neighbors is , the number of pixels in the neighborhood is , then the average gray value is .like , then The value from Modified to This comparison and selective correction is performed on all pairs of adjacent pixels on the edges detected in the region. This process can be iterated 1-2 times until no pixel value changes or the maximum number of iterations is reached. Finally, a set of grayscale consistency-corrected images of all abnormal regions is generated.
[0138] 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 based on the distance value, perform superimposed correction on the path execution parameters, and generate a multi-source response optimization table.
[0139] Integrate the grayscale consistency correction image set generated by S402 (these images are collected under the optimized parameters and grayscale smoothed) and the dynamic adjustment path instructions determined in steps S202 / S203 that lead to these high-quality images, which include the light source angle for each optimized area , camera focal length , and combined with the optimized exposure determined in S401 . Form the current successful parameter set . Call a historical database that stores the collected data in the past. The database records the abnormal areas of similar types (according to S303) when the same type of electric energy meter was tested in the past. Various historical parameter combinations used to classify values or their derived characteristics and the evaluation of its collection effect (such as whether the problem is successfully solved, or the subsequent Score). Calculate the current successful parameter set The set of past parameters associated with each entry in the history database Multi-parameter Euclidean distance between Before calculating the distance, in order to ensure that the contribution of each parameter to the distance is balanced, it is necessary to unify the scale. Using the minimum-maximum normalization method, each parameter is converted to The conversion rules are based on the empirical range of various parameters in practical applications: angle scope ,focal length scope , exposure scope For a parameter value , its normalized value .
[0140] For example, .
[0141] ;
[0142] ;
[0143] ;
[0144] so, A historical record .
[0145] ;
[0146] ;
[0147] so, . .
[0148] Euclidean distance ;
[0149]
[0150] Parameter normalization here is the process of converting parameters with different physical meanings and numerical ranges into a unified comparable scale. Its rationality lies in ensuring that the contribution of each parameter in the distance calculation is not biased by its original numerical value.
[0151] Based on the calculated distance value Allocation weighting coefficient .parameter Controls the decay rate of weight with distance, set to This value is set based on the historical data The observation of the distribution is to make it closer to the current success parameter ( Historical records (about ) gain significant weight, while the weight of more distant records drops rapidly. , . Select the historical database The nearest Records (or all weights Greater than a certain threshold records), together with the current (Give it a higher fixed weight, such as ), weighted average is performed on these parameter records (original unnormalized values) to update or generate the recommended parameters in the multi-source response optimization table. For example, the updated recommended angle for: .
[0152] Similar weighted average corrections are performed on focus and exposure. These updated parameters are stored in the multi-source response optimization table and used to guide initial parameter settings for similar detection scenarios in the future.
[0153] Table 3: Multi-source response optimization parameters
[0154]
[0155] Table 3 lists some sample contents of a multi-source response optimization table. This table stores learned and dynamically corrected recommended acquisition parameter combinations (light source angle, camera focal length, and exposure) based on different abnormal area characteristics (identified by unique feature IDs that link to more detailed feature descriptions). It also records the confidence score for each parameter combination (calculated based on historical success rates and update counts) and the most recent update time, enabling continuous optimization of detection strategies.
[0156] An intelligent energy meter image acquisition system based on multi-source data is provided. The intelligent energy meter image acquisition system based on multi-source data is used to execute the above-mentioned intelligent energy meter image acquisition method based on multi-source data. The system includes:
[0157] The reflection profile analysis module 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 coordinates of the standard reference contour points, divide the edge segments, and use the Gaussian filter algorithm to filter the maximum, minimum, and mean values to generate multi-angle difference statistics. The multi-angle difference statistics are passed to the dynamic path generation module;
[0158] The dynamic path generation module is used to select three consecutive out-of-limit edge segments based on the statistical results of multi-angle difference values, adjust the acquisition angle and 2mm focal length compensation in 0.5-degree steps, extract the edge area using the Canny edge detection algorithm, calculate the edge contrast change rate of three frames, generate dynamic path adjustment instructions, and pass the dynamic path adjustment instructions to the feature anomaly recognition module and the acquisition optimization feedback module;
[0159] The feature anomaly recognition module is used to divide the image into 64×64 pixel areas, obtain the high-frequency feature point density in multiple areas through the SIFT feature extraction algorithm, extract edge direction angle data based on the directional gradient histogram, adjust the regional 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 pass the multi-source feature anomaly distribution map to the acquisition optimization feedback module;
[0160] The acquisition optimization feedback module is used to screen abnormal areas based on the multi-source feature anomaly distribution map, invoke the local focus mechanism to increase exposure by 20% and re-acquire the image, perform splicing and replacement based on the grayscale consistency ratio of edge pixels, combine dynamic path adjustment instructions with historical data to generate a multi-source response optimization table, and drive the multi-source response optimization table into the acquisition path closed-loop correction process;
[0161] The acquisition path closed-loop correction process iteratively optimizes the path parameters through the PID control algorithm and feeds back to the path dynamic generation module.
[0162] The above are merely preferred embodiments of the present invention and do not limit the present invention in any other form. Any technician familiar with the profession may use the technical content disclosed above to change or modify it into an equivalent embodiment with equivalent changes and apply it to other fields. However, any simple modification, equivalent change and modification made to the above embodiment based on the technical essence of the present invention without departing from the content of the technical solution of the present invention shall still fall within the scope of protection of the technical solution of the present invention.
Claims
1. An intelligent energy meter image acquisition system based on multi-source data, characterized in that: include: A reflection profile analysis module 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 coordinates of the standard reference profile points, divide the edge segments, and use a Gaussian filter algorithm to filter the maximum, minimum, and mean values to generate multi-angle difference statistics, which are then passed to the dynamic path generation module; The steps for obtaining the multi-angle difference statistical results are specifically as follows: S101: Acquire a reflection profile image of the electric energy meter under the incident angle of the light source, establish a profile point positioning model based on the mapping relationship between the image pixel coordinates and the physical space coordinates, import the coordinates of the standard reference profile points into the model, match the corresponding areas in the multi-angle reflection profile image, calculate the horizontal and vertical coordinate offsets between the reflection profile points and the standard reference points in a point-to-point manner, and generate a reflection profile difference matrix; S102: Based on the reflection profile difference matrix, the difference data is divided into independent edge segments according to the profile curvature change nodes, and the Gaussian filtering algorithm is used to suppress noise in the difference data in each edge segment. The filter window size and standard deviation parameters are set, and the filtered data in multiple segments are traversed to identify and record the maximum and minimum values. The mean is calculated by combining the sliding average to generate an edge segment filter extreme value set; S103: calling the edge segment filter extreme value set corresponding to all incident angles, classifying and summarizing the maximum value, minimum value and mean value of each segment according to the incident angle of the light source, performing weighted superposition on all statistical items under the same angle, eliminating the influence of angle differences through normalization, and generating multi-angle difference statistical results; The mapping relationship realizes linear conversion from pixel coordinates to physical coordinates based on an affine transformation matrix; The ratio of the sliding average window length to the edge segment length is 1:5; The weighted superposition weight has a nonlinear relationship with the incident angle and the weight distribution formula is w=sin²(θ); A dynamic path generation module is used to select three consecutive out-of-limit edge segments based on the multi-angle difference statistical results, adjust the acquisition angle and 2mm focal length compensation in 0.5 degree steps, extract the edge area using the Canny edge detection algorithm, calculate the edge contrast change rate of three frames, generate dynamic path adjustment instructions, and transmit the dynamic path adjustment instructions 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 edge direction angle data in combination with the directional gradient histogram, adjust the regional 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 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 based on the multi-source feature abnormality distribution map, invoke a local focus mechanism to increase 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 into 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 back to the path dynamic generation module.
2. The electric energy meter image intelligent acquisition system based on multi-source data according to claim 1 is characterized in that: The multi-angle difference statistical results are specifically the maximum edge segment difference, the minimum edge segment difference, and the mean edge segment difference. The dynamic adjustment path instructions include 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 directional gradient variance, and the regional scanning order.
3. The intelligent energy meter image acquisition system based on multi-source data according to claim 2 is characterized in that: The Gaussian filter algorithm has a window size of 5×5 pixels and a standard deviation σ=1.2; The Canny edge detection algorithm has a high and low threshold ratio of 1:3 and is dynamically adjusted by the gradient amplitude histogram; The Gaussian difference pyramid for SIFT feature extraction has 4 layers and a scale factor k=1.6; The directional gradient histogram divides 360 degrees into 8 fixed intervals and counts the weighted frequencies.
4. The electric energy meter image intelligent acquisition system based on multi-source data according to claim 3 is characterized in that: The steps for obtaining the dynamic path adjustment instruction are specifically as follows: S201: Calling the multi-angle difference statistical results, setting the edge segment over-limit judgment threshold to the upper limit of three consecutive difference fluctuations, traversing all edge segment data, counting the frequency of three consecutive difference values exceeding the threshold for each segment, filtering out qualified segments based on the frequency value, extracting the angle parameters and focal length parameters of the corresponding acquisition angles, and generating a set of continuous over-limit edge segments; The over-limit judgment threshold is the upper limit of the difference fluctuation and the probability threshold based on the Gaussian distribution is set to μ±3σ; S202: Based on the set of continuous over-limit edge segments, the incident angle of the light source is incrementally adjusted in steps of 0.5 degrees, a 2mm focal length compensation is simultaneously superimposed, and the adjusted reflected image is collected. The Canny edge detection algorithm is invoked to filter valid edge pixels through gradient amplitude calculation and directional non-maximum suppression, combined with high and low dual thresholds, to extract the coordinate set of the target edge region and generate an edge region detection sequence; S203: Based on the set of continuous out-of-limit edge segments, the incident angle of the light source is incrementally adjusted in steps of 0.5 degrees, and a 2mm focal length compensation is simultaneously superimposed. The adjusted reflected image is collected, and the Canny edge detection algorithm is called. Through gradient amplitude calculation and directional non-maximum suppression, combined with high and low dual thresholds, valid edge pixel points are screened, and the coordinate set of the target edge area is extracted to generate an edge area detection sequence.
5. The electric energy meter image intelligent acquisition system based on multi-source data according to claim 4 is characterized in that: The steps for obtaining the multi-source characteristic 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 pixels, detect local extreme points as feature points, count the ratio of the number of feature points to the area of 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 pixel in the region to calculate the gradient amplitude 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: Calling the dynamic path adjustment instruction, rearranging the region scanning order according to the instruction priority, extracting the feature point density distribution map and the gradient direction angle set of the current scanning area, calculating the standard deviation of the density value dispersion and the distribution variance of the gradient angle, performing normalized weighted summation on the two types of statistics, and generating a multi-source feature anomaly distribution map; The normalized weighted sum weight is allocated according to the contribution of the abnormal index, and the density standard deviation weight is 0.6 and the gradient variance weight is 0.
4.
6. The intelligent energy meter image acquisition system based on multi-source data according to claim 5 is characterized in that: The method further comprises: S4: Filter abnormal areas according to the multi-source feature abnormality 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 previous data to generate a multi-source response optimization table, and drive the subsequent closed-loop correction of the acquisition path.
7. The electric energy meter image intelligent acquisition system based on multi-source data according to claim 6 is characterized in that: The multi-source response optimization table specifically includes local exposure adjustment parameters, image splicing replacement areas, 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%.
8. The electric energy meter image intelligent acquisition system based on multi-source data according to claim 7 is 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 indicators of all regions, setting an anomaly identification boundary based on the mean plus twice the standard deviation, screening areas where the comprehensive indicator values exceed the boundary, activating the local focus mechanism to set the exposure boost ratio, and re-performing image acquisition for the screened areas to generate a high-exposure acquisition image set; S402: Based on the high-exposure acquired image set, extract the pixel grayscale values at the edge of the region, calculate the difference ratio between the grayscale values of multiple adjacent pixels, set a consistency ratio threshold using the average of the grayscale values of the adjacent pixels, replace pixels whose grayscale ratio exceeds the threshold with the grayscale average of their adjacent regions, and generate a grayscale consistency corrected 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 based on the distance value, perform superimposed correction on the path execution parameters, and generate a multi-source response optimization table.
Citation Information
Patent Citations
Intelligent sea surface garbage detection method, system and storage medium
CN109472200A
Ammeter information extraction method and equipment
CN116524504A