CN115761606A - Box electric energy meter identification method and device based on image processing - Google Patents

Box electric energy meter identification method and device based on image processing Download PDF

Info

Publication number
CN115761606A
CN115761606A CN202211435705.7A CN202211435705A CN115761606A CN 115761606 A CN115761606 A CN 115761606A CN 202211435705 A CN202211435705 A CN 202211435705A CN 115761606 A CN115761606 A CN 115761606A
Authority
CN
China
Prior art keywords
image
meter
electric energy
exponential
energy meter
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211435705.7A
Other languages
Chinese (zh)
Inventor
贺星
余敏琪
王智
黄瑞
刘谋海
肖宇
杨帅
杨静
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
State Grid Corp of China SGCC
State Grid Hunan Electric Power Co Ltd
Metering Center of State Grid Hunan Electric Power Co Ltd
Original Assignee
State Grid Corp of China SGCC
State Grid Hunan Electric Power Co Ltd
Metering Center of State Grid Hunan Electric Power Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by State Grid Corp of China SGCC, State Grid Hunan Electric Power Co Ltd, Metering Center of State Grid Hunan Electric Power Co Ltd filed Critical State Grid Corp of China SGCC
Priority to CN202211435705.7A priority Critical patent/CN115761606A/en
Publication of CN115761606A publication Critical patent/CN115761606A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Image Analysis (AREA)

Abstract

The invention discloses a box electric energy meter identification method and a device based on image processing, wherein the method comprises the following steps: s01, acquiring an image of the box electric energy meter to obtain a meter image; s02, performing single-parameter exponential homomorphic filtering processing on the meter image to perform illumination compensation on the brightness component in the meter image to obtain a filtered image, and approximating a homomorphic filtering function by adopting an exponential high-pass filtering function in the single-parameter exponential homomorphic filtering to form corresponding exponential homomorphic filtering; s03, performing image enhancement on the filtered image based on the global contrast to obtain an enhanced image; and S04, inputting the enhanced image into a pre-trained convolutional neural network model to obtain a meter type identification result and outputting the meter type identification result. The invention has the advantages of simple realization method, low cost, high identification efficiency and precision and the like.

Description

Box electric energy meter identification method and device based on image processing
Technical Field
The invention relates to the technical field of box electric energy meters, in particular to a box electric energy meter identification method and device based on image processing.
Background
As a key electric energy monitoring device, the operation stability of the box electric energy meter is an important link for ensuring the safety, reliability and stability of an electric power system, so that the box electric energy meter needs to be regularly inspected. The box electric energy meter is numerous in quantity and various in category, the traditional box electric energy meter adopts a manual inspection mode, namely, the electric power monitoring equipment is inspected and read by a professional inspector at regular time and fixed point, data are recorded manually, the efficiency is low, the safety is poor, the labor cost is high, the inspection accuracy is difficult to guarantee, and the omission inspection is easy to occur.
The intelligent inspection mode of the inspection robot can solve the problem of traditional manual inspection. Aiming at intelligent inspection of a box electric energy meter, in the prior art, an intelligent inspection robot usually acquires high-quality instrument images through a holder camera, an instrument dial is detected by using a computer vision technology, and results are transmitted to a background server through a wireless network bridge for recording, so that the intelligent degree and efficiency of inspection can be greatly improved. However, the number of the box electric energy meters is large and the box electric energy meters are easily influenced by illumination and environment, the traditional image recognition algorithm is directly suitable for recognizing the box electric energy meters, the recognition accuracy and the recognition efficiency are still low, for example, due to the influence of factors such as illumination and dust, the contrast ratio of a dial plate information area and a dial plate background area is small, even the problem that dial plate information is shielded possibly exists, and the dial plate information is difficult to recognize. Therefore, it is highly desirable to provide an application scenario applicable to the box electric energy meter to realize rapid and accurate identification of the box electric energy meter.
Disclosure of Invention
The technical problem to be solved by the invention is as follows: aiming at the technical problems in the prior art, the invention provides the box electric energy meter identification method and device based on image processing, which have the advantages of simple implementation method, low cost, high identification efficiency and high accuracy.
In order to solve the technical problems, the technical scheme provided by the invention is as follows:
a box electric energy meter identification method based on image processing comprises the following steps:
s01, acquiring an image of the box electric energy meter to obtain a meter image;
s02, carrying out single-parameter exponential homomorphic filtering processing on the meter image to carry out illumination compensation on brightness components in the meter image to obtain a filtered image, wherein the single-parameter exponential homomorphic filtering is performed by adopting an exponential high-pass filtering function to approximate a homomorphic filtering function so as to form corresponding exponential homomorphic filtering;
s03, performing image enhancement on the filtered image based on the global contrast to obtain an enhanced image;
and S04, inputting the enhanced image into a pre-trained convolutional neural network model to obtain a meter type identification result and outputting the meter type identification result.
Further, the step S02 includes:
s201, converting an image of the box electric energy meter from an RGB color space to an HSV color space, carrying out three-channel separation on an HSV color model, and extracting a brightness component of the image;
s202, performing illumination compensation on the brightness component by using the single-parameter exponential homomorphic filtering;
and S203, restoring the current HSV image into an RGB image to obtain a filtered image.
Further, when the single-parameter exponential homomorphic filtering is performed, the following exponential high-pass filtering function is adopted:
Figure BDA0003947143970000021
wherein (u, v) represents the coordinates of the pixel points, r h 、r 1 High frequency gain, low frequency gain, D, respectively 0 And D (u, v) are the cut-off frequency and the distance to the center of the frequency rectangle, respectively.
Further, when the single-parameter exponential homomorphic filtering is performed, the following exponential high-pass filtering function is adopted:
Figure BDA0003947143970000022
wherein, (u, v) represents the coordinates of the pixel points, and K is a single parameter.
Further, the step S03 includes:
s301, counting the number of pixels with the same gray level in the filtered image to obtain the frequency of each pixel with the gray level in the image;
s302, calculating gray scale measurement between each pixel point and all other pixel points in the image;
and S303, taking the gray scale measurement of the pixels with the same gray scale as the gray scale values of all pixel points on the corresponding gray scale to obtain the image after renormalization.
Further, in step S302, the distance metric between each pixel point and all other pixel points in the image is calculated according to the following formula:
Dis(G m )=f 0 *||G m -G 0 ||+f 1 *||G m -G 1 ||+…f n *||G m -G n ||
wherein f is 0 ~f n Frequency, G, of occurrence of pixel points of 0-n gray levels in an image m Is a pixel point P k Gray value of (D), P k For the kth pixel, m represents the gray level of the pixel, and m belongs to [0,255 ]],Dis(G m ) Is a gray value G m A distance measure of (a);
defining the gray scale metric for the same gray scale pixel from the distance metric as:
Figure BDA0003947143970000023
wherein, gray (G) m ) Is G m Normalized gray values.
Further, the convolutional neural network model is a YOLOX-s convolutional neural network, and a bidirectional feature pyramid network is used for a neck part in the YOLOX-s convolutional neural network.
Further, the bidirectional feature pyramid network includes 3 input feature layers, each feature fusion node in the network weights ω i for each input feature, and a calculation formula output by each fusion node is as follows:
Figure BDA0003947143970000031
Figure BDA0003947143970000032
Figure BDA0003947143970000033
Figure BDA0003947143970000034
where Conv denotes a convolution operation, resize denotes an upsampling or downsampling operation on the input, ω i More than or equal to 0 is learnable weight, i =0,1, \82309, epsilon is a preset value,
Figure BDA0003947143970000035
for the middle feature of the fourth layer in the top-down path,
Figure BDA0003947143970000036
respectively the outputs of the three feature layers,
Figure BDA0003947143970000037
which are inputs to the three feature layers, respectively.
Further, when the convolutional neural network model is trained, the GIOU-Loss is used as a bounding box Loss function, and a GIOU _ Loss calculation formula is specifically as follows:
Figure BDA0003947143970000038
Figure BDA0003947143970000039
wherein A is a predicted rectangular box, B is a real rectangular box, I is the intersection area of A and B, U is the union area of A and B, A is c The minimum circumscribed rectangular area of a and B is shown.
A box electric energy meter recognition device based on image processing comprises:
the acquisition module is used for acquiring an image of the box electric energy meter to obtain a meter image;
the homomorphic filtering module is used for carrying out single-parameter exponential homomorphic filtering processing on the meter image so as to carry out illumination compensation on the brightness component in the meter image and obtain a filtered image, and the single-parameter exponential homomorphic filtering is performed by adopting an exponential high-pass filtering function to approximate a homomorphic filtering function so as to form corresponding exponential homomorphic filtering;
the image enhancement module is used for enhancing the filtered image based on the global contrast to obtain an enhanced image;
the meter identification module is used for inputting the enhanced image into a pre-trained convolutional neural network model to obtain a meter type identification result and outputting the meter type identification result;
or the apparatus comprises a processor and a memory for storing a computer program, the processor being adapted to execute the computer program to perform the method as described above.
Compared with the prior art, the invention has the advantages that:
1. according to the invention, homomorphic filtering processing is carried out on the meter image of the box electric energy meter by adopting single-parameter exponential homomorphic filtering, homomorphic filtering functions are approximated by the exponential high-pass filtering functions to form corresponding exponential homomorphic filtering, illumination compensation is carried out on brightness components in the meter image, then the image enhancement is carried out based on the global contrast, the color contrast of the image is improved, the contrast of a dial plate information area and a dial plate background area is increased, the influence of factors such as illumination, dust and the like on identification and reading can be effectively removed, and finally the processed image is input into a convolutional neural network model, so that rapid and accurate meter type identification can be realized, the workload of visual identification is favorably reduced, the labor cost is reduced, the automatic identification accuracy and efficiency can be effectively improved, and the safe and stable operation of a power grid is further ensured.
2. The invention further adopts the improved YOLOX-s convolutional neural network as the convolutional neural network model, and simplifies the neck part in the YOLOX-s convolutional neural network into 3 input feature layers on the basis of the YOLOX-s convolutional neural network, so that the model training speed can be obviously improved, and the recognition efficiency can be further improved on the premise of ensuring the recognition accuracy.
3. The method adopts a generalized intersection-proportion Loss function GIOU _ Loss to predict the boundary frame Loss function of the target frame coordinate during the convolutional neural network model training, so that the method has the characteristics of nonnegativity, scale invariance and the like and is insensitive to the scale, the prediction frame can move to the target frame under the condition of no overlap, the contact ratio can be better reflected, the method can be suitable for training under any condition, and the recognition precision is further improved.
Drawings
FIG. 1 is a schematic flow chart of a box electric energy meter identification method based on image processing according to the embodiment.
Fig. 2 is a schematic structural diagram of a small bidirectional feature pyramid network adopted in this embodiment.
FIG. 3 is a schematic diagram of the overall structure of the improved YOLOX-s network employed in this embodiment.
Detailed Description
The invention is further described below with reference to the drawings and specific preferred embodiments of the description, without thereby limiting the scope of protection of the invention.
As shown in fig. 1, the steps of the method for identifying the box electric energy meter based on image processing in the embodiment include:
s01, acquiring an image of the box electric energy meter to obtain a meter image;
s02, performing single-parameter exponential homomorphic filtering processing on the meter image to perform illumination compensation on the brightness component in the meter image to obtain a filtered image, and approximating a homomorphic filtering function by adopting an exponential high-pass filtering function in the single-parameter exponential homomorphic filtering to form corresponding exponential homomorphic filtering;
s03, performing image enhancement on the filtered image based on the global contrast to obtain an enhanced image;
and S04, inputting the enhanced image into a pre-trained convolutional neural network model to obtain a meter type identification result and outputting the meter type identification result.
According to the embodiment, homomorphic filtering processing is carried out on the meter image of the box electric energy meter by adopting single-parameter exponential homomorphic filtering firstly, illumination compensation is carried out on brightness components in the meter image, the image enhancement is carried out based on the global contrast, the color contrast of the image is improved, the contrast of the dial plate information area and the dial plate background area is increased, the influence of factors such as illumination and dust on identification and reading can be effectively removed, and finally, the image after the processing is input into the convolutional neural network model, so that the rapid and accurate meter category identification can be realized.
Homomorphic filtering is an image processing method combining frequency filtering and gray scale transformation, and improves the visual quality of an image by compressing the brightness range of the image and enhancing the contrast on the basis of an illumination-reflection model of the image. According to the embodiment, corresponding exponential homomorphic filtering can be formed by approaching homomorphic filtering functions through the exponential high-pass filtering function, illumination compensation can be effectively carried out on brightness components in a meter image, the influence of factors such as illumination and dust on identification is reduced, and on the basis, the background area and the dial information area can be effectively inhibited by combining an image enhancement algorithm based on the global contrast. The method is beneficial to reducing the workload of visual identification and labor cost, and can effectively improve the accuracy and efficiency of automatic identification, thereby ensuring the safe and stable operation of the power grid.
In this embodiment, the specific step of step S02 includes:
s201, converting an image of the box electric energy meter from an RGB color space to an HSV color space, carrying out three-channel separation on an HSV color model, and extracting a brightness component of the image;
s202, illumination compensation is carried out on the brightness component by using single-parameter exponential homomorphic filtering;
and S203, restoring the current HSV image into an RGB image to obtain a filtered image.
In the embodiment, the instrument image is converted into the HSV color space from the RGB color space, the HSV color model is subjected to three-channel separation, the hue and the saturation are kept unchanged, the brightness component of the image is further extracted, the brightness component is subjected to illumination compensation by using the single-parameter exponential homomorphic filtering, and then the HSV image is restored into the RGB image, so that the influence of illumination and pointer shadow on the reading of the box electric energy meter can be effectively reduced, and the identification precision of the box electric energy meter is further improved.
In this embodiment, the homomorphic filtering is to approximate a homomorphic filtering function by using an exponential high-pass filtering function to form a corresponding exponential homomorphic filtering, where the expression of the high-pass filtering function is specifically as follows:
Figure BDA0003947143970000051
the high and low frequencies of the exponential high pass filter are too smooth to allow the processed image to have significant ringing. Multiplying by a high-frequency gain r on the basis of an exponential high-pass filter function h Plus a low frequency gain r 1 The expression is obtained as follows:
Figure BDA0003947143970000052
in this embodiment, the above formula is modified to further optimize to obtain an exponential high-pass filter function, the exponential high-pass filter function is first changed into an exponential low-pass filter function, and since the oscillogram of the low-pass filter transfer function is opposite to the oscillogram of the high-pass filter transfer function, the low-pass filter transfer function is subtracted by 1, and meanwhile, the low-frequency gain is subtracted by the high-frequency gain. c is a sharpening coefficient, the image contrast can be further enhanced, and when n is 2, the optimized transfer function can be obtained:
Figure BDA0003947143970000061
wherein (u, v) represents the coordinates of the pixel points, r h 、r 1 Respectively high frequency gain, low frequency gain, D 0 And D (u, v) are the cut-off frequency and the distance to the center of the frequency rectangle, respectively.
Because the optimized exponential homomorphic filter has more parameters and different image parameter values, the optimal effect can be obtained through a large amount of experiments. In order to reduce the influence of the parameters without influencing the filtering effect, the present embodiment further introduces an exponential function of the sigmoid curve, where the expression is as follows:
Figure BDA0003947143970000062
since the curve of the exponential function is similar to the cross-sectional structure of the homomorphic filter, the present embodiment finally constructs a single-parameter exponential homomorphic filter by combining the exponential function and the homomorphic filter, and the transfer function of the filter is as follows:
Figure BDA0003947143970000063
(u, v) represents the pixel coordinates, and K is a single parameter.
In the transfer function shown in the above equation (5), only the parameter K needs to be controlled, so that the optimal filtering effect can be obtained, and the illumination compensation effect on the brightness component in the meter image is ensured finally.
In this embodiment, the step S03 includes:
s301, counting the number of pixels with the same gray level in the filtered image to obtain the frequency of each gray level pixel in the image;
s302, calculating distance measurement between each pixel point and all other pixel points in the image;
and S303, taking the gray scale measurement of the pixels with the same gray scale as the gray scale values of all pixel points on the corresponding gray scale to obtain the image after renormalization.
Setting a certain pixel point P in the image k Calculating the pixel point P k Distance metric Dis (P) from all other pixels in the image k ) The expression of (c) is:
Dis(P k )=||P k -P 1 ||+||P k -P 2 ||+…||P k -P N || (6)
where N is the number of pixel points.
If P k Gray value of G m M represents the gray level of the pixel point, and m belongs to [0,255 ]]Then the above equation can be reconstructed as follows:
Dis(G m )=f 0 *||G m -G 0 ||+f 1 *||G m -G 1 ||+…f n *||G m -G n || (7)
wherein, f 0 ~f n The frequency of the pixel points with 0-n gray levels appearing in the image.
By integrating the above equation (6), the Gray scale of the pixel point with the same Gray level m and all other pixel points with the same Gray level m can be obtained, i.e. the Gray scale of the pixel point with the same Gray level m is defined as Gray (G) m ):
Figure BDA0003947143970000064
And (3) taking the gray scale measurement of the pixel with the same gray scale as the gray scale value of all the pixel points on the gray scale according to the formula (8), so as to obtain the image after renormalization.
In this embodiment, the number of pixels in the same gray level is counted through a gray level histogram of the image to obtain the frequency f of the gray level pixels appearing in the image, and each pixel P is calculated k Distance measurement Di s (P) with all other pixel points in image k ) And Dis (G) m ) And taking the gray measurement of the pixels with the same gray level as the gray values of all the pixel points on the gray level, finally obtaining the image after renormalization, finishing the image enhancement based on the global contrast, increasing the contrast between the dial information area and the dial background area, restraining the background area, highlighting the information area, and removing the influence of factors such as illumination, dust and the like on identification and reading.
In step S04 of this embodiment, the preprocessed meter image is transmitted into a meter type identification model, and the meter type is identified while the region of interest is segmented. The meter type identification model comprises a lightning arrester monitor, a pressure meter, an oil level meter, a discharge counter and other type information databases. After the meter image is input into a pre-trained meter type identification model, an interested region can be identified, and meanwhile, the interested region is matched with a meter database to determine whether a meter exists in the interested region and determine the type of the meter.
In the embodiment, the meter type identification model adopts a convolutional neural network model, the convolutional neural network model adopts an improved Yolox-s convolutional neural network, and specifically, on the basis of the Yolox-s convolutional neural network, a bidirectional feature pyramid network is used for the neck part in the Yolox-s convolutional neural network. For a YOLOX-s backbone network part, an original network structure is reserved, feature extraction is conducted on three feature layers of a middle layer, a middle-lower layer and a bottom layer at the same time, and then a bidirectional feature pyramid is introduced to strengthen a feature extraction network. However, the conventional bidirectional feature pyramid network has 5 input feature layers, and in this embodiment, the bidirectional feature pyramid network is simplified into 3 input feature layers to form a small bidirectional feature pyramid network, so as to reduce the amount of computation and apply to the YOLOX network. The small bidirectional feature pyramid network structure adopted in the present embodiment is specifically shown in fig. 2. The embodiment performs training by adopting the improved YOLOX-s convolutional neural network, and compared with the traditional neural network, the automatic identification efficiency can be obviously improved.
In the specific application embodiment, when the input size is (640, 3), the three input feature layers of the small bidirectional feature pyramid network are respectively
Figure BDA0003947143970000071
Figure BDA0003947143970000072
Each feature fusion node of the small two-way feature pyramid network respectively weights omega for each input feature i The weights are trained simultaneously using a fast normalization formula. The calculation formula output by each fusion node is as follows:
Figure BDA0003947143970000073
Figure BDA0003947143970000074
Figure BDA0003947143970000075
Figure BDA0003947143970000081
where Conv denotes a convolution operation, resize denotes an upsampling or downsampling operation on the input, ω i More than or equal to 0 is a learnable weight, i =0,1, \82309, epsilon is a preset value (epsilon =0.0001 is a small quantity for ensuring the numerical value to be stable),
Figure BDA0003947143970000082
for the middle feature of the fourth layer in the top-down path,
Figure BDA0003947143970000083
respectively the outputs of the three feature layers,
Figure BDA0003947143970000084
the inputs of the three feature layers are respectively.
The resulting improved integral structure of YOLOX-s of this example is shown in FIG. 3. The small bidirectional feature pyramid network outputs three feature layers with the shapes and sizes of the feature layers after feature extraction
Figure BDA0003947143970000085
Figure BDA0003947143970000086
After the decoupling head is used for predicting, each characteristic layer obtains three prediction results which are respectively the coordinates of the target frame, the foreground and background judgment of the target frame and the category of the target frame, namely, the interested area and the category of the table can be output after network identification.
The traditional Loss function for predicting the foreground and background of the target frame and the category of the target frame is a binary cross Loss function (BCE _ Loss) in the YOLOX network, and this embodiment further improves the boundary frame Loss function for predicting the coordinates of the target frame during the training of the convolutional neural network model, and specifically adopts a generalized cross-over ratio Loss function (GIOU _ Loss). Compared with the conventional intersection ratio (IOU), the generalized intersection ratio (GIOU) is specifically the following characteristics: 1. the method has the characteristics of nonnegativity, scale invariance and the like; 2. GIOU is not scale sensitive; 3. GIOU is the lower bound of the IOU and takes the value of [ -1,1], and due to the introduction of penalty items, the prediction frame can move to the target frame under the condition of no overlap; 4. in addition to focusing on the difference in overlapping regions, GIOU focuses on non-overlapping regions, which better reflects the degree of overlap. From the above, the GIOU _ Loss is 0 only when the prediction box and the real box coincide, and the present embodiment can perform training in any case by using the GIOU _ Loss, compared to the IOU _ Loss.
The calculation formula of the GIOU _ Loss in this embodiment is specifically as follows:
Figure BDA0003947143970000087
Figure BDA0003947143970000088
wherein A is a predicted rectangular box, B is a real rectangular box, I is the intersection area of A and B, U is the union area of A and B, A is c The minimum circumscribed rectangular area of a and B is shown.
In order to verify the effectiveness of the invention, 1083 images of the box electric energy meter are collected as a data set in the specific application embodiment, and the labels include JCQ, pressure _ gauge, oil _ level _ gauge and discharge _ counter, which respectively represent a lightning arrester monitor, a pressure gauge, an oil level gauge and a discharge counter. In order to meet the requirement of data on diversity, the existing data set is subjected to data preprocessing, the breadth and the depth of the data set are expanded, and therefore the robustness of the model is improved. In this embodiment, three image processing measures are selected to randomly change the texture structure and the geometric features of the original image: (1) The image is horizontally mirrored and turned over, so that the invariance of the whole network in the direction is increased; (2) Random salt-pepper noise or Gaussian noise in a certain range is added to the image, so that the invariance of the network to the camera distortion is improved; (3) The brightness of the image is randomly changed, and the meter conditions at different brightness in the same place are simulated. The expanded data set was preprocessed for a total of 7581 sheets. The method uses a tensoflow framework based on a YOLOX-s convolutional neural network, and takes 90% of images in a database as a training set and 10% of images as a testing set. A freezing training method is adopted to improve training efficiency and accelerate convergence, meanwhile, a threshold value is set to be 0.5, the iteration times are set to be 500, a mosaic data enhancement method is adopted for training in the first 90% of iteration processes, and an Adam optimizer is used in the whole process. The freeze phase iterates 100 times, the Batch sample training number (Batch _ size) is set to 32, and the learning rate is 0.0001; the thaw phase iterates 400 times with Batch _ size set to 8 and a learning rate of 0.00001. After training is finished, the system automatically stores parameters of the neural network.
In the testing process, non-maximum inhibition is performed on all the predicted frames, the predicted frames are selected as final prediction results according to the confidence degrees, and 500 pictures in the test set are used for testing the model performance. According to the test result, the method can accurately identify various meters and output the coordinate information (namely the coordinates of the upper left vertex and the coordinates of the lower right vertex of the boundary box) and the category information of the targets in the image, namely the method can obviously improve the automatic identification precision and efficiency of the box electric energy meter.
The box electric energy meter recognition device based on image processing comprises:
the acquisition module is used for acquiring an image of the box electric energy meter to obtain a meter image;
the homomorphic filtering module is used for carrying out single-parameter exponential homomorphic filtering processing on the meter image so as to carry out illumination compensation on the brightness component in the meter image and obtain a filtered image, and the single-parameter exponential homomorphic filtering is performed by adopting an exponential high-pass filtering function to approximate a homomorphic filtering function so as to form corresponding exponential homomorphic filtering;
the image enhancement module is used for carrying out image enhancement on the filtered image based on the global contrast to obtain an enhanced image;
and the meter identification module is used for inputting the enhanced image into a pre-trained convolutional neural network model to obtain a meter type identification result and outputting the meter type identification result.
The box electric energy meter identification device based on image processing in the embodiment corresponds to the box electric energy meter identification method based on image processing one by one, and is not described in detail herein.
In another embodiment, the box electric energy meter identification device based on image processing of the present invention may further be: comprising a processor and a memory for storing a computer program, the processor being adapted to execute the computer program to perform the method as described above.
Before meter classification, firstly processing an instrument image by using single-parameter exponential homomorphic filtering, then enhancing the image based on global contrast, improving the color contrast of the image, removing the influence of factors such as illumination, dust and the like on identification and reading, and finally classifying the input meter image through an improved YOLOX-s convolutional neural network model. The combined use of the methods can improve the speed and the precision of meter identification, thereby improving the quality and the efficiency of routing inspection.
The foregoing is illustrative of the preferred embodiments of the present invention and is not to be construed as limiting the invention in any way. Although the present invention has been described with reference to the preferred embodiments, it is not intended to be limited thereto. Therefore, any simple modification, equivalent change and modification made to the above embodiments according to the technical spirit of the present invention should fall within the protection scope of the technical scheme of the present invention, unless the technical spirit of the present invention departs from the content of the technical scheme of the present invention.

Claims (10)

1. A box electric energy meter identification method based on image processing is characterized by comprising the following steps:
s01, acquiring an image of the box electric energy meter to obtain a meter image;
s02, carrying out single-parameter exponential homomorphic filtering processing on the meter image to carry out illumination compensation on the brightness component in the meter image to obtain a filtered image, wherein corresponding exponential homomorphic filtering is formed by adopting an exponential high-pass filtering function to approximate a homomorphic filtering function in the single-parameter exponential homomorphic filtering;
s03, performing image enhancement on the filtered image based on the global contrast to obtain an enhanced image;
and S04, inputting the enhanced image into a pre-trained convolutional neural network model to obtain a meter type identification result and outputting the meter type identification result.
2. The box electric energy meter identification method based on image processing as claimed in claim 1, wherein the step S02 comprises:
s201, converting an image of the box electric energy meter from an RGB color space to an HSV color space, carrying out three-channel separation on an HSV color model, and extracting a brightness component of the image;
s202, performing illumination compensation on the brightness component by using the single-parameter exponential homomorphic filtering;
and S203, restoring the current HSV image into an RGB image to obtain a filtered image.
3. The box electric energy meter identification method based on image processing as claimed in claim 1, wherein the following exponential high-pass filter function is adopted when performing single-parameter exponential homomorphic filtering:
Figure FDA0003947143960000011
wherein (u, v) represents the coordinates of the pixel points, r h 、r 1 Respectively high frequency gain, low frequency gain, D 0 And D (u, v) is the cut-off frequency and the distance to the center of the frequency rectangle, respectively.
4. The box electric energy meter identification method based on image processing as claimed in claim 1, wherein the following exponential high-pass filter function is adopted when single-parameter exponential homomorphic filtering is carried out:
Figure FDA0003947143960000012
wherein, (u, v) represents the coordinates of the pixel points, and K is a single parameter.
5. The box electric energy meter identification method based on image processing as claimed in claim 1, wherein the step S03 comprises:
s301, counting the number of pixels with the same gray level in the filtered image to obtain the frequency of each pixel with the gray level in the image;
s302, calculating gray scale measurement between each pixel point and all other pixel points in the image;
and S303, taking the gray scale measurement of the pixels with the same gray scale as the gray scale values of all the pixel points on the corresponding gray scale to obtain the image after renormalization.
6. The method for identifying the tank electric energy meter based on the image processing as claimed in claim 5, wherein in the step S302, the distance measure between each pixel point and all other pixel points in the image is calculated according to the following formula:
Dis(G m )=f 0 *||G m -G 0 ||+f 1 *||G m -G 1 ||+…f n *||G m -G n ||
wherein, f 0 ~f n Frequency G of pixel points with 0-n gray levels appearing in image m Is a pixel point P k Gray value of (D), P k For the kth pixel, m represents the gray level of the pixel, and m belongs to [0,255 ]],Dis(G m ) Is a gray value G m A distance measure of (a);
defining the gray scale metric for the same gray scale pixel from the distance metric as:
Figure FDA0003947143960000021
wherein, gray (G) m ) Is G m Normalized gray value.
7. The image processing-based box electric energy meter identification method according to any one of claims 1 to 6, characterized in that the convolutional neural network model is a YOLOX-s convolutional neural network, and a bidirectional feature pyramid network is used for a neck in the YOLOX-s convolutional neural network.
8. The box electric energy meter identification method based on image processing as claimed in claim 7, wherein the bidirectional feature pyramid network comprises 3 input feature layers, each feature fusion node in the network weights ω i to each input feature, and a calculation formula output by each fusion node is as follows:
Figure FDA0003947143960000022
Figure FDA0003947143960000023
Figure FDA0003947143960000024
Figure FDA0003947143960000025
where Conv denotes a convolution operation, resize denotes an up-or down-sampling operation on the input, ω i Not less than 0 is a learnable weight, i=0,1, \82309,. Epsilon. Is a preset value,
Figure FDA0003947143960000026
is an intermediate property of the fourth layer in the top-down path,
Figure FDA0003947143960000027
respectively the outputs of the three feature layers,
Figure FDA0003947143960000028
the inputs of the three feature layers are respectively.
9. The image processing-based box electric energy meter identification method according to claim 7, wherein the GIOU-Loss is adopted as a bounding box Loss function during the convolutional neural network model training, and the GIOU _ Loss calculation formula is specifically as follows:
Figure FDA0003947143960000029
Figure FDA0003947143960000031
wherein A is a predicted rectangular box, B is a real rectangular box, I is the intersection area of A and B, U is the union area of A and B, A is c The minimum circumscribed rectangular area of a and B is shown.
10. The utility model provides a box electric energy meter recognition device based on image processing which characterized in that, the device includes:
the acquisition module is used for acquiring an image of the box electric energy meter to obtain a meter image;
the homomorphic filtering module is used for carrying out single-parameter exponential homomorphic filtering processing on the meter image so as to carry out illumination compensation on the brightness component in the meter image and obtain a filtered image, and the single-parameter exponential homomorphic filtering is performed by adopting an exponential high-pass filtering function to approximate the homomorphic filtering function so as to form corresponding exponential homomorphic filtering;
the image enhancement module is used for enhancing the filtered image based on the global contrast to obtain an enhanced image;
the meter identification module is used for inputting the enhanced image into a pre-trained convolutional neural network model to obtain a meter type identification result and outputting the meter type identification result;
or the apparatus comprising a processor and a memory for storing a computer program, the processor being adapted to execute the computer program to perform the method of any of claims 1 to 9.
CN202211435705.7A 2022-11-16 2022-11-16 Box electric energy meter identification method and device based on image processing Pending CN115761606A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211435705.7A CN115761606A (en) 2022-11-16 2022-11-16 Box electric energy meter identification method and device based on image processing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211435705.7A CN115761606A (en) 2022-11-16 2022-11-16 Box electric energy meter identification method and device based on image processing

Publications (1)

Publication Number Publication Date
CN115761606A true CN115761606A (en) 2023-03-07

Family

ID=85373839

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211435705.7A Pending CN115761606A (en) 2022-11-16 2022-11-16 Box electric energy meter identification method and device based on image processing

Country Status (1)

Country Link
CN (1) CN115761606A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117636075A (en) * 2024-01-25 2024-03-01 江苏省特种设备安全监督检验研究院 Special equipment instrument identification system based on computer vision

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117636075A (en) * 2024-01-25 2024-03-01 江苏省特种设备安全监督检验研究院 Special equipment instrument identification system based on computer vision
CN117636075B (en) * 2024-01-25 2024-05-03 江苏省特种设备安全监督检验研究院 Special equipment instrument identification system based on computer vision

Similar Documents

Publication Publication Date Title
CN106875381B (en) Mobile phone shell defect detection method based on deep learning
CN109635806B (en) Ammeter value identification method based on residual error network
CN111080693A (en) Robot autonomous classification grabbing method based on YOLOv3
CN111563893B (en) Grading ring defect detection method, device, medium and equipment based on aerial image
CN110781885A (en) Text detection method, device, medium and electronic equipment based on image processing
CN113505865B (en) Sheet surface defect image recognition processing method based on convolutional neural network
CN111368825B (en) Pointer positioning method based on semantic segmentation
CN114549981A (en) Intelligent inspection pointer type instrument recognition and reading method based on deep learning
CN110598613B (en) Expressway agglomerate fog monitoring method
CN111507426A (en) No-reference image quality grading evaluation method and device based on visual fusion characteristics
CN115830004A (en) Surface defect detection method, device, computer equipment and storage medium
CN112215217B (en) Digital image recognition method and device for simulating doctor to read film
CN115829995A (en) Cloth flaw detection method and system based on pixel-level multi-scale feature fusion
CN114863189B (en) Intelligent image identification method based on big data
CN115861210A (en) Transformer substation equipment abnormity detection method and system based on twin network
CN116563262A (en) Building crack detection algorithm based on multiple modes
CN117635615B (en) Defect detection method and system for realizing punching die based on deep learning
CN115761606A (en) Box electric energy meter identification method and device based on image processing
CN115272876A (en) Remote sensing image ship target detection method based on deep learning
CN115019201A (en) Weak and small target detection method based on feature refined depth network
CN117557565B (en) Detection method and device for lithium battery pole piece
CN113421223B (en) Industrial product surface defect detection method based on deep learning and Gaussian mixture
CN113705564A (en) Pointer type instrument identification reading method
CN106778822B (en) Image straight line detection method based on funnel transformation
CN112396580A (en) Circular part defect detection method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination