Electricity meter dial plate identification method based on computer vision
By combining super-resolution-illuminance joint enhancement and an improved YOLOv8 target detection network with an optical character recognition model, the accuracy problem of meter dial recognition in complex environments was solved, high-precision readings and anomaly detection were achieved, and the reliability of the automatic meter reading system was improved.
Patent Information
- Application Number
- CN202510907847.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-02
- Publication Date
- 2025-09-26
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing meter dial image recognition technology has difficulty achieving high-precision pointer positioning and digital character recognition in low-resolution, drastic lighting changes, and complex environments. This is especially true for meters with multiple disk positions, multiple specifications, and heterogeneous structures from different manufacturers. Existing methods are difficult to adaptively extract features and robustly recognize, resulting in insufficient reading consistency and confidence in the results.
A computer vision-based electricity meter dial recognition method is adopted. The image resolution and illumination adaptability are improved through a super-resolution-illuminance joint enhancement network. The improved YOLOv8 target detection network and polar coordinate attention mechanism are combined to detect the meter structure. The pointer direction vector is constructed and angle regression is performed. The optical character recognition model is combined for digital window recognition. The reading accuracy is improved through consistency comparison and timing verification.
Under low-resolution and complex lighting conditions, the detection recall rate and digital recognition accuracy of the meter dial are significantly improved, error accumulation is reduced, high-precision readings are achieved under different meter types and multi-disc heterogeneous structures, and timely alarms are issued for abnormal conditions.
Smart Images

Figure CN120708204A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electric meters, and in particular to an electric meter dial recognition method based on computer vision. Background Art
[0002] With the rapid adoption of smart grids and IoT devices, automated meter reading and remote meter data collection have become key trends in metering management for the electricity, gas, and water industries. Traditional manual meter reading methods are inefficient, prone to errors, and require high labor costs. Consequently, an increasing number of companies are deploying automated meter reading systems based on video capture and image recognition.
[0003] In practical applications, meter reading images are usually collected by low-cost smart cameras or mobile inspection terminals installed on-site. However, existing equipment is limited by the collection distance, lens focal length, ambient light and cost control factors, resulting in limited resolution of the meter dial images obtained and often accompanied by uneven brightness, reflective occlusion or complex imaging interference in low-light conditions at night. Existing technologies generally use conventional target detection algorithms in conjunction with general OCR models to locate dial elements and recognize digital windows. When the resolution is low, the lighting changes drastically, the pointer and scale are blurred, or the digital window is blocked, the detection recall rate and recognition accuracy of conventional algorithms drop significantly, and pointer positioning errors, accumulated angle deviations and digital character recognition errors are prone to occur.
[0004] In addition, electricity meters from different manufacturers have heterogeneous structures with multiple disk positions, multiple specifications, and mixed clockwise and counterclockwise arrangements. Existing target detection models and character recognition methods are difficult to achieve adaptive feature extraction and robust recognition based on changes in meter structure, and have limited ability to judge reading consistency and result confidence in extreme environments. Summary of the Invention
[0005] One purpose of the present invention is to propose a method for recognizing electric meter dials based on computer vision. The present invention can improve reading accuracy under different electric meter types and multi-disc heterogeneous structures by jointly verifying multiple links of detection, regression, and recognition.
[0006] A method for recognizing an electric meter dial based on computer vision according to an embodiment of the present invention includes: Perform periodic image acquisition on the target meter to generate the original meter dial image; The original meter dial image is input into the super-resolution-illumination joint enhancement network to obtain the enhanced meter dial image; The enhanced meter dial image is input into the improved YOLOv8 target detection network to obtain the meter structure detection result; According to the meter structure detection results, the coordinates of the pointer center and the pointer end are extracted, the pointer direction vector is constructed, and the angle value of each pointer is output through the angle regression model; Calculate the reading of each disk position based on the pointer angle value and the dial outer circle specification parameters, and crop and enhance the digital window area in the meter dial image according to the digital window position information to obtain a digital window image; Input the digital window image into the optical character recognition model to obtain the digital window recognition result, and compare the digital window recognition result with the readings of each disk position for consistency; Perform time-consistent smoothing on the qualified reading results within consecutive acquisition cycles and output the smoothed reading results.
[0007] Optionally, the periodic image acquisition of the target electric meter to generate an original electric meter dial image includes: Periodically capture images of the target electric meter at preset time intervals to obtain a sequence of original electric meter dial images; Performing clarity evaluation on each frame of the original meter dial image in the original meter dial image sequence to obtain an image clarity score; Compare the image clarity score to a preset clarity threshold: If the image clarity score is greater than or equal to the preset clarity threshold, the original meter dial image is determined to be a valid image; If the image clarity score is less than a preset clarity threshold, the original meter dial image is determined to be an invalid image; The original electric meter dial images judged as valid images constitute an image retention set.
[0008] Optionally, the inputting a super-resolution-illuminance joint enhancement network to obtain an enhanced meter dial image includes: Each frame of the original meter dial image in the image retention set is input into the super-resolution-illumination joint enhancement network to obtain a super-resolution image and an illumination adaptive image; The super-resolution image and the illumination adaptive image are linearly weighted according to the fusion weight coefficient to obtain the enhanced meter dial image.
[0009] Optionally, the super-resolution-illumination joint enhancement network consists of a backbone encoder module, a dual-path feature decoding module and an illumination adjustment module; The backbone encoder module is used to extract the multi-scale structural information and high-frequency edge features of the original meter dial image and output the encoded feature map; The dual-path feature decoding module includes a super-resolution image reconstruction submodule and an illumination feature generation submodule; The super-resolution image reconstruction submodule generates a super-resolution image through layer-by-layer upsampling and residual reconstruction operations based on the encoded feature map; The illumination feature generation submodule generates an illumination guidance map based on the encoded feature map. The illumination guidance map is used to characterize the relative brightness response of each pixel area. The illumination adjustment module is based on the original meter dial image and the illumination guidance map. Through pixel weighted mapping operation, the pixels in the low-brightness area are enhanced in detail and the pixels in the high-brightness area are compressed and adjusted to obtain an illumination adaptive image. The illumination adaptive image is used to represent the original meter dial image after dynamic brightness adjustment.
[0010] Optionally, the structure of the improved YOLOv8 target detection network includes: The enhanced meter dial image is input into the backbone feature extraction module of the improved YOLOv8 object detection network to obtain a set of multi-scale meter feature maps; Input the multi-scale electricity meter feature map set into the polar coordinate attention mechanism module to obtain the polar coordinate enhanced feature map set. The polar coordinate attention mechanism module is used to explicitly model the polar symmetric structural characteristics of the electricity meter dial image; The polar coordinate attention mechanism module includes a polar coordinate position encoding unit, a polar domain convolution unit and an attention weight generation unit: The polar coordinate position encoding unit maps each pixel position in the multi-scale meter feature map set to a radial distance and polar angle direction with the center of the dial as the origin; The polar convolution unit aggregates the feature points with the same radial distance and adjacent polar angle directions on the feature map based on the polar coordinate position of each feature point to obtain the aggregated polar feature response; The attention weight generation unit is used to dynamically weight the polar feature response output by the polar convolution unit according to the polar coordinate position of each feature point, and output a set of polar coordinate enhanced feature maps; The polar coordinate enhanced feature map set is input into the angle-sensitive rotation anchor box detection head, which outputs the meter structure detection result based on the prior of the dial geometry.
[0011] Optionally, constructing the pointer direction vector and outputting each pointer angle value includes: Extract the pointer center point coordinates and pointer end point coordinates of each group of pointer structures in the meter structure detection results, and construct the pointer direction vector; The coordinates of the dial center point are obtained based on the dial outer circle position information, and the angle between the line connecting the pointer end point and the dial center point and the horizontal reference axis is calculated with the dial center point as the reference origin as the initial pointer angle value; The initial pointer angle value, pointer direction vector, pointer length, pointer tilt feature and dial attitude angle are input into the angle regression model as feature vectors; The angle regression model adopts a residual regression network structure, which includes two layers of linear fully connected structures and one layer of nonlinear activation function. The angle regression model performs a linear transformation on the feature vector and adds a first layer of bias. After the nonlinear activation function, it performs a second linear transformation and adds a second layer of bias to obtain the residual correction value. The final regression angle value is obtained by adding the residual correction value to the initial pointer angle value.
[0012] Optionally, the calculation of the digital window image includes: Calculate the reading value of the dial position where the pointer is located based on the final regression angle value of each pointer structure and the corresponding dial outer circle specification parameters. The dial outer circle specification parameters include the total number of readings per circle and the rotation direction indicator; The decimal point of each disk position reading is truncated to obtain the standardized whole-digit reading result; According to the digital window position information in the meter structure detection result, the digital window image is obtained by cropping the area in the enhanced meter dial image according to the horizontal and vertical values of the center coordinates of the digital window circumscribed rectangular frame and the width and height as the boundary; The standardized whole-bit reading result of each disk position is bound and stored with the corresponding digital window image.
[0013] Optionally, the digital window recognition result is compared with the readings of each disk position for consistency, including: Input each digital window image into the optical character recognition model to obtain a digital window recognition result; The recognition result of each digital window is compared with the standardized whole-digit reading result of the corresponding disk position. The consistency comparison is used to verify the correspondence between the character sequence and the meter pointer calculation result in the physical reading value. The consistency judgment rules are defined according to the following conditions: If each digit in the normalized whole-digit reading result is numerically equal to the corresponding digit in the digital window recognition result, it is determined that the consistency condition is met; If any digit is inconsistent between the standardized whole-digit reading result and the digit window recognition result, it is determined that the consistency condition is not met; If the consistency condition is met, a qualified reading result is generated. The qualified reading result is a valid structured meter disk position reading value confirmed under the dual consistency of the pointer regression reading value and the optical character recognition reading value; If the consistency condition is not met, the pointer re-detection process is triggered and the consistency comparison process is re-executed. If the consistency condition is still not met, the verification failure mark is output and the cause of the exception is recorded.
[0014] Optionally, the optical character recognition model includes a freeze-frame perception embedding module, a structure-guided feature encoding module, and a dislocation-robust character decoding module; The freeze-frame perception embedding module segments the input digital window image into several fixed-width character regions based on the physical layout prior of the meter's digital window. The character region boundary positions are dynamically generated using a position-guided convolutional network. This allows the optical character recognition model to adapt to border trimming, alignment deviation, and imaging distortion in the digital window image, and outputs a character partition feature map. The structure-guided feature encoding module uses a character position embedding mechanism to extract independent features from each character region in the character partition feature map and explicitly encodes the position order relationship between characters. The output of each character region is represented as a set of feature vectors and corresponding spatial position coordinates. The feature vector and the corresponding spatial position coordinates are input into the misalignment robust character decoding module. The misalignment robust character decoding module is a self-attention decoding network based on character spatial position alignment. It adopts a character-level saliency guidance mechanism to suppress character edge occlusion, stroke breakage, and upper and lower box overflow interference, and outputs the predicted character and character saliency weight for each character area.
[0015] The beneficial effects of the present invention are: (1) In the structured detection link of the meter dial image, the present invention deeply improves the YOLOv8 target detection network by introducing the polar coordinate attention mechanism and the angle-sensitive rotation anchor frame detection head, thereby achieving high-precision spatial positioning of the outer circle of the meter dial, the pointer structure and the digital window. The polar coordinate attention mechanism can incorporate the prior information of the central symmetric structure of the dial into the feature modeling process, significantly improving the detection capability of polar targets. The rotation anchor frame detection head optimizes the anchor frame distribution by the polar anchor frame set, thereby improving the detection robustness of the YOLOv8 target detection network under the conditions of dial tilt, rotation and complex lighting. The improved YOLOv8 target detection network has better recall rates of the dial, pointer and digital window than the traditional YOLOv5 and YOLOv8 backbone networks in low-resolution and high-noise scenarios.
[0016] (2) The optical character recognition model of the present invention designs a freeze-frame perception embedding module, a structure-guided feature encoding module and a misalignment robust character decoding module for the fixed-width structure and easy-to-misalignment imaging characteristics of the meter digital window. It can perform freeze-frame segmentation, structured feature extraction and saliency adaptive decoding on the digital window area. The optical character recognition model not only explicitly integrates the spatial pattern prior of the digital window, but also adaptively recognizes and corrects the interference of character occlusion, edge cutting, and upper and lower frame noise through the saliency weight mechanism, and outputs a set of character pairs with spatial position and confidence weight. In the poor imaging environment of digital window narrow edge occlusion, reflection blur and tilt distortion, the recognition accuracy of the optical character recognition model is significantly improved compared with the traditional CRNN-CTC scheme, and the misrecognition rate under the disk position is reduced.
[0017] (3) The present invention constructs an end-to-end super-resolution-illuminance joint enhancement and structure detection, reading consistency verification pipeline, which effectively solves the problem of dial reading error accumulation under low-definition imaging and complex lighting conditions. The spatial resolution and local contrast of the input image are improved through super-resolution reconstruction and adaptive illumination enhancement. Combined with the disk pointer angle residual regression model and the digital window character consistency comparison mechanism, the joint verification of multiple links in detection, regression, and recognition can improve the reading accuracy under different meter types and multi-disk heterogeneous structures, and timely output alarms for idling and reversal abnormal states. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings: Figure 1 This is a flow chart of a method for recognizing electric meter dials based on computer vision proposed in the present invention. DETAILED DESCRIPTION
[0019] The present invention will now be described in further detail with reference to the accompanying drawings, which are simplified schematic diagrams that illustrate the basic structure of the present invention in a schematic manner.
[0020] refer to Figure 1 , a method for recognizing an electric meter dial based on computer vision, comprising: Perform periodic image acquisition on the target meter to generate the original meter dial image; In this embodiment, periodic image acquisition is performed on the target electricity meter to generate an original electricity meter dial image, including: Periodically capture images of the target electric meter at preset time intervals to obtain a sequence of original electric meter dial images; The original meter dial image sequence is used to represent a set of original meter dial images collected at multiple consecutive time points, and each original meter dial image corresponds to a specific image collection cycle.
[0021] Performing clarity evaluation on each frame of the original meter dial image in the original meter dial image sequence to obtain an image clarity score; The image clarity score is used to measure the spatial structural clarity of the pointer edge and scale outline in the original meter dial image. The image clarity score is obtained by weighted combination of image gradient intensity and image frequency response according to a fixed weight ratio. Image gradient intensity is used to measure the sharpness of edges in the image, and image frequency response is used to measure the completeness of high-frequency details in the image.
[0022] Compare the image clarity score to a preset clarity threshold: If the image clarity score is greater than or equal to the preset clarity threshold, the original meter dial image is determined to be a valid image; If the image clarity score is less than a preset clarity threshold, the original meter dial image is determined to be an invalid image; The preset clarity threshold is used to ensure that the meter pointer, scale lines and digital window in the image have sufficient clarity in terms of spatial structure; The original electric meter dial images judged as valid images constitute an image retention set.
[0023] The original meter dial image is input into the super-resolution-illumination joint enhancement network to obtain the enhanced meter dial image; In this embodiment, a super-resolution-illuminance joint enhancement network is input to obtain an enhanced meter dial image, including: Each frame of the original meter dial image in the image retention set is input into the super-resolution-illumination joint enhancement network to obtain a super-resolution image and an illumination adaptive image; In this implementation, the super-resolution-illumination joint enhancement network consists of a backbone encoder module, a dual-path feature decoding module, and an illumination adjustment module; The backbone encoder module is used to extract the multi-scale structural information and high-frequency edge features of the original meter dial image and output a coded feature map, which is used to characterize the spatial structural information and detail features contained in the original meter dial image.
[0024] The dual-path feature decoding module includes a super-resolution image reconstruction submodule and an illumination feature generation submodule.
[0025] The super-resolution image reconstruction submodule generates a super-resolution image based on the encoded feature map through layer-by-layer upsampling and residual reconstruction operations. The super-resolution image is used to represent the meter dial image with improved spatial resolution. The spatial size of the super-resolution image is equal to the spatial size of the original meter dial image multiplied by the magnification factor. The magnification factor is used to control the resolution improvement multiple.
[0026] The illumination feature generation submodule generates an illumination guidance map based on the encoded feature map. The illumination guidance map is used to characterize the relative brightness response of each pixel area. The spatial size of the illumination guidance map is consistent with the spatial size of the super-resolution image.
[0027] The illumination adjustment module is based on the original meter dial image and the illumination guidance map. Through pixel weighted mapping operation, the pixels in the low-brightness area are enhanced in detail and the pixels in the high-brightness area are compressed and adjusted to obtain an illumination adaptive image. The illumination adaptive image is used to represent the original meter dial image after dynamic brightness adjustment.
[0028] The super-resolution image and the illumination adaptive image are linearly weighted according to the fusion weight coefficient to obtain an enhanced meter dial image; The enhanced meter dial image is used to represent the final output image that combines high-resolution details with illumination adaptation characteristics. The fusion weight coefficient is used to control the relative contribution of the super-resolution image and the illumination adaptation image in the enhanced meter dial image. In the process of generating the enhanced meter dial image, the spatial resolution unit of the enhanced meter dial image is pixels per inch. The spatial resolution unit is used to measure the pixel density of the image, so that the spatial size of the enhanced meter dial image is consistent with the input size of the object detection network.
[0029] The enhanced meter dial image is input into the improved YOLOv8 target detection network to obtain the meter structure detection result; In this embodiment, the structure of the YOLOv8 target detection network is improved, including: The enhanced meter dial image is input into the backbone feature extraction module of the improved YOLOv8 object detection network to obtain a set of multi-scale meter feature maps; The multi-scale electricity meter feature map set is used to characterize the spatial structural characteristics of the dial outer circle, pointer center, pointer end and digital window in the enhanced electricity meter dial image. The multi-scale electricity meter feature map set consists of multiple groups of feature maps with different spatial resolutions. The spatial resolution unit of each group of feature maps is consistent with the spatial resolution unit of the enhanced electricity meter dial image, which is pixels per inch.
[0030] The multi-scale electricity meter feature map set is input into the polar coordinate attention mechanism module to obtain the polar coordinate enhanced feature map set. The polar coordinate attention mechanism module is used to explicitly model the polar symmetric structural characteristics of the electricity meter dial image.
[0031] The polar coordinate attention mechanism module includes a polar coordinate position encoding unit, a polar domain convolution unit and an attention weight generation unit.
[0032] The polar coordinate position encoding unit maps each pixel position in the multi-scale electricity meter feature map set to a radial distance and polar angle direction with the center of the dial as the origin.
[0033] The polar convolution unit aggregates feature points with the same radial distance and adjacent polar angle directions on the feature map based on the polar coordinate position of each feature point to obtain the aggregated polar feature response.
[0034] Specifically, with the center of the dial as the origin, the polar domain convolution unit collects a set of feature points with the same radial distance and adjacent polar angular directions for each feature point in the polar coordinate domain according to the set radial distance step and polar angular direction step. For the collected feature point set, the polar domain convolution unit fuses the feature responses of the feature points through weighted summation or trainable convolution kernel operation to obtain the aggregated polar domain feature response. The polar domain feature response reflects the spatial structure information of the pointer and scale on the meter dial image along the radial and angular distribution.
[0035] The attention weight generation unit is used to dynamically weight the polar feature response output by the polar convolution unit according to the polar coordinate position of each feature point, and output a set of polar coordinate enhanced feature maps.
[0036] Specifically, for each feature point output by the polar convolution unit, the attention weight generation unit takes the radial distance and polar angular direction as input to generate the corresponding attention weight. The attention weight reflects the significant contribution of the meter dial image to the target detection task at different radial and angular positions. The attention weight is multiplied by the polar feature response of the corresponding feature point to form a weighted polar coordinate enhanced feature map set.
[0037] The polar coordinate enhanced feature map set is input into the angle-sensitive rotation anchor frame detection head. The angle-sensitive rotation anchor frame detection head outputs the meter structure detection result based on the prior of the dial geometry. The meter structure detection result includes the outer circle position information of the dial, the coordinate position information of the pointer center, the coordinate position information of the pointer end and the digital window position information.
[0038] In the angle-sensitive rotation anchor frame detection head, the angle and position initialization distribution of the rotation anchor frame adopts the polar anchor frame set constructed based on the dial geometry prior. The polar anchor frame set corresponds to the radius of the dial scale in the radial direction and is evenly distributed along the circumference of 360 degrees in the polar angle direction. The polar anchor frame set is used to improve the matching accuracy of rotating targets under non-orthographic viewing conditions.
[0039] The outer circle position information of the dial is jointly represented by the center coordinates, width, height and rotation angle of the rotating rectangle; the pointer structure is jointly represented by the pointer center point coordinates, pointer length, pointer width and pointer angle; the digital window position information is jointly represented by the center coordinates, width and height of the external rectangular frame; all parameter units are a combination of pixels and degrees.
[0040] According to the meter structure detection results, the coordinates of the pointer center and the pointer end are extracted, the pointer direction vector is constructed, and the angle value of each pointer is output through the angle regression model; In the structured detection link of the meter dial image, the present invention deeply improves the YOLOv8 target detection network by introducing the polar coordinate attention mechanism and the angle-sensitive rotation anchor frame detection head, thereby achieving high-precision spatial positioning of the outer circle of the meter dial, the pointer structure and the digital window. The polar coordinate attention mechanism can incorporate the prior information of the central symmetric structure of the dial into the feature modeling process, significantly improving the detection capability of polar targets. The rotation anchor frame detection head optimizes the anchor frame distribution by the polar anchor frame set, thereby improving the detection robustness of the YOLOv8 target detection network under dial tilt, rotation and complex lighting conditions. The improved YOLOv8 target detection network has better recall rates of the dial, pointer and digital window than the traditional YOLOv5 and YOLOv8 backbone networks in low-resolution and high-noise scenarios.
[0041] In this embodiment, the pointer direction vector is constructed and the angle values of each pointer are output, including: Extract the pointer center point coordinates and pointer end point coordinates of each group of pointer structures in the meter structure detection results, and construct the pointer direction vector; The coordinates of the pointer center point and the pointer end point are both in pixels, which are used to represent the spatial positions of the pointer center point and the pointer end point in the enhanced meter dial image. The pointer direction vector is used to represent the directed spatial change from the pointer center point to the pointer end point. The horizontal component of the pointer direction vector is the difference between the pixel value of the pointer end point coordinate in the horizontal direction and the pixel value of the pointer center point coordinate in the horizontal direction. The vertical component of the pointer direction vector is the difference between the pixel value of the pointer end point coordinate in the vertical direction and the pixel value of the pointer center point coordinate in the vertical direction.
[0042] The coordinates of the dial center point are obtained based on the outer circle position information of the dial. The angle between the line connecting the pointer end point and the dial center point and the horizontal reference axis is calculated with the dial center point as the reference origin as the initial pointer angle value.
[0043] The coordinates of the dial center point represent the spatial position of the dial center in the enhanced meter dial image in pixels. The initial pointer angle value is used to represent the polar angle position of the pointer direction vector in the polar coordinate system of the dial. The initial pointer angle value ranges from negative π to positive π.
[0044] The initial pointer angle value, pointer direction vector, pointer length, pointer tilt feature and dial posture angle are input into the angle regression model as feature vectors.
[0045] The pointer length is the modulus of the pointer direction vector. The pointer tilt characteristic is the difference between the square differences of the coordinates of the pointer end point and the coordinates of the dial center point in the horizontal and vertical directions. The dial attitude angle is the rotation angle of the dial outer circle.
[0046] The angle regression model adopts a residual regression network structure, which includes two layers of linear fully connected structures and one layer of nonlinear activation function. The angle regression model performs a linear transformation on the feature vector and adds a first layer of bias. After the nonlinear activation function, it performs a second linear transformation and adds a second layer of bias to obtain the residual correction value. The final regression angle value is obtained by adding the residual correction value to the initial pointer angle value.
[0047] The final regression angle value is mapped to the range interval of the target meter dial type, and combined with the pointer rotation direction and the dial position number conversion table, the final regression angle value is used as the input basis, and the pointer angle is converted to the dial position value according to the meter dial type reading conversion rule to obtain each pointer angle value.
[0048] Calculate the reading of each disk position based on the pointer angle value and the dial outer circle specification parameters, and crop and enhance the digital window area in the meter dial image according to the digital window position information to obtain a digital window image; Input the digital window image into the optical character recognition model to obtain the digital window recognition result, and compare the digital window recognition result with the readings of each disk position for consistency; In this embodiment, the calculation of the digital window image includes: Calculate the reading value of the dial position where the pointer is located based on the final regression angle value of each pointer structure and the corresponding dial outer circle specification parameters. The dial outer circle specification parameters include the total number of readings per circle and the rotation direction indicator; The total number of readings per revolution indicates the cumulative readings corresponding to one full revolution of the dial pointer. The rotation direction indicator indicates the direction of rotation of the pointer, with a positive value indicating clockwise rotation and a negative value indicating counterclockwise rotation. The reading value of the dial position where the pointer is located is obtained by multiplying the final regression angle value with the rotation direction indicator, the total number of readings per revolution, and the percentage after angle normalization. Angle normalization refers to scaling the final regression angle value to the range of zero to 360 degrees so that the angle cycles within this range. The decimal point of each reading is truncated to obtain a standardized whole-digit reading. The standardization method is consistent with the reading base structure of the target meter model. According to the digital window position information in the meter structure detection result, the digital window image is obtained by cropping the area in the enhanced meter dial image according to the horizontal and vertical values of the center coordinates of the digital window circumscribed rectangular frame and the width and height as the boundary; The digital window position information includes the horizontal value and vertical value of the center coordinates, width and height of the digital window's circumscribed rectangular frame; The standardized whole-bit reading result of each disk position is bound and stored with the corresponding digital window image.
[0049] In this embodiment, the digital window recognition result is compared with the reading of each disk position for consistency, including: Input each digital window image into the optical character recognition model to obtain a digital window recognition result; The digital window recognition result is represented as a character sequence, which is used to represent the power value information recognized in the digital window image. Each character in the character sequence is used to represent a numeric character at the corresponding position in the digital window. The order of the character sequence is consistent with the arrangement order of the numbers in the digital window. In this embodiment, the character type is limited to the Arabic numeral character set {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; In this embodiment, the digital window image is input into the optical character recognition model, including: The digital window image is input into an optical character recognition model. The optical character recognition model includes a freeze-frame perception embedding module, a structure-guided feature encoding module, and a dislocation-robust character decoding module. The model is used to recognize the character content in the digital window image of the meter and output the digital window recognition result in the form of a set of position-character pairs. The freeze-frame perception embedding module, based on the physical layout prior of the meter's digital window, segments the input digital window image into several fixed-width character regions. The number of character regions is preset based on the target meter model. The character region boundary positions are dynamically generated using a position-guided convolutional network. This allows the optical character recognition model to adapt to border trimming, alignment deviation, and imaging distortion in the digital window image, and outputs a character partition feature map. The character partition feature map is input into the structure-guided feature encoding module. The structure-guided feature encoding module uses the character position embedding mechanism to extract independent features for each character region and explicitly encode the position order relationship between characters. The output of each character region is represented as a set of feature vectors and corresponding spatial position coordinates. The feature vector output by the structure-guided feature encoding module and the corresponding spatial position coordinates are input into the misaligned robust character decoding module. The misaligned robust character decoding module is a self-attention decoding network based on character spatial position alignment. It adopts a character-level saliency guidance mechanism to suppress character edge occlusion, stroke breakage, and upper and lower box overflow interference, and outputs the predicted character and character saliency weight for each character area.
[0050] The optical character recognition model of the present invention is designed with a freeze-frame perception embedding module, a structure-guided feature encoding module and a misalignment-robust character decoding module for the fixed-width structure and easily misaligned imaging characteristics of the digital window of the electricity meter. It can perform freeze-frame segmentation, structured feature extraction and saliency adaptive decoding of the digital window area. The optical character recognition model not only explicitly integrates the spatial pattern prior of the digital window, but also adaptively recognizes and corrects the interference of character occlusion, edge cutting, and upper and lower frame noise through the saliency weight mechanism, and outputs a set of character pairs with spatial position and confidence weights. In the poor imaging environment of narrow edge occlusion of the digital window, blurred reflection and tilt distortion, the recognition accuracy of the optical character recognition model is significantly improved compared with the traditional CRNN-CTC scheme, and the misrecognition rate under the disk position is reduced.
[0051] Each digital window recognition result is compared with the standardized whole-digit reading result of the corresponding disk position. The consistency comparison is used to verify the correspondence between the character sequence and the pointer calculation result in the physical reading value. The consistency judgment rules are defined according to the following conditions: If each digit in the normalized whole-digit reading result is numerically equal to the corresponding digit in the digital window recognition result, it is determined that the consistency condition is met; If any digit is inconsistent between the standardized whole-digit reading result and the digit window recognition result, it is determined that the consistency condition is not met; If the consistency condition is met, a qualified reading result is generated. The qualified reading result is a valid structured meter disk position reading value confirmed under the dual consistency of the pointer regression reading value and the optical character recognition reading value; If the consistency condition is not met, the pointer re-detection process is triggered, and the pointer final regression angle value and the standardized whole-bit reading result are updated based on the re-detection result, and the consistency comparison process is re-executed. If the consistency condition is still not met, the verification failure mark is output and the cause of the exception is recorded.
[0052] Perform time-consistent smoothing on the qualified reading results within consecutive acquisition cycles and output the smoothed reading results.
[0053] The present invention constructs an end-to-end super-resolution-illuminance joint enhancement and structure detection, and reading consistency verification pipeline, which effectively solves the problem of dial reading error accumulation under low-definition imaging and complex lighting conditions. The spatial resolution and local contrast of the input image are improved through super-resolution reconstruction and adaptive illumination enhancement. Combined with the disk pointer angle residual regression model and the digital window character consistency comparison mechanism, the joint verification of multiple links in detection, regression, and recognition can improve the reading accuracy under different meter types and multi-disk heterogeneous structures, and timely output alarms for idling and reversal abnormal states.
[0054] Example 1: In the No. 10 power distribution room in Community A, an intelligent inspection camera numbered SC20250512-01 (model PowerEye-100S, resolution 800×600 pixels) regularly collects data from an old mechanical electricity meter numbered 4403140 on the wall. Joint verification in detection, regression, and recognition can improve reading accuracy under different meter types and multi-disk heterogeneous structures. On that day, the sky was cloudy, the indoor illumination in the power distribution room was 18 lux, and there was obvious light reflection on the mirrored glass dial.
[0055] The system automatically scored 85 out of 100 for the raw meter dial image in its clarity evaluation, with a threshold of 78. This image was deemed valid and saved as PE-20250512-01-001. The valid image then entered the super-resolution and illumination enhancement module, where the resolution was increased to 1600 × 1200 pixels. The enhanced result, PE-20250512-01-001-E, was automatically generated. The system detected a shadowed area in the upper right corner of the meter dial. The increased illumination improved the scale line contrast in this area from the original 0.42 to 0.68, and the pointer edge clarity improved from 0.37 to 0.61.
[0056] The enhanced image is input to the improved YOLOv8 dial recognition model deployed on the edge server (NXP i.MX8MP, 4-core A53, 2GB memory). The improved YOLOv8 dial recognition model automatically detects that the coordinates of the center of the outer circle of the dial are (810, 612), the radius of the outer circle is 394 pixels, the coordinates of the digital window detection box are (joint verification in multiple links of detection, regression, and recognition can improve the reading accuracy by 6,590 under different meter types and multi-disk heterogeneous structures), the width is 142 pixels, and the height is 64 pixels. The coordinates of the center of the pointer are detected as (812, 619) and the end coordinates are (1221, 611).
[0057] The calculated pointer direction vector is (409, -8), with a length of 409.08 pixels. The initial angle between the pointer tip and the dial center is -1.1 degrees. After correction using the angle regression model, the final pointer angle is -0.8 degrees. This six-position meter reads 10 kWh per clockwise rotation. After normalization, the pointer reading for this position is 9.97 kWh. Following local power company standards, the position reading is truncated after the decimal point and recorded as 9 kWh.
[0058] The digital window image was cropped by the system according to the detection frame area. The image number is PE-20250512-01-001-DIGIT and input into the system's dedicated optical character recognition model. The system automatically determines that the digital window contains 6 Arabic numerals. After the model freezes and segments, it is recognized as 9, 0, 5, 3, 7, and 8 respectively. The character saliency scores are 0.98, 0.96, 0.95, 0.92, 0.88, and 0.99 respectively. The digital window recognition result is 905378.
[0059] The system automatically compares the pointer disk position standardized reading result (9) with the digital window first position identification result (9) for consistency. The comparison results are consistent. Since the other disk positions have not changed in this round of detection (the values are consistent with the previous cycle), the final verification qualified reading result 905378 is generated and uploaded to the distribution automation cloud platform.
[0060] Compared to the traditional YOLOv5+CRNN solution deployed at the same time, image PE-20250512-01-001-V, captured by the same camera at the same time, was processed using the traditional process. The pointer center detection error was 6 pixels, the end detection error was 21 pixels, and the digit window was incorrectly segmented, misidentified as 905318, with a significance score of 0.77. Backend comparison showed that the traditional solution had a pointer recognition error of 0.23 degrees, corresponding to a reading deviation of 0.2 kWh, and the digit window recognition accuracy dropped to 83%. This detection result was marked by the system for manual review, affecting the efficiency of data storage.
[0061] Another smart inspection camera (number SC20250512-04) encountered extreme nighttime lighting conditions of as low as 11 lux when collecting data from a semi-mechanical electricity meter with number 4403140789002. The original image scored only 79 points. After illumination compression and detail enhancement using the enhancement module, the pointer edge clarity improved from 0.21 to 0.60. The improved YOLOv8 dial recognition model detected the center of the dial outer circle at (804,599) and the pointer tip at (1178,607). The vector length was 374 pixels, and the angle was -8.3 degrees. After residual regression correction, the angle was reduced to -7.9 degrees. The corresponding reading for this dial position was 8.78 kWh, and the digital window was fixed at 887132. Both significance scores were greater than 0.95. The entire pointer position reading was 8, which was consistent with the first digit 8 in the digital window, passing the verification. In this scenario, the traditional method misdetects the pointer end as offset by 30 pixels due to light spot obstruction, and the digital window is recognized as 897132. The comparison is inconsistent and the system performs a second detection.
[0062] A total of 116,000 images were collected from 3,200 electricity meters in Community A. The proposed method achieved a 99.14% effective reading rate, a 0.07% false positive rate, and a 1.3% manual review rate. Traditional methods, on the other hand, achieved only a 93.25% effective reading rate, a 0.96% false positive rate, and a 6.7% manual review rate. See the table below for a detailed comparison (data from a random sample of 2,000 electricity meters over five days):
[0063] By deploying the method of the present invention, the overall manual intervention rate of meter reading is reduced by 80%, and the accuracy rate under special working conditions such as night / reflection / low definition is improved by 7-15 percentage points compared with traditional algorithms.
[0064] The above description is only a preferred specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any technician familiar with the technical field, within the technical scope disclosed by the present invention, who makes equivalent replacements or changes based on the technical solution and inventive concept of the present invention, should be covered by the scope of protection of the present invention.
Claims
1. A method for recognizing electric meter dials based on computer vision, characterized in that: include: Perform periodic image acquisition on the target meter to generate the original meter dial image; The original meter dial image is input into the super-resolution-illumination joint enhancement network to obtain the enhanced meter dial image; The enhanced meter dial image is input into the improved YOLOv8 target detection network to obtain the meter structure detection result; According to the meter structure detection results, the coordinates of the pointer center and the pointer end are extracted, the pointer direction vector is constructed, and the angle value of each pointer is output through the angle regression model; Calculate the reading of each disk position based on the pointer angle value and the dial outer circle specification parameters, and crop and enhance the digital window area in the meter dial image according to the digital window position information to obtain a digital window image; Input the digital window image into the optical character recognition model to obtain the digital window recognition result, and compare the digital window recognition result with the readings of each disk position for consistency; Perform time-consistent smoothing on the qualified reading results within consecutive acquisition cycles and output the smoothed reading results.
2. The method for recognizing an electric meter dial based on computer vision according to claim 1, characterized in that: The periodic image acquisition of the target electric meter to generate the original electric meter dial image includes: Periodically capture images of the target electric meter at preset time intervals to obtain a sequence of original electric meter dial images; Performing clarity evaluation on each frame of the original meter dial image in the original meter dial image sequence to obtain an image clarity score; Compare the image clarity score to a preset clarity threshold: If the image clarity score is greater than or equal to the preset clarity threshold, the original meter dial image is determined to be a valid image; If the image clarity score is less than a preset clarity threshold, the original meter dial image is determined to be an invalid image; The original electric meter dial images judged as valid images constitute an image retention set.
3. The method for recognizing an electric meter dial based on computer vision according to claim 1, characterized in that: The input super-resolution-illuminance joint enhancement network is used to obtain an enhanced meter dial image, including: Each frame of the original meter dial image in the image retention set is input into the super-resolution-illumination joint enhancement network to obtain a super-resolution image and an illumination adaptive image; The super-resolution image and the illumination adaptive image are linearly weighted according to the fusion weight coefficient to obtain the enhanced meter dial image.
4. The method for recognizing an electric meter dial based on computer vision according to claim 3, characterized in that: The super-resolution-illumination joint enhancement network consists of a backbone encoder module, a dual-path feature decoding module and an illumination adjustment module; The backbone encoder module is used to extract the multi-scale structural information and high-frequency edge features of the original meter dial image and output the encoded feature map; The dual-path feature decoding module includes a super-resolution image reconstruction submodule and an illumination feature generation submodule; The super-resolution image reconstruction submodule generates a super-resolution image through layer-by-layer upsampling and residual reconstruction operations based on the encoded feature map; The illumination feature generation submodule generates an illumination guidance map based on the encoded feature map. The illumination guidance map is used to characterize the relative brightness response of each pixel area. The illumination adjustment module is based on the original meter dial image and the illumination guidance map. Through pixel weighted mapping operation, the pixels in the low-brightness area are enhanced in detail and the pixels in the high-brightness area are compressed and adjusted to obtain an illumination adaptive image. The illumination adaptive image is used to represent the original meter dial image after dynamic brightness adjustment.
5. The method for recognizing an electric meter dial based on computer vision according to claim 1, characterized in that: The structure of the improved YOLOv8 target detection network includes: The enhanced meter dial image is input into the backbone feature extraction module of the improved YOLOv8 object detection network to obtain a set of multi-scale meter feature maps; Input the multi-scale electricity meter feature map set into the polar coordinate attention mechanism module to obtain the polar coordinate enhanced feature map set. The polar coordinate attention mechanism module is used to explicitly model the polar symmetric structural characteristics of the electricity meter dial image; The polar coordinate attention mechanism module includes a polar coordinate position encoding unit, a polar domain convolution unit and an attention weight generation unit: The polar coordinate position encoding unit maps each pixel position in the multi-scale meter feature map set to a radial distance and polar angle direction with the center of the dial as the origin; The polar convolution unit aggregates the feature points with the same radial distance and adjacent polar angle directions on the feature map based on the polar coordinate position of each feature point to obtain the aggregated polar feature response; The attention weight generation unit is used to dynamically weight the polar feature response output by the polar convolution unit according to the polar coordinate position of each feature point, and output a set of polar coordinate enhanced feature maps; The polar coordinate enhanced feature map set is input into the angle-sensitive rotation anchor box detection head, which outputs the meter structure detection result based on the prior of the dial geometry.
6. The method for recognizing an electric meter dial based on computer vision according to claim 1, characterized in that: The step of constructing the pointer direction vector and outputting the angle values of each pointer includes: Extract the pointer center point coordinates and pointer end point coordinates of each group of pointer structures in the meter structure detection results, and construct the pointer direction vector; The coordinates of the dial center point are obtained based on the dial outer circle position information, and the angle between the line connecting the pointer end point and the dial center point and the horizontal reference axis is calculated with the dial center point as the reference origin as the initial pointer angle value; The initial pointer angle value, pointer direction vector, pointer length, pointer tilt feature and dial attitude angle are input into the angle regression model as feature vectors; The angle regression model adopts a residual regression network structure, which includes two layers of linear fully connected structures and one layer of nonlinear activation function. The angle regression model performs a linear transformation on the feature vector and adds a first layer of bias. After the nonlinear activation function, it performs a second linear transformation and adds a second layer of bias to obtain the residual correction value. The final regression angle value is obtained by adding the residual correction value to the initial pointer angle value.
7. The method for recognizing an electric meter dial based on computer vision according to claim 1, characterized in that: The calculation of the digital window image includes: Calculate the reading value of the dial position where the pointer is located based on the final regression angle value of each pointer structure and the corresponding dial outer circle specification parameters. The dial outer circle specification parameters include the total number of readings per circle and the rotation direction indicator; The decimal point of each disk position reading is truncated to obtain the standardized whole-digit reading result; According to the digital window position information in the meter structure detection result, the digital window image is obtained by cropping the area in the enhanced meter dial image according to the horizontal and vertical values of the center coordinates of the digital window circumscribed rectangular frame and the width and height as the boundary; The standardized whole-bit reading result of each disk position is bound and stored with the corresponding digital window image.
8. The method for recognizing an electric meter dial based on computer vision according to claim 1, characterized in that: The digital window recognition result is compared with the readings of each disk position for consistency, including: Input each digital window image into the optical character recognition model to obtain a digital window recognition result; The recognition result of each digital window is compared with the standardized whole-digit reading result of the corresponding disk position. The consistency comparison is used to verify the correspondence between the character sequence and the meter pointer calculation result in the physical reading value. The consistency judgment rules are defined according to the following conditions: If each digit in the normalized whole-digit reading result is numerically equal to the corresponding digit in the digital window recognition result, it is determined that the consistency condition is met; If any digit is inconsistent between the standardized whole-digit reading result and the digit window recognition result, it is determined that the consistency condition is not met; If the consistency condition is met, a qualified reading result is generated. The qualified reading result is a valid structured meter disk position reading value confirmed under the dual consistency of the pointer regression reading value and the optical character recognition reading value; If the consistency condition is not met, the pointer re-detection process is triggered and the consistency comparison process is re-executed. If the consistency condition is still not met, the verification failure mark is output and the cause of the exception is recorded.
9. The method for recognizing an electric meter dial based on computer vision according to claim 8, characterized in that: The optical character recognition model includes a freeze-frame perception embedding module, a structure-guided feature encoding module and a dislocation-robust character decoding module; The freeze-frame perception embedding module segments the input digital window image into several fixed-width character regions based on the physical layout prior of the meter's digital window. The character region boundary positions are dynamically generated using a position-guided convolutional network. This allows the optical character recognition model to adapt to border trimming, alignment deviation, and imaging distortion in the digital window image, and outputs a character partition feature map. The structure-guided feature encoding module uses a character position embedding mechanism to extract independent features from each character region in the character partition feature map and explicitly encodes the position order relationship between characters. The output of each character region is represented as a set of feature vectors and corresponding spatial position coordinates. The feature vector and the corresponding spatial position coordinates are input into the misalignment robust character decoding module. The misalignment robust character decoding module is a self-attention decoding network based on character spatial position alignment. It adopts a character-level saliency guidance mechanism to suppress character edge occlusion, stroke breakage, and upper and lower box overflow interference, and outputs the predicted character and character saliency weight for each character area.
Citation Information
Cited By
Knob switch state reading method and device based on graphic mark identification
CN122244872A
Knob switch state reading method and device based on graphical marker recognition
CN122244872B