Method and device for detecting display function defects of electric energy meter
By constructing a standard image template library of electricity meter and comparing the front images of the electricity meter captured, the problem that the existing technology cannot detect the defects in the electricity meter display function is solved, and accurate detection of the electricity meter display function and monitoring of the changes in the electricity meter display content are realized.
Patent Information
- Application Number
- CN202411806319.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-10
- Publication Date
- 2025-06-24
AI Technical Summary
The prior art cannot detect whether the power meter can display the specified content according to the settings, and cannot detect whether the display content changes of the display screen and the indicator light changes are correct.
The template library is constructed by determining at least one standard image template corresponding to each functional mode according to the display status and indicator status of the power meter in preset different functional modes. Then, the power meter is controlled to run different functional modes in sequence, determine the target shooting frequency in each functional mode, and take the front image of the power meter according to the target shooting frequency. Finally, the front image of the power meter taken in each functional mode is compared with the standard image template corresponding to the functional mode in the template library to identify the display function defects of the power meter.
It realizes accurate detection of the display function of the power meter, can detect whether the power meter can display the specified content according to the settings, and detect whether the display content changes of the display screen and the indicator light changes are correct.
Smart Images

Figure CN120195609A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of electric energy meters, and particularly relates to a method and device for detecting display function defects of electric energy meters. Background Art
[0002] With the wide use of smart electric energy meters in the State Grid, the quality of electric energy meters needs to reach a relatively high standard. In order to ensure the qualified rate of electric energy meters when leaving the factory, it is necessary to conduct appearance inspections on them.
[0003] In an electric energy meter, the display screen and indicator lights are the main areas for displaying information and the most important positions for users to read information. If there are display quality problems, it will significantly and seriously affect the user experience and usage. During production and transportation, due to external extrusion and collision, internal welding, etc., various quality problems may occur in the display screen and indicator lights, such as the display screen not lighting up, character display defects, screen breakage, the indicator lights not lighting up or having insufficient brightness, etc.
[0004] In the related art, the common appearance inspections of electric energy meters are mainly divided into manual quality inspection and machine vision. Manual quality inspection has problems such as low efficiency, high cost, and the accuracy decreasing with the increase of working hours. And the machine vision detection algorithms currently used in industrial sites can only achieve full-display detection of the display screen and lighting detection of the indicator lights, and cannot detect whether the electric energy meter can display the specified content according to the settings. Summary of the Invention
[0005] In view of this, embodiments of the present invention provide a method and device for detecting display function defects of electric energy meters to solve the problem in the prior art that it is impossible to detect whether the electric energy meter can display the specified content according to the settings.
[0006] The first aspect of the embodiments of the present invention provides a method for detecting display function defects of electric energy meters, and the method includes:
[0007] Determine at least one standard image template corresponding to each function mode according to the display screen state and indicator light state of the electric energy meter in preset different function modes, and construct a template library;
[0008] Control the electric energy meter to run different function modes in sequence;
[0009] In each function mode, determine the target shooting frequency, and according to the target shooting frequency, shoot at least one front image of the electric energy meter;
[0010] Compare the front image of the electric energy meter taken in each function mode with the standard image template corresponding to this function mode in the template library, and identify the display function defects of the electric energy meter according to the comparison result.
[0011] In combination with the first aspect, in a possible implementation manner of the first aspect, determining at least one standard image template corresponding to each function mode according to the display screen state and the indicator light state of the electric energy meter in preset different function modes, and constructing a template library, including:
[0012] In each function mode, determine the number of display screen states and the number of indicator light states;
[0013] Combine different display screen states and indicator light states, and obtain the front image of the electric energy meter corresponding to each combination;
[0014] According to the front image of the electric energy meter corresponding to each combination in each function mode, obtain at least one standard image template corresponding to each function mode;
[0015] Construct a template library according to the standard image templates in various function modes.
[0016] In combination with the first aspect, in a possible implementation manner of the first aspect, in each function mode, determine the target shooting frequency, and according to the target shooting frequency, shoot at least one front image of the electric energy meter, including:
[0017] If the number of display screen states and the number of indicator light states in a certain function mode are both one, then shoot one front image of the electric energy meter;
[0018] If the number of display screen states and / or the number of indicator light states in a certain function mode is not one, then determine the target shooting frequency according to the change frequency of the display screen state and / or the change frequency of the indicator light state, so that the camera can shoot at least one front image of the electric energy meter including each display screen state and indicator light state according to the target shooting frequency.
[0019] In combination with the first aspect, in a possible implementation manner of the first aspect, comparing the front image of the electric energy meter shot in each function mode with the standard image template corresponding to this function mode in the template library, and identifying the display function defect of the electric energy meter according to the comparison result, including:
[0020] For each standard image template corresponding to this function mode, respectively perform a consistency comparison with each front image of the electric energy meter shot in this function mode to obtain the comparison result;
[0021] If the comparison result shows that each standard image template has a consistent front image of the electric energy meter, then determine that the electric energy meter has no display function defect;
[0022] If the comparison result shows that any one standard image template has no consistent front image of the electric energy meter, then determine that the electric energy meter has a display function defect.
[0023] Combined with the first aspect, in a possible implementation manner of the first aspect, for each standard image template corresponding to the function mode, it is respectively compared with each front image of the electric energy meter taken in this function mode to obtain the comparison result, including:
[0024] Preprocess the standard image template and the front image of the electric energy meter;
[0025] Determine the display screen area and the indicator light area in the standard image template, and the display screen area and the indicator light area in the front image of the electric energy meter;
[0026] Perform a consistency comparison on the display screen areas of the standard image template and the front image of the electric energy meter to obtain a first comparison result;
[0027] Perform a consistency comparison on the indicator light areas of the standard image template and the front image of the electric energy meter to obtain a second comparison result;
[0028] Based on the first comparison result and the second comparison result, obtain the comparison result.
[0029] Combined with the first aspect, in a possible implementation manner of the first aspect, the preprocessing of the standard image template and the front image of the electric energy meter includes:
[0030] Perform grayscale processing on the standard image template and the front image of the electric energy meter to convert the color image into a grayscale image;
[0031] Perform filtering denoising and binarization processing on the grayscale image.
[0032] Combined with the first aspect, in a possible implementation manner of the first aspect, the performing a consistency comparison on the display screen areas of the standard image template and the front image of the electric energy meter to obtain a first comparison result includes:
[0033] Perform size matching and position alignment on the display screen areas of the standard image template and the front image of the electric energy meter;
[0034] Subtract the corresponding pixel points of the display screen areas of the standard image template and the front image of the electric energy meter to obtain the first comparison result.
[0035] Combined with the first aspect, in a possible implementation manner of the first aspect, the performing a consistency comparison on the indicator light areas of the standard image template and the front image of the electric energy meter to obtain a second comparison result includes:
[0036] Perform size matching and position alignment on the indicator light areas of the standard image template and the front image of the electric energy meter;
[0037] Subtract the pixel points of the indicator light area of the standard image template and the front image of the electricity meter in a one-to-one correspondence to obtain the second comparison result.
[0038] Combined with the first aspect, in a possible implementation manner of the first aspect, before controlling the electricity meter to sequentially operate different function modes, the method further includes:
[0039] Control the display screen of the electricity meter to be fully displayed and the indicator light to be lit.
[0040] Capture an initial front image of the electricity meter.
[0041] Compare the initial front image of the electricity meter with a preset initial standard image template, and judge whether there are device defects in the display screen and indicator light of the electricity meter according to the comparison result.
[0042] A second aspect of the embodiments of the present invention provides a device for detecting display function defects of an electricity meter, and the device includes:
[0043] A building module, configured to determine at least one standard image template corresponding to each function mode according to the display screen state and indicator light state of the electricity meter in preset different function modes, and construct a template library.
[0044] A control module, configured to control the electricity meter to sequentially operate different function modes.
[0045] An execution module, configured to determine a target shooting frequency in each function mode, and shoot at least one front image of the electricity meter according to the target shooting frequency.
[0046] A processing module, configured to compare the front image of the electricity meter captured in each function mode with the standard image template corresponding to this function mode in the template library, and identify the display function defect of the electricity meter according to the comparison result.
[0047] Combined with the second aspect, in a possible implementation manner of the second aspect, the building module is specifically configured to:
[0048] In each function mode, determine the number of display screen states and the number of indicator light states.
[0049] Combine different display screen states and indicator light states, and obtain the front image of the electricity meter corresponding to each combination.
[0050] According to the front image of the electricity meter corresponding to each combination in each function mode, obtain at least one standard image template corresponding to each function mode.
[0051] Construct a template library according to the standard image templates in each function mode.
[0052] In combination with the second aspect, in a possible implementation manner of the second aspect, the execution module is specifically configured to:
[0053] If the number of display screen states and the number of indicator light states in a certain function mode are both one, then capture a front image of the electricity meter;
[0054] If the number of display screen states and / or the number of indicator light states in a certain function mode is not one, then determine the target shooting frequency according to the change frequency of the display screen state and / or the change frequency of the indicator light state, so that the camera can capture at least one front image of the electricity meter containing each display screen state and indicator light state according to the target shooting frequency.
[0055] In combination with the second aspect, in a possible implementation manner of the second aspect, the processing module is specifically configured to:
[0056] For each standard image template corresponding to this function mode, respectively perform a consistency comparison with each front image of the electricity meter captured in this function mode to obtain the comparison result;
[0057] If the comparison result shows that there is a consistent front image of the electricity meter for each standard image template, then determine that the electricity meter has no display function defect;
[0058] If the comparison result shows that there is no consistent front image of the electricity meter for any one standard image template, then determine that the electricity meter has a display function defect.
[0059] In combination with the second aspect, in a possible implementation manner of the second aspect, the processing module is specifically configured to:
[0060] Perform preprocessing on the standard image template and the front image of the electricity meter;
[0061] Determine the display screen area and the indicator light area in the standard image template, and the display screen area and the indicator light area in the front image of the electricity meter;
[0062] Perform a consistency comparison on the display screen areas of the standard image template and the front image of the electricity meter to obtain a first comparison result;
[0063] Perform a consistency comparison on the indicator light areas of the standard image template and the front image of the electricity meter to obtain a second comparison result;
[0064] Based on the first comparison result and the second comparison result, obtain the comparison result.
[0065] In combination with the second aspect, in a possible implementation manner of the second aspect, the processing module is specifically configured to:
[0066] Perform grayscale processing on the standard image template and the front image of the electricity meter, and convert the color image into a grayscale image;
[0067] Perform filtering denoising and binarization processing on the grayscale image.
[0068] In combination with the second aspect, in a possible implementation manner of the second aspect, the processing module is specifically configured to:
[0069] Perform size matching and position alignment on the display screen areas of the standard image template and the front image of the electricity meter;
[0070] Subtract the corresponding pixel points of the display screen areas of the standard image template and the front image of the electricity meter to obtain the first comparison result.
[0071] In combination with the second aspect, in a possible implementation manner of the second aspect, the processing module is specifically configured to:
[0072] Perform size matching and position alignment on the indicator light areas of the standard image template and the front image of the electricity meter;
[0073] Subtract the corresponding pixel points of the indicator light areas of the standard image template and the front image of the electricity meter to obtain the second comparison result.
[0074] In combination with the second aspect, in a possible implementation manner of the second aspect, the processing module is further configured to:
[0075] Control the full display of the display screen of the electricity meter and the lighting of the indicator lights;
[0076] Take an initial front image of the electricity meter;
[0077] Compare the initial front image of the electricity meter with a preset initial standard image template, and judge whether there are device defects in the display screen and indicator lights of the electricity meter according to the comparison result.
[0078] The beneficial effects of the embodiments of the present invention compared with the prior art are:
[0079] In the embodiments of the present invention, considering that in some functional modes of the electricity meter, there may be states of display screen changes and indicator light flashes. In order to accurately detect these states, according to the display screen states and indicator light states of the electricity meter in preset different functional modes, at least one standard image template corresponding to each functional mode is determined, and a template library is constructed. Then, by controlling the electricity meter to run different functional modes in sequence, in each functional mode, a target shooting frequency is determined, and at least one front image of the electricity meter is taken according to the target shooting frequency. The front images of the electricity meter taken in each functional mode are compared with the standard image templates corresponding to this functional mode in the template library, and the display function defects of the electricity meter are identified according to the comparison results. The embodiments of the present invention can accurately detect whether the electricity meter can display the specified content according to the settings, and can also detect whether the changes in the display content of the display screen and the changes in the indicator lights are correct. Brief Description of the Drawings
[0080] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for use in the embodiments or the description of the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained according to these drawings.
[0081] Figure 1 is a schematic flow chart of a method for detecting display function defects of an electricity meter provided by an embodiment of the present invention;
[0082] Figure 2 is a schematic structural diagram of a device for detecting display function defects of an electricity meter provided by an embodiment of the present invention. Detailed Embodiments
[0083] In the following description, specific details such as specific system structures and technologies are proposed for the purpose of illustration rather than limitation, so as to thoroughly understand the embodiments of the present invention. However, those skilled in the art should clearly understand that the present invention can also be implemented in other embodiments without these specific details. In other cases, the detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid unnecessary details from interfering with the description of the present invention.
[0084] In order to illustrate the technical solutions described in the present invention, the following will be illustrated through specific embodiments.
[0085] The electricity meter is used for a lot of control, measurement, and information interaction, and its relevant information is mainly displayed through components such as nameplates, LED indicator lights, and LCD display screens:
[0086] LCD display screen: The main display window of the electricity meter, which can display information such as meter number, user number, voltage, current, maximum power, date, time, total electricity consumption this month, and electricity consumption last month;
[0087] Infrared device: Infrared interface, a communication method for the electricity meter, which can realize functions such as meter reading, time calibration, data management, etc.;
[0088] LED indicator light: Indicates pulse and trip information through lighting, extinguishing and flashing;
[0089] Nameplate: It contains basic intelligent information, such as the name and model of the electricity meter, and also indicates usage information such as the rated maximum current and rated voltage;
[0090] Switch: The information on the LCD screen can be switched by pressing repeatedly.
[0091] Among them, the LCD display screen and the LED indicator light are the main areas for displaying relevant information of the electricity meter. If there are display quality problems, it will significantly and seriously affect the use. Although the manufacturer will strictly check the components of the electricity meter for incoming materials, strictly reject the components that do not meet the requirements and have defects, and resolutely prevent unqualified components from flowing into the production process. In particular, there are stricter incoming inspection standards and supervision for the LED indicator light and the LCD display screen to prevent the possibility of quality problems with the display defects of the electricity meter from the source. However, due to inevitable problems that occur during the storage, internal transportation and installation of the LED indicator light and the LCD display screen, and in addition, since the incoming inspection is manual inspection and cannot ensure that 100% of the components entering production are qualified, some electricity meters may have defects. The main defects include that the LCD screen and the LED light cannot be lit or have insufficient brightness, the LCD screen shows ghost images, incomplete, etc. These display defects will seriously affect the display of the electricity meter's own information and metering information, and affect the quality of the electricity meter and the manufacturer's reputation and brand. Therefore, the detection of finished product display defects and appearance defects of the electricity meter is an extremely important part of the entire electricity meter production process.
[0092] At present, common industrial defect detection methods can be divided into manual quality inspection and machine vision inspection. Among them, manual quality inspection has low efficiency, high cost, and the quality inspectors cannot work continuously for 24 hours. Moreover, the detection accuracy decreases with the increase of working hours. The method of manual quality inspection can no longer meet the needs of modern industrial detection. Therefore, using machine vision technology to detect product defects in industry has become the mainstream method. Using machine vision to detect the appearance quality of electric energy meters can not only save human resources but also has high detection efficiency. Its working principle is to collect object pictures through an industrial camera, upload them to the upper computer for detection, and then return the conclusion, which has higher accuracy and faster detection speed than manual quality inspection. However, the machine vision detection algorithms currently used in industrial sites can only detect character missing on the display screen, screen breakage, and whether the indicator light can be lit. For the electric energy meter after it is in the working state, the machine vision detection algorithms currently used cannot detect whether the display screen can display some specific function contents such as the bottom electricity value of the electric energy meter, and whether the indicator light can correctly change color or blink.
[0093] To solve the above problems, an embodiment of the present invention provides a method for detecting display function defects of an electric energy meter. Refer to Figure 1 As shown in the figure, the method includes:
[0094] Step S101, according to the display screen state and indicator light state of the electric energy meter in preset different function modes, determine at least one standard image template corresponding to each function mode, and construct a template library.
[0095] In this embodiment, the electric energy meter has multiple function modes. Under different function modes, the content displayed on the display screen and the state of the indicator light are not completely the same. For example, in the display character wheel display function of the display screen, the display screen sequentially displays five characters "total", "peak", "flat", "valley", "trough", and the digital characters in the middle area, and it is necessary to detect whether the characters can change correctly. The indicator light also has states such as red, green, yellow, and flashing, corresponding to different working states of the electric energy meter.
[0096] To accurately detect whether the content displayed on the display screen and the state of the indicator light are correct under each function mode, an embodiment of the present invention collects the standard image templates under each function mode. Specifically, under each function mode, determine the number of display screen states and the number of indicator light states; combine different display screen states and indicator light states, and obtain the front image of the electric energy meter corresponding to each combination; according to the front image of the electric energy meter corresponding to each combination under each function mode, obtain at least one standard image template corresponding to each function mode; construct a template library according to the standard image templates under various function modes.
[0097] Exemplarily, assume that in a certain function mode, the display screen state remains unchanged, then the number of display screen states is 1. Assume that the display screen states are the five characters "total", "peak", "crest", "flat", and "valley" that are cyclically displayed, then the number of display screen states is 5. Similarly, assume that in a certain function mode, the indicator light is always green and unchanged, then the number of indicator light states is 1. Assume that the indicator light flashes, then the indicator light includes two states: lit and extinguished, so the number of indicator light states is 2.
[0098] In each function mode, different combinations of display screen states and indicator light states are made, and one front image of the electric energy meter is collected for each combination to ensure that all display screen states and indicator light states are included in the standard image template.
[0099] Step S102, control the electric energy meter to run different function modes in sequence.
[0100] In this embodiment, an efficient and automatic defect detection system for electric energy meters can be designed. Eight smart electric energy meters of the same batch are simultaneously transmitted to the detection position along with the conveyor belt to trigger the image acquisition system to perform image acquisition. Each electric energy meter is connected to the controller through a data interface, which can not only provide power for the electric energy meter to light up the LCD screen and LED lights during the detection of display defects and quality problems, but also control the function mode of the electric energy meter to meet the detection requirements and solve the problem of low efficiency.
[0101] The image acquisition system is the most basic and also the most core component in the electric energy meter display defect quality detection system. Its main components include a light source, a color industrial camera, a lens, and related fixed protection devices, etc. The image acquisition system mainly collects high-quality and high-definition display images of the smart electric energy meter, and judges whether there are defects in the electric energy meter to be detected based on this as the basic basis for image processing and recognition.
[0102] Step S103, in each function mode, determine the target shooting frequency, and according to the target shooting frequency, shoot at least one front image of the electric energy meter.
[0103] In this embodiment, considering that the display screen state and the indicator light state may change, shooting only one front image of the electric energy meter may not be able to detect these states.
[0104] This embodiment collects the front images of the electric energy meter containing each display screen state and indicator light state:
[0105] If the number of display screen states and the number of indicator light states in a certain function mode are both one, then shooting one front image of the electric energy meter is sufficient.
[0106] If the number of display screen states and / or the number of indicator light states in a certain function mode is not one, then according to the change frequency of the display screen state and / or the change frequency of the indicator light state, determine the target shooting frequency, so that the camera can shoot at least one front image of the electricity meter containing each display screen state and indicator light state according to the target shooting frequency.
[0107] Here, assume that the indicator light is lit once per second and the lighting duration is 1 second, then the target shooting frequency can be every 0.5 seconds. In this way, it can be ensured that the images in the lit and extinguished states are captured. The situation of the display screen is similar. When both the display screen state and the indicator light state change, in order to capture the front image of the electricity meter containing each display screen state and indicator light state, the target shooting frequency can be set shorter, and more front images of the electricity meter can be captured. This embodiment does not make specific limitations.
[0108] Step S104, compare the front image of the electricity meter captured in each function mode with the standard image template corresponding to this function mode in the template library, and identify the display function defect of the electricity meter according to the comparison result.
[0109] Here, for each standard image template corresponding to this function mode, respectively perform a consistency comparison with each front image of the electricity meter captured in this function mode to obtain the comparison result; if the comparison result shows that there is a consistent front image of the electricity meter for each standard image template, it is determined that the electricity meter has no display function defect; if the comparison result shows that there is no consistent front image of the electricity meter for any one of the standard image templates, it is determined that the electricity meter has a display function defect.
[0110] It can be understood that only when all the standard image templates corresponding to this function mode can be detected from the front image of the electricity meter, is it considered that the state change is correctly detected. For example, when there are both front images of the electricity meter with the indicator light on and the indicator light off, it can indicate that the indicator light is flashing.
[0111] It can be seen that the embodiment of the present invention takes into account that in some function modes of the electricity meter, there may be states of display screen change and indicator light flashing. In order to accurately detect these states, at least one standard image template corresponding to each function mode is determined according to the display screen state and indicator light state of the electricity meter in different preset function modes, and a template library is constructed; then, by controlling the electricity meter to run different function modes in sequence, in each function mode, determine the target shooting frequency, and according to the target shooting frequency, shoot at least one front image of the electricity meter; compare the front image of the electricity meter captured in each function mode with the standard image template corresponding to this function mode in the template library, and identify the display function defect of the electricity meter according to the comparison result. The embodiment of the present invention can accurately detect whether the electricity meter can display the specified content according to the setting, and can also detect whether the change of the display content of the display screen and the change of the indicator light are correct.
[0112] In one embodiment, for the consistency comparison between the standard image template and the front image of the electricity meter, the following method can be adopted in this embodiment:
[0113] (1) Preprocess the standard image template and the front image of the electricity meter.
[0114] The preprocessing includes: performing grayscale processing on the standard image template and the front image of the electricity meter to convert the color image into a grayscale image; performing filtering denoising and binarization processing on the grayscale image.
[0115] The images collected by industrial cameras have a large amount of information and contain a lot of noise, occupying a large storage space and being difficult to transmit. Color industrial cameras increase the difficulty of direct processing. Grayscale processing can remove the color information of the image while retaining the brightness information of the image, ensuring that the chromaticity and brightness level distribution characteristics of the processed image are consistent with the original image before processing, and greatly reducing the computational amount required for subsequent image processing. A grayscale image is an image without color, and it only has change information in brightness, but it can still reflect the chromaticity and brightness level distribution and characteristics of the original image collected.
[0116] The original images collected by the image acquisition system have image noise, and at the same time, the process of grayscale processing and the transmission stage may also cause the image to be contaminated by noise, ultimately affecting the judgment results of the machine vision system. Therefore, it is necessary to perform denoising processing on the image. The denoising processing not only avoids the interference of image noise on defect detection, but also highlights the features required for detection, weakens the unnecessary features, and makes the processed picture meet the processing requirements of the machine vision system.
[0117] After image denoising, binarization processing will be performed, converting it into a black-and-white image with only 0 or 255 grayscale values after grayscale processing. After binarization, the useless information contained in the image is reduced, the subsequent image data processing amount decreases, and at the same time, the contour of the area of interest can be more clearly shown, which is beneficial to the further processing of the image.
[0118] (2) Determine the display screen area and the indicator light area in the standard image template, and the display screen area and the indicator light area in the front image of the electricity meter.
[0119] (3) Compare the consistency of the display screen areas of the standard image template and the front image of the electricity meter to obtain the first comparison result.
[0120] Here, first, the size matching and position alignment are performed on the display area of the standard image template and the front image of the electricity meter. Due to factors such as mechanical positioning accuracy and equipment vibration, there are slight differences in the spatial positions of the images collected each time. The main differences are translation and rotation. If the images are not registered, these differences will affect the determination result. To eliminate this influence, the images must be registered, that is, aligned in space. Template matching is a commonly used method for target detection and recognition. The basic idea is to use the standard target image as a template and slide the template pixel by pixel in the image to be inspected, so that the image to be inspected is consistent with the template in spatial position, and then machine recognition begins. After image preprocessing and registration processing, the images can meet the conditions required for subtraction operations, that is, the picture sizes correspond equally, and the corresponding pixel points are at the same position coordinates. This ensures the accuracy of the processing results.
[0121] Then, the pixel points of the display area of the standard image template and the front image of the electricity meter are subtracted from each other correspondingly to obtain the first comparison result, that is, the difference image. The difference information of the images contained in different difference images can be used to monitor the changing or moving objects.
[0122] (4) Perform a consistency comparison on the indicator light area of the standard image template and the front image of the electricity meter to obtain the second comparison result.
[0123] The implementation method of this step is similar to that of step (3), and will not be elaborated here.
[0124] (5) Obtain the comparison result based on the first comparison result and the second comparison result.
[0125] Here, a consistency comparison is performed on the display area and the indicator light area respectively. If the two areas are the same, it is considered that the standard image template and the front image of the electricity meter are the same.
[0126] In this embodiment, through the consistency comparison, the correctness of the display content of the display screen of the indicator light, the correctness of the on / off and color of the indicator light, and the correctness of the changes of the display screen and the indicator light can be detected, so as to achieve the purpose of accurately detecting whether the electricity meter can display the specified content according to the settings.
[0127] In one embodiment, before controlling the electricity meter to run different function modes in sequence, it may further include:
[0128] Control the display screen of the electricity meter to be fully displayed and the indicator light to be lit;
[0129] Take the initial front image of the electricity meter;
[0130] Compare the initial front image of the electricity meter with the preset initial standard image template, and judge whether there are device defects in the display screen and indicator light of the electricity meter according to the comparison result.
[0131] Here, by controlling the full display of characters on the display screen and the constant lighting of the indicator lights during startup initialization, it is mainly used to detect device problems such as missing characters in the display screen, screen failures, and indicator light failures. The comparison method can still adopt the above-mentioned consistency comparison method.
[0132] It should be understood that the magnitudes of the sequence numbers of the steps in the above embodiments do not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
[0133] Figure 2 It is a schematic structural diagram of an electric energy meter display function defect detection device 20 provided by an embodiment of the present invention. The device includes:
[0134] A building module 21, configured to determine at least one standard image template corresponding to each function mode according to the display screen state and the indicator light state of the electric energy meter in preset different function modes, and construct a template library.
[0135] A control module 22, configured to control the electric energy meter to sequentially operate different function modes.
[0136] An execution module 23, configured to determine a target shooting frequency in each function mode, and shoot at least one front image of the electric energy meter according to the target shooting frequency.
[0137] A processing module 24, configured to compare the front image of the electric energy meter captured in each function mode with the standard image template corresponding to this function mode in the template library, and identify the display function defect of the electric energy meter according to the comparison result.
[0138] As a possible implementation manner, the building module 21 is specifically configured to:
[0139] In each function mode, determine the number of display screen states and the number of indicator light states;
[0140] Combine different display screen states and indicator light states, and obtain the front image of the electric energy meter corresponding to each combination;
[0141] According to the front image of the electric energy meter corresponding to each combination in each function mode, obtain at least one standard image template corresponding to each function mode;
[0142] Construct a template library according to the standard image templates in each function mode.
[0143] As a possible implementation manner, the execution module 23 is specifically configured to:
[0144] If the number of display screen states and the number of indicator light states in a certain function mode are both one, then shoot one front image of the electric energy meter;
[0145] If the number of display screen states and / or the number of indicator light states in a certain function mode is not one, determine the target shooting frequency according to the change frequency of the display screen state and / or the change frequency of the indicator light state, so that the camera can shoot at least one front image of the electricity meter containing each display screen state and indicator light state according to the target shooting frequency.
[0146] As a possible implementation manner, the processing module 24 is specifically configured to:
[0147] For each standard image template corresponding to this function mode, respectively perform consistency comparison with each front image of the electricity meter taken in this function mode to obtain a comparison result;
[0148] If the comparison result shows that there is a consistent front image of the electricity meter for each standard image template, it is determined that the electricity meter has no display function defect;
[0149] If the comparison result shows that there is no consistent front image of the electricity meter for any one of the standard image templates, it is determined that the electricity meter has a display function defect.
[0150] As a possible implementation manner, the processing module 24 is specifically configured to:
[0151] Preprocess the standard image template and the front image of the electricity meter;
[0152] Determine the display screen area and the indicator light area in the standard image template, as well as the display screen area and the indicator light area in the front image of the electricity meter;
[0153] Perform consistency comparison on the display screen areas of the standard image template and the front image of the electricity meter to obtain a first comparison result;
[0154] Perform consistency comparison on the indicator light areas of the standard image template and the front image of the electricity meter to obtain a second comparison result;
[0155] Based on the first comparison result and the second comparison result, obtain the comparison result.
[0156] As a possible implementation manner, the processing module 24 is specifically configured to:
[0157] Perform grayscale processing on the standard image template and the front image of the electricity meter to convert the color image into a grayscale image;
[0158] Perform filtering denoising and binarization processing on the grayscale image.
[0159] As a possible implementation manner, the processing module 24 is specifically configured to:
[0160] Perform size matching and position alignment on the display screen areas of the standard image template and the front image of the electricity meter;
[0161] Subtract the corresponding pixels of the display screen areas of the standard image template and the front image of the electricity meter to obtain a first comparison result.
[0162] As a possible implementation, the processing module 24 is specifically configured to:
[0163] Perform size matching and position alignment on the indicator light areas of the standard image template and the front image of the electricity meter;
[0164] Subtract the corresponding pixels of the indicator light areas of the standard image template and the front image of the electricity meter to obtain a second comparison result.
[0165] As a possible implementation, the processing module 24 is further configured to:
[0166] Control the full display of the display screen of the electricity meter and the lighting of the indicator lights;
[0167] Capture the initial front image of the electricity meter;
[0168] Compare the initial front image of the electricity meter with a preset initial standard image template, and based on the comparison result, determine whether there are device defects in the display screen and indicator lights of the electricity meter.
[0169] It can be seen that the embodiments of the present invention take into account that in some functional modes of the electricity meter, there may be states of display screen changes and indicator light flashes. In order to accurately detect these states, at least one standard image template corresponding to each functional mode is determined according to the display screen state and indicator light state of the electricity meter in preset different functional modes, and a template library is constructed; then, by controlling the electricity meter to sequentially run different functional modes, in each functional mode, a target shooting frequency is determined, and at least one front image of the electricity meter is captured according to the target shooting frequency; the front image of the electricity meter captured in each functional mode is compared with the standard image template corresponding to this functional mode in the template library, and the display function defects of the electricity meter are identified according to the comparison result. The embodiments of the present invention can accurately detect whether the electricity meter can display the specified content according to the settings, and can also detect whether the changes in the display content of the display screen and the changes in the indicator lights are correct.
[0170] In the above embodiments, the descriptions of each embodiment have their own emphases. For parts not detailed or recorded in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.
[0171] Those of ordinary skill in the art can realize that the templates, units, and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented by electronic hardware or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered to exceed the scope of the present invention.
[0172] If the module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, to implement all or part of the processes in the above-described embodiment methods of the present invention, it can also be completed by a computer program instructing relevant hardware. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, it can implement the steps of the above-described embodiments of the method for detecting functional defects of each electric energy meter display. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file, or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disc, computer memory, read-only memory, random access memory, electrical carrier signal, telecommunication signal, and software distribution medium, etc.
[0173] The above-described embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments or perform equivalent replacements for some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention and should all be included in the protection scope of the present invention.
Claims
1. A method for detecting display function defects of an electric energy meter, characterized in that: include: According to the display screen status and indicator light status of the electric energy meter in different preset functional modes, at least one standard image template corresponding to each functional mode is determined, and a template library is constructed; Control the electric energy meter to run different functional modes in sequence; In each functional mode, a target shooting frequency is determined, and at least one front image of the electric energy meter is shot according to the target shooting frequency; The front image of the electric energy meter taken in each functional mode is compared with the standard image template corresponding to the functional mode in the template library, and the display function defects of the electric energy meter are identified according to the comparison results.
2. The method for detecting a display function defect of an electric energy meter according to claim 1, characterized in that: The method of determining at least one standard image template corresponding to each functional mode according to the display screen state and indicator light state of the electric energy meter in different preset functional modes and constructing a template library includes: In each functional mode, determine the number of display screen states and the number of indicator light states; Combine different display screen states and indicator light states, and obtain the front image of the electric energy meter corresponding to each combination; According to the front image of the electric energy meter corresponding to each combination in each functional mode, at least one standard image template corresponding to each functional mode is obtained; A template library is constructed based on various standard image templates in various functional modes.
3. The method for detecting display function defects of an electric energy meter according to claim 2, characterized in that: In each functional mode, determining a target shooting frequency, and shooting at least one front image of the electric energy meter according to the target shooting frequency, comprises: If the number of display screen states and indicator light states in a certain function mode are both one, then take a front image of the energy meter; If the number of display screen states and / or indicator light states in a certain functional mode is not one, the target shooting frequency is determined according to the change frequency of the display screen state and / or the change frequency of the indicator light state, so that the camera can capture at least one front image of the electricity meter containing each display screen state and indicator light state according to the target shooting frequency.
4. The method for detecting display function defects of an electric energy meter according to claim 1, characterized in that: The step of comparing the front image of the electric energy meter taken in each functional mode with the standard image template corresponding to the functional mode in the template library, and identifying the display function defects of the electric energy meter according to the comparison result, includes: For each standard image template corresponding to the functional mode, respectively, a consistency comparison is performed with each front image of the electric energy meter taken under the functional mode to obtain the comparison result; If the comparison result shows that each standard image template has a consistent front image of the electric energy meter, it is determined that the electric energy meter has no display function defect; If the comparison result shows that any standard image template does not have a consistent front image of the electric energy meter, it is determined that the electric energy meter has a display function defect.
5. The method for detecting display function defects of an electric energy meter according to claim 4, characterized in that: The consistency comparison is performed on each standard image template corresponding to the functional mode and each front image of the electric energy meter taken in the functional mode to obtain the comparison result, including: Preprocessing the standard image template and the front image of the electric energy meter; Determine the display screen area and indicator light area in the standard image template, and the display screen area and indicator light area in the front image of the electric energy meter; Performing consistency comparison between the standard image template and the display screen area of the front image of the electric energy meter to obtain a first comparison result; Performing consistency comparison between the standard image template and the indicator light area of the front image of the electric energy meter to obtain a second comparison result; The comparison result is obtained based on the first comparison result and the second comparison result.
6. The method for detecting display function defects of an electric energy meter according to claim 5, characterized in that: The preprocessing of the standard image template and the front image of the electric energy meter includes: Grayscale processing is performed on the standard image template and the front image of the electric energy meter to convert the color image into a grayscale image; The grayscale image is subjected to filtering, denoising and binarization processing.
7. The method for detecting display function defects of an electric energy meter according to claim 5, characterized in that: The performing consistency comparison between the display screen area of the standard image template and the front image of the electric energy meter to obtain a first comparison result includes: Performing size matching and position alignment on the display screen area of the standard image template and the front image of the electric energy meter; The first comparison result is obtained by correspondingly subtracting the pixel points of the display screen area of the standard image template and the front image of the electric energy meter.
8. The method for detecting display function defects of an electric energy meter according to claim 5, characterized in that: The performing consistency comparison between the standard image template and the indicator light area of the front image of the electric energy meter to obtain a second comparison result includes: Performing size matching and position alignment on the standard image template and the indicator light area of the front image of the electric energy meter; The pixel points of the standard image template and the indicator light area of the front image of the electric energy meter are correspondingly subtracted to obtain the second comparison result.
9. The method for detecting display function defects of an electric energy meter according to claim 1, characterized in that: Before controlling the electric energy meter to sequentially operate in different functional modes, the method further includes: Controlling the full display of the display screen and the lighting of the indicator lights of the electric energy meter; Take an initial front image of the electric energy meter; The initial front image of the electric energy meter is compared with a preset initial standard image template, and based on the comparison result, it is determined whether there are device defects in the display screen and indicator light of the electric energy meter.
10. An electric energy meter display function defect detection device, characterized in that: include: Establishing a module, for determining at least one standard image template corresponding to each functional mode according to the display screen state and indicator light state of the electric energy meter in different preset functional modes, and constructing a template library; A control module, used to control the electric energy meter to run different functional modes in sequence; An execution module, used for determining a target shooting frequency in each functional mode, and taking at least one front image of the electric energy meter according to the target shooting frequency; The processing module is used to compare the front image of the electric energy meter taken in each functional mode with the standard image template corresponding to the functional mode in the template library, and identify the display function defects of the electric energy meter according to the comparison result.
Citation Information
Cited By
Method and system for automatically detecting display defects of electric energy meter based on image recognition
CN121616865A