Electric energy meter calibration method, device, electronic equipment and storage medium
Image recognition technology is used to obtain and identify images of electric energy meters and measurement calibrators, which solves the problem of human errors in electric energy meter error calibration and improves calibration accuracy and work efficiency.
Patent Information
- Application Number
- CN202111289551.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-02
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2041-11-02
AI Technical Summary
The prior art has problems of artificial errors and irregular readings in the error verification of electricity meters, which makes it difficult to guarantee the accuracy of the calibration.
By obtaining the image of the electrical energy meter and the measurement of the album tester, the image recognition technology is used to determine the model and the number of dials and the number of dials.
Improve the accuracy of the electrical energy meter verification, reduce the errors of artificial reading, save the workload of staff, improve work efficiency and reduce labor costs.
Smart Images

Figure CN114047471B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of electric power technology, and in particular to an electric energy meter calibration method, device, electronic equipment, storage medium and computer program product. Background Art
[0002] The rapid development of the economy and society is inseparable from the continuous and stable supply of electricity. As a connecting bridge, the electricity meter needs to conduct error calibration and ensure its efficient operation and maintenance, which is an important part of maintaining reliable and stable electricity.
[0003] For the error calibration of electric energy meters, the standard meter method is currently widely used, that is, the meter calibration instrument is connected to the power grid system where the electric energy meter is located. The meter calibration instrument and the electric energy meter simultaneously measure the electric energy parameters and compare the parameters to determine the error of the electric energy meter. If the error is greater than the preset value, it means that the electric energy meter cannot measure accurately and the electricity meter does not meet the standard. The more common meter calibration instrument is the electric energy meter field calibration instrument, which is a test instrument that integrates electric energy parameter measurement, electric energy meter calibration, and wiring judgment.
[0004] However, due to the influence of technical and management factors, when actually performing error calibration of electric energy meters, staff need to go to the site to record the data measured by the electric energy meters and the electric energy meter field calibration instrument one by one, that is, the staff read and copy the data one by one into a paper work manual, and after copying the data, they need to sort out the calculations, error analysis, report writing and other statistical analysis work. Manual reading is prone to human errors and irregular readings, making it difficult to ensure the accuracy of calibration. Summary of the invention
[0005] Based on this, it is necessary to provide an electric energy meter calibration method, device, electronic device, computer-readable storage medium and computer program product that can improve the accuracy of electric energy meter calibration in response to the above technical problems.
[0006] In a first aspect, the present application provides a method for calibrating an electric energy meter. The method comprises:
[0007] Acquire an image of the electric energy meter obtained by photographing the electric energy meter, and acquire a standard calibration image obtained by photographing the metering calibration instrument;
[0008] Determine the electric energy meter outline in the electric energy meter image, and determine the electric energy meter model based on the electric energy meter outline;
[0009] According to the position of the digital display area corresponding to the electric energy meter model, the dial indication in the electric energy meter image is identified to obtain a first measurement result;
[0010] Identify the dial indication in the standard verification image to obtain a second measurement result;
[0011] An electric energy meter calibration result is determined according to the first measurement result and the second measurement result.
[0012] In one of the embodiments, the dial indication in the electric energy meter image is identified according to the position of the digital display area corresponding to the electric energy meter model to obtain a first metering result, including: determining a target digital display area in the area surrounded by the electric energy meter outline according to the position of the digital display area corresponding to the electric energy meter model; and identifying the dial indication based on the target digital display area to obtain a first metering result.
[0013] In one of the embodiments, the dial indication recognition based on the target digital display area to obtain the first metering result includes: dividing the target digital display image including the target digital display area from the electric energy meter image; determining the single-digit area in the target digital display image; removing the connected areas whose areas do not meet the preset conditions in the single-digit area; performing feature extraction on the remaining connected areas, and recognizing the whole words and half words in the single-digit area based on the extracted features to obtain the first metering result.
[0014] In one of the embodiments, the target digital display image is binarized to obtain a target digital display projection curve; the target digital display projection curve is traversed to extract the coordinates of the lowest point; the horizontal coordinate distance between the two lowest points is calculated to determine whether it meets the preset conditions; the area between the two lowest points that meet the preset conditions is segmented from the target digital display image to obtain multiple single-digit areas.
[0015] In one of the embodiments, determining the electric energy meter verification result based on the first measurement result and the second measurement result includes: subtracting the first measurement result and the second measurement result and taking the absolute value; if the absolute value does not exceed a set threshold relative to the second measurement result, it is determined that the electric energy meter measurement is accurate.
[0016] In one of the embodiments, the method further includes: determining a barcode area from the electric energy meter image based on barcode features; performing row-by-row scanning in the barcode area to identify all arrays that meet the barcode row features; calculating an average value of the barcode space width based on all arrays that meet the barcode row features, and identifying and saving the corresponding barcode characters based on the average value and in accordance with barcode encoding rules.
[0017] In a second aspect, the present application also provides an electric energy meter calibration device. The device comprises:
[0018] An acquisition module, used to acquire an image of an electric energy meter obtained by photographing the electric energy meter, and to acquire a standard calibration image obtained by photographing the metering calibration instrument;
[0019] A determination module, used to determine the outline of the electric energy meter in the electric energy meter image, and determine the model of the electric energy meter based on the outline of the electric energy meter;
[0020] an identification module, configured to identify a dial indication in the electric energy meter image according to a position of a digital display area corresponding to the electric energy meter model, and obtain a first measurement result;
[0021] The recognition module is further used to recognize the dial indication in the standard verification image to obtain a second measurement result;
[0022] The determination module is further used to determine the electric energy meter verification result according to the first measurement result and the second measurement result.
[0023] In a third aspect, the present application further provides an electronic device. The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0024] Acquire an image of the electric energy meter obtained by photographing the electric energy meter, and acquire a standard calibration image obtained by photographing the metering calibration instrument;
[0025] Determine the electric energy meter outline in the electric energy meter image, and determine the electric energy meter model based on the electric energy meter outline;
[0026] According to the position of the digital display area corresponding to the electric energy meter model, the dial indication in the electric energy meter image is identified to obtain a first measurement result;
[0027] Identify the dial indication in the standard verification image to obtain a second measurement result;
[0028] An electric energy meter calibration result is determined according to the first measurement result and the second measurement result.
[0029] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0030] Acquire an image of the electric energy meter obtained by photographing the electric energy meter, and acquire a standard calibration image obtained by photographing the metering calibration instrument;
[0031] Determine the electric energy meter outline in the electric energy meter image, and determine the electric energy meter model based on the electric energy meter outline;
[0032] According to the position of the digital display area corresponding to the electric energy meter model, the dial indication in the electric energy meter image is identified to obtain a first measurement result;
[0033] Identify the dial indication in the standard verification image to obtain a second measurement result;
[0034] An electric energy meter calibration result is determined according to the first measurement result and the second measurement result.
[0035] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0036] Acquire an image of the electric energy meter obtained by photographing the electric energy meter, and acquire a standard calibration image obtained by photographing the metering calibration instrument;
[0037] Determine the electric energy meter outline in the electric energy meter image, and determine the electric energy meter model based on the electric energy meter outline;
[0038] According to the position of the digital display area corresponding to the electric energy meter model, the dial indication in the electric energy meter image is identified to obtain a first measurement result;
[0039] Identify the dial indication in the standard verification image to obtain a second measurement result;
[0040] An electric energy meter calibration result is determined according to the first measurement result and the second measurement result.
[0041] The above-mentioned electric energy meter calibration method, device, electronic device, storage medium and computer program product can perform image recognition on the electric energy meter image by acquiring the electric energy meter image obtained by photographing the electric energy meter, obtain the outline of the electric energy meter, and determine the electric energy meter model based on the outline of the electric energy meter. Since the dial indications of electric energy meters of different models are located in different areas, after determining the electric energy meter model, the dial indication of the electric energy meter can be identified according to the position of the digital display area corresponding to the electric energy meter model. In this way, the accurate reading of the electric energy meter can be identified according to the electric energy meter image, thereby improving the accuracy of the measurement data collected by the electric energy meter. Compared with manually reading and transcribing the measurement data, it also reduces the workload of the staff and improves the work efficiency of the measurement data collection of the electric energy meter. On the other hand, by acquiring the standard calibration image obtained by photographing the meter calibration instrument, the dial indication of the meter calibration instrument is identified, and the dial indication of the electric energy meter is compared with the dial indication of the meter calibration instrument, thereby completing the calibration of the electric energy meter. Compared with manual data transcription and statistical analysis of the transcribed data, this electric energy meter calibration method can greatly improve the accuracy of electric energy meter calibration, and also save working time, improve work efficiency and reduce labor costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 A diagram showing an application environment of an electric energy meter calibration method in an embodiment;
[0043] Figure 2 A schematic diagram of a flow chart of an electric energy meter calibration method in one embodiment;
[0044] Figure 3 A schematic diagram of a flow chart of steps for determining an electric energy meter model in an embodiment;
[0045] Figure 4 A schematic diagram of a flow chart of a step of identifying the indication on the dial of an electric energy meter in one embodiment;
[0046] Figure 5 A schematic diagram of a flow chart of a step of identifying the indication on the dial of an electric energy meter in one embodiment;
[0047] Figure 6 A schematic flow chart of a step of identifying the indication on the dial of an electric energy meter in another embodiment;
[0048] Figure 7 A structural block diagram of an electric energy meter verification system in one embodiment;
[0049] Figure 8 A schematic diagram of a flow chart of an electric energy meter calibration method in another embodiment;
[0050] Fig. 9 It is a structural block diagram of an electric energy meter calibration device in one embodiment;
[0051] Fig.10 FIG. 4 is a diagram showing the internal structure of an electronic device in one embodiment. DETAILED DESCRIPTION
[0052] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0053] The electric energy meter calibration method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Figure 1, the electric energy meter calibration method is applied to the electric energy meter calibration system. The electric energy meter calibration system includes a terminal 102, a server 104, an electric energy meter 106 and a meter calibration instrument 108. Among them, the terminal 102 communicates with the server 104 through a network. The data storage system can store data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The electric energy meter 106 and the meter calibration instrument 108 are used to measure the electric energy at the substation site, and the terminal 102 is used to collect images of the electric energy meter 106 and the meter calibration instrument 108. The terminal 102 and the server 104 can execute the electric energy meter calibration method provided in the embodiment of the present application separately, or they can execute the electric energy meter calibration method provided in the embodiment of the present application in collaboration. For example, the terminal 102 can obtain an image of an electric energy meter obtained by photographing the electric energy meter, and obtain a standard verification image obtained by photographing the meter calibrator; determine the outline of the electric energy meter in the electric energy meter image, and determine the model of the electric energy meter based on the outline of the electric energy meter; identify the dial indication in the electric energy meter image according to the position of the digital display area corresponding to the electric energy meter model to obtain a first metering result; identify the dial indication in the standard verification image to obtain a second metering result; determine the electric energy meter verification result based on the first metering result and the second metering result.
[0054] The terminal 102 may be, but is not limited to, any personal computer, laptop computer, smart phone, tablet computer, or portable wearable device with a shooting function. Smart phones and tablet computers may be mobile terminals using HarmonyOS or Android operating systems. Portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. The server 104 may be implemented using an independent server or a server cluster consisting of multiple servers.
[0055] The energy meter 106 is a gateway meter installed at the substation site, which measures energy by measuring voltage and current. The energy meters are classified according to manufacturers and specific models. The classified energy meter models include DTZ568, ISKRAWG.MT831, ISKRA WG.MT860, Landis+Gyr E850, Landis+Gyr E650, EDMI2000-6E20, EDMI2000-0400, EDMI2000-0420, EDMIMk6E, Schneider ION8650, Schneider ION8600, MK6E, DTSD3000, ZMD405CT44.0457.B2, ZMQ202C.4r4af6, etc., which are not limited in the embodiments of the present application.
[0056] The metering and calibration instrument 108 is used as a standard source to synchronously measure the data of the electric energy meter 106. It is a tester that integrates electric energy parameter measurement, electric energy meter calibration, and wiring judgment. In order to facilitate on-site operation, the metering and calibration instrument can use a current clamp to access the current without disconnecting the line. The metering and calibration instrument 108 can be a metering instrument MTE PWS3.3 or Accupo AP2003L handheld wireless secondary voltage drop and load tester, etc., which is not limited in the embodiments of the present application.
[0057] In one embodiment, Figure 2 As shown, a method for verifying an electric energy meter is provided, and the method is applied to an electronic device (the electronic device can be specifically Figure 1 The terminal or server in the example is used to illustrate, including the following steps:
[0058] Step 202, obtaining an image of the electric energy meter obtained by photographing the electric energy meter, and obtaining a standard calibration image obtained by photographing the metering calibrator.
[0059] Among them, the energy meter image is obtained by Figure 1 The terminal in the application environment shown is obtained by photographing the electric energy meter working on the substation site. The electric energy meter image includes the outline of the electric energy meter. The area surrounded by the outline of the electric energy meter includes the digital display area and the barcode area. The digital display area refers to the area where the numbers are located, which is used to display the readings of the electric energy meter. The barcode area refers to the area where the barcode is located, which is used to display the asset barcode number of the electric energy meter. The standard verification image is obtained by the terminal photographing the metering calibrator measuring the electric energy meter. The standard verification image includes the verification digital display area, which is used to display the readings of the metering calibrator.
[0060] The electric energy meter image may come from the electric energy meter image collected by the terminal in real time, or may be the electric energy meter image taken by the terminal in a historical time period pre-stored in the server. That is to say, after the terminal collects the electric energy meter image, it can process the electric energy meter image in real time, such as recognizing the electric energy meter outline and dial indication in the electric energy meter image in real time; it can also be pre-stored and processed, for example, it can be selected to perform the electric energy meter outline and dial indication recognition processing of the electric energy meter image when the server has fewer processing tasks, or it can be selected to perform the electric energy meter outline and dial indication recognition processing of the electric energy meter image according to the staff's specified time when the staff is not busy. This embodiment does not limit this.
[0061] Similarly, the standard verification image can be derived from a standard verification image collected by the terminal in real time, or it can be a standard verification image taken by the terminal in a historical period of time pre-stored on the server. That is to say, after the terminal collects the standard verification image, it can process the standard verification image in real time, such as recognizing the dial indication in the standard verification image in real time; it can also be pre-stored and processed, for example, it can be selected to perform dial indication recognition processing of the standard verification image when the server has fewer processing tasks, or it can be selected to perform dial indication recognition processing of the standard verification image at a time specified by the staff when the staff is not busy. This embodiment does not limit this.
[0062] As mentioned above, the terminal can be other electronic devices equipped with cameras, such as personal computers, laptops, smart phones, tablet computers, or portable wearable devices. In the electric energy meter calibration scenario, the terminal can be a smart phone with a built-in camera, which is convenient for staff to carry and has wide versatility. In other embodiments, the terminal can be a personal computer with an external camera, and the external camera can be deployed at the substation site. For example, the external camera is a HF900 wide dynamic industrial camera.
[0063] In one embodiment, an image of an electric energy meter obtained by photographing the electric energy meter includes: pre-modeling the appearance contours of electric energy meters of different models to obtain a contour recognition model; when photographing the electric energy meter, identifying the appearance contour of the electric energy meter through the contour recognition model, and photographing after identifying the appearance contour of the electric energy meter of the corresponding model to obtain the electric energy meter image.
[0064] The contour recognition model here is generated by training the machine learning model. It can also be understood that the contour recognition model is a machine learning model that has been trained and has the ability to recognize the appearance contour of the electricity meter.
[0065] During the image acquisition stage of the electricity meter, the electronic device assists the user in efficiently aligning the electricity meter to be captured by identifying the appearance outline of the electricity meter, thereby realizing target detection and autofocus during the shooting process of the electricity meter. Compared with directly shooting the electricity meter, this improves the accuracy of acquiring the electricity meter image and ensures the accuracy of subsequent recognition of the dial readings in the electricity meter image.
[0066] Step 204: determine the electric energy meter outline in the electric energy meter image, and determine the electric energy meter model based on the electric energy meter outline.
[0067] The contour of the energy meter is the line that defines or limits the outer edge of the energy meter. Contour is a common concept in machine learning of computer vision, and is often used for tasks such as target detection and recognition. Use OpenCV software to perform contour operations, including finding contours, drawing contours, and calculating contour lengths.
[0068] The electronic device can classify the electric energy meter according to the length of the electric energy meter outline. For each type of electric energy meter, the specific model of the electric energy meter can be determined according to the different characteristics of the area surrounded by the electric energy meter outline.
[0069] In one embodiment, the electronic device may further classify the electric energy meters according to the ratio of the length of the long side to the length of the short side in the outline of the electric energy meter.
[0070] In other embodiments, the electronic device may further classify the electric energy meters according to the shape of the outline of the electric energy meters.
[0071] Step 206: Identify the dial indication in the electric energy meter image according to the position of the digital display area corresponding to the electric energy meter model to obtain a first measurement result.
[0072] The digital display area is located in the area surrounded by the outline of the electric energy meter, and the digital display area is used to display the dial reading of the electric energy meter. After the electric energy meter model is determined in step 204, the electronic device can determine the digital display area position in the electric energy meter image corresponding to the electric energy meter model according to the electric energy meter model, and then identify the dial reading of the electric energy meter displayed at the digital display area position to obtain a first measurement result, that is, the electric energy meter reading.
[0073] Step 208, identifying the dial indication in the standard calibration image to obtain a second measurement result.
[0074] In one embodiment, the electronic device determines the position of the calibration digital display area of the metrology calibrator in the standard calibration image, identifies the dial indication of the metrology calibrator displayed in the calibration digital display area, and obtains a second metrology result, that is, the reading of the metrology calibrator.
[0075] Among them, the model of the metrology calibrator is determined or known, so the position of the calibration digital display area in the standard calibration image corresponding to the metrology calibrator can be directly determined according to the model of the metrology calibrator. The electronic device determines the position of the calibration digital display area in the standard calibration image corresponding to the metrology calibrator according to the model of the metrology calibrator. For example, the electronic device can pre-model the outline of the metrology calibrator of the specified model to obtain the positional relationship between the area surrounded by the outline of the metrology calibrator and the calibration digital display area. Then, the position of the calibration digital display area is determined based on the positional relationship.
[0076] In other embodiments, the model of the metrology calibrator is uncertain. In this case, the outline of the metrology calibrator in the standard calibration image may be determined first, and the model of the metrology calibrator may be determined based on the outline of the metrology calibrator.
[0077] Specifically, the electronic device uses OpenCV software to perform contour operations on the metrology calibrator, including finding contours, drawing contours, and calculating contour lengths, and identifies the type of the metrology calibrator based on its contours. For each type of metrology calibrator, the specific model of the metrology calibrator can be determined based on the different features of the area surrounded by the contour of the metrology calibrator.
[0078] Step 210: Determine the electric energy meter verification result according to the first measurement result and the second measurement result.
[0079] The electric energy meter verification result is the error evaluation result of the electric energy meter, including qualified and unqualified. If the absolute error or relative error between the first measurement result and the second measurement result does not exceed the set threshold, the electric energy meter verification result is qualified, and the electric energy meter is judged to be accurate; if it exceeds the set threshold, the electric energy meter verification result is unqualified, and the electric energy meter is judged to be inaccurate.
[0080] In the above-mentioned electric energy meter calibration method, by acquiring the electric energy meter image obtained by photographing the electric energy meter, the electric energy meter image can be image recognized to obtain the outline of the electric energy meter, and the electric energy meter model can be determined based on the outline of the electric energy meter. Since the dial indications of electric energy meters of different models are located in different areas, after determining the electric energy meter model, the dial indication of the electric energy meter can be identified according to the position of the digital display area corresponding to the electric energy meter model. In this way, the accurate reading of the electric energy meter can be identified according to the electric energy meter image, thereby improving the accuracy of the measurement data collected by the electric energy meter. Compared with manually reading and transcribing the measurement data, it also reduces the workload of the staff and improves the work efficiency of the measurement data collection of the electric energy meter. On the other hand, by acquiring the standard calibration image obtained by photographing the metering calibrator, the dial indication of the metering calibrator is identified, and the dial indication of the electric energy meter is compared with the dial indication of the metering calibrator, thereby completing the calibration of the electric energy meter. Compared with manual data transcription and statistical analysis of the transcribed data, this electric energy meter calibration method saves working time, improves work efficiency and reduces labor costs.
[0081] In one embodiment, Figure 3 As shown, step 204, determining the electric energy meter outline in the electric energy meter image, and determining the electric energy meter model based on the electric energy meter outline, includes:
[0082] Step 302 : preprocessing the acquired electric energy meter image, including image size normalization and grayscale conversion.
[0083] Among them, image size normalization can limit the image size within a preset range. Grayscale can convert a three-channel image into a single-channel image for binary threshold segmentation.
[0084] Step 304 , performing binarization processing on the pre-processed electric energy meter image after removing interference, drawing a projection curve of the electric energy meter image, and obtaining the electric energy meter contour in the electric energy meter image.
[0085] The electronic device may use the findContours() and drawContours() functions of the OpenCV software to draw the projection curve of the electric energy meter image, and obtain the electric energy meter contour in the electric energy meter image.
[0086] Among them, interference removal can effectively remove abnormal independent interference points in the electric energy meter image. Binarization is to provide a single-channel image for finding the contour function.
[0087] Step 306: Calculate the length of the electric energy meter contour according to the projection curve information of the electric energy meter image.
[0088] In one embodiment, the curve length calculation function double ArcLength() of OpenCV software is used to calculate the length of the electric energy meter contour. First, a set of sequence points of the projection curve is input, the starting point of the curve is determined, and whether the curve is closed is determined. If the curve is closed, the length of the line segments between each sequence point is calculated in turn, and the sum is calculated to obtain the length of the electric energy meter contour; if the curve is not closed, the set of sequence points is re-input.
[0089] Step 308: Determine the model of the electric energy meter based on the length of the electric energy meter outline.
[0090] In one embodiment, the electronic device pre-models the appearance contours of different types of electric energy meters using the above-mentioned contour recognition model, obtains and saves the lengths of the electric energy meter contours of different types of electric energy meters. Thus, the type of electric energy meter can be determined based on the length of the electric energy meter contour.
[0091] Furthermore, the electronic device pre-models the appearance contours of different types of electric energy meters through the above-mentioned contour recognition model to obtain the regional features surrounded by the contours of the electric energy meters of different types. Therefore, for each type of electric energy meter, the electric energy meter model can be determined according to the different features of the area surrounded by the electric energy meter contour.
[0092] As mentioned above, the energy meter models currently suitable for this energy meter calibration system include DTZ568, ISKRAWG.MT831, ISKRA WG.MT860, Landis+Gyr E850, Landis+Gyr E650, EDMI2000-6E20, EDMI2000-0400, EDMI2000-0420, EDMIMk6E, Schneider ION8650, Schneider ION8600, MK6E, DTSD3000, ZMD405CT44.0457.B2, and ZMQ202C.4r4af6, a total of 15 types, which can be divided into 7 main types of energy meters according to the manufacturers.
[0093] In this embodiment, the length of the electric energy meter contour is calculated by an image processing algorithm based on OpenCV software, and the electric energy meter model is determined according to the length of the electric energy meter contour, which can improve the accuracy of electric energy meter model recognition.
[0094] In one embodiment, the electric energy meter verification method further includes adding electric energy meter models. For electric energy meter models that have not been identified in the system, by setting features for the electric energy meter of this model, the set information is saved in the contour recognition model to achieve the addition of electric energy meter models, thereby meeting the needs of system function expansion.
[0095] In one embodiment, Figure 4 As shown, step 206, according to the position of the digital display area corresponding to the electric energy meter model, the dial indication in the electric energy meter image is identified to obtain a first measurement result, including:
[0096] Step 402 : determining a target digital display area in the area surrounded by the outline of the electric energy meter according to the position of the digital display area corresponding to the electric energy meter model.
[0097] The target digital display area refers to the digital display area corresponding to the electric energy meter model.
[0098] After the electric energy meter contour and the electric energy meter model are determined in step 204, since the contour recognition model stores the positional relationship between the digital display area corresponding to the electric energy meter model and the area surrounded by the electric energy meter contour, the electronic device reads the pre-stored digital display area coordinates corresponding to the electric energy meter model and determines the target digital display area within the area surrounded by the electric energy meter contour.
[0099] Step 404, performing dial indication recognition based on the target digital display area to obtain a first measurement result.
[0100] In one embodiment, the electronic device may perform image recognition on the target digital display area to obtain information such as numbers and pointers in the target digital display area, and then determine the first measurement result corresponding to the target digital display area based on the recognized information.
[0101] In this embodiment, by locating the target digital display area, the dial indication in the electric energy meter image is identified based on the target digital display area, and the identification area is narrowed from the electric energy meter image to the target digital display area, which can improve the accuracy of reading recognition.
[0102] In one embodiment, Figure 5 As shown, step 404, performing dial indication recognition based on the target digital display area to obtain a first measurement result, includes:
[0103] Step 502: Divide the target digital display image including the target digital display area from the electric energy meter image.
[0104] In one embodiment, the electronic device may segment the target digital display area from the electric energy meter image to obtain the target digital display image.
[0105] Step 504, determining a single-digit area in the target digital display image.
[0106] The single-digit area refers to the area where a single electric energy meter character is located, and multiple single-digit areas constitute the target digital display area. The dial indication (reading) of the electric energy meter includes an integer part, a decimal point and a decimal part, and the integer part and the decimal part are composed of Arabic numerals 0-9 in sequence.
[0107] Step 506: remove the connected regions in the single-digit region whose areas do not meet the preset conditions.
[0108] Although the single-digit area is located, there may still be some small outlines remaining in the single-digit area or the connected area may be blocked. Therefore, it is necessary to further process the single-digit area before performing character recognition on it.
[0109] In one embodiment, the electronic device may locate and delete a connected region whose area is greater than a maximum threshold or whose area is less than a minimum threshold in the single-digit region; and segment the remaining connected regions from the single-digit region.
[0110] Step 508 , extracting features from the remaining connected regions, and identifying the whole words and half words in the single-digit region based on the extracted features to obtain a first measurement result.
[0111] In one embodiment, the electronic device normalizes the rows and columns of the remaining connected area in the direction of minimum deformation to obtain a feature vector of the single-digit area; inputs the feature vector of the single-digit area into a character recognition model; the character recognition model recognizes characters, including whole words and half words, to obtain a first measurement result.
[0112] Among them, a full word refers to a complete number displayed in a single-digit area, and a half word refers to an incomplete number displayed in a single-digit area. The electric energy meter characters are printed digital characters with a relatively standardized character structure, so the process of recognizing full words and half words is the same.
[0113] The character recognition model here uses a template matching method for character recognition. Moreover, the character recognition model is generated by training a BP (Back Propagation) neural network model under the Tensorflow framework. It can also be understood that the character recognition model is a machine learning model that has been trained to have the ability to recognize electric energy meter characters.
[0114] According to at least one electric energy meter image and an electric energy meter image with electric energy meter characters labeled, the BP neural network model is trained to obtain a character recognition model. The electric energy meter image here refers to the training sample to be detected, and the electric energy meter image with electric energy meter characters labeled refers to the training sample labels collected in the early stage of the electric energy meter calibration work. The BP neural network is based on the neural network and integrates the Error Back Propagation Algorithm algorithm.
[0115] In one embodiment, the character recognition model recognizes characters, including whole words and half words, and obtains a first measurement result, including:
[0116] 1) Read the training data of electric energy meters and measuring instruments, including training samples and training sample labels; and establish a training set with 17,000 data points and a test set with 10,000 data points;
[0117] 2) Configure the neural network, including initializing the parameters; the parameters here include the number of nodes in each layer, the learning rate of the weights in each layer, and the offset of each layer;
[0118] 3) Configure activation functions, including using sigmoid functions to smooth the perceptron;
[0119] 4) Training data, including forward process and backward process. The backward process feedback adjusts the weights and offsets of each layer;
[0120] 5) Verification test: The training samples in the test set with 10,000 data are tested in turn to obtain the accuracy of the character recognition model in recognizing characters.
[0121] In this embodiment, by accurately locating the single-digit area in the target digital display image, a feature-based template matching algorithm is used to train the BP neural network model to obtain a character recognition model. The character recognition model is used to recognize the electricity meter characters, which can achieve a higher recognition rate and improve the accuracy of data recognition.
[0122] In one embodiment, Figure 6 As shown, step 504, determining a single-digit area in the target digital display image, includes:
[0123] Step 602, binarizing the target digital display image to obtain a target digital display projection curve;
[0124] The electronic device binarizes the target digital display image to obtain black pixels representing the object and white pixels representing the background.
[0125] The electronic device traverses the binarized target digital display image and extracts black pixels; traverses the binarized target digital display image row by row and counts the number of black pixels in each row; sets the number column of black pixels in front of each row of pixels as black pixels and the remaining columns as white pixels to obtain the target digital display projection curve.
[0126] For example, if the number of black pixels in a row is M, the 1st to Mth columns (that is, the first M columns) of the pixel points in the row are set as black pixels.
[0127] Step 604, traverse the target digital projection curve and extract the coordinates of the lowest point;
[0128] The electronic device traverses the target digital projection curve and extracts the coordinates of several lowest points of the curve (that is, the troughs of the curve).
[0129] Step 606, calculating the horizontal coordinate distance between the two lowest points to determine whether it meets the preset conditions;
[0130] The electronic device calculates the horizontal coordinate distance between every two lowest points (that is, the distance between two troughs, or called the valley distance), and determines whether it meets the preset conditions.
[0131] Step 608 , segmenting the area between the two lowest points that meet the preset conditions from the target digital display image to obtain a plurality of single-digit areas.
[0132] In this embodiment, the projection curve is obtained by binarizing the target digital display curve, and the single-digit area is segmented from the target digital display image according to the valley spacing, so that the purpose of accurately locating the single-digit area can be achieved. Compared with the target digital display area, the character recognition area of the electric energy meter is further reduced, and the accuracy of character recognition is improved.
[0133] In one embodiment, step 210, determining the electric energy meter verification result according to the first measurement result and the second measurement result, includes: subtracting the first measurement result from the second measurement result and taking the absolute value; if the absolute value does not exceed a set threshold relative to the second measurement result, determining that the electric energy meter measurement is accurate.
[0134] In this embodiment, the purpose of verifying the electric energy meter can be achieved by comparing the two measurement results. The electric energy meter is verified to be qualified according to the absolute error or relative error between the first measurement result and the second measurement result. The method is simple and easy to operate.
[0135] In one embodiment, the electric energy meter verification method further includes: determining a barcode area from the electric energy meter image based on the barcode feature,
[0136] Scan the barcode area line by line to identify all arrays that meet the barcode line characteristics;
[0137] The average value of the barcode space width is calculated based on all arrays that meet the barcode row characteristics, and the corresponding barcode characters are identified and saved based on the average value and according to the barcode encoding rules.
[0138] The barcode is used to identify the electric energy meter as an asset, and refers to a graphic identifier that arranges multiple black bars and blanks of different widths according to certain coding rules to express a set of information. In this embodiment, the EAN8 barcode can be used. The EAN8 barcode refers to a one-dimensional barcode with 8 digits. The EAN8 barcode can only encode numbers, not letters or other characters.
[0139] In one embodiment, a barcode area is determined from an electric energy meter image based on barcode features, including: grayscale processing of the acquired color electric energy meter image, determining the barcode area from the electric energy meter image based on identifying multiple black bars and blanks of different widths, and segmenting the barcode area from the electric energy meter image to obtain a barcode image.
[0140] The pixels in the grayscale barcode image have a total of 256 grayscale values, ranging from 0 to 255.
[0141] Furthermore, the barcode image is binarized to obtain a binary image of the barcode image. Specifically, the electronic device compares the grayscale value of each pixel in the grayscale barcode image with the grayscale threshold, and if the grayscale value of the pixel is less than the grayscale threshold, the grayscale value of the pixel is set to 0, otherwise, the grayscale value of the pixel is set to 255 to obtain a binary image of the barcode image.
[0142] Specifically, according to the characteristics of one-dimensional barcodes, barcode images are composed of black bars and blanks, black bars (that is, dark modules) are represented by "1", and blanks (that is, light modules) are represented by "0". In the grayscale barcode image, the pixel values of black bars and blanks are not binary "0" and "255". The grayscale values of the pixels in the barcode image are set to 0 or 255 through binarization, making the black and white contrast effect of black bars and blanks more obvious, thereby distinguishing black bars from blanks.
[0143] In one embodiment, a line-by-line scan is performed in a barcode area to identify all arrays that meet the barcode line characteristics, including: the electronic device traverses the binary image of the barcode image line by line, starting from the first pixel point, and when encountering a pixel point whose pixel value is not equal to its previous pixel value, the position of the pixel point is recorded to obtain an array; a forward difference operation is performed on the array to obtain the width of the black bar or blank space; the number of black bars or blank spaces is counted, and if the number of black bars or blank spaces meets the encoding rules of the EAN8 barcode, the array is retained, otherwise the array is discarded.
[0144] In one embodiment, the average value of the barcode bar and space widths is calculated based on all arrays that meet the barcode row characteristics, and the corresponding barcode characters are identified and saved based on the average value and in accordance with the barcode encoding rules, including: adding the widths of the black bars and spaces of all arrays that meet the barcode row characteristics to obtain the average value to obtain the unit module width, and then dividing the width of each black bar or space by the unit module width to obtain the bar-space ratio; identifying the corresponding barcode characters based on the bar-space ratio and the encoding rules of the EAN8 barcode and saving them.
[0145] Among them, the barcode feature of the EAN8 barcode is that the character structure consists of eight parts: left blank area, start character, left data character (4 digits), middle separator, right data character (3 digits), check character (1 digit), terminator, right blank area.
[0146] In one embodiment, after the barcode is identified, the ledger information of the corresponding electric energy meter is obtained from the equipment asset ledger stored in the terminal or server according to the barcode, such as the manufacturer, production date, commissioning date, and warranty period of the electric energy meter, for subsequent statistical analysis such as comparison and verification of the data.
[0147] In this embodiment, the barcode characters corresponding to the electric energy meter can be identified through the EAN 8 barcode encoding rules, and the ledger information of the corresponding electric energy meter can be obtained according to the barcode characters.
[0148] refer to Figure 7 In one embodiment, an electric energy meter calibration system is provided, which includes a terminal, an electric energy meter and a metering calibrator.
[0149] Among them, the electricity meters include DTZ568, ISKRA WG.MT831, ISKRA WG.MT860, Landis+Gyr E850, Landis+Gyr E650, EDMI2000-6E20, EDMI2000-0400, EDMI2000-0420, EDMIMk6E, SchneiderION8650, ZMQ202C.4r4af6, ZMD405CT44.0457.B2, MK6E, DTSD3000 and other models.
[0150] The measurement and calibration instruments include the measuring instrument MTE PWS3.3 and the Accupo AP2003L handheld wireless secondary voltage drop and load tester.
[0151] The terminal has a built-in high-definition camera, and the terminal includes an image recognition module, which includes an image acquisition unit, an image recognition unit, a data report unit, a basic data unit and a user center unit.
[0152] The image acquisition unit is used to acquire images. The terminal takes pictures of the energy meter and the metering calibrator on site through a high-definition camera, or the terminal selects pre-taken and saved pictures to acquire the energy meter image and the standard calibration image.
[0153] The image recognition unit is used to recognize images. The terminal trains a neural network based on the Tensorflow and Opencv open source machine learning frameworks, compares, analyzes, and trains the collected images of the electric energy meter and the metering calibrator with the images of the electric energy meter and the metering calibrator that are manually marked with the corresponding appearance structure, asset identity, and display reading, thereby improving the recognition accuracy of the data, and uses the trained neural network model to respectively recognize the appearance structure, asset identity, and display reading of the electric energy meter in the electric energy meter image to obtain a first measurement result for displaying the reading of the electric energy meter, and to respectively recognize the appearance structure, asset identity, and display reading of the metering calibrator in the standard verification image to obtain a second measurement result for displaying the reading of the metering calibrator. The first measurement result and the second measurement result are used to determine the verification result of the electric energy meter.
[0154] The electric energy meter verification system can currently identify some types of electric energy meters. With the expansion of the application of the system, for the electric energy meter models that cannot be identified, by setting their characteristics and saving the set information to the system, the number of identifiable electric energy meters can be increased. For the electric energy meter models that can be identified, the positions of their identity identification areas and display reading areas can be adjusted by setting new coordinates, so that the meter type maintenance can be achieved.
[0155] The image recognition module also includes a statistical analysis unit. The statistical analysis unit is used to perform statistics and analysis on the metering data, metering accuracy, verification history data, verification error trend, etc., so as to facilitate multi-dimensional comparative analysis and display of the verification data of the electric energy meter. Among them, the metering data includes the first metering result and the second metering result, and multiple groups of metering data are calculated to obtain the metering accuracy; the verification history data includes the verification results of the electric energy meter, and multiple groups of verification results of the electric energy meter are calculated to obtain the verification error, and the verification error trend is analyzed.
[0156] The basic data unit is used to manage the basic data of the energy meter and meter calibration instrument. The terminal imports the basic data of the energy meter and meter calibration instrument, such as the manufacturer, production date, and commissioning date, into the system in batches in the form of a table template in advance. After the identity of the energy meter and meter calibration instrument is identified, the corresponding basic data is queried in the terminal or server according to the identity.
[0157] The data report unit is used to display the identified data and export the data according to the specified template. The data report is used to display the identified data of the electric energy meter and the meter calibration instrument, including but not limited to the model, identification, dial indication of the electric energy meter and the model, identification, dial indication of the meter calibration instrument, and is also used to associate the identified data with the basic data of the corresponding electric energy meter and meter calibration instrument, and export the associated data according to the specified template, so that the relevant metering data can be further imported into other application systems.
[0158] The user center unit is used to manage user information. Considering the security and confidentiality requirements of power metering verification data, as well as the network environment conditions at the verification site (for example, the network conditions at some sites are poor and there is electromagnetic interference), the current design of the electric energy meter verification system can support online and offline working modes, and can also use the local database for normal functional operations without connecting to the external network. It also has user management functions, including adding new users, setting passwords, and changing passwords.
[0159] The above-mentioned electric energy meter calibration system adopts image recognition technology, collects working images of electric energy meters and metering calibrators through terminals, automatically identifies the model, asset code, nameplate parameters and other information of electric energy meters and metering calibrators, and forms a detailed electric energy meter on-site calibration data file with pictures, identification information and business information. The system can also realize real-time data interaction, automatically fill in the dial reading of the electric energy meter, and check the dial reading information of the electric energy meter business processing; it can also conduct statistics and analysis on the metering data, accuracy, calibration history, error trend, etc. of the image recognition electric energy meter calibration.
[0160] refer to Figure 8 The above-mentioned electric energy meter calibration system adopts Figure 8 The electric energy meter calibration method shown includes the steps of connecting the device, starting calibration, data collection, data identification, data storage, data analysis, etc.
[0161] Step 1: Connect the device. Connect the energy meter and the meter calibrator to prepare for calibration, turn on the meter calibrator power, and connect the test wires on the meter calibrator and the energy meter.
[0162] Step 2: Start calibration. Set calibration parameters according to the calibration procedures for electric energy meters and start calibration.
[0163] Step 3: Data collection. To collect images of electric energy meters and standard calibration images, you can use the intelligent mobile operation terminal to take pictures of electric energy meters and metering calibrators on site or select pre-taken pictures of electric energy meters and metering calibrators. During the image acquisition process, the appearance contour modeling is performed based on the structure of the electric energy meter to be identified, and the contour line of the electric energy meter is dynamically loaded to assist and guide users to efficiently align the collected objects, realize target detection and automatic focus during the meter data photography process, and improve the accuracy and efficiency for further data preprocessing and cutting.
[0164] Step 4: Data recognition. First, train the image data of the energy meter and meter calibration instrument collected in the early stage. After reaching the expected recognition accuracy, encapsulate the recognition algorithm package into an image recognition module; based on the image recognition module, identify the appearance structure, asset identity and display reading of the target instrument (energy meter or meter calibration instrument); finally, according to the record form and format requirements of the meter calibration instrument, automatically integrate and organize the basic information data and verification record data.
[0165] (1) Data training. The data training process is based on the BP neural network algorithm. The BP neural network integrates the Error Back Propagation Algorithm algorithm on the basis of the neural network. The extracted image data features are input into the neural network, and the sample training set collected in the early stage and the test set to be tested are used for intensive training to obtain the final recognition result.
[0166] Specifically, it includes: reading in the training data of electric energy meters and metering instruments, training samples, and training sample labels; neural network configuration, initialization of parameters (number of nodes in each layer, learning rate of weights in each layer, offset of each layer, etc.); activation function configuration: sigmoid function realizes the smoothing of perceptron; data training: training set of 17,000 data; forward process, backward process (feedback adjustment of weights and offsets in each layer); verification test: test set of 10,000 data to obtain accuracy.
[0167] (2) Data recognition: This includes the recognition of appearance structure, asset identification, and display readings.
[0168] The data is identified by appearance to determine the model of the electric energy meter or instrument. The specific calculation method is: use the function double ArcLength(const void curve, CvSlice slice=CV_WHOLE_SEQ, intis_closed=-1) of OpenCV software; calculate the contour perimeter or curve length. The input parameter curve is a sequence or array of curve points; slice is the starting point of the curve. By default, the length of the entire curve is calculated; is_closed indicates whether the curve is closed. There are three cases: is_closed=0, assuming that the curve is not closed, is_closed>0 assumes that the curve is closed, and is_closed<0 assumes that the curve is a sequence; check the flag CV_SEQ_FLAG_CLOSED in ((CvSeq*)curve)->flags to determine whether the curve is closed. The function cvArcLength calculates the length of the line segment between the sequence points in sequence and sums them up to obtain the length of the curve. The electric energy meter model is matched based on the obtained electric energy meter contour curve length.
[0169] Identify asset identification including barcode, QR code, NFC tag, RFID tag, etc. to determine the asset information of electric energy meters and metering calibrators. Grayscale the collected color image to obtain the area where the meter to be identified is located. Identify the identity information of the electric energy meter based on barcode features, QR code features, NFC tag features, and RFID features.
[0170] Based on image recognition technology, the dial reading is identified. The dial character area is located by image contour extraction algorithm, and the dial reading is identified using the convolutional neural network model.
[0171] (3) Information fusion: Information fusion and organization are carried out according to business rules, and data information is automatically analyzed and comprehensively processed under certain criteria.
[0172] Step 5: Data preservation: The identified data information is saved to the local database, and it also supports manual synchronization to the metering business system when connected online.
[0173] Step 6: Data analysis. Based on the identified data, the calibration error of the electric energy meter is automatically calculated, and the calibration data record and data report are automatically generated; the information of the identified electric energy meter is sorted, and the calibration error rate of the electric energy meter is trained and counted to form an electric energy meter information file, which supports multi-dimensional comparative analysis, timely discovers the metering error and change trend of the electric energy meter, and guides the adjustment.
[0174] Step 7: Complete the verification.
[0175] The above-mentioned electric energy meter calibration method takes a photo of the electric energy meter and the metering and calibrating instrument through the terminal to form an image. The image recognition technology is used to automatically identify the appearance structure, asset identification, display reading and other information of the electric energy meter and metering and calibrating instrument in the image, extract data and save it; the data recognition and fusion data are automatically reported, the error data is automatically calculated, and data reports are generated, and statistical analysis, basic information management and user information management and maintenance functions are provided.
[0176] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0177] Based on the same inventive concept, the embodiment of the present application also provides an electric energy meter calibration device for implementing the electric energy meter calibration method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more embodiments of the electric energy meter calibration device provided below can refer to the limitations of the electric energy meter calibration method above, and will not be repeated here.
[0178] In one embodiment, Fig. 9 As shown, an electric energy meter calibration device 900 is provided, comprising: an acquisition module 902, a determination module 904 and an identification module 906, wherein:
[0179] An acquisition module 902 is used to acquire an image of an electric energy meter obtained by photographing the electric energy meter, and to acquire a standard calibration image obtained by photographing the metering calibration instrument;
[0180] A determination module 904 is used to determine the outline of the electric energy meter in the electric energy meter image, and determine the model of the electric energy meter based on the outline of the electric energy meter;
[0181] The identification module 906 is used to identify the dial indication in the electric energy meter image according to the position of the digital display area corresponding to the electric energy meter model, and obtain a first measurement result;
[0182] The recognition module 906 is further used to recognize the dial indication in the standard calibration image to obtain a second measurement result;
[0183] The determination module 904 is further used to determine the electric energy meter verification result according to the first measurement result and the second measurement result.
[0184] In one embodiment, the identification module 906 also includes a target digital display area identification module, which is used to determine the target digital display area in the area surrounded by the electric energy meter outline according to the digital display area position corresponding to the electric energy meter model; and perform dial indication identification based on the target digital display area to obtain a first metering result.
[0185] In one embodiment, the target digital display area recognition module is also used to divide the target digital display image including the target digital display area from the electric energy meter image; determine the single-digit area in the target digital display image; remove the connected areas whose areas do not meet the preset conditions in the single-digit area; perform feature extraction on the remaining connected areas, and identify the whole words and half words in the single-digit area based on the extracted features to obtain a first metering result.
[0186] In one embodiment, the target digital display area identification module is also used to binarize the target digital display image to obtain the target digital display projection curve; traverse the target digital display projection curve to extract the coordinates of the lowest point; calculate the horizontal coordinate distance between the two lowest points to determine whether it meets the preset conditions; and segment the area between the two lowest points that meet the preset conditions from the target digital display image to obtain multiple single-digit areas.
[0187] In one embodiment, the determination module 904 is further used to make a difference between the first measurement result and the second measurement result and take the absolute value; if the absolute value does not exceed a set threshold relative to the second measurement result, it is determined that the electric energy meter is measuring accurately.
[0188] In one embodiment, the recognition module 906 is also used to determine the barcode area from the electric energy meter image based on the barcode features; perform row-by-row scanning in the barcode area to identify all arrays that meet the barcode row features; calculate the average value of the barcode space width based on all arrays that meet the barcode row features, and identify the corresponding barcode characters based on the average value and according to the barcode encoding rules and save them.
[0189] Each module in the above-mentioned electric energy meter verification device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of the processor in the electronic device in the form of hardware, or can be stored in the memory of the electronic device in the form of software, so that the processor can call and execute the corresponding operations of each of the above modules.
[0190] In one embodiment, an electronic device is provided. The electronic device may be a terminal, and its internal structure diagram may be as follows: Fig.10 As shown. The electronic device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the electronic device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, an electric energy meter calibration method is implemented. The display screen of the electronic device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the housing of the electronic device, or an external keyboard, touchpad or mouse, etc.
[0191] Those skilled in the art will understand that Fig.10The structure shown in the figure is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the electronic device to which the scheme of the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0192] In one embodiment, an electronic device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0193] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0194] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0195] 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, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0196] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0197] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0198] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for calibrating an electric energy meter, characterized in that: The method comprises: Acquire an image of the electric energy meter obtained by photographing the electric energy meter, and acquire a standard calibration image obtained by photographing the metering calibration instrument; Preprocessing the electric energy meter image, removing interference from the preprocessed electric energy meter image and performing binarization processing; Using the contour search function and the contour drawing function, the projection curve of the electric energy meter image after the binary processing is drawn to obtain the electric energy meter contour in the electric energy meter image; According to the projection curve, using an image processing algorithm to calculate the length of the electric energy meter contour; determining the electric energy meter model based on the length of the electric energy meter profile; According to the position of the digital display area corresponding to the electric energy meter model, a neural network model trained based on a machine learning framework is used to identify the dial indication of the electric energy meter in the electric energy meter image to obtain a first measurement result; Using the neural network model to identify the dial reading of the metrology calibration instrument in the standard calibration image to obtain a second metrology result; Determining an electric energy meter calibration result according to the first measurement result and the second measurement result; Among them, the verification result of the electric energy meter includes qualified and unqualified; if the absolute error or relative error between the first measurement result and the second measurement result does not exceed the set threshold, the verification result of the electric energy meter is qualified, and it is determined that the measurement of the electric energy meter is accurate; if the absolute error or relative error between the first measurement result and the second measurement result exceeds the set threshold, the verification result of the electric energy meter is unqualified, and it is determined that the measurement of the electric energy meter is inaccurate.
2. The method according to claim 1, characterized in that: The step of identifying the dial indication in the electric energy meter image according to the position of the digital display area corresponding to the electric energy meter model to obtain the first measurement result includes: According to the position of the digital display area corresponding to the electric energy meter model, determining the target digital display area in the area surrounded by the electric energy meter outline; The dial indication is identified based on the target digital display area to obtain a first measurement result.
3. The method according to claim 2, characterized in that The step of performing dial indication recognition based on the target digital display area to obtain a first measurement result includes: Dividing a target digital display image including a target digital display area from the electric energy meter image; Determining a single-digit area in the target digital display image; Removing the connected regions whose areas do not meet the preset conditions in the single-digit regions; Features are extracted from the remaining connected regions, and the whole words and half words in the single digit region are identified based on the extracted features to obtain a first measurement result.
4. The method according to claim 3, characterized in that Determining the single-digit area in the target digital display image includes: Binarizing the target digital display image to obtain a target digital display projection curve; Traverse the target digital projection curve and extract the coordinates of the lowest point; Calculate the horizontal coordinate distance between the two lowest points to determine whether it meets the preset conditions; The area between the two lowest points that meet the preset conditions is segmented from the target digital display image to obtain a plurality of single-digit areas.
5. The method according to claim 1, characterized in that The step of determining the electric energy meter verification result according to the first measurement result and the second measurement result includes: Subtract the first measurement result from the second measurement result and take the absolute value; If the absolute value does not exceed the set threshold relative to the second measurement result, it is determined that the electric energy meter is measuring accurately.
6. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: Determining a barcode region from the electric energy meter image based on barcode features; Scanning the barcode area line by line to identify all arrays that meet the barcode line characteristics; The average value of the barcode space width is calculated according to all arrays that meet the barcode row characteristics, and the corresponding barcode characters are identified and saved based on the average value and according to the barcode encoding rules.
7. An electric energy meter calibration device, characterized in that: The device comprises: An acquisition module, used to acquire an image of an electric energy meter obtained by photographing the electric energy meter, and to acquire a standard calibration image obtained by photographing the metering calibration instrument; A determination module is used to preprocess the electric energy meter image, remove interference from the preprocessed electric energy meter image, and then perform binarization processing; use a contour search function and a contour drawing function to draw a projection curve of the electric energy meter image after the binarization processing to obtain the electric energy meter contour in the electric energy meter image; according to the projection curve, use an image processing algorithm to calculate the length of the electric energy meter contour; and determine the electric energy meter model based on the length of the electric energy meter contour; an identification module, configured to identify the dial indication of the electric energy meter in the electric energy meter image according to the position of the digital display area corresponding to the electric energy meter model by using a neural network model trained based on a machine learning framework to obtain a first measurement result; The recognition module is further used to use the neural network model to recognize the dial reading of the metrology calibration instrument in the standard calibration image to obtain a second measurement result; The determination module is further used to determine the electric energy meter verification result according to the first measurement result and the second measurement result; Among them, the verification result of the electric energy meter includes qualified and unqualified; if the absolute error or relative error between the first measurement result and the second measurement result does not exceed the set threshold, the verification result of the electric energy meter is qualified, and it is determined that the measurement of the electric energy meter is accurate; if the absolute error or relative error between the first measurement result and the second measurement result exceeds the set threshold, the verification result of the electric energy meter is unqualified, and it is determined that the measurement of the electric energy meter is inaccurate.
8. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Kilowatt-hour meter image automatic identification method
CN102236788A
Verification monitoring system for electric energy meter calibration device
CN109975740A
Power distribution cabinet dial plate nixie tube visual identification method based on deep learning
CN113139541A