Electric energy meter liquid crystal detection method and system based on image recognition

Through the electric energy meter liquid crystal detection method based on image recognition, the CCD camera and deep neural network are used to automatically detect the electric energy meter liquid crystal, which solves the problems of low manual detection efficiency and large errors, and achieves efficient and accurate liquid crystal detection and data recording.

CN120259227AActive Publication Date: 2025-07-04NINGXIA LGG INSTR CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202510328326.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-19
Publication Date
2025-07-04
Estimated Expiration
2045-03-19

AI Technical Summary

Technical Problem

In the prior art, the testing and verification of the liquid crystal display function of the power meter mainly relies on manual methods, resulting in large labor consumption, long verification cycle, large errors, and the inability to provide effective process records. There is a possibility of verification omissions and errors in the R&D and production stages.

Method used

The liquid crystal detection method based on image recognition is adopted to obtain the liquid crystal image through the CCD camera, and combined with median filtering, sharpening filtering, edge detection and object detection algorithms (such as the YOLO model), the liquid crystal image is preprocessed and segmented, and a deep neural network is used for character block recognition and detection, replacing manual detection.

Benefits of technology

It improves the accuracy and efficiency of liquid crystal detection, reduces manual intervention, shortens the R&D iteration cycle, improves production intelligence, and saves detection data for easy traceability query.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120259227A_ABST
    Figure CN120259227A_ABST
Patent Text Reader

Abstract

The invention discloses an electric energy meter liquid crystal detection method and system based on image recognition, and relates to the technical field of electric energy meter testing. The method combines deep learning, a traditional mode and the specification of the liquid crystal, detects the liquid crystal of the electric energy meter under the condition of ensuring the recognition accuracy, accurately recognizes the deep features and edge features of the liquid crystal, and replaces manual detection of the liquid crystal in the research and development process and the production process, so that the iteration period of a program in research and development is shortened, and the production efficiency is improved. The efficiency in the production process is improved; manual intervention in links is reduced, the production intelligence is improved, abnormity caused by manual errors is eliminated, and the detection accuracy is improved; and images and detection data in the whole detection process are stored, so that later traceability query is convenient to realize.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electricity meter testing, and particularly relates to a method and system for detecting the liquid crystal of an electricity meter based on image recognition. Background Art

[0002] In the field of electricity meters, there is a need for testing and verifying the liquid crystal display function during the R & D stage and production stage of electricity meters. However, at present, the most commonly used method is manual verification. This method not only consumes a large amount of manpower, prolongs the verification cycle, but also requires manual observation and judgment. When the number of display items is large, for example, the number of display items of some electricity meters in the Southern Power Grid can reach several thousand or even tens of thousands, the errors introduced by humans are quite significant, and there may be cases of verification omission or even the possibility of verification errors. Using manual verification during the R & D stage will greatly limit the function verification and software iteration cycle; using manual verification during the production stage will slow down the product output. In addition, the manual verification method cannot provide effective process records, resulting in problems of lack of data support for later data query and anomaly analysis. Summary of the Invention

[0003] The purpose of the present invention is to provide a method and system for detecting the liquid crystal of an electricity meter based on image recognition to improve the above technical problems.

[0004] To achieve the above-mentioned invention purpose, the embodiments of the present invention provide the following technical solutions:

[0005] A method for detecting the liquid crystal of an electricity meter based on image recognition includes:

[0006] Obtain the liquid crystal image of the electricity meter and perform preprocessing to obtain the preprocessed liquid crystal image;

[0007] Segment the preprocessed liquid crystal image to obtain the corresponding single-character blocks and their numbers;

[0008] Based on the numbers, use an image recognition algorithm to sequentially identify and classify each single-character block to obtain the corresponding recognition results; the recognition results include classification results and probabilities; the classification results include characters and numbers;

[0009] Obtain the actual liquid crystal display code of the electricity meter; based on the actual liquid crystal display code and each recognition result, detect each single-character block to obtain the detection results.

[0010] Further, the preprocessing includes:

[0011] Perform median filtering on the liquid crystal image to obtain the first filtered liquid crystal image;

[0012] Set a sharpening convolution kernel, and use a sharpening filter to enhance the first filtered liquid crystal image to obtain a second filtered liquid crystal image;

[0013] Use an edge detection algorithm to process the second filtered liquid crystal image to obtain a liquid crystal edge feature map;

[0014] Use an object detection algorithm to process the liquid crystal edge feature map to obtain the pixel edge positions of the liquid crystal display; the object detection algorithm uses the YOLO model;

[0015] Based on the pixel edge positions, crop the liquid crystal edge feature map to obtain liquid crystal display area image data;

[0016] Perform grayscale processing, normalization, and binarization on the liquid crystal display area image data to obtain a preprocessed liquid crystal image.

[0017] Further, the splitting of the preprocessed liquid crystal image to obtain corresponding single-character blocks includes:

[0018] Perform a first split on the preprocessed liquid crystal image to obtain corresponding liquid crystal split images;

[0019] Perform a second split on multiple liquid crystal split images respectively to obtain corresponding initial single-character blocks;

[0020] Judge that the surrounding pixel values of the N edge pixel points of each initial single-character block are all within the white threshold range; if so, take each initial single-character block as a single-character block and perform sorting and numbering; otherwise, update the liquid crystal image of the watt-hour meter and perform processing.

[0021] Further, the processing process of the first split includes:

[0022] Use a first edge detection algorithm to process the preprocessed liquid crystal image to obtain a liquid crystal edge image;

[0023] Project the preprocessed liquid crystal image and the liquid crystal edge image in the Y-axis direction respectively and perform binarization to obtain a first binarized array and a second binarized array;

[0024] Based on the first binarized array and the second binarized array, calculate a first exclusive OR array;

[0025] Select the pixel points at the middle values of the continuous 0-value intervals in the first exclusive OR array as split points to obtain P split points;

[0026] Based on the P split points, split the preprocessed liquid crystal image and the liquid crystal edge image to obtain corresponding first liquid crystal split images and first liquid crystal edge split images;

[0027] The liquid crystal segmented image includes a first liquid crystal segmented image and a first liquid crystal edge segmented image.

[0028] Further, the process of secondary segmentation includes:

[0029] Project the first liquid crystal segmented image and the first liquid crystal edge segmented image in the X-axis direction respectively and perform binarization to obtain a third binarized value and a fourth binarized array;

[0030] Calculate a second exclusive OR array based on the third binarized value and the fourth binarized array;

[0031] Select the pixel points of the middle value in the continuous 0-value interval of the second exclusive OR array as segmentation points to obtain Q segmentation points;

[0032] Segment the first liquid crystal segmented image based on the Q segmentation points to obtain the corresponding second liquid crystal segmented image, that is, obtain the initial single-character block.

[0033] Further, the image recognition algorithm uses a deep neural network; the deep neural network includes a first convolutional layer to a tenth convolutional layer, a pooling layer, a first fully connected layer, a second fully connected layer, and a classification layer connected in series in sequence.

[0034] Further, obtain the actual liquid crystal display code of the electric energy meter; based on the actual liquid crystal display code and the recognition result, detect each single-character block to obtain a detection result, including:

[0035] Read the actual liquid crystal display code of the electric energy meter through the communication module;

[0036] Group the single-character blocks to obtain M groups of character block groups;

[0037] Based on each classification result, perform hexadecimal encoding on each character block group to obtain M string data;

[0038] Randomly select a string data as the display item to be detected and compare it with the actual liquid crystal display code to obtain a comparison result;

[0039] Calculate the joint probability of the string data and the actual liquid crystal display code based on the comparison result and the probability;

[0040] Judge whether the joint probability is less than the first probability threshold; if so, determine that the detection result is that the display item to be detected passes the test, and re-select a string data for processing;

[0041] Otherwise, judge whether the joint probability is within the probability threshold range. If so, determine that the detection result is that the display item to be detected is a defective item, and re-select a string data for processing; otherwise, determine that the detection result is that the display item to be detected is abnormal and stop the detection.

[0042] Further, the formula for the joint probability is as follows:

[0043] T = (W n * P n + W s * P s ) * R;

[0044] where T represents the joint probability of the string data and the actual liquid crystal display code, W n , W s respectively represent the digital weight parameter and the character weight parameter, P n , P s respectively represent the probabilities that the classification results of the string data are digital and character respectively, and R represents the comparison result.

[0045] An electric energy meter liquid crystal detection system based on image recognition includes:

[0046] A CCD camera for acquiring liquid crystal images;

[0047] A liquid crystal image preprocessing module for preprocessing the liquid crystal image to obtain a preprocessed liquid crystal image;

[0048] A character block segmentation module for segmenting the preprocessed liquid crystal image to obtain corresponding single character blocks and their numbers;

[0049] A character block recognition and classification module for sequentially recognizing and classifying each single character block by using an image recognition algorithm to obtain recognition results;

[0050] An electric energy meter liquid crystal detection module for acquiring the actual liquid crystal display code of the electric energy meter; and detecting each single character block based on the actual liquid crystal display code and the recognition results to obtain detection results.

[0051] The beneficial effects of the present invention are as follows:

[0052] The present invention combines deep learning, traditional methods and the specifications of liquid crystals to detect the liquid crystals of electric energy meters while ensuring the recognition accuracy, accurately recognize the deep features and edge features of the liquid crystals, replace the manual detection of liquid crystals in the R & D process and production process, thereby reducing the iteration cycle of the program in R & D and improving the efficiency in the production process; reducing the manual intervention in the process, enhancing the intelligence of production and eliminating the abnormalities caused by human errors, improving the detection accuracy; saving the images and detection data in the whole detection process, which is convenient for realizing the traceability query in the later stage. Description of the Drawings

[0053] To more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required for use in the embodiments. It should be understood that the following drawings only show certain embodiments of the present invention, and therefore should not be regarded as limiting the scope. For those of ordinary skill in the art, without creative efforts, other related drawings can also be obtained based on these drawings.

[0054] Figure 1 It is the flowchart of the method in the embodiment of the present invention;

[0055] Figure 2 It is the preprocessing flowchart in the embodiment of the present invention;

[0056] Figure 3 It is the structure diagram of the YOLO model and the deep neural network in the embodiment of the present invention;

[0057] Figure 4 It is the schematic diagram of the liquid crystal full display picture in the embodiment of the present invention;

[0058] Figure 5 It is the system structure diagram in the embodiment of the present invention. Detailed implementation manners

[0059] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, rather than all embodiments. Usually, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed present invention, but only represents the selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.

[0060] Please refer to Figure 1 , a method for detecting the liquid crystal of an electric energy meter based on image recognition provided in this embodiment includes:

[0061] S1. Use a CCD camera to obtain the liquid crystal image of the electric energy meter and perform preprocessing to obtain the preprocessed liquid crystal image;

[0062] As Figure 2 shown, the preprocessing includes:

[0063] S101. Use a median filter to perform median filtering on the liquid crystal image to obtain a first filtered liquid crystal image; Select median filtering to remove the noise caused by light changes and reflections in the liquid crystal image and retain the edge features of the liquid crystal image. The Size of the median filter is set to 9, and its better edge features can be retained.

[0064] S102. Set a sharpening convolution kernel, define a sharpening convolution kernel with a positive center value and negative values around the center value, and use a sharpening filter to enhance the first filtered liquid crystal image, increasing the edge information of the first filtered liquid crystal image through convolution operation to obtain a second filtered liquid crystal image; the depths of the first filtered liquid crystal image and the second filtered liquid crystal image are the same. Among them, the positive number is 7 and the negative number is -1.

[0065] S103. Use an edge detection algorithm to perform feature processing on the second filtered liquid crystal image, extract the corresponding edge information, and obtain a liquid crystal edge feature map with clearer and more prominent edge features, further improving the positioning accuracy of the target detection algorithm; the edge detection algorithm in S102 uses a sobel operator.

[0066] S104. Use a target detection algorithm to process the liquid crystal edge feature map to obtain the pixel edge position of the liquid crystal display;

[0067] As Figure 3 shown, the target detection algorithm uses a YOLO model to detect the edge of the liquid crystal screen of the electric energy meter. The YOLO model includes a cascaded convolution module, a fully connected module, and a max pooling layer Maxpool; the convolution module includes Q convolutional layers, namely convolutional layer Conv1 to convolutional layer ConvQ connected in series in sequence; the fully connected module includes a fully connected layer FC1 and a fully connected layer FC2 connected in series in sequence. The output dimensions of the fully connected layer FC1 and the fully connected layer FC are 8*8*16.

[0068] In this embodiment, the value of Q is 20. Among them, since the convolution kernel sizes of convolutional layer Conv8, convolutional layer Conv11, convolutional layer Conv14, convolutional layer Conv17, and convolutional layer Conv20 are 1*4 and the strides are all 1, rectangular receptive fields are generated. The convolution kernels of the remaining convolutional layers are all 3*4 and the strides are all 1.

[0069] The processing process of the YOLO model is as follows:

[0070] Input the liquid crystal edge feature map into the convolution module to extract features such as edges and textures, and obtain the corresponding deep liquid crystal feature representation;

[0071] Input the deep liquid crystal feature representation into the fully connected module for integration and mapping to obtain a liquid crystal mapped feature representation;

[0072] Input the liquid crystal mapped feature representation into the max pooling layer Maxpool to select the most significant features and obtain the initial pixel edge position, which can further reduce the amount of calculation and the risk of overfitting;

[0073] Convert the initial pixel edge position to obtain four pixel coordinate points that are the same size as the liquid crystal image, namely the pixel edge position.

[0074] S105. Based on the pixel edge position, crop the liquid crystal edge feature map to obtain liquid crystal cropped image data, that is, the image of the liquid crystal display area of the electricity meter.

[0075] S106. Perform grayscale processing, normalization, and binarization on the liquid crystal cropped image data to obtain the preprocessed liquid crystal image. When normalizing the liquid crystal cropped image data, it is necessary to normalize the liquid crystal cropped image data according to the liquid crystal sizes of different specifications to ensure that the obtained image data has the same size.

[0076] Since the test standard liquid crystal size is 60mm * 19mm, it is necessary to normalize the grayscale processed liquid crystal cropped image data to the 60mm * 19mm standard size. Since the liquid crystal backlight is white and the display font is black, the binarization threshold is set to 127.

[0077] In one embodiment, build an electricity meter test rack and hang no more than 32 electricity meters on it. Assemble corresponding robotic arms for each electricity meter hung on the electricity meter test table. Each robotic arm is controlled by the upper computer and moves to the specified position according to the instructions transmitted by the upper computer. The specified position is based on the center of the liquid crystal display and is parallel and facing the benchmark. After each robotic arm moves to the specified position, wait for the upper computer to transmit the detection instruction. After each robotic arm receives the corresponding detection instruction, control the communication module through the upper computer to turn on the liquid crystal backlight and control the electricity meter to display the specified content to be tested. The upper computer sends an operation instruction to the CCD camera, and image acquisition is performed through the CCD camera. The specified image output format is 300 DPI to obtain the corresponding liquid crystal image. The communication module can adopt RS485.

[0078] All models of electricity meters are applicable to this method. In this embodiment, the detection is performed based on the liquid crystals of the Southern Power Grid three-phase meters and single-phase meters, as Figure 4 shown.

[0079] S2. Based on the segmentation rules, segment the preprocessed liquid crystal image to obtain the corresponding single-character blocks and their numbers, including:

[0080] S201. Perform a first segmentation on the preprocessed liquid crystal image to obtain the corresponding liquid crystal segmented image.

[0081] The S201 includes:

[0082] Process the preprocessed liquid crystal image using the first edge detection algorithm to obtain a liquid crystal edge image; the first edge detection algorithm uses the Canny operator. The sizes of the preprocessed liquid crystal image X1 and the liquid crystal edge image X2 are both M1*N1 pixel points.

[0083] Project the preprocessed liquid crystal image and the liquid crystal edge image in the Y-axis direction and perform binarization respectively to obtain a first binarized array and a second binarized array; the formula for projection in the Y-axis direction is:

[0084]

[0085] where ∑(·) represents the summation function, and i and j represent the row index value and the column index value respectively. respectively represent the sum of the pixels of all columns in the i-th row of the preprocessed liquid crystal image X1 and the liquid crystal edge image X2, and X1(i,j) and X2(i,j) respectively represent the pixel values of the j-th column in the i-th row of the preprocessed liquid crystal image X1 and the liquid crystal edge image X2.

[0086] Process the preprocessed liquid crystal image and the liquid crystal edge image according to the projection formula to obtain the corresponding one-dimensional array and one-dimensional edge array;

[0087] Based on the first threshold, binarize the one-dimensional array to obtain a first binarized array where the first threshold in this embodiment is 200. If the pixel point of the one-dimensional array is greater than the first threshold, the pixel value of this pixel point is normalized to 1; in other cases, the pixel value corresponding to this pixel point is normalized to 0.

[0088] Based on the second threshold, binarize the one-dimensional edge array to obtain a second binarized array where the second threshold in this embodiment is If the pixel point of the one-dimensional edge array is greater than the second threshold, the pixel value corresponding to this pixel point is normalized to 1; in other cases, the pixel value corresponding to this pixel point is normalized to 0. Max represents the maximum value function.

[0089] Based on the first binarized array and the second binarized array, calculate the first exclusive OR array H xor (i), that is represents the exclusive OR process.

[0090] Select the pixel point of the middle value of the continuous 0-value interval in the first exclusive OR array H xor (i) as the cut point to obtain P cut points;

[0091] Based on P segmentation points, segment the preprocessed liquid crystal image and the liquid crystal edge image to obtain the corresponding first liquid crystal segmented image and the first liquid crystal edge segmented image;

[0092] The liquid crystal segmented images include the first liquid crystal segmented image and the first liquid crystal edge segmented image.

[0093] S202. Perform secondary segmentation on multiple liquid crystal segmented images respectively to obtain the corresponding initial single-character blocks;

[0094] The S202 includes:

[0095] Perform projections on the first liquid crystal segmented image and the first liquid crystal edge segmented image in the X-axis direction respectively and perform binarization to obtain the third binarized value and the fourth binarized array;

[0096] Based on the third binarized value and the fourth binarized array, calculate the second exclusive-OR array;

[0097] Select the pixel points of the middle value of the continuous 0-value interval in the second exclusive-OR array as the segmentation points to obtain Q segmentation points;

[0098] Based on the Q segmentation points, segment the first liquid crystal segmented image to obtain the corresponding second liquid crystal segmented image, that is, obtain the initial single-character blocks.

[0099] S202 adopts the same calculations and processing as S201.

[0100] S203. Judge whether the surrounding pixel values of the N edge pixel points of each initial single-character block are all within the white threshold range; if so, take each initial single-character block as a single-character block and perform sorting and numbering; otherwise, use the CCD camera to re-take the liquid crystal image of the electric energy meter and return to S1. Where N≥3.

[0101] S3. Based on the numbers, use an image recognition algorithm to sequentially identify and classify each single-character block to obtain the corresponding recognition results; the recognition results include classification results and probabilities; the classification results include characters and numbers.

[0102] The image recognition algorithm uses a deep neural network to effectively extract image features and perform recognition of numbers and symbols; as Figure 3 shown, the deep neural network includes a first convolutional layer to a tenth convolutional layer, a pooling layer, a first fully connected layer, a second fully connected layer, and a classification layer connected in series in sequence.

[0103] The convolution kernels of the first to tenth convolutional layers are all 3×3, which can extract more hierarchical features from single-character blocks, thereby better capturing the detailed features of symbols and numbers. The stride of the pooling layer is 2, which is used to reduce the size of the feature map, reduce the complexity of subsequent calculations, and prevent overfitting of the network while retaining the main features of the image. The input dimension of the first fully connected layer is 512×7×7, that is, the size of the feature map output by the pooling layer is converted into a one-dimensional vector, which contains 512 feature channels, and the size of each channel is 7×7. The input dimension of the second fully connected layer is 512, and the output dimension is set to 50, corresponding to different recognized character categories (characters and numbers).

[0104] Use the Labelme tool to build a training data set containing labels (symbols and numbers), and pre-train the deep neural network to obtain the trained deep neural network.

[0105] S4. Obtain the actual LCD display code of the electric energy meter; based on the actual LCD display code and each recognition result, detect each single-character block to obtain the detection result, including:

[0106] S401. Read the actual LCD display code of the electric energy meter through the communication module;

[0107] S402. Group the single-character blocks to obtain M groups of character block groups; M takes the value of 4.

[0108] S403. Based on each classification result, perform hexadecimal encoding on each group of character blocks to obtain M string data. For the character blocks with the classification result being characters, they are represented by a one-digit hexadecimal number and filled with 0x0; for the character blocks with the classification character being numbers, they are represented by a one-byte hexadecimal number and filled with 0x0.

[0109] S404. Randomly select a string data as the display item to be detected, and compare it with the actual LCD display code to obtain the comparison result R; when the corresponding part of the display item to be detected and the actual LCD display code is the same, the comparison result R is 1, otherwise the comparison result R is 0;

[0110] When the comparison result R is 0, return to S1. If the comparison result R of the display item to be detected is still 0 in the next round, that is, when the comparison results R of the same display item to be detected in two consecutive rounds are both 0, the detection result of the display item to be detected is an abnormal prompt, and enter S406 to re-select a string data for processing.

[0111] S405. Calculate the joint probability of the string data and the actual LCD display code based on the comparison result and probability;

[0112] The formula for the joint probability is:

[0113] T = (W n * P n + W s * P s ) * R;

[0114] Wherein, T represents the joint probability of the string data and the actual liquid crystal display code, and W n , W s respectively represent the digital weight parameter and the character weight parameter, and P n , P s respectively represent the probabilities that the classification results of the string data are digital and character respectively, and R represents the comparison result.

[0115] S406. Determine whether the joint probability is less than the first probability threshold; if so, determine that the test result of the to-be-tested display item is qualified, and re-select a string data for processing; otherwise, enter S407; the first probability threshold is 95%.

[0116] S407. Determine whether the joint probability is within the probability threshold range; if so, determine that the to-be-tested display item is a defective item, re-select a string data and return to S404; otherwise, determine that the test result of the to-be-tested display item is abnormal, and stop the detection. The probability threshold range is [90%, 95%].

[0117] In this embodiment, the YOLO model and the deep neural network are built by using the OpenCV-python computer vision library and the Pytorch deep learning framework.

[0118] As Figure 5 shown, an electric energy meter liquid crystal detection system based on image recognition includes:

[0119] A CCD camera for acquiring a liquid crystal image;

[0120] A liquid crystal image preprocessing module for preprocessing the liquid crystal image to obtain a preprocessed liquid crystal image;

[0121] A character block segmentation module for segmenting the preprocessed liquid crystal image to obtain corresponding single character blocks and their numbers;

[0122] A character block recognition and classification module for sequentially recognizing and classifying each single character block by using an image recognition algorithm to obtain a recognition result;

[0123] An electric energy meter liquid crystal detection module for acquiring the actual liquid crystal display code of the electric energy meter; and based on the actual liquid crystal display code and the recognition result, detecting each single character block to obtain a detection result;

[0124] The present invention further includes a storage module for all data during the entire detection process.

[0125] In summary, the present invention combines deep learning, traditional methods, and the specifications of liquid crystals to detect the liquid crystals of electric energy meters while ensuring the recognition accuracy, accurately identifying the deep features and edge features of the liquid crystals, replacing the manual detection of liquid crystals during the R & D process and production process, thereby reducing the iteration cycle of the program in R & D and improving the efficiency during the production process; reducing the manual intervention in the process, enhancing the intelligence of production and eliminating the abnormalities caused by human errors, improving the detection accuracy; saving the images and detection data during the entire detection process, facilitating the realization of traceability queries in the later stage.

[0126] The above is only the specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention can easily think of changes or substitutions, which should all be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.

Claims

1. A method for detecting the liquid crystal of an electric energy meter based on image recognition, characterized in that, Including: Obtain the liquid crystal image of the electric energy meter and perform preprocessing to obtain the preprocessed liquid crystal image; Segment the preprocessed liquid crystal image to obtain the corresponding single-character blocks and their numbers; Based on the numbers, use an image recognition algorithm to sequentially recognize and classify each single-character block to obtain the corresponding recognition results; the recognition results include classification results and probabilities; the classification results include characters and numbers; Obtain the actual liquid crystal display code of the electric energy meter; Based on the actual liquid crystal display code and each recognition result, detect each single-character block to obtain the detection result.

2. The method for detecting the liquid crystal of an electric energy meter based on image recognition according to claim 1, wherein The preprocessing includes: Perform median filtering on the liquid crystal image to obtain the first filtered liquid crystal image; Set a sharpening convolution kernel and use a sharpening filter to enhance the first filtered liquid crystal image to obtain the second filtered liquid crystal image; Use an edge detection algorithm to perform feature processing on the second filtered liquid crystal image to obtain a liquid crystal edge feature map; Use an object detection algorithm to process the liquid crystal edge feature map to obtain the pixel edge position of the liquid crystal display; the object detection algorithm uses the YOLO model; Based on the pixel edge position, crop the liquid crystal edge feature map to obtain the liquid crystal display area image data; Perform grayscale processing, normalization, and binarization on the liquid crystal display area image data to obtain the preprocessed liquid crystal image.

3. The method for detecting the liquid crystal of an electric energy meter based on image recognition according to claim 1, characterized in that The segmentation of the preprocessed liquid crystal image to obtain the corresponding single-character blocks includes: Perform a first segmentation on the preprocessed liquid crystal image to obtain the corresponding liquid crystal segmented images; Perform a second segmentation on multiple liquid crystal segmented images respectively to obtain the corresponding initial single-character blocks; Judge whether the surrounding pixel values of the N edge pixel points of each initial single-character block are all within the white threshold range; if so, take each initial single-character block as a single-character block and perform sorting and numbering; otherwise, update the liquid crystal image of the electric energy meter and perform processing.

4. The method for detecting the liquid crystal of an electric energy meter based on image recognition according to claim 3, wherein The processing process of the first segmentation includes: Use a first edge detection algorithm to process the preprocessed liquid crystal image to obtain a liquid crystal edge image; Perform projections on the preprocessed liquid crystal image and the liquid crystal edge image in the Y-axis direction respectively and perform binarization to obtain a first binarized array and a second binarized array; Based on the first binarized array and the second binarized array, calculate a first exclusive OR array; Select the pixel points at the middle values of the continuous 0-value intervals in the first exclusive OR array as segmentation points to obtain P segmentation points; Based on the P segmentation points, segment the preprocessed liquid crystal image and the liquid crystal edge image to obtain the corresponding first liquid crystal segmented image and the first liquid crystal edge segmented image; The liquid crystal segmented images include the first liquid crystal segmented image and the first liquid crystal edge segmented image.

5. The method for detecting the liquid crystal of an electric energy meter based on image recognition according to claim 3, wherein The processing process of the second segmentation includes: Perform projections on the first liquid crystal segmented image and the first liquid crystal edge segmented image in the X-axis direction respectively and perform binarization to obtain a third binarized value and a fourth binarized array; Based on the third binarized value and the fourth binarized array, calculate a second exclusive OR array; Select the pixel points at the middle values of the continuous 0-value intervals in the second exclusive OR array as segmentation points to obtain Q segmentation points; Based on Q segmentation points, segment the first liquid crystal segmented image to obtain the corresponding second liquid crystal segmented image, that is, obtain the initial single-character block.

6. The method for detecting the liquid crystal of an electric energy meter based on image recognition according to claim 1, characterized in that The image recognition algorithm uses a deep neural network; the deep neural network includes a first convolutional layer to a tenth convolutional layer, a pooling layer, a first fully connected layer, a second fully connected layer, and a classification layer connected in series in sequence.

7. The method for detecting the liquid crystal of an electric energy meter based on image recognition according to claim 1, wherein, Obtain the actual liquid crystal display code of the electric energy meter; Based on the actual liquid crystal display code and the recognition result, detect each single-character block to obtain a detection result, including: Read the actual liquid crystal display code of the electric energy meter through the communication module; Group the single-character blocks to obtain M groups of character block groups; Based on each classification result, perform hexadecimal encoding on each group of character blocks to obtain M string data; Randomly select a string data as the display item to be detected and compare it with the actual liquid crystal display code to obtain a comparison result; Based on the comparison result and probability, calculate the joint probability of the string data and the actual liquid crystal display code; Judge whether the joint probability is less than the first probability threshold; if so, determine that the detection result is that the display item to be detected passes the test, and re-select a string data for processing; Otherwise, judge whether the joint probability is within the probability threshold range. If so, determine that the detection result is that the display item to be detected is a defective item, and re-select a string data for processing; otherwise, determine that the detection result is that the display item to be detected is abnormal, and stop the detection.

8. The method for detecting the liquid crystal of an electric energy meter based on image recognition according to claim 7, wherein The formula for the joint probability is: T = (Wn * Pn + Ws * Ps) * R; Where, T represents the joint probability of the string data and the actual liquid crystal display code, Wn and Ws respectively represent the digital weight parameter and the character weight parameter, Pn and Ps respectively represent the probabilities that the classification results of the string data are digital and character respectively, and R represents the comparison result.

9. An electric energy meter liquid crystal detection system based on image recognition, which is used to implement the electric energy meter liquid crystal detection method based on image recognition according to any one of claims 1 to 8, and is characterized in that, Including: A CCD camera for obtaining a liquid crystal image; A liquid crystal image preprocessing module for preprocessing the liquid crystal image to obtain a preprocessed liquid crystal image; A character block segmentation module for segmenting the preprocessed liquid crystal image to obtain the corresponding single-character block and its number; A character block recognition and classification module for sequentially recognizing and classifying each single-character block using an image recognition algorithm to obtain a recognition result; An electric energy meter liquid crystal detection module for obtaining the actual liquid crystal display code of the electric energy meter; Based on the actual liquid crystal display code and the recognition result, detect each single-character block to obtain a detection result.

Citation Information

Patent Citations

  • Dial digital image reading device and method

    CN103136532A

  • Instrument liquid crystal digit automation segmentation and identification method and system thereof

    CN106960208A

  • Power transmission equipment digital instrument anomaly detection method and system based on character recognition

    CN114529906A

  • Electric energy meter automatic detection system and method based on image recognition

    CN115082776A

  • Liquid crystal digital display instrument reading identification method and system based on deep learning

    CN116665227A