A screen image processing method
Through the improved homomorphic filtering formula and bilateral filtering function, combined with power function transformation and color adjustment, the problem of low contrast of screen images under low illumination is solved, and the image recognition and imaging effect are significantly improved.
Patent Information
- Application Number
- CN202111270339.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-29
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2041-10-29
AI Technical Summary
The existing image recognition and analysis system has poor screen image imaging effect under low illumination or haze conditions, resulting in low contrast and making it difficult to accurately identify screen area information.
The screen image is denoised by improved homomorphic filtering formula and bilateral filtering function, and the image contrast is improved through power function transformation, low-frequency and high-frequency components are separated and enhanced, image detail information is enhanced, and color adjustment factors are added to improve contrast. and recognition.
It effectively improves the contrast and recognition of screen images, enhances the contrast between the image and the background, and improves the imaging effect under low illumination or haze conditions.
Smart Images

Figure CN113962894B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power distribution automation, and in particular to a screen image processing method. Background Art
[0002] In recent years, with the rapid development of the national economy and power systems, the requirements for safe and reliable operation of power equipment (such as power instruments and meters) have been continuously improved, and online status monitoring of power systems has become an important direction of scientific research and engineering applications.
[0003] The image recognition and analysis system is used in the online status monitoring system of the power system to automatically identify the display data of power instruments and meters. The existing image recognition and analysis system has a good recognition effect for high-quality images with high imaging quality and good visual effects. However, in the scene where the screen needs to be photographed and the content is identified, the screen will produce a strong reflection phenomenon, and the image visual effect is poor, especially in low illumination conditions. Or in some meteorological conditions such as haze and low visibility, the imaging effect will also be poor. The reasons for the poor imaging effect include: low image contrast, which leads to low recognition of the screen area and difficulty in distinguishing it from the background area, which is not conducive to accurate and effective collection of information. Summary of the invention
[0004] The present invention provides a screen image processing method, which solves the problem of low contrast of screen images of instruments and meters in a substation in the related art.
[0005] The technical solution of the present invention is as follows:
[0006] In a first aspect, a screen image processing method includes the steps of image noise reduction, specifically including:
[0007] Get the screen image g(x,y);
[0008] Convert the screen image g(x,y) to the frequency domain to obtain the frequency domain image g(u,v);
[0009] The improved homomorphic filtering formula H(u,v) is used to filter the frequency domain image g(u,v) to obtain the frequency domain denoised image s(u,v), where s(u,v)=H(u,v)g(u,v);
[0010] The improved homomorphic filtering formula specifically includes:
[0011]
[0012] Among them, γ H , γ L , D H , D Land c are both constants, D(u,v) represents the frequency difference between the frequency of the pixel point (U,V) and the center frequency in the frequency domain image g(u,v);
[0013] The frequency domain denoised image s(u,v) is restored to the spatial domain to obtain a first denoised image.
[0014] Furthermore, it also includes:
[0015] The first denoised image is further denoised using a bilateral filtering function to obtain a second denoised image.
[0016] Furthermore, it also includes:
[0017] Performing enhancement processing on the second denoised image to obtain an enhanced image;
[0018] A color adjustment factor is added to the enhanced image to obtain a final image, wherein the final image has the same component ratio in the three channels of R, G, and B as the second denoised image.
[0019] Furthermore, before obtaining the screen image, the following steps are also included:
[0020] Get the original screen image f(x,y);
[0021] The original screen image f(x, y) is subjected to a power function transformation to obtain a screen image g(x, y); the power function transformation is used to improve the image contrast.
[0022] Further, the original screen image f(x,y) is transformed by a power function to obtain the screen image g(x,y), which specifically includes:
[0023] Using the formula g(x,y)=pf(x,y) q Perform power function transformation on the original screen image f(x,y);
[0024] Where p is a constant, q is the power transformation coefficient, and the value of q is obtained as follows:
[0025] Obtain the shooting equipment number and weather category corresponding to the original screen image f(x,y);
[0026] Determine a data record matching the photographing equipment number and the weather category from the coefficient table; the determined data record is a target data record; wherein the coefficient table includes a plurality of data records, each data record includes a one-to-one corresponding photographing equipment number, a weather category and a setting value;
[0027] The set value in the target data record is determined as the value of q.
[0028] Furthermore, the screen image g(x,y) is converted to the frequency domain to obtain the frequency domain image g(u,v), which specifically includes:
[0029] Decompose the screen image g(x, y) into the product of the illumination component i(x, y) and the reflection component r(x, y),
[0030] g(x,y)=i(x,y)×r(x,y), where, 0 <i(x,y)<∞,0<r(x,y)<1;
[0031] The irradiation component i(x,y) is sequentially subjected to logarithm and Fourier transform operations to obtain the low-frequency component;
[0032] The reflected component r(x,y) is sequentially subjected to logarithm and Fourier transform operations to obtain the high-frequency component;
[0033] The low-frequency component and the high-frequency component are added to obtain a frequency domain image g(u,v).
[0034] In a second aspect, a screen image processing device includes:
[0035] A first obtaining unit, used for obtaining a screen image g(x,y);
[0036] A first conversion unit, used for converting the screen image g(x,y) into a frequency domain to obtain a frequency domain image g(u,v);
[0037] The first filtering unit is used to filter the frequency domain image g(u,v) using an improved homomorphic filtering formula H(u,v) to obtain a frequency domain denoised image s(u,v), where s(u,v)=H(u,v)g(u,v);
[0038] The improved homomorphic filtering formula specifically includes:
[0039]
[0040] Among them, γ H , γ L , D H , D L and c are both constants, D(u,v) represents the frequency difference between the frequency of any pixel (U,V) in the frequency domain image g(u,v) and the center frequency;
[0041] The second conversion unit is used to restore the frequency domain denoised image s(u,v) to the spatial domain to obtain a first denoised image.
[0042] Furthermore, it also includes:
[0043] The second filtering unit is used to perform further denoising processing on the first denoised image using a bilateral filtering function to obtain a second denoised image.
[0044] Furthermore, it also includes:
[0045] A first processing unit is used to perform enhancement processing on the second denoised image to obtain an enhanced image;
[0046] The first adjustment unit is used to add a color adjustment factor to the enhanced image to obtain a final image, and the final image has the same component ratio in the three channels of R, G, and B as the second denoised image.
[0047] In a third aspect, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the above-mentioned screen image processing method are implemented.
[0048] The working principle and beneficial effects of the present invention are:
[0049] When shooting an image on an LCD screen, the angle and lighting of the shooting equipment affect the frequency of many details of the image itself, which cannot form a clear contrast with the background information, resulting in a decrease in contrast. Since the low-frequency component also contains a large amount of image detail information, if a cutoff frequency is selected to process the entire image according to the traditional homomorphic filtering method, the effect achieved is: enhance the part above the cutoff frequency and weaken the part below the cutoff frequency, and the image detail information contained in the low-frequency component will also be weakened, which is not the result we want.
[0050] The embodiment of the present invention first converts the acquired screen image into the frequency domain to obtain a frequency domain image, and then filters the frequency domain image using an improved filtering formula.
[0051] It can be seen from the improved filtering formula that the improved filtering formula has different filtering effects in the following three cases:
[0052] The first case: when D(u,v)<D L hour, The corresponding amplitude of H(u,v) is also smaller, so it is lower than D L The low frequency part is weakened;
[0053] The second case: when D(u,v)>D H When D(u,v) increases, The calculated amplitude of H(u,v) also increases accordingly. It can be seen that it is higher than D H The high frequency part is enhanced;
[0054] The third case, corresponding to the image detail information D(u,v), has a frequency between D L ~D HThe degree of enhancement is between the first two cases, and it is a smooth changing process.
[0055] In summary, the improved filtering formula ultimately achieves enhancement above the high cutoff frequency D H The high-frequency part of the signal weakens the background information below the low cutoff frequency DL, while enhancing the low-frequency components above the low cutoff frequency D L image details, thereby enhancing the contrast between the screen image and background information and improving the recognition of the screen area. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.
[0057] Figure 1 is a flow chart of the method of the present invention; DETAILED DESCRIPTION
[0058] The following will be combined with the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0059] Embodiment 1
[0060] The screen image processing method of this embodiment specifically comprises the following steps:
[0061] Step S1, obtain the input original image f(x,y)
[0062] Step S2, preprocessing the original image f(x, y) to obtain the screen image g(x, y), the main steps are as follows:
[0063] Perform a power function transformation on the input image to improve the image contrast
[0064] g(x,y)=pf(x,y) q
[0065] Among them, p is a constant, q is the power transformation coefficient, and f(x,y) is the value before transformation. This method will automatically determine the light conditions when the photo was taken according to the source of the photo and the weather, and automatically set the appropriate γ parameter. Among them, the source of the photo is distinguished according to the shooting equipment number. The substation is equipped with a meteorological collection device that can determine the weather category. By storing the coefficient table in advance, q is the power transformation coefficient during image preprocessing, which is obtained by looking up the table, specifically including:
[0066] Obtain the shooting equipment number and weather category corresponding to the original screen image f(x,y);
[0067] Determine the data record that matches the shooting equipment number and weather category from the coefficient table; the determined data record is the target data record;
[0068] Among them, the coefficient table includes multiple data records, and each data record includes a corresponding shooting equipment number, weather category, and set value; the value of q is the set value in the target data record.
[0069] Step S3: Enhance the screen image g(x,y). The main steps are as follows:
[0070] (1) Obtain the high and low cut-off frequencies in the screen image g(x,y), denoted as D H and D L , and use the improved homomorphic filtering method to filter the screen image g(x,y). The filtering formula is as follows:
[0071]
[0072] Among them, γ H and γ L respectively represent the magnification of the increase in high-frequency components and the reduction in low-frequency components. D(U,V) represents the frequency difference between the frequency of point (U,V) and the center frequency. c is a constant used to control the shape of the filter. The center frequency has the same meaning as in the existing homomorphic filtering formula and takes the value of zero. D H and D L respectively represent the high-frequency cut-off frequency and the low-frequency cut-off frequency. By collecting multiple historical screen images and trying multiple sets of different values of D H and D L , filter multiple historical screen graphics using the improved homomorphic filtering formula, and select the set of D H and D L with the best filtering effect as the final D H and D L .
[0073] As Figure 1 shown, the steps for image denoising of the screen image g(x,y) according to the improved filtering formula are as follows:
[0074] 1) Represent the screen image g(x,y) as the product of the illumination component i(x,y) and the reflection component r(x,y). 0 < i(x,y) < ∞, 0 < r(x,y) < 1. i(x,y) describes the illumination of the scene, changes slowly, and is in the low-frequency component. r(x,y) describes the details of the scene, changes quickly, and is in the high-frequency component.
[0075] g(x,y) = i(x,y) × r(x,y)
[0076] 2) The above formula cannot be used directly to operate the frequency components of illuminance and reflection, so first take the logarithm of the above formula to convert the spatial domain into an additive relationship.
[0077] lng(x,y)=lni(x,y)+lnr(x,y)
[0078] Then perform Fourier transform on the above formula to obtain the frequency domain image g(u,v), and transform the spatial domain problem into the frequency domain.
[0079] DFT(lng(x,y))=DFT(lni(x,y))+DFT(lnr(x,y))
[0080] That is, g(u,v)=Fi(u,v)+Fr(u,v)
[0081] 3) Use the improved homomorphic filtering method to filter the low-frequency component Fi(u,v) and the high-frequency component Fr(u,v) in the frequency domain image g(u,v) separately to obtain the frequency domain denoised image s(u,v), which specifically includes:
[0082] The low-frequency component Fi(u,v) is filtered using the improved homomorphic filtering formula H(u,v) to obtain the low-frequency filtered image H(u,v)Fi(u,v);
[0083] The high-frequency component Fr(u,v) is filtered using the improved homomorphic filtering formula H(u,v) to obtain a high-frequency filtered image H(u,v)Fr(u,v);
[0084] The low-frequency filtered image H(u,v)Fi(u,v) and the high-frequency filtered image H(u,v)Fr(u,v) are added to obtain the frequency denoised image s(u,v).
[0085] s(u,v)=H(u,v)g(u,v)=H(u,v)Fi(u,v)+H(u,v)Fr(u,v)
[0086] 4) Perform inverse Fourier transform on the frequency domain denoised image s(u,v) to return the spatial domain logarithmic image, and then perform exponential operation to obtain the first denoised image.
[0087] s(x,y)=exp(IDFT(s(u,v)))
[0088] This embodiment uses an improved filtering formula to filter the low-frequency component and the high-frequency component in the frequency domain image separately, and finally achieves the enhancement of the image above the high cutoff frequency D H The high-frequency part of the signal weakens the background information below the low cutoff frequency DL, while enhancing the low-frequency components above the low cutoff frequency D LThe image details are preserved in the processed image while reducing the impact of noise.
[0089] (2) Use the bilateral filtering function to further denoise the first denoised image. After bilateral filtering denoise, the second denoised image is obtained, which is expressed as
[0090]
[0091] Where W(i,j,k,l) is the bilateral filter template, and the formula is:
[0092] W(i,j,k,l)=d(i,j,k,l)*r(i,j,k,l)
[0093] Among them, d(i,j,k,l) is the distance template coefficient, which is expressed as:
[0094]
[0095] r(i,j,k,l) is the range template coefficient, expressed as:
[0096]
[0097] Among them, (k, l) is the center coordinate of the template window, (i, j) is the other coefficient coordinates of the template window, s(k, l) represents the function s(x, y) represents the pixel value of the image at point (k, l).
[0098] (3) The second denoised image is enhanced to obtain an enhanced image. A color adjustment factor is added to the enhanced image to restore the component ratios of the three channels R, G, and B of the enhanced image to the ratios of the second denoised image to obtain a final image, thereby achieving a color fidelity effect for the final image.
[0099]
[0100] Where k = 3, W k =1 / 3, s(x,y) is the first denoised image, F n (x, y) is the second denoised image, I(x, y) is any pixel in the second denoised image, C i (x, y) is the color adjustment factor, and the calculation formula is:
[0101]
[0102] Where k=3, β is the gain coefficient, and α is the nonlinear controlled intensity factor. In the present invention, the image enhancement effect is best when β=46 and α=125.
[0103] Step S4, output the final image.
[0104] Embodiment 2
[0105] The screen image processing device of this embodiment includes:
[0106] A first obtaining unit, used for obtaining a screen image g(x,y);
[0107] A first conversion unit, used for converting the screen image g(x,y) into a frequency domain to obtain a frequency domain image g(u,v);
[0108] The first filtering unit is used to filter the frequency domain image g(u,v) using an improved homomorphic filtering formula H(u,v) to obtain a frequency domain denoised image s(u,v), where s(u,v)=H(u,v)g(u,v);
[0109] The improved homomorphic filtering formula specifically includes:
[0110]
[0111] Among them, γ H , γ L , D H , D L and c are both constants, D(u,v) represents the frequency difference between the frequency of any pixel (U,V) in the frequency domain image g(u,v) and the center frequency;
[0112] The second conversion unit is used to restore the frequency domain denoised image s(u,v) to the spatial domain to obtain a first denoised image.
[0113] Furthermore, it also includes:
[0114] The second filtering unit is used to perform further denoising processing on the first denoised image using a bilateral filtering function to obtain a second denoised image.
[0115] Furthermore, it also includes:
[0116] A first processing unit is used to perform enhancement processing on the second denoised image to obtain an enhanced image;
[0117] The first adjustment unit is used to add a color adjustment factor to the enhanced image to obtain a final image, and the final image has the same component ratio in the three channels of R, G, and B as the second denoised image.
[0118] Embodiment 3
[0119] Based on the same inventive concept as the above-mentioned embodiment 1, this embodiment proposes a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned screen image processing method are implemented.
[0120] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A screen image processing method, characterized in that: The steps of image noise reduction are as follows: Get the screen image g(x,y); Convert the screen image g(x,y) to the frequency domain to obtain the frequency domain image ; The improved homomorphic filtering formula H(u,v) is used to filter the frequency domain image Perform filtering to obtain the frequency domain denoised image s(u,v), where: ; The improved homomorphic filtering formula specifically includes: in, , , , and c are constants, Represents frequency domain image The frequency difference between the frequency of the middle pixel (U, V) and the center frequency; Restoring the frequency domain denoised image s(u,v) to the spatial domain to obtain a first denoised image; Before getting the screen image, it also includes: Get the original screen image f(x,y); Performing a power function transformation on the original screen image f(x, y) to obtain a screen image g(x, y); the power function transformation is used to improve the image contrast; Perform a power function transformation on the original screen image f(x,y) to obtain the screen image g(x,y), including: Using formula Perform power function transformation on the original screen image f(x,y); Where p is a constant, q is the power transformation coefficient, and the value of q is obtained as follows: Obtain the shooting equipment number and weather category corresponding to the original screen image f(x,y); Determine a data record matching the photographing equipment number and the weather category from the coefficient table; the determined data record is a target data record; wherein the coefficient table includes a plurality of data records, each data record includes a one-to-one corresponding photographing equipment number, a weather category and a setting value; Determine the set value in the target data record as the value of q; Also includes: Using a bilateral filter function to further perform denoising on the first denoised image to obtain a second denoised image; Performing enhancement processing on the second denoised image to obtain an enhanced image; Adding a color adjustment factor to the enhanced image to obtain a final image, wherein the final image has the same component ratio in the three channels of R, G, and B as the second denoised image; The calculation formula for enhancing the second denoised image is: in, is the final image, k=3, W k =1 / 3, s(x,y) is the first denoised image, F n (x, y) is the second denoised image, I(x, y) is any pixel in the second denoised image, C i (x,y) is the color adjustment factor, and the calculation formula is: Among them, β is the gain coefficient and α is the nonlinear controlled intensity factor.
2. A screen image processing method according to claim 1, characterized in that: Convert the screen image g(x,y) to the frequency domain to obtain the frequency domain image , including: Decompose the screen image g(x, y) into the product of the illumination component i(x, y) and the reflection component r(x, y), , where 0 <i(x,y)<∞,0<r(x,y)<1; The irradiation component i(x,y) is sequentially subjected to logarithm and Fourier transform operations to obtain the low-frequency component; The reflected component r(x,y) is sequentially subjected to logarithm and Fourier transform operations to obtain the high-frequency component; The low frequency component and the high frequency component are added to obtain a frequency domain image .
3. A screen image processing device, characterized in that: include: A first obtaining unit, used for obtaining a screen image g(x,y); The first conversion unit is used to convert the screen image g(x,y) into the frequency domain to obtain a frequency domain image ; The first filtering unit is used to adopt an improved homomorphic filtering formula , for frequency domain images Perform filtering to obtain the frequency domain denoised image s(u,v), where: ; The improved homomorphic filtering formula specifically includes: in, , , , and c are constants, Represents frequency domain image The frequency difference between the frequency of any pixel point (U, V) and the center frequency; A second conversion unit, used to restore the frequency domain denoised image s(u,v) to the spatial domain to obtain a first denoised image; Before getting the screen image, it also includes: Get the original screen image f(x,y); Performing a power function transformation on the original screen image f(x, y) to obtain a screen image g(x, y); the power function transformation is used to improve the image contrast; Perform a power function transformation on the original screen image f(x,y) to obtain the screen image g(x,y), including: Using formula Perform power function transformation on the original screen image f(x,y); Where p is a constant, q is the power transformation coefficient, and the value of q is obtained as follows: Obtain the shooting equipment number and weather category corresponding to the original screen image f(x,y); Determine a data record matching the photographing equipment number and the weather category from the coefficient table; the determined data record is a target data record; wherein the coefficient table includes a plurality of data records, each data record includes a one-to-one corresponding photographing equipment number, a weather category and a setting value; Determine the set value in the target data record as the value of q; Also includes: Performing further denoising processing on the first denoised image using a bilateral filtering function to obtain a second denoised image; Performing enhancement processing on the second denoised image to obtain an enhanced image; Adding a color adjustment factor to the enhanced image to obtain a final image, wherein the final image has the same component ratio in the three channels of R, G, and B as the second denoised image; The calculation formula for enhancing the second denoised image is: in, is the final image, k=3, W k =1 / 3, s(x,y) is the first denoised image, F n (x, y) is the second denoised image, I(x, y) is any pixel in the second denoised image, C i (x,y) is the color adjustment factor, and the calculation formula is: Among them, β is the gain coefficient and α is the nonlinear controlled intensity factor.
4. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the screen image processing method according to any one of claims 1 to 2 are implemented.
Citation Information
Patent Citations
Image preprocessing method for processing nonuniform illumination of miner face image and coal surface
CN102750682A
HSV (hue, saturation and value) color space-based homomorphic filtering enhancement method
CN107578387A
Enhancement method of low-illumination color image
CN110276729A
Aviation and remote sensing image defogging method based on NSCT domain
CN110930339A
Axicon Lens Array
US20100302396A1
