Calculation rate increasing method for defect detection of instrument panel of electric energy meter based on multi-scale mask image dimension reduction
Through multi-scale mask image dimensionality reduction technology, the problem that traditional detection methods are difficult to improve detection speed and versatility at the same time is solved, and efficient image calculation and diversified detection capabilities of the power meter dashboard are achieved.
Patent Information
- Application Number
- CN202411661030.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-20
- Publication Date
- 2025-03-14
AI Technical Summary
Traditional power meter dashboard detection methods are difficult to meet the needs of both detection speed and versatility.
The calculation rate improvement method based on dimensionality reduction of multi-scale mask images is adopted. The target image is obtained through filtering denoising, multi-layer pyramid transformation, multi-scale mask and bilateral filtering, and a mask model is constructed for convolutional calculations, and a one-dimensional function is fitted to detect defects.
It improves the image calculation efficiency of the power meter dashboard, enhances the detection ability of different specifications and display content, reduces the calculation amount, and meets the detection speed and versatility requirements.
Smart Images

Figure CN119624877A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electric energy meter instrument panel detection, and in particular to a method for improving the calculation rate for electric energy meter instrument panel defect detection based on multi-scale mask image dimensionality reduction. Background Art
[0002] For the electric energy meter panel, its factory quality is directly related to the user experience and the market competitiveness of the product. Therefore, the manufacturing industry has very high quality control requirements for the electric energy meter panel. Visual image detection plays a core role in the detection of electric energy meter panels, especially in ensuring the display quality and accuracy of the electric energy meter panel. Through image acquisition, processing and analysis, the automatic detection of the display content of the electric energy meter panel is realized. In the process of automated detection of electric energy meter panels, detection speed and versatility are two key indicators, and traditional detection methods often find it difficult to meet both requirements at the same time. Therefore, it is necessary to study a method for improving the computing rate for panel defect detection that can meet the requirements in terms of both detection speed and versatility. Summary of the invention
[0003] The purpose of this application is to provide a method for improving the computing rate for electric energy meter instrument panel defect detection based on multi-scale mask image dimensionality reduction, so as to solve the problem that traditional detection methods often find it difficult to simultaneously meet the requirements of both detection speed and versatility.
[0004] In order to solve the above technical problems, the present application provides a method for improving the computing rate of electric energy meter instrument panel defect detection based on multi-scale mask image dimensionality reduction, comprising:
[0005] Obtain the original image at each target position of the dashboard;
[0006] Filtering and denoising each of the original images, performing a multi-layer pyramid transformation on each of the original images, and introducing a multi-scale mask;
[0007] Performing bilateral filtering on the edges of each of the original images to obtain a corresponding target image;
[0008] Constructing a mask model corresponding to each of the target images according to the shape information displayed by each of the target images;
[0009] Performing convolution calculation on each of the original images according to the mask model to obtain a corresponding standard value, and fitting each of the standard values into a standard one-dimensional function;
[0010] During detection, convolution is performed on each original image to be detected according to the mask model to obtain a corresponding detection value, and each detection value is fitted into a one-dimensional detection function;
[0011] The difference between the standard one-dimensional function and the detection one-dimensional function is compared, and the defect of the instrument panel is determined according to the difference.
[0012] Based on the above embodiment, as a preferred implementation mode, the convolution calculation formula is:
[0013]
[0014] Among them, I represents the two-dimensional matrix of the original image to be detected, K represents the k*k convolution kernel, i represents the row value of the original image, j represents the column value of the original image, m represents the row value of the processed image, and n represents the column value of the processed image.
[0015] Compared with the prior art, the present invention provides a method for improving the computing rate of defect detection of electric energy meter instrument panels based on multi-scale mask image dimensionality reduction. The method first performs filtering and denoising, multi-layer pyramid transformation, multi-scale masking and bilateral filtering on the original image to obtain a target image, then constructs a mask model, performs convolution calculation to obtain a standard value and then fits it into a standard one-dimensional function. During detection, it is only necessary to perform convolution calculation on each original image to be detected according to the mask model to obtain a corresponding detection value, and fit each detection value into a detection one-dimensional function. By comparing the difference between the curves where the standard one-dimensional function and the detection one-dimensional function are located, the defects of the instrument panel can be determined, which reduces the amount of calculation. At the same time, when facing the challenges of large differences in specifications of electric energy meter instrument panels and diversified display content, the method has stronger generalization ability and improves the image calculation efficiency of electric energy meter instrument panels. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solution of the present application, the following briefly introduces the drawings required for use in the embodiments. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without inventiveness.
[0017] Figure 1 A flow chart of a method for improving the computing rate for electric energy meter instrument panel defect detection based on multi-scale mask image dimensionality reduction provided in an embodiment of the present application;
[0018] Figure 2 A schematic diagram of four mask forms provided in an embodiment of the present application;
[0019] Figure 3 A comparison diagram of the curves of a standard one-dimensional function and a detection one-dimensional function provided in an embodiment of the present application. DETAILED DESCRIPTION
[0020] In order to enable those skilled in the art to better understand the technical solutions in the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.
[0021] The core of this application is to provide a method for improving the computing rate for electric energy meter instrument panel defect detection based on multi-scale mask image dimensionality reduction, which solves the problem that traditional detection methods often find it difficult to simultaneously meet the requirements of both detection speed and versatility.
[0022] Figure 1 A flow chart of a method for improving the computing rate for electric energy meter instrument panel defect detection based on multi-scale mask image dimensionality reduction provided in an embodiment of the present application, Figure 2 A schematic diagram of four mask forms provided in an embodiment of the present application, Figure 3 A comparison diagram of a standard one-dimensional function and a detection one-dimensional function provided in the embodiment of the present application, see Figures 1 to 3 shown.
[0023] A method for improving the computing rate of electric energy meter instrument panel defect detection based on multi-scale mask image dimensionality reduction comprises the following steps:
[0024] S1: Acquire the original image at each target position of the instrument panel to ensure the quality of subsequent processing of the original image.
[0025] S2: Filter and denoise each original image, perform multi-layer pyramid transformation on each original image, and introduce multi-scale masks; multi-scale masks (also called convolution kernels or filters), these masks can capture details and features of different scales in the original image and improve the calculation rate of the original image.
[0026] S3: Perform bilateral filtering on the edges of each original image to obtain a corresponding target image; application scenarios of bilateral filtering include but are not limited to noise reduction, edge enhancement and other technologies. This step can retain clear image edge information while removing noise, thereby improving the quality and clarity of the target image.
[0027] Application principle of bilateral filtering: Based on the optimization of Gaussian filtering, the spatial domain and the range are considered at the same time. Specifically, the kernel of bilateral filtering is obtained by multiplying the spatial domain kernel and the range kernel. The spatial domain kernel determines the template weight based on the Euclidean distance of the pixel position, that is, the closer the pixel is to the center point, the greater the weight is, the closer it is to 1; the farther the pixel is from the center point, the smaller the weight is, the closer it is to 0. The range kernel determines the template weight based on the interpolation of the pixel value, that is, the larger the gray value is from the center weight value, the smaller the weight is, multiplied by a number that tends to 0; the smaller the gray value is from the center weight value, the larger the weight is, multiplied by a number that is closer to 1.
[0028]
[0029] Where IBF(P) is the value of the filtered image at pixel P, S is the neighborhood window centered on p, usually a rectangular area. Ip and Iq are the values of the original image at pixels p and q, respectively.
[0030] · is the Gaussian kernel of spatial proximity with standard deviation σ τ , used to measure the spatial distance between pixels. Specifically:
[0031]
[0032] where |pq| is the Euclidean distance between p and q.
[0033] · is the Gaussian kernel of pixel value similarity, and its standard deviation is Used to measure the difference between pixel values. Specifically:
[0034]
[0035] ·W p is a normalization factor that ensures that the sum of all weights is:
[0036]
[0037] S4: Construct a mask model corresponding to each target image based on the shape information displayed by each target image; under the premise of simplifying the number of masks and ensuring the validity of features as much as possible, four mask forms are designed in the embodiment of the present application to ensure that the information of each area in the target image can be accurately captured and quantified to the maximum extent. Assume k = 3, k represents a 3x 3 convolution kernel, and the four mask forms are as follows: Figure 2 shown.
[0038] S5: performing convolution on each original image according to the mask model to obtain a corresponding standard value, and fitting each standard value into a standard one-dimensional function;
[0039] Preferably, a method for improving the computing rate of electric energy meter panel defect detection based on multi-scale mask image dimensionality reduction, the convolution calculation formula is:
[0040]
[0041] Among them, I represents the two-dimensional matrix of the original image to be detected, K represents the k*k convolution kernel, i represents the row value of the original image, j represents the column value of the original image, m represents the row value of the processed image, and n represents the column value of the processed image.
[0042] Specifically, the value h11 is obtained after the first pixel is calculated using the first mask, the result obtained by the second mask is h12, …, and each point has 4 data after the calculation is completed. The average of the 4 data is calculated as the fifth data, and the variance is calculated as the sixth data. A total of 6 data are obtained for each point. The second point uses the first mask as h21, and the second point uses the second mask as h22. Similarly, 6 points are obtained after the calculation is completed, and so on. After the calculation of each point is completed, the 6 data obtained are placed behind the data of the previous point. All pixel point data are arranged in the order of rows first and columns to obtain a one-dimensional array. The above results are recorded as standard values, and multiple standard values are fitted into a one-dimensional function. The horizontal coordinate of the one-dimensional function is the order information of the array.
[0043] S6: During detection, convolution is performed on each original image to be detected according to the mask model to obtain a corresponding detection value, and each detection value is fitted into a one-dimensional detection function;
[0044] S7: Compare the difference between the standard one-dimensional function and the curve where the detection one-dimensional function is located, and determine the defect of the instrument panel according to the difference.
[0045] In actual detection, the curves of the standard one-dimensional function and the detection one-dimensional function are as follows: Figure 3 As shown, black represents the curve image of the standard one-dimensional function obtained after convolution, blue represents the curve image of the one-dimensional function detected during the detection process, and the red rectangular box is used to represent the difference factor. The larger the difference factor, the worse the accuracy of image processing, and the smaller the difference factor, the better the accuracy of image processing.
[0046] The embodiment of the present application provides a method for improving the computing rate of defect detection of an electric energy meter panel based on multi-scale mask image dimensionality reduction. The method first performs filtering and denoising, multi-layer pyramid transformation, multi-scale masking and bilateral filtering on the original image to obtain a target image, then constructs a mask model, performs convolution calculation to obtain a standard value and then fits it into a standard one-dimensional function. During detection, it is only necessary to perform convolution calculation on each original image to be detected according to the mask model to obtain a corresponding detection value, and fit each detection value into a detection one-dimensional function. By comparing the difference between the curves of the standard one-dimensional function and the detection one-dimensional function, the defects of the panel can be determined, thereby reducing the amount of calculation. At the same time, when facing the challenges of large differences in specifications of electric energy meter panels and diversified display content, the method has stronger generalization ability and improves the image calculation efficiency of electric energy meter panels.
[0047] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the application disclosed herein. The present application is intended to cover any variations, uses or adaptations of the present application, which follow the general principles of the present application and include common knowledge or customary technical means in the art disclosed in the present application. The specification and examples are to be regarded as exemplary only, and the true scope of the present application is indicated by the claims.
[0048] It should be understood that the present application is not limited to the precise structure described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The above embodiments of the present application do not constitute a limitation on the scope of protection of the present application.
Claims
1. A method for improving the computing rate of electric energy meter instrument panel defect detection based on multi-scale mask image dimensionality reduction, characterized in that: include: Obtain the original image at each target position of the dashboard; Filtering and denoising each of the original images, performing a multi-layer pyramid transformation on each of the original images, and introducing a multi-scale mask; Performing bilateral filtering on the edges of each of the original images to obtain a corresponding target image; Constructing a mask model corresponding to each of the target images according to the shape information displayed by each of the target images; Performing convolution calculation on each of the original images according to the mask model to obtain a corresponding standard value, and fitting each of the standard values into a standard one-dimensional function; During detection, convolution is performed on each original image to be detected according to the mask model to obtain a corresponding detection value, and each detection value is fitted into a one-dimensional detection function; The difference between the standard one-dimensional function and the detection one-dimensional function is compared, and the defect of the instrument panel is determined according to the difference.
2. The method for improving the computing rate of electric energy meter instrument panel defect detection based on multi-scale mask image dimensionality reduction according to claim 1 is characterized in that: The convolution calculation formula is: Among them, I represents the two-dimensional matrix of the original image to be detected, K represents the k*k convolution kernel, i represents the row value of the original image, j represents the column value of the original image, m represents the row value of the processed image, and n represents the column value of the processed image.