Image processing essentially extracts the feature quantity or special information in the image and transforms the gray level of the image to achieve the purpose of improving the signal-to-noise ratio and optimizing the image quality. The most valuable thing about the electromagnetic leakage emission reduction image is the text information, which has nothing to do with color. Therefore, the process of image processing should not only effectively eliminate noise, but also improve the image quality, and also enhance the image according to the characteristics of the text to improve the visual effect [14,15,16].
Electromagnetic leakage emission reduction image noise analysis
More and more research results show that correct estimation and utilization of image noise have important guiding significance and use value for image denoising follow-up processing. No matter how good the noise removal method is, it is impossible to apply it to all noise. Electromagnetic leakage emission reduction image is limited by objective factors such as imaging mode and equipment, and the received image degradation is serious. It is inevitable to introduce Gaussian noise, short-line impulse noise, and various mixed noises. The noise itself may be related to each other and may be independent of each other, which may or may not be related to the useful signal, and exhibit different characteristics. The effect of noise on the image can be described by two different mathematical models [17]:
The additive noise mathematical model can be described as:
s(t) represents a real image signal, n(t) represents additive Gaussian noise, and x(t) represents a noisy image. Electromagnetic leakage emission reduction image since static acquisition is performed on computer video screen information; each frame of static image introduces additive noise, which is additive in nature and independent of the signal.
Multiplicative noise, also known as convolution noise, can be described as:
$$ x(t)=s(t)\times n(t) $$
(2)
s(t) represents a real image signal, n(t) represents multiplicative noise, and x(t) represents a noisy image. Unpredictable noise in electromagnetic leak emission reduction images is generally a multiplicative noise.
Image denoising
Accumulated average
The electromagnetic leakage emission reduction image is a periodic image that is actually a period of time because it is a static image. As a periodic repeat image, the general signal is relatively stable and the correlation is better. Additive noise is generally randomly changed, and the multi-frame averaging method can effectively improve the signal-to-noise ratio. Although the noise in a single frame is more serious, statistically speaking, the distribution of signals is regular, and the noise of each image can be considered to be randomly and evenly distributed. Therefore, the cumulative average of multiple images can suppress the noise, to enhance the signal. After the m images are accumulated and averaged, the signal-to-noise ratio can be improved by \( \sqrt{m} \). However, it is not like the more the number of images is accumulated, the better the results will be. This is because the imaging device cannot accurately capture the line synchronization and frame synchronization of the image to be received, so the images are offset between different frames. If the accumulated number of frames is too large, the average image may produce a relatively large edge blur that affects the resolution of the image detail [18].
Image noise smoothing
Image noise smoothing is a way to eliminate noise, both to remove noise as much as possible, and not too distorted. Commonly used algorithms for noise removal include median filtering, mean filtering, and so forth.
Median filtering
Median filtering is a nonlinear filtering technique based on sorting statistics theory to remove noise. The basic principle is to replace the value of a point in a digital image with a median value in a neighbor of the point. In the image processing, a 3 × 3 matrix is generally used as a template for image filtering, and some also adopt different shapes, such as a line shape, a circle shape, and a cross shape. It can protect the edge of the image well while removing noise, which is more effective for impulse noise, but it is not ideal for Gaussian noise median filtering.
Mean filtering
Also known as linear filtering, the main method is the neighbor averaging method. The basic principle is to replace the individual pixel values in the image to be processed with a mean. The method is to use a template with odd points to slide on the image, and the size of the template can be selected according to the actual situation. The template includes adjacent pixels around it, that is, the surrounding n pixels centered on the target pixel. The filtering process calculates the mean value of the gray value corresponding to each pixel point in the current template for the current pixel point (x, y) to be processed in the image and assigns the mean value to the current pixel point (x, y) as the gray level g(x, y) of the image at this point after processing.
Sxy is assumed to represent a filter template window with a center point at (x, y) and a size of m × n. Mean filtering is to calculate the pixel mean of the filter template window area and assign the mean to the pixel at the center of the window [19]:
$$ g\left(x,y\right)=\frac{1}{mn}{\sum}_{\left(x,y\right)\in {S}_{xy}}f\left(x,y\right) $$
(3)
where f(x, y) represents the value of each pixel in the filter template window in the original image, and g(x, y) represents the mean filtered image. In the mean filtering process, the pixel information of the peak value of the image is changed, which causes the image to be blurred, which is not conducive to edge detection. If we consider the weight of each pixel of the window, this time is called weighted median filtering. Equation (3) can be rewritten as:
$$ g\left(x,y\right)=\frac{1}{mn}{\sum}_{\left(x,y\right)\in {S}_{xy}}f\left(x,y\right)K\left(x,y\right) $$
(4)
where k(x, y) represents the weighted value of the value of each pixel within the filter template window. Weighted median filtering removes uniform noise and ensures edge clarity to some extent.
Filter method selection
By comparing the methods of advantages and disadvantages of mean filtering and median filtering, this paper uses 3 × 3 domain-weighted mean algorithm combined with electromagnetic leakage emission to restore the importance of image edge information. The weight coefficient selection of the weighted template is allocated according to the nearest distance principle, that is, the coefficient close to the center point is large, the coefficient far from the center point is small, and the center point itself has the largest coefficient. The specific algorithm for determining the weight coefficient is shown in Eq. (5) [20]:
$$ k=\frac{1}{2^{a+b+2}} $$
(5)
where a represents the distance of each point of the template from the center point in the x direction, and b represents the distance of each point of the template from the center point in the y direction. If a 3 × 3 field is selected, the template-specific weighting coefficient can be calculated according to Eq. (5), as shown in Fig. 1:
Image enhancement
Ambiguity
A typical fuzzy system is shown in Fig. 2. This fuzzy system is usually divided into four parts: fuzzy generator, fuzzy inference engine, fuzzy rule base, and anti-fuzzifier. In the fuzzification, the input fuzzy set and the corresponding fuzzy membership function are first determined. Compared with traditional collections, the main feature of fuzzy sets is that there is no obvious set boundary, that is, an element may only partially belong to the set. In a traditional set, whether an element belongs to the set can be represented by true and false, and in the fuzzy set, whether an element belongs to the set is represented by membership degree, that is, to what extent the element belongs to the fuzzy set, belonging to the degree is between 0 and 1. The fuzzy membership function defines the mapping relationship between a certain point of the input space and the membership degree. The whole process of fuzzification is to represent the input determination value with the membership degree of each fuzzy set. In the process of fuzzy reasoning, fuzzy rules are used. Commonly used are IF-THEN structures, such as “IF (x is A) AND (y is B), THEN z is C”, where C is the output fuzzy set, and fuzzy logic can be used. Obtain the membership degree when the condition is established [14].
The fuzzy inference process uses fuzzy logic to map the membership degree of the input fuzzy set obtained by the fuzzification process to the membership degree of the output fuzzy set. The often-used fuzzy logic has AND, OR, etc., and for the AND logic in the fuzzy set, the equivalent membership is the smallest while the OR is equivalent to the largest membership.
If it is known that the input degrees belonging to the fuzzy sets A and B are a and b, respectively, the membership of the input belonging to both A and B is MIN (a, b). Fuzzy rules are used in the process of fuzzy reasoning. Commonly used are IF-THEN structures, and fuzzy logic can be used. If the membership degree is established, the membership degree of the conclusion will be the same.
In general applications, there are multiple fuzzy rules. Each fuzzy rule determines the membership degree of the output in a certain output fuzzy set. In the overlapping part of each fuzzy set, the membership degree is taken as the maximum value, so that the final output of the membership graph can be obtained. This method of reasoning is called the minimum-maximum method.
In the fuzzy process, the output membership graph is obtained, and the final defuzzification process is to map the uncertainty to the determined output. Anti-fuzzification converts the ambiguity of the output variable obtained by fuzzy rule inference into an exact value. The easiest way is the maximum membership method. The most commonly used method in control technology is the area center of gravity method, and the calculation method of the area center of gravity method is:
$$ {Z}_0=\frac{\sum \mu \left({Z}_i\right){xZ}_i}{\sum \mu \left({Z}_i\right)} $$
(6)
where μ(Zi) is the membership degree of the output fuzzy set, and the area center of gravity method is actually the weighted average method.
FIRE filter principle
The fuzzy inference ruled by else-action (FIRE) filter is a fuzzy system based on the IF-THEN-ELSE structure, which maps the input variables nonlinearly to the output variables. In the image denoising process, the input variable is defined as the luminance difference value xj = pj − p (pj∈W), where p is the luminance value of the processed pixel point, and W = {pj} is the pixel point in the neighborhood of p brightness value. The output y is a correction value of the luminance value of the processed point.
Set the gray level of the image as L, because the input and output variables are relative quantities, and the domain of the fuzzy set of the FIRE filter is [−L + 1, L − 1]. The fuzzy set defining the input variable is X positive and X negative, represented by PX and NX. The fuzzy set of the output variable is Y negative, Y zero, Y negative, and is represented by PY, ZY, and NY, respectively. According to symmetry, there is:
$$ {\mu}_{\mathrm{NX}}\left(\Delta x\right)=\mu \left(-\Delta x\right),{\mu}_{\mathrm{NX}}\left(\Delta y\right)={\mu}_{\mathrm{PY}}\left(-\Delta y\right) $$
(7)
where Δx is input; Δy is output; and μNX, μPX, μNY, and μPX are the corresponding membership functions. The above formula indicates that the corresponding membership function takes values in the interval (− 255, 255) and is symmetric with respect to 0.
In general, the rule base of a FIRE filter consists of two sets of symmetric sub-rule bases and an ELSE rule, in the form as follows:
-
IF (x1 is A11) AND (x2 is A12) …… AND (xM is A1M) THEN (y is PY)
-
IF (x1 is A21) AND (x2 is A22) …… AND (xM is A2M) THEN (y is PY)
-
IF (x1 is AN1) AND (x2 is AN2) …… AND (xM is ANM) THEN (y is PY)
-
IF (x1 is A*11) AND (x2 is A*12)…… AND (xM is A*1M) THEN (y is NY)
-
IF (x1 is A*21) AND (x2 is A*22)…… AND (xM is A*2M) THEN (y is NY)
-
IF (x1 is A*N1) AND (x2 is A*N2)…… AND (xM is A*NM) THEN (y is NY)
-
ELSE (y is ZY)
where Aij is a fuzzy set corresponding to the jth variable in the ith rule, which is PX or NX. According to the symmetry, the membership function of A*ij satisfies \( {\mu}_{A^{\ast }}\left(\Delta x\right)={\mu}_A\left(-\Delta x\right) \). The first set of sub-rule bases is used to process negative noise points, giving a positive correction value, and the second set of sub-rule bases is used to process positive noise points, giving a negative correction value. Within a rule base, the first rule processes the uniform area of the image, and the other rules process the detail area.
For a given input variable {xj}, set the \( {\lambda}_{{\mathrm{POS}}_i} \) and \( {\lambda}_{{\mathrm{NEG}}_i} \) as the output strength of the ith rule in the positive and negative sub-rule bases, i.e.;
$$ {\lambda}_{{\mathrm{POS}}_i}=\min \left\{{\mu}_{A_{ij}}\left({x}_j\right);\kern0.5em j=1,\cdots, M\right\} $$
(8)
$$ {\lambda}_{{\mathrm{NEG}}_i}=\min \left\{{\mu}_{A_{ij}^{\ast }}\left({x}_j\right);\kern0.5em j=1,\cdots, M\right\} $$
(9)
The total output intensity of the positive and negative sub-rule bases of λPOS and λNEG is:
$$ {\lambda}_{\mathrm{POS}}=\max \left\{{\lambda}_{{\mathrm{POS}}_i};\kern0.5em i= 1,\cdots, N\right\} $$
(10)
$$ {\lambda}_{\mathrm{NEG}}=\max \left\{{\lambda}_{{\mathrm{NEG}}_i};\kern0.5em i= 1,\cdots, N\right\} $$
(11)
The fitness of the ELSE λ0 rule is:
$$ {\lambda}_0=1-{\lambda}_{\mathrm{POS}}-{\lambda}_{\mathrm{NEG}} $$
(12)
The output fuzzy set uses a triangular fuzzy set, as shown in Fig. 3, where C represents the position of the center point of the fuzzy set, and W represents the half width. The output of the positive and negative sub-rules and the ELSE rule can be obtained:
$$ y=\frac{{}^C\mathrm{P}{\mathrm{Y}}^W{\mathrm{PY}}^{\lambda}\mathrm{POS}+{}^C\mathrm{Z}{\mathrm{Y}}^W{\mathrm{ZY}}^{\lambda }0{+}^C{\mathrm{NY}}^W{\mathrm{NY}}^{\lambda}\mathrm{NEG}}{{}^W\mathrm{P}{\mathrm{Y}}^{\lambda}\mathrm{POS}+{}^W\mathrm{Z}{\mathrm{Y}}^{\lambda }0+{}^W\mathrm{N}{\mathrm{Y}}^{\lambda}\mathrm{NEG}} $$
(13)
For fuzzy logic, the membership function can be determined by itself. By designing symmetric and equal-width membership functions, we can get cPY = − cNY = cY, wPY = − wNY = wY, cZY = 0, and wZY = wY. Then, the formula can be simplified to:
$$ y={c}_Y\left({\lambda}_{\mathrm{POS}}-{\lambda}_{\mathrm{NEG}}\right) $$
(14)
Image sharpening
In the early noise image smoothing process, the boundaries and contours in the image are often blurred. In order to reduce the influence of such unfavorable effects, it is necessary to use image sharpening technology to make the edges of the image clear, reduce the blurring effect caused by the image modification, highlight the outline of the image, and effectively improve the clarity of the text details. The more commonly used algorithms are gradient sharpening, Laplacian sharpening, and high-pass filtering.
In this paper, the FIRE operator is used for sharpening. It is mainly used in image denoising and edge detection. The FIRE operator is a class of nonlinear operators that deal with digital images using fuzzy inference mechanisms. This method operates on pixels in the neighborhood window, and for each pixel of the image, its neighborhood grayscale difference set is examined (Fig. 4).
Let x(n) denote the gray value of the pixel located at n = [n1, n2], W(n) = {xj(n); j = 1,...,8} denote the gray of the 3 × 3 neighborhood collection of values, as shown in Fig. 5.
We define the input of the FIRE operator as the neighborhood grayscale difference, Δxj = xj(n) − x(n), and the output Δy(n) is obtained by fuzzy inference, and the final output y(n) = x(n) + Δy(n) is the corrected result.
In practice, according to the pixel of Fig. 6, take 5 × 5 neighborhood, consider the combination of modes in eight directions: B1 = {0, 1, 9}, B2 = {0, 2, 11}, ..., B8 = {0, 8, 23}.
Since the received computer video electromagnetic leakage emits a restored image as a binary image, the design fuzzy rules are as follows:
The rule indicates that the surrounding pixel points are lower than the target point pixels, and y takes a negative value to reduce the brightness of the target pixel point; otherwise, the target pixel brightness does not change.
It can be seen that this method considers the sharpening index in all directions around the pixel and conforms to the directional characteristic of the character stroke. According to the fuzzy reasoning, if there is no sharpening, the central pixel has no change, the subjective reasoning of the fuzzy reasoning compound person, showing the effectiveness of fuzzy logic.
Contrast enhancement
The methods of contrast enhancement mainly include histogram modification, gradation transformation, and histogram equalization. The histogram modification technique can enhance the text information, but the noise at this time is not weakened but enhanced. The gradation transformation can change the original gray value distribution of the image, both linear and nonlinear. The gradation transformation can improve the sharpness of the image, expand or compress the entire range of the gray level of the image or one of the segments, and display the details of the image that need to be highlighted. Histogram equalization is a histogram correction method based on the cumulative distribution function transformation, which can produce an image with a uniform probability density of grayscale distribution. This is a relatively common method of contrast enhancement.
In this paper, the method of ambiguity contrast enhancement is selected. This method is based on the global gray distribution to adjust the contrast. Through the fuzzy inference mechanism, the soft computing method is introduced to make the grayscale transformation more in line with the human visual experience. The basic idea of the algorithm is briefly described as follows:
-
1.
Calculate the gray histogram of the image to determine the grayscale distribution of the image.
-
2.
Define a single fuzzy set dark, gray, bright, membership function as shown in the left line of Fig. 2, representing the linear function of the segment, respectively representing the size of the gray level belonging to the three fuzzy sets of dark, gray, and bright. Three membership degrees are found for the gray levels in each grayscale range.
-
3.
Use fuzzy inference mechanism with the following simple rules:
-
IF dark, THEN black;
-
IF gray, THEN gray;
-
IF bright, THEN white.
The grayscale determined by the gray histogram determines the fuzzy single value of the three fuzzy sets, as shown in Fig. 2, taking S1 = gmin, S2 = gmid; S3 = gmax for defuzzification, using the following formula:
$$ {g}^{\prime }=\frac{\mu_{\mathrm{dark}}(g)\times {S}_1+{\mu}_{\mathrm{gray}}(g)\times {S}_2+{\mu}_{\mathrm{bright}}(g)\times {S}_3}{\mu_{\mathrm{dark}}(g)+{\mu}_{\mathrm{gray}}(g)+{\mu}_{\mathrm{bright}}(g)} $$
(15)
S1 = gmin, S2 = gmid, and S3 = gmax are the minimum, intermediate, and maximum value of gray, respectively, in the image obtained by the gray histogram, representing black, gray, and white, and is set to a single value of the fuzzy set.
The above formula can be regarded as a general weighted average method to solve the deblurring problem.
It can be seen from the above steps that the contrast enhancement method based on the fuzzy rule actually uses a fuzzy inference mechanism to create a grayscale map to implement grayscale transformation. This method considers the grayscale distribution range of the image as a whole. The gray level is fuzzy classified, and its visual effect is obviously superior to the traditional gray level equalization method.