An electric meter meter code recognition method and device based on a first view picture, an electronic device, and a storage medium

By capturing images of the meter reading area using wearable cameras, image quality assessment and distortion correction are performed. Combined with two-stage cascaded recognition and business work order correction, the robustness problem of meter reading recognition in near-wide-angle images is solved, achieving high-precision meter reading recognition.

CN123182201APending Publication Date: 2026-11-27ELECTRIC POWER RES INST CHINA SOUTHERN POWER GRID CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611413398.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-11
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing meter reading recognition methods lack a robust end-to-end processing mechanism, encompassing quality assurance, target locking, distortion correction, and refined recognition, when faced with first-person wide-angle images, leading to reading errors and insufficient recognition accuracy.

Method used

Wearable camera devices are used to capture multiple frames of raw images. The best frame is selected through image quality assessment, the target area is identified and distortion is corrected. Combined with two-stage cascaded recognition and business work order correction, the correction table code recognition result is output.

Benefits of technology

It significantly improves the accuracy and efficiency of meter code recognition, reduces the risk of misidentification caused by distortion, and ensures the reliability and accuracy of the recognition results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123182201A_ABST
    Figure CN123182201A_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on first visual angle picture electric meter table code recognition method, device, electronic equipment and storage medium, for solving the technical problem that existing electric meter table code recognition method is short of the whole-link robust processing mechanism from quality guarantee, target locking, distortion correction to fine identification when facing first visual angle near wide-angle picture.The present application comprises: by wearing camera equipment to shoot the preset electric meter area with first visual angle, collect multiple frames of original images;Image quality evaluation is carried out on the original image, and the optimal frame image is screened;Target area is identified in the optimal frame image;Distortion correction is carried out on the target area, and the corrected image is obtained;Two-stage cascaded identification is carried out on the corrected image, and the character recognition result is obtained;The character recognition result is corrected by the current associated work order of the preset electric meter area, and the corrected table code recognition result is obtained;Output the corrected table code recognition result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of electricity meter identification technology, and in particular to a method, device, electronic device, and storage medium for identifying electricity meter codes based on a first-person view. Background Technology

[0002] In the meter reading, verification, and on-site maintenance of power systems, accurate reading of meter readings is crucial for electricity billing, line loss analysis, and electricity consumption monitoring. Traditional meter installation, removal, and reading operations mainly rely on manual on-site reading and entry of meter reading data. This method consumes a lot of manpower and time and is prone to reading errors or entry deviations due to human negligence, making it difficult to meet the requirements of modern power marketing operations for data timeliness and accuracy.

[0003] In recent years, methods for automatically reading electricity meter codes based on image recognition have gradually developed. However, most existing methods are designed for front-view shooting scenarios using smartphones. Assuming the input image has minimal geometric distortion, a single target, and controllable shooting conditions, in this scenario, the lens is close to the meter and the field of view is large. The image inevitably exhibits significant barrel distortion and perspective tilt, causing the meter code characters to bend, stretch, or deform. Simultaneously, with multiple meters densely packed, strong reflections from the glass cover, and some meters in standby mode, general target detection methods struggle to accurately locate the target to be read, easily leading to misreading of adjacent meter data or even misinterpreting the reading of neighboring meters. Furthermore, the text areas on the meter display, such as meter codes, asset numbers, and electricity labels, are small and densely packed. General OCR models easily miss these tiny text areas during the detection phase, leading to character confusion during the recognition phase. They also lack the ability to link and correct errors with business work order information, making it difficult to meet the accuracy requirements for meter reading verification.

[0004] In summary, existing meter reading recognition methods lack a robust end-to-end processing mechanism, encompassing quality assurance, target locking, distortion correction, and refined recognition, when faced with first-person wide-angle images. Summary of the Invention

[0005] This invention provides a method, device, electronic device, and storage medium for recognizing electricity meter codes based on a first-person perspective image. It addresses the technical problem that existing electricity meter code recognition methods lack a robust end-to-end processing mechanism, encompassing quality assurance, target locking, distortion correction, and refined recognition, when faced with near-wide-angle images from a first-person perspective.

[0006] This invention provides a method for recognizing electricity meter codes based on a first-person view, comprising:

[0007] Multiple frames of raw images were captured by shooting a pre-set electricity meter area from a first-person perspective using a wearable camera device.

[0008] The original images are subjected to image quality assessment, and the optimal frame images are selected;

[0009] Identify the target region in the optimal frame image;

[0010] Distortion correction is performed on the target region to obtain a corrected image;

[0011] The corrected image is subjected to two-stage cascaded recognition to obtain character recognition results;

[0012] The character recognition result is corrected by the current associated work order of the preset meter area to obtain the corrected meter code recognition result.

[0013] Output the identification result of the correction table code.

[0014] Optionally, the step of performing image quality evaluation on the original image and selecting the optimal frame image includes:

[0015] Convert the original image to a grayscale image;

[0016] Perform a second-order Laplacian differential convolution on the grayscale image to obtain the Laplacian response image;

[0017] Calculate the global variance of the Laplace response plot to obtain the sharpness score;

[0018] Remove the original image whose sharpness score is less than a preset blur threshold to obtain a sharp image;

[0019] Calculate the mean and standard deviation of the brightness of the clear image;

[0020] Candidate frame images are obtained by filtering overexposed and underexposed images from the clear images based on the mean brightness and the standard deviation.

[0021] The candidate frame image with the highest sharpness score is selected as the optimal frame image.

[0022] Optionally, the step of identifying the target region in the optimal frame image includes:

[0023] The optimal frame image is input into a pre-trained YOLO object detection model, which outputs bounding box coordinates, class labels, and confidence scores for various region types.

[0024] The target category label is determined from the category labels, and the bounding box coordinates of the target category label with the highest confidence score are extracted as the target region of the optimal frame image.

[0025] Optionally, the step of performing distortion correction on the target region to obtain a corrected image includes:

[0026] Detect the four corner feature points of the meter casing or the four sides of the meter display area in the target area;

[0027] Calculate the perspective transformation matrix that maps the four corner feature points or the four side contours to the rectangular front-view target;

[0028] Apply the perspective transformation matrix to the target region to obtain a frontal view.

[0029] An adaptive rotation correction is performed on the frontal view to obtain a corrected image.

[0030] Optionally, the step of adaptively rotating and correcting the frontal view to obtain the corrected image includes:

[0031] The main direction angle of the table code text row in the frontal view is determined by using the minimum bounding rectangle or Hough line detection.

[0032] Calculate the deflection of the principal direction angle relative to the horizontal direction;

[0033] Using the center of the frontal view as the rotation center, perform an affine rotation according to the opposite direction of the deflection amount to adjust the main direction angle of the code text line to horizontal, thus obtaining the corrected image.

[0034] Optionally, the step of performing two-stage cascaded recognition on the corrected image to obtain character recognition results includes:

[0035] The corrected image is input into a pre-trained YOLO segmentation model, which outputs pixel-level semantic segmentation results.

[0036] The corrected image is segmented into a liquid crystal screen area and a barcode area based on the pixel-level semantic segmentation results.

[0037] Extract the LCD screen boundary rectangle of the LCD screen region based on the segmentation mask to obtain the LCD screen region sub-image;

[0038] The barcode boundary rectangle of the barcode region is extracted based on the segmentation mask to obtain a sub-image of the barcode region;

[0039] Text detection is performed on the sub-image of the LCD screen area and the sub-image of the barcode area, and the coordinates of the text region bounding box and the text category label are output.

[0040] The text region bounding box is cropped from the corrected image based on the coordinates of the text region bounding box;

[0041] Character recognition is performed on the bounding box of the text region to obtain the character recognition result.

[0042] Optionally, the step of correcting the character recognition result using the current associated work order of the preset meter area to obtain the corrected meter code recognition result includes:

[0043] The character recognition results are then processed to standardize the format, resulting in standardized characters.

[0044] Obtain the business information from the currently associated work orders in the preset electricity meter area;

[0045] The standardized characters are compared with the business information, and the standardized characters are corrected according to the comparison results to obtain the correction table code recognition result.

[0046] The present invention also provides a meter code recognition device based on a first-person view, comprising:

[0047] The raw image acquisition module is used to capture multiple frames of raw images of a preset electricity meter area from a first-person perspective using a wearable camera device.

[0048] The optimal frame image filtering module is used to evaluate the image quality of the original image and filter the optimal frame image.

[0049] Target region identification module, used to identify target regions in the optimal frame image;

[0050] The distortion correction module is used to correct the distortion of the target region to obtain a corrected image;

[0051] A two-stage cascaded recognition module is used to perform two-stage cascaded recognition on the corrected image to obtain character recognition results;

[0052] The correction module is used to correct the character recognition result based on the current associated work order of the preset meter area, and obtain the corrected meter code recognition result.

[0053] The output module is used to output the identification result of the correction table code.

[0054] The present invention also provides an electronic device, the device comprising a processor and a memory:

[0055] The memory is used to store program code and transmit the program code to the processor;

[0056] The processor is used to execute the meter code recognition method as described above according to the instructions in the program code.

[0057] The present invention also provides a computer-readable storage medium for storing program code for executing the meter code recognition method as described in any of the preceding claims.

[0058] As can be seen from the above technical solutions, the present invention has the following advantages: The present invention provides a method for recognizing electricity meter codes based on a first-person perspective image, and specifically discloses: capturing multiple frames of original images by photographing a preset electricity meter area from a first-person perspective using a wearable camera device; evaluating the image quality of the original images and selecting the optimal frame image; identifying the target area in the optimal frame image; correcting the distortion of the target area to obtain a corrected image; performing two-stage cascaded recognition on the corrected image to obtain a character recognition result; correcting the character recognition result using the current associated work order of the preset electricity meter area to obtain a corrected meter code recognition result; and outputting the corrected meter code recognition result.

[0059] This invention introduces a dynamic image quality assessment and optimal frame selection mechanism, which can automatically select the best frame from multiple consecutive original images, effectively avoiding motion artifacts and low-quality input, ensuring the basic data quality for subsequent recognition from the source, and significantly reducing the invalid recognition rate. This invention also sets up a combined processing step of target region extraction and distortion correction. By first locking the local area where the code is located, and then performing targeted geometric correction on that area, it avoids the computational redundancy of full-image correction, and accurately restores the standard proportion and arrangement direction of the characters, significantly reducing the risk of misidentification caused by distortion. This invention also improves the accuracy of character recognition through two-stage cascaded recognition. Furthermore, this invention introduces business work orders for correction, further improving the accuracy of character recognition. Attached Figure Description

[0060] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0061] Figure 1 A flowchart illustrating the steps of a method for recognizing electricity meter codes based on a first-view image, provided in an embodiment of the present invention;

[0062] Figure 2 This is a structural block diagram of an electricity meter code recognition device based on a first-view image, provided as an embodiment of the present invention. Detailed Implementation

[0063] This invention provides a method, apparatus, electronic device, and storage medium for recognizing electricity meter codes based on a first-person perspective image. It addresses the technical problem that existing electricity meter code recognition methods lack a robust end-to-end processing mechanism, encompassing quality assurance, target locking, distortion correction, and refined recognition, when facing near-wide-angle images from a first-person perspective.

[0064] To make the objectives, features, and advantages of this invention more apparent and understandable, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described below are only some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0065] Please see Figure 1 , Figure 1 The flowchart illustrates the steps of a method for recognizing electricity meter codes based on a first-view image, as provided in an embodiment of the present invention.

[0066] This invention provides a method for recognizing electricity meter codes based on a first-person view, which may specifically include the following steps:

[0067] Step 101: Use a wearable camera device to capture multiple frames of original images of the preset electricity meter area from a first-person perspective.

[0068] Wearable camera devices can include AI smart glasses, helmet cameras, and the like.

[0069] In real-world scenarios, wearable camera devices can be used to capture multiple frames of images of the meter area from a first-person perspective, obtaining multiple original images.

[0070] Before acquiring raw images using a wearable camera device, the device must first be initialized. When starting the device, ensure the attitude sensor and camera are functioning correctly, then set the burst shooting parameters, including frame rate, interval, and resolution. In one example, the burst frame rate can be set to 3–10 frames, and the shooting interval to 100–500 ms, ensuring enough candidate frames are captured during slight movements of the wearer for subsequent selection.

[0071] Next, the wearer faces the area to be read and triggers a burst shooting command. The wearable camera device continuously captures multiple frames of raw images from a first-person perspective, forming an image sequence and caching it to local storage.

[0072] Step 102: Evaluate the image quality of the original image and select the best frame image;

[0073] After acquiring the original image of the area to be read, the image quality of the original image can be evaluated to select the best frame as the input for subsequent processing, and to filter out blurry, overexposed, and underexposed frames, so as to ensure the image quality of the recognition input from the source.

[0074] In one example, step 102 may include the following sub-steps:

[0075] S21, convert the original image to a grayscale image;

[0076] S22, perform a second-order Laplace convolution on the grayscale image to obtain the Laplace response map;

[0077] S23, calculate the global variance of the Laplace response plot to obtain the sharpness score;

[0078] S24, Remove the original image whose sharpness score is less than the preset blur threshold to obtain a sharp image;

[0079] In this embodiment of the invention, the original images of each frame in the cache are first converted into grayscale images. Then, the degree of fuzziness is quantified using the Laplace variance method, specifically: first, the degree of fuzziness is... Perform a Laplace second-order differential convolution with the following kernel:

[0080] ;

[0081] Obtain the Laplace response diagram :

[0082] ;

[0083] Recalculate Global variance as a sharpness score :

[0084] ;

[0085] in, M×N represents the total number of pixels in the grayscale image. A larger value indicates richer and clearer high-frequency details in the image. The smaller the value, the more blurred the image. Let the blur threshold be T. b ,when If the frame is deemed blurry, it will be discarded. The value range is 50 to 500, and the specific value can be set according to actual needs.

[0086] S25, calculate the mean and standard deviation of brightness of a clear image;

[0087] S26, Based on the mean and standard deviation of brightness, overexposed and underexposed images are filtered from the clear images to obtain candidate frame images;

[0088] Next, the average brightness of each clear image frame is calculated. with standard deviation ,when and When, it is determined to be an overexposed frame, when and When an image is identified as underexposed, both overexposed and underexposed images are removed to obtain candidate frame images. The highest average brightness threshold, The minimum average brightness threshold. This is the standard deviation threshold.

[0089] S27, select the candidate frame image with the highest sharpness score as the optimal frame image.

[0090] Finally, the image with the highest sharpness score is selected from the candidate frame images as the optimal frame image and proceeds to the next processing stage.

[0091] Step 103: Identify the target region in the optimal frame image;

[0092] After selecting the optimal frame image, screen-on front-facing locking can be performed to identify the target area in the optimal frame image.

[0093] In one example, step 103 may include the following sub-steps:

[0094] S31, input the best frame image into the pre-trained YOLO object detection model, and output the bounding box coordinates, class labels and confidence scores of various region types;

[0095] S32, determine the target category label in the category labels, and extract the bounding box coordinates of the target category label with the highest confidence score as the target region of the optimal frame image.

[0096] YOLO (You Only Look Once) is a single-stage real-time object detection algorithm. Its core feature is that it can complete object localization and classification simultaneously with only one forward propagation, making it extremely fast.

[0097] In the specific implementation, the optimal frame image can be input into a pre-trained YOLO object detection model. The model outputs detection results, including the bounding box coordinates, class labels, and confidence scores of various objects. The class labels used during YOLO model training at least include "bright-screen meter," "dim-screen meter," "reflective area," and "non-target meter." The training process of the YOLO object detection model can refer to conventional training methods, which will not be elaborated upon in this embodiment of the invention.

[0098] Next, based on the detection results, the bounding box coordinates of the target category label with the highest confidence score, namely "on-screen electricity meter," are selected as the target region of the optimal frame image. This target region is then cropped for subsequent processing.

[0099] It should be noted that if multiple "bright-screen meters" are detected, a unique target is determined by combining the distance from the center of the screen or the work order association information. If the target is closest to the center of the screen or most relevant to the work order association information, the areas corresponding to the detection results of "dim-screen meters", "reflective areas" and "non-target meters" are simultaneously removed to avoid them interfering with subsequent identification.

[0100] Step 104: Perform distortion correction on the target area to obtain the corrected image;

[0101] After the target region is extracted, a two-step distortion correction can be performed on the target region to obtain the corrected image.

[0102] In one example, step 104 may include the following sub-steps:

[0103] S41, detect the four corner feature points of the meter casing or the four sides of the meter display area in the target area;

[0104] S42, calculate the perspective transformation matrix that maps the four corner feature points or four side contours to the rectangular front view target;

[0105] S43, apply a perspective transformation matrix to the target area to obtain a frontal view;

[0106] In practical implementation, the four corner feature points of the meter casing or the four sides of the meter display area in the target area can be detected. Using these four points as source points, the perspective transformation matrix that maps them to the rectangular front view target is calculated. The perspective transformation is applied to the target area to correct the tilted meter display area into a front view plan view and eliminate perspective distortion.

[0107] The perspective transformation matrix is ​​a 3x3 projection transformation matrix used to map an image from one plane to another, thereby achieving viewpoint correction. The mapping process of the perspective transformation matrix can refer to conventional mapping methods, and will not be elaborated here.

[0108] S44, adaptive rotation correction is performed on the frontal view to obtain the corrected image.

[0109] After obtaining the frontal view of the target area, adaptive rotation correction can be performed on the frontal view to obtain the corrected image.

[0110] In one example, step S44 may include the following sub-steps:

[0111] S441, the main direction angle of the table code text line in the frontal view is determined by using the minimum bounding rectangle or Hough line detection;

[0112] S442, calculate the deflection of the principal direction angle relative to the horizontal direction;

[0113] S443, with the center of the frontal view as the rotation center, perform affine rotation according to the opposite direction of the deflection amount, adjust the main direction angle of the code text line to horizontal, and obtain the corrected image.

[0114] In practical implementation, the direction of the text lines can be detected on the front view after perspective transformation. The main direction angle of the code text lines can be determined by the minimum bounding rectangle or Hough line detection method. The deflection of this angle relative to the horizontal direction can be calculated. Affine rotation can be performed with the image center as the rotation center and in the opposite direction of the deflection to adjust the direction of the code text lines to the horizontal, thus completing the adaptive rotation correction.

[0115] Step 105: Perform two-stage cascaded recognition on the corrected image to obtain the character recognition result;

[0116] In this embodiment of the invention, after the angle of the target region is completely corrected, a two-stage cascaded recognition process can be performed on the corrected image to obtain the character recognition result. The first stage is region segmentation, where a custom-trained YOLO algorithm is used to perform semantic segmentation on the corrected image, extracting the LCD screen region and the barcode region to achieve accurate separation of different information carriers. The second stage is information recognition, where a custom PaddleOCR detection model performs text region detection on the images output from the first stage, locating the precise positions of three types of extremely small text regions: meter code, asset number, and battery label. Then, the PaddleOCR recognition model extracts characters from each detected text region and outputs the corresponding character recognition result.

[0117] In one example, step 105 may include the following sub-steps:

[0118] S51 corrects the image input to the pre-trained YOLO segmentation model and outputs pixel-level semantic segmentation results;

[0119] S52, based on the pixel-level semantic segmentation results, the corrected image is segmented into an LCD screen area and a barcode area;

[0120] In this embodiment of the invention, the modified image is first input into a custom-trained YOLO segmentation model. The model outputs pixel-level semantic segmentation results, dividing the image into two categories: LCD screen regions and barcode regions. Images of both categories are then cropped for subsequent recognition. The custom YOLO segmentation model employs the YOLO instance segmentation architecture, and the training dataset consists of manually labeled pixel-level samples of electricity meter images, covering different models and display content of the LCD screens and barcode regions. The specific training process can use conventional YOLO model training methods, which will not be detailed here.

[0121] S53, extract the LCD screen boundary rectangle of the LCD screen area based on the segmentation mask to obtain the LCD screen area sub-image;

[0122] The LCD screen category mask is a single-channel binary image (or probability map) with the same size as the original image. This mask can be used to extract the LCD screen boundary rectangle of the LCD screen region, as shown below:

[0123] Foreground (white / 255): Represents the pixel area belonging to the "LCD screen area";

[0124] Background (black / 0): Represents non-character areas (such as dial background, borders, stains, etc.).

[0125] S54, extract the barcode boundary rectangle of the barcode region based on the segmentation mask to obtain the barcode region sub-image;

[0126] The barcode category mask is a single-channel binary image (or probability map) with the same size as the original image. This mask can be used to extract the barcode boundary rectangle of the barcode region, as shown below:

[0127] Foreground (white / 255): Represents the pixel area belonging to the "barcode area";

[0128] Background (black / 0): Represents non-character areas (such as dial background, borders, stains, etc.).

[0129] S55 performs text detection on the sub-images of the LCD screen area and the barcode area, and outputs the coordinates of the bounding box of the text area and the text category label;

[0130] In this embodiment of the invention, the sub-image of the LCD screen region is input into a customized PaddleOCR detection model. The model outputs the bounding box coordinates and category labels of the text region, locating the precise positions of three types of extremely small text regions: meter code, asset number, and electricity label. The customized PaddleOCR detection model is based on the DBNet detection architecture of PaddleOCR and is specifically trained using the electricity meter display text dataset. The training samples focus on extremely small text instances with an area less than 32×32 pixels, and the detection recall rate of extremely small text regions is enhanced by increasing the input resolution and scaling the prediction scale. For the sub-image of the barcode region, the customized PaddleOCR detection model is also input to locate the asset number text region below the barcode.

[0131] The training process for the customized PaddleOCR detection model can refer to conventional training methods, and will not be elaborated here.

[0132] S56, crop the text region bounding box from the corrected image based on the text region bounding box coordinates;

[0133] S57, perform character recognition on the bounding box of the text region to obtain the character recognition result.

[0134] In this embodiment of the invention, the detected text region bounding boxes can be cropped and input into the PaddleOCR recognition model. The model uses a CRNN+CTC architecture to extract serialized characters from each text region, outputting table code character sequences, asset number character sequences, and electricity tag character sequences. The specific training process of the PaddleOCR recognition model can refer to conventional training methods, and will not be described in detail here.

[0135] Step 106: Correct the character recognition result by using the current associated work order of the preset meter area to obtain the corrected meter code recognition result;

[0136] In this embodiment of the invention, the character recognition result can first undergo business correction preprocessing, including removing redundant spaces, adding decimal points according to the convention, and correcting error-prone symbols; then the recognition result after correction preprocessing is compared and matched with business information such as expected asset number and table code value in the current associated work order, and the recognition result that is inconsistent with the work order information is corrected according to the work order constraints to obtain the corrected table code recognition result.

[0137] In one example, step 106 may include the following sub-steps:

[0138] S61, The character recognition results are processed to standardize the format and obtain standardized characters;

[0139] S62, retrieve the business information from the currently associated work orders in the preset electricity meter area;

[0140] S63 compares the standardized characters with the business information, and corrects the standardized characters based on the comparison results to obtain the correction table code recognition result.

[0141] In the specific implementation, the character recognition results are first standardized, including: removing extra spaces between characters; inserting a decimal point before the decimal place according to the meter code digit convention, such as adding a decimal point to separate the total electricity meter code from the integer and decimal places as specified in the work order when the total electricity meter code is a combination of integer and decimal places; and correcting the symbols of easily confused OCR characters, including but not limited to the conversion correction between the letter "O" and the number "0", the letter "I" and the number "1", and the letter "S" and the number "5". The correction rules are determined based on the contextual semantics of the character's position. For example, if a letter appears in the pure numeric area of ​​the meter code, it is corrected to the corresponding number.

[0142] Next, the identification results after correction preprocessing are compared item by item with the business information in the current associated work order. The business information includes the expected asset number and table code value. For the asset number, the identification result is matched with the expected number of the work order. If they are completely consistent, the identification is confirmed. If there are individual character differences, a second correction is attempted based on the error-prone symbol rules before fuzzy matching. For the table code value, the identification result is compared with the table code value of the previous period of the work order. If it is greater than the table code value of the previous period, the identification is compliant.

[0143] Step 107: Output the correction table code recognition result.

[0144] After obtaining the correction meter code recognition result, the correction meter code recognition result can be written into the EXIF ​​information of the optimal frame image for embedded storage. The image file is renamed according to the asset number obtained by recognition, and the coordinate information of the meter area and the recognition credibility are output to complete the delivery of structured results.

[0145] Specifically as follows:

[0146] EXIF information writing: Key fields such as meter code value, asset number, power tag, recognition timestamp and recognition credibility are written into the EXIF ​​metadata custom tag of the optimal frame image file in a structured format, realizing the integrated binding and storage of recognition data and original image, avoiding data loss caused by image and text separation;

[0147] Image file renaming: The best frame image file is renamed based on the asset number string obtained from the identification. The naming rule is "asset number_identification timestamp.extension", which allows the image file to be directly retrieved and located by asset number, facilitating subsequent file management and quick retrieval.

[0148] Coordinate and credibility output: Output the coordinate information of the bounding box of the meter area obtained by YOLO detection, as well as the credibility scores of various text recognition output by the PaddleOCR recognition model, delivered together in a structured data format to provide a quantitative basis for subsequent manual review and quality inspection.

[0149] This invention introduces a dynamic image quality assessment and optimal frame selection mechanism, which can automatically select the best frame from multiple consecutive original images, effectively avoiding motion artifacts and low-quality input, ensuring the basic data quality for subsequent recognition from the source, and significantly reducing the invalid recognition rate. This invention also sets up a combined processing step of target region extraction and distortion correction. By first locking the local area where the code is located, and then performing targeted geometric correction on that area, it avoids the computational redundancy of full-image correction, and accurately restores the standard proportion and arrangement direction of the characters, significantly reducing the risk of misidentification caused by distortion. This invention also improves the accuracy of character recognition through two-stage cascaded recognition. Furthermore, this invention introduces business work orders for correction, further improving the accuracy of character recognition.

[0150] Please see Figure 2 , Figure 2 This is a structural block diagram of an electricity meter code recognition device based on a first-view image, provided as an embodiment of the present invention.

[0151] This invention provides a meter code recognition device based on a first-view image, comprising:

[0152] The raw image acquisition module 201 is used to capture multiple frames of raw images of a preset electricity meter area from a first-person perspective using a wearable camera device.

[0153] The optimal frame image filtering module 202 is used to evaluate the image quality of the original image and filter the optimal frame image.

[0154] The target region recognition module 203 is used to recognize the target region in the optimal frame image;

[0155] The distortion correction module 204 is used to correct the distortion of the target area to obtain a corrected image.

[0156] The dual-stage cascaded recognition module 205 is used to perform dual-stage cascaded recognition on the corrected image to obtain character recognition results.

[0157] Correction module 206 is used to correct the character recognition result based on the current associated work order of the preset meter area, and obtain the corrected meter code recognition result;

[0158] Output module 207 is used to output the correction table code recognition result.

[0159] In this embodiment of the invention, the optimal frame image filtering module 202 includes:

[0160] The grayscale conversion submodule is used to convert the original image into a grayscale image;

[0161] The Laplacian response map generation submodule is used to perform a second-order Laplacian differential convolution on the grayscale image to obtain the Laplacian response map;

[0162] The sharpness score calculation submodule is used to calculate the global variance of the Laplace response map to obtain the sharpness score;

[0163] The sharp image generation submodule is used to remove the original image whose sharpness score is less than a preset blur threshold to obtain a sharp image;

[0164] The brightness mean and standard deviation calculation submodule is used to calculate the brightness mean and standard deviation of a clear image;

[0165] The candidate frame image generation submodule is used to filter overexposed and underexposed images from clear images based on the mean and standard deviation of brightness to obtain candidate frame images.

[0166] The optimal frame image generation submodule is used to select the candidate frame image with the highest sharpness score as the optimal frame image.

[0167] In this embodiment of the invention, the target region identification module 203 includes:

[0168] The bounding box coordinates, class labels, and confidence score output submodule is used to input the best frame image into the pre-trained YOLO object detection model and output the bounding box coordinates, class labels, and confidence scores for various region types.

[0169] The target region extraction submodule is used to determine the target category label from the category labels and extract the bounding box coordinates of the target category label with the highest confidence score as the target region of the optimal frame image.

[0170] In this embodiment of the invention, the distortion correction module 204 includes:

[0171] The corner detection submodule is used to detect the four corner feature points of the meter casing or the four sides of the meter display area in the target area.

[0172] The perspective transformation matrix calculation submodule is used to calculate the perspective transformation matrix of the four corner feature points or four side contours mapped to the rectangular front view target;

[0173] The frontal view plan generation submodule is used to apply a perspective transformation matrix to the target area to obtain the frontal view plan.

[0174] The adaptive rotation correction submodule is used to perform adaptive rotation correction on the frontal view to obtain the corrected image.

[0175] In this embodiment of the invention, the adaptive rotation correction submodule includes:

[0176] The main direction angle determination unit is used to determine the main direction angle of the table code text line in the frontal view using the minimum bounding rectangle or Hough line detection.

[0177] The deflection calculation unit is used to calculate the deflection of the principal direction angle relative to the horizontal direction.

[0178] The image correction generation unit is used to perform affine rotation with the center of the frontal view as the rotation center and according to the opposite direction of the deflection amount to adjust the main direction angle of the code text line to horizontal, thereby obtaining the corrected image.

[0179] In this embodiment of the invention, the two-stage cascaded identification module 205 includes:

[0180] The pixel-level semantic segmentation result output submodule is used to input the corrected image into the pre-trained YOLO segmentation model and output the pixel-level semantic segmentation result.

[0181] The region segmentation submodule is used to segment the corrected image into LCD screen region and barcode region based on pixel-level semantic segmentation results;

[0182] The LCD screen region sub-image extraction sub-module is used to extract the LCD screen boundary rectangle of the LCD screen region based on the segmentation mask to obtain the LCD screen region sub-image;

[0183] The barcode region sub-image extraction submodule is used to extract the barcode boundary rectangle of the barcode region based on the segmentation mask to obtain the barcode region sub-image;

[0184] The text detection submodule is used to perform text detection on the LCD screen area sub-image and the barcode area sub-image, and output the coordinates of the text area bounding box and the text category label;

[0185] The text region bounding box cropping submodule is used to crop the text region bounding box from the corrected image based on the text region bounding box coordinates.

[0186] The character recognition submodule is used to perform character recognition on the bounding box of the text region and obtain the character recognition result.

[0187] In this embodiment of the invention, the correction module 206 includes:

[0188] The format normalization processing submodule is used to normalize the character recognition results to obtain normalized characters;

[0189] The business information acquisition submodule is used to acquire business information from the currently associated work orders in the preset electricity meter area;

[0190] The correction submodule is used to compare the standard characters with the business information, and correct the standard characters based on the comparison results to obtain the correction table code recognition result.

[0191] This invention also provides an electronic device, which includes a processor and a memory:

[0192] The memory is used to store program code and transfer the program code to the processor;

[0193] The processor is used to execute the meter code recognition method of this invention according to the instructions in the program code.

[0194] This invention also provides a computer-readable storage medium for storing program code, which is used to execute the meter code recognition method of this invention.

[0195] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0196] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0197] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, embodiments of the present invention can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of the present invention can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0198] Embodiments of the present invention are described with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0199] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0200] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0201] Although preferred embodiments of the present invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present invention.

[0202] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.

[0203] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.

[0204] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for recognizing electricity meter codes based on a first-person perspective view, characterized in that, include: Multiple frames of raw images were captured by shooting a pre-set electricity meter area from a first-person perspective using a wearable camera device. The original images are subjected to image quality assessment, and the optimal frame images are selected. Identify the target region in the optimal frame image; Distortion correction is performed on the target region to obtain a corrected image; The corrected image is subjected to two-stage cascaded recognition to obtain character recognition results; The character recognition result is corrected by the current associated work order of the preset meter area to obtain the corrected meter code recognition result. Output the identification result of the correction table code.

2. The method according to claim 1, characterized in that, The step of evaluating the image quality of the original image and selecting the optimal frame image includes: Convert the original image to a grayscale image; Perform a second-order Laplacian differential convolution on the grayscale image to obtain the Laplacian response image; Calculate the global variance of the Laplace response plot to obtain the sharpness score; Remove the original image whose sharpness score is less than a preset blur threshold to obtain a sharp image; Calculate the mean and standard deviation of the brightness of the clear image; Candidate frame images are obtained by filtering overexposed and underexposed images from the clear images based on the mean brightness and the standard deviation. The candidate frame image with the highest sharpness score is selected as the optimal frame image.

3. The method according to claim 1, characterized in that, The step of identifying the target region in the optimal frame image includes: The optimal frame image is input into a pre-trained YOLO object detection model, which outputs bounding box coordinates, class labels, and confidence scores for various region types. The target category label is determined from the category labels, and the bounding box coordinates of the target category label with the highest confidence score are extracted as the target region of the optimal frame image.

4. The method according to claim 1, characterized in that, The step of performing distortion correction on the target region to obtain a corrected image includes: Detect the four corner feature points of the meter casing or the four sides of the meter display area in the target area; Calculate the perspective transformation matrix that maps the four corner feature points or the four side contours to the rectangular front-view target; Apply the perspective transformation matrix to the target region to obtain a frontal view. An adaptive rotation correction is performed on the frontal view to obtain a corrected image.

5. The method according to claim 4, characterized in that, The step of adaptively rotating and correcting the frontal view to obtain the corrected image includes: The main direction angle of the table code text row in the frontal view is determined by using the minimum bounding rectangle or Hough line detection. Calculate the deflection of the principal direction angle relative to the horizontal direction; Using the center of the frontal view as the rotation center, perform an affine rotation according to the opposite direction of the deflection amount to adjust the main direction angle of the code text line to horizontal, thus obtaining the corrected image.

6. The method according to claim 1, characterized in that, The step of performing two-stage cascaded recognition on the corrected image to obtain character recognition results includes: The corrected image is input into a pre-trained YOLO segmentation model, which outputs pixel-level semantic segmentation results. The corrected image is segmented into a liquid crystal screen area and a barcode area based on the pixel-level semantic segmentation results. Extract the LCD screen boundary rectangle of the LCD screen region based on the segmentation mask to obtain the LCD screen region sub-image; The barcode boundary rectangle of the barcode region is extracted based on the segmentation mask to obtain a sub-image of the barcode region; Text detection is performed on the sub-image of the LCD screen area and the sub-image of the barcode area, and the coordinates of the text region bounding box and the text category label are output. The text region bounding box is cropped from the corrected image based on the coordinates of the text region bounding box; Character recognition is performed on the bounding box of the text region to obtain the character recognition result.

7. The method according to claim 1, characterized in that, The step of correcting the character recognition result using the current associated work order of the preset meter area to obtain the corrected meter code recognition result includes: The character recognition results are then processed to standardize the format, resulting in standardized characters. Obtain the business information from the currently associated work orders in the preset electricity meter area; The standardized characters are compared with the business information, and the standardized characters are corrected according to the comparison results to obtain the correction table code recognition result.

8. A meter code recognition device based on a first-person view, characterized in that, include: The raw image acquisition module is used to capture multiple frames of raw images of a preset electricity meter area from a first-person perspective using a wearable camera device. The optimal frame image filtering module is used to evaluate the image quality of the original image and filter the optimal frame image. The target region identification module is used to identify the target region in the optimal frame image; The distortion correction module is used to correct the distortion of the target region to obtain a corrected image; A two-stage cascaded recognition module is used to perform two-stage cascaded recognition on the corrected image to obtain character recognition results; The correction module is used to correct the character recognition result based on the current associated work order of the preset meter area, and obtain the corrected meter code recognition result. The output module is used to output the identification result of the correction table code.

9. An electronic device, characterized in that, The device includes a processor and a memory: The memory is used to store program code and transmit the program code to the processor; The processor is used to execute the meter code recognition method according to any one of claims 1-7 according to the instructions in the program code.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store program code for executing the meter code recognition method according to any one of claims 1-7.