Image deblurring system and method thereof
By combining the atmospheric environment model and the dark channel prior principle in the image deblurring system to adaptively adjust the brightness and color characteristics, the contrast and color problems in blurred image processing in the existing technology are solved, and the clarity and look and feel of the image are improved. .
Patent Information
- Application Number
- CN202311139035.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-05
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2043-09-05
AI Technical Summary
When existing image deblurring algorithms deal with blurred images caused by suspended water droplets and particulate matter in the air, there are problems such as low contrast, low saturation, loss of texture details, and color deviation, which affect the quality and clarity of image recognition, and are based on deep learning. Although the generated image quality is improved by this method, the model complexity is high and the operating efficiency is low.
The image deblurring system is adopted, including image input module, atmospheric environment model module, dark channel prior principle module, brightness constraint module and color constraint module. By constructing the atmospheric environment model, calculating light perspective, adjusting brightness and color characteristics, adaptive Deblurring to produce clear images.
It improves the clarity and look and feel of blurred images, maintains the brightness and color balance of the image, avoids excessive color distortion, and achieves a more realistic image restoration effect.
Smart Images

Figure CN117314770B
Abstract
Description
Technical Field
[0001] The invention belongs to the field of image technology, in particular to an image deblurring system and a method thereof. Background Art
[0002] The fine water droplets and particles suspended in the air are scattered by the objective lens, resulting in blurred images. Blurred images have problems such as low contrast, low saturation, loss of texture details, and color deviation, which seriously affect the quality of image recognition, the accuracy of target tracking, and the clarity of image restoration. Reducing the impact of image deblurring and improving image clarity are of great practical significance. At present, image deblurring algorithms can be divided into methods based on image enhancement, methods based on image restoration, and methods based on deep learning. The image enhancement-based method mainly restores a fog-free image by removing image noise and improving image contrast. Most of the methods based on image restoration are based on the atmospheric scattering model, and deblurring is achieved by estimating transmittance and atmospheric light, but they are prone to problems such as inaccurate parameter estimation, which affects the quality of the generated image. The deep learning-based method mainly achieves end-to-end deblurring through convolutional neural networks. Compared with the methods based on image enhancement and image restoration, the quality of the generated image is greatly improved, but at the same time, it is accompanied by an increase in model complexity and a decrease in operating efficiency. Summary of the invention
[0003] The present invention provides an image deblurring system and method thereof, which are used to solve the defects in the prior art.
[0004] The present invention is achieved through the following technical solutions:
[0005] An image deblurring system comprises the following modules:
[0006] An image input module, used for inputting a blurred image to be processed;
[0007] Atmospheric environment model module, used to calculate the effect of suspended matter in the environment on the image due to the refraction of light;
[0008] Dark channel prior principle module, used to calculate the light perspective estimation and obtain a preliminary clear image;
[0009] The intensity constraint module is used to calculate the brightness distribution characteristics of different scene images and adaptively adjust the light perspective to obtain the best deblurring effect;
[0010] Brightness constraint module, used to maintain the brightness level and image edge information of the original image during the deblurring process;
[0011] Color constraint module, used to maintain the color balance of the original image during the deblurring process, to prevent excessive color distortion and unnatural color cast during algorithm enhancement and fusion;
[0012] The image output module is used to generate a clear image after deblurring.
[0013] An image deblurring method comprises the following steps:
[0014] Step 1: Obtain the original blurred image to be processed and input the blurred image to be processed through the image input module;
[0015] Step 2: Use the atmospheric environment model module to build an atmospheric environment model, and use the dark channel prior principle module to calculate the light perspective rate to obtain the preliminary deblurred reconstruction result;
[0016] Step 3: The brightness constraint module uses the histogram to count the pixel brightness features of the original image, and the intensity constraint module uses the image quality evaluation function to calculate the intensity constraint function of the preliminary reconstruction result;
[0017] Step 4: Use the color constraint module to calculate the ratio of the brightness and illumination value of each pixel in the original image and transfer this feature to the reconstructed image;
[0018] Step 5: Calculate the mean and standard deviation of each channel of the original image and the reconstructed image. Subtract the mean of each channel from the value of each pixel of the reconstructed image, multiply it by the ratio of the standard deviation of the original image and the reconstructed image, and finally add the mean of the original image.
[0019] Step 6: The image output module outputs the deblurred clear image.
[0020] In the above-mentioned image deblurring method, the formula for constructing the atmospheric environment model in step 2 is as follows:
[0021] I 真实 =I 清晰 (x)t(x)+A(1-t(x))
[0022] Among them, I 真实 The camera is affected by light, haze, etc., and the captured image is blurred, degraded, and unclear; I 清晰 It is an idealized clear image that is not affected by the environment, that is, the image that we want to reconstruct and restore; It is used to indicate the light transmittance of the environment. When t(x) is larger, it means that more light can pass through the air, that is, the environment has less impact on the image. When t(x) = 1, it is an absolutely pure environment, and when t(x) = 0, it is an opaque environment. A is the ambient light value, which represents the intensity of the light in the environment. When the light intensity is greater, the image will be more blurred and degraded. 清晰(x)t(x) indicates that the suspended matter in the environment blocks the light and affects the image, and A(1-t(x)) indicates that the suspended matter in the environment refracts the light and affects the image. This formula represents the process of image blurring due to the influence of the environment.
[0023] As described above, the image deblurring method, the I 清晰 (x) Explanation for being too large (I 原始 (x)-A) / t(x) is too large, due to I 原始 (x)-A≤0, so the calculated result of the light perspective rate t(x) is too large, resulting in a brighter reconstructed image. Based on the dark channel prior, by adding a deblurring strength constraint P(x) to the light perspective rate t(x), the size of t(x) is limited to solve the problem of over-brightness of the reconstructed image. The formula is as follows:
[0024]
[0025]
[0026] In the above-mentioned image deblurring method, in the step 4, the ratio of the brightness and the illumination value of each pixel in the original image is transferred to the reconstructed image to ensure that the illumination distribution of the reconstructed image is consistent with that of the original image, and the local brightness constraint of the deblurred reconstructed image is realized. The formula is as follows:
[0027]
[0028] Among them, J(x) represents the image after brightness constraint, and L0 represents the average value of the light intensity in the original image.
[0029] In the above-mentioned image deblurring method, the mean μ of each channel of the original image and the reconstructed image is calculated in step 5. c , μ′ c and standard deviation σ c ,σ′ c , used to represent the distribution law of image color, the formula is as follows:
[0030]
[0031]
[0032] Among them, c∈{R,G,B} represents the channel, N represents the number of pixels, I c (x i ), I′ c (x i ) represents pixel x i The value on channel c.
[0033] The advantages of the present invention are as follows: the present invention processes image deblurring by adding three dynamic adjustment constraint functions on the basis of the dark channel prior principle, so as to obtain a clearer and more realistic image, thereby improving the perception and information content of the blurred image. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0035] Figure 1 It is a schematic diagram of the structure of the present invention;
[0036] Figure 2 It is a schematic diagram of the process of the present invention. DETAILED DESCRIPTION
[0037] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are 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.
[0038] Example 1
[0039] like Figure 1 In the image processing device, the image processing device can be a server, a personal computer, a laptop computer, an electronic device, etc. The image processing device and the image acquisition device are connected to each other through a network, and the image acquisition device can be an image collector, a camera, etc. The terminal can be a personal computer, a mobile phone, etc. Among them, when the image processing device and the image acquisition device are connected using a local interface, the image acquisition device can send the acquired initial image to the image processing device, and the image processing device can send the processed image to the terminal. In addition, the terminal can also obtain the initial image obtained by the image acquisition device through the network.
[0040] Example 2
[0041] like Figure 2 As shown, application Figure 1 The image processing device in the embodiment is used as an example to perform an image deblurring method, comprising the following steps:
[0042] Step S1, obtaining an original blurred image to be processed and inputting the blurred image to be processed through an image input module. The original blurred image refers to an image disturbed by atmospheric haze, dust, smoke and other particulate matter. These interference factors will cause the color, contrast and clarity of the image to decrease, making the image look blurred, distorted in color or lose details.
[0043] Step S2, using the atmospheric environment model module to construct an atmospheric environment model, and using the dark channel prior principle module to calculate the light perspective rate, to obtain a preliminary deblurred reconstruction result.
[0044] Step S201, constructing an atmospheric environment model to represent the imaging process of an image in a natural environment, the formula is as follows:
[0045] I 真实 =I 清晰 (x)t(x)+A(1-t(x))
[0046] Among them, I 真实 The camera is affected by light, haze, etc., and the captured image is blurred, degraded, and unclear; I 清晰 It is an idealized clear image that is not affected by the environment, that is, the image that we want to reconstruct and restore; It is used to indicate the light transmittance of the environment. When t(x) is larger, it means that more light can pass through the air, that is, the environment has less impact on the image. When t(x) = 1, it is an absolutely pure environment, and when t(x) = 0, it is an opaque environment. A is the ambient light value, which represents the intensity of the light in the environment. The greater the light intensity, the more blur and degradation the image will produce. 清晰 (x)t(x) indicates that the suspended matter in the environment blocks the light and affects the image, and A(1-t(x)) indicates that the suspended matter in the environment refracts the light and affects the image. This formula represents the process of image blurring due to the influence of the environment.
[0047] Step S202, according to the principle of a priori assumption, there is at least one pixel with the lowest brightness in each color channel of the idealized clear image, which is called the dark channel. The formula is as follows:
[0048]
[0049] Step S203, through the real image I 真实 The corresponding pixel has the highest ambient light value A, and the model is calculated. After the minimum value operation, the model is converted to:
[0050]
[0051] Step S204, after the model conversion, the estimated perspective of the t(x) light ray affected by the blurred image of the dark channel is obtained after the image is blurred by dust, haze or refraction:
[0052]
[0053] Step S205, in the dark channel image I 暗通道 Find the pixel with the lowest brightness in the image, and invert the ambient light value A and the transmittance t(x) to obtain the reconstructed image I without dust, haze or refraction. 清晰 :
[0054]
[0055] Step S3: the brightness constraint module uses a histogram to count the pixel brightness features of the original image, and the intensity constraint module uses an image quality evaluation function to calculate an intensity constraint function of a preliminary reconstruction result.
[0056] Step S301, I 清晰 (x) Explanation for being too large (I 原始 (x)-A) / t(x) is too large, due to I 原始 (x)-A≤0, so the calculated result of the light perspective rate t(x) is too large, resulting in a brighter reconstructed image. Based on the dark channel prior, this section adds a deblurring strength constraint P(x) to the light perspective rate t(x) to limit the size of t(x) to solve the problem of overbrightness of the reconstructed image. The formula is as follows:
[0057]
[0058]
[0059] Step S302, different scene images have different characteristics of brightness feature distribution. In order to make the algorithm adapt to different scenes, it is necessary to automatically adjust the intensity constraint P(x) to obtain the best deblurring effect. First, the brightness feature of the image is calculated by the histogram. The histogram can provide statistical information of the image pixel values, that is, the frequency of occurrence of each pixel value. With the help of the histogram, the image pixel values can be divided into different sets, thereby realizing the image segmentation operation based on the threshold. Let the position of the intensity quantile in the histogram of the original image be the preliminary value of the edge b.
[0060] Step S303: To further refine the exploration of the best value of edge b, perform neighbor exploration on the value of edge b, with a step length of m, perform n value explorations to the left and right, and obtain a value set B of edge b, as shown in the following formula:
[0061] B=[bn×m...b-2m,bm,b,b+m,b+2m...b+m×n]
[0062] Step S304: Use the values in set B as the edge b to perform image deblurring and reconstruction. In order to evaluate the quality of the reconstructed image under each value, use the image evaluation function Q to evaluate the quality of all the obtained deblurred and reconstructed images. The formula is as follows:
[0063] Q(x,y)=l 2 (x,y)c(x,y)s(x,y)
[0064]
[0065]
[0066]
[0067] Among them, l(x,y), c(x,y) and s(x,y) represent the brightness contrast function, contrast contrast function and structure contrast function respectively, and the formulas are as follows. The brightness contrast function l(x,y) compares the mean and variance of the brightness of the original image and the reconstructed image, and normalizes them to obtain a brightness contrast index. The larger the brightness contrast index, the more inconsistent the brightness of the image and the lower the quality; conversely, the smaller the brightness contrast index, the more consistent the brightness of the image and the higher the quality. Unlike the brightness contrast function, the contrast contrast function c(x,y) focuses on the contrast of each position in the image, which can better reflect the local features of the image, and therefore can better measure the quality and realism of the reconstructed image. The larger the contrast contrast index, the greater the contrast difference between the two images and the lower the quality; conversely, the smaller the contrast contrast index, the closer the contrast of the two images and the higher the quality. The structure contrast function s(x,y) obtains the structure contrast index by calculating the similarity of the structural information (i.e., edges, textures, details, etc.) of the two images. The larger the structure contrast index is, the lower the structural similarity between the original image and the reconstructed image is, and the worse the quality is; conversely, the smaller the structure contrast index is, the more similar the structures of the two images are, and the higher the quality is. In summary, the smaller the image evaluation function Q is, the higher the quality of the reconstructed image is.
[0068] Step S305: Use the value of b when the image quality evaluation value is minimum as the constraint edge of P(k).
[0069] b = argmin(Q(m,n))
[0070] Step S4, using the color constraint module to calculate the ratio of the brightness of each pixel in the original image to the illumination value and transfer this feature to the reconstructed image;
[0071] Step S401, calculate the illumination value L(x) of each pixel, where I(y) represents the brightness at position y in the original image, t(y) represents the light perspective at position y in the original image, and Ω(x) represents a small window centered on x. The formula is as follows:
[0072]
[0073] Step S402, the ratio of the brightness and illumination value of each pixel in the original image is transferred to the reconstructed image to ensure that the illumination distribution of the reconstructed image is consistent with that of the original image, and to implement the local brightness constraint on the deblurred reconstructed image. Wherein, J(x) represents the image after the brightness constraint, and L0 represents the average value of the illumination intensity in the original image.
[0074]
[0075] Step S5, calculating the mean and standard deviation of each channel of the original image and the reconstructed image, subtracting the mean of the channel from the value of each pixel of each channel of the reconstructed image, multiplying it by the ratio of the standard deviation of the original image and the standard deviation of the channel of the reconstructed image, and finally adding the mean of the original image;
[0076] Step S501, calculate the mean μ of each channel of the original image and the reconstructed image c , μ′ c and standard deviation σ c ,σ′ c , these two statistics can effectively represent the distribution law of image color. Where c∈{R,G,B} represents the channel, N represents the number of pixels, and I c (x i ), I′ c (x i ) represents pixel x i The value on channel c is as follows:
[0077]
[0078]
[0079] Step S502: Subtract the mean value of each channel from the value of each pixel of the reconstructed image, multiply it by the standard deviation ratio of the original image and the reconstructed image, and finally add the mean value of the original image. The color of the original image can be transferred to the reconstructed image, realizing the color constraint of the deblurred reconstructed image. c (x) represents the final clear image. The formula is as follows:
[0080]
[0081] Step S6: the image output module outputs the clear image after deblurring.
[0082] The present invention first obtains a blurred image affected by haze, water vapor, etc., sets the point with the highest brightness in the image as the ambient light intensity, sets the point with the lowest brightness in the image as the dark channel pixel, constructs an atmospheric environment model, and uses the dark channel prior principle to calculate the light perspective rate to obtain a preliminary deblurring and reconstruction result. The image brightness features are statistically analyzed using a histogram to explore the edge of the image deblurring process, and a deblurring intensity constraint is added to the light perspective rate; the illumination value of each pixel in the original image is calculated, and the ratio of the brightness to the illumination value is transferred to the reconstructed image to constrain the local brightness of the deblurred and reconstructed image; the mean and standard deviation of each channel of the original image and the reconstructed image are calculated, and the value of each channel of each pixel of the reconstructed image is subtracted from the mean of the channel, multiplied by the ratio of the standard deviation of the original image and the reconstructed image, and added to the mean of the original image to obtain the final deblurred and reconstructed image, thereby obtaining a clearer and more realistic image, and improving the perception and information content of the blurred image.
[0083] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. An image deblurring system, Features: Includes the following modules: An image input module, used for inputting a blurred image to be processed; Atmospheric environment model module, used to calculate the effect of suspended matter in the environment on the image due to the refraction of light; Dark channel prior principle module, used to calculate the light perspective estimation and obtain a preliminary clear image; The intensity constraint module is used to calculate the brightness distribution characteristics of different scene images and adaptively adjust the light perspective to obtain the best deblurring effect; Brightness constraint module, used to maintain the brightness level and image edge information of the original image during the deblurring process; Color constraint module, used to maintain the color balance of the original image during the deblurring process, to prevent excessive color distortion and unnatural color cast during algorithm enhancement and fusion; An image output module, used to generate a clear image after deblurring; The specific operation includes the following steps: Step S3, the brightness constraint module uses a histogram to count the pixel brightness features of the original image, and the intensity constraint module uses an image quality evaluation function to calculate an intensity constraint function of the preliminary reconstruction result; Step S301, I 清晰 (x) Explanation for being too large (I 原始 (x)-A) / t(x) is too large, due to I 原始 (x)-A≤0, so the calculated result of the light perspective rate t(x) is too large, resulting in a brighter reconstructed image. Based on the dark channel prior, a deblurring strength constraint P(x) is added to the light perspective rate t(x) to limit the size of t(x) to solve the problem of over-brightness of the reconstructed image. The formula is as follows: Step S302: Different scene images have different characteristics of brightness feature distribution. In order to make the algorithm adapt to different scenes, it is necessary to automatically adjust the intensity constraint P(x) to obtain the best deblurring effect. First, the brightness feature of the image is calculated by a histogram. The histogram can provide statistical information of the image pixel values, that is, the frequency of occurrence of each pixel value. With the help of the histogram, the image pixel values can be divided into different sets, thereby realizing the image segmentation operation based on the threshold. The position of the intensity quantile in the histogram of the original image is set as the preliminary value of the edge b. Step S303: To further refine the exploration of the best value of edge b, perform neighbor exploration on the value of edge b, with a step length of m, perform n value explorations to the left and right, and obtain a value set B of edge b, as shown in the following formula: B=[bn×m...b-2m,bm,b,b+m,b+2m...b+m×n]; Step S304: Use the values in set B as the edge b to perform image deblurring and reconstruction. In order to evaluate the quality of the reconstructed image under each value, use the image evaluation function Q to evaluate the quality of all the obtained deblurred and reconstructed images. The formula is as follows: Q(x,y)=l 2 (x,y)c(x,y)s(x,y) Among them, l(x,y), c(x,y) and s(x,y) represent the brightness contrast function, contrast contrast function and structure contrast function respectively, and the formulas are as follows. The brightness contrast function l(x,y) compares the mean and variance of the brightness of the original image and the reconstructed image, and normalizes them to obtain a brightness contrast index. The larger the brightness contrast index, the more inconsistent the brightness of the image and the lower the quality; conversely, the smaller the brightness contrast index, the more consistent the brightness of the image and the higher the quality. Different from the brightness contrast function, the contrast contrast function c(x,y) focuses on the contrast of each position in the image, which can better reflect the local characteristics of the image. The larger the contrast index, the greater the difference in contrast between the two images, and the lower the quality; conversely, the smaller the contrast index, the closer the contrast between the two images, and the higher the quality. The structural contrast function s(x, y) calculates the similarity of the structural information of the two images to obtain the structural contrast index. The larger the structural contrast index, the lower the structural similarity between the original image and the reconstructed image, and the worse the quality; conversely, the smaller the structural contrast index, the more similar the structures of the two images, and the higher the quality. In summary, when the image evaluation function Q is smaller, the quality of the reconstructed image is higher. Step S305, using the value of b when the image quality evaluation value is minimum as the constraint edge of P(k); b = argmin(Q(m,n)); Step S4, using the color constraint module to calculate the ratio of the brightness of each pixel in the original image to the illumination value and transfer this feature to the reconstructed image; Step S401, calculate the illumination value L(x) of each pixel, where I(y) represents the brightness at position y in the original image, t(y) represents the light perspective at position y in the original image, and Ω(x) represents a small window centered on x. The formula is as follows: Step S402, the ratio of the brightness and illumination value of each pixel in the original image is transferred to the reconstructed image to ensure that the illumination distribution of the reconstructed image is consistent with that of the original image, and to implement the local brightness constraint on the deblurred reconstructed image, where J(x) represents the image after brightness constraint, and L 0 Expressed as the average value of the light intensity in the original image; Step S5, calculating the mean and standard deviation of each channel of the original image and the reconstructed image, subtracting the mean of the channel from the value of each pixel of each channel of the reconstructed image, multiplying it by the ratio of the standard deviation of the original image and the standard deviation of the channel of the reconstructed image, and finally adding the mean of the original image; Step S501, calculate the mean μ of each channel of the original image and the reconstructed image c , μ c ′ and standard deviation σ c , σ c ′, these two statistics can effectively represent the distribution law of image color, where c∈{R,G,B} represents the channel, N represents the number of pixels, and I c (x i ), I c ′(x i ) represents pixel x i The value on channel c is as follows: Step S502: Subtract the mean value of each channel from the value of each pixel of the reconstructed image, multiply it by the standard deviation ratio of the original image and the reconstructed image, and finally add the mean value of the original image, so as to transfer the color of the original image to the reconstructed image and realize the color constraint of the deblurred reconstructed image. c (x) represents the final clear image, and the formula is as follows:
2. An image deblurring method, Features: The steps include: Step 1: Obtain the original blurred image to be processed and input the blurred image to be processed through the image input module; Step 2: Use the atmospheric environment model module to build an atmospheric environment model, and use the dark channel prior principle module to calculate the light perspective rate to obtain the preliminary deblurred reconstruction result; Step 3: The brightness constraint module uses the histogram to count the pixel brightness features of the original image, and the intensity constraint module uses the image quality evaluation function to calculate the intensity constraint function of the preliminary reconstruction result; Step S301, I 清晰 (x) Explanation for being too large (I 原始 (x)-A) / t(x) is too large, due to I 原始 (x)-A≤0, so the calculated result of the light perspective rate t(x) is too large, resulting in a brighter reconstructed image. Based on the dark channel prior, a deblurring strength constraint P(x) is added to the light perspective rate t(x) to limit the size of t(x) to solve the problem of over-brightness of the reconstructed image. The formula is as follows: Step S302: Different scene images have different characteristics of brightness feature distribution. In order to make the algorithm adapt to different scenes, it is necessary to automatically adjust the intensity constraint P(x) to obtain the best deblurring effect. First, the brightness feature of the image is calculated by a histogram. The histogram can provide statistical information of the image pixel values, that is, the frequency of occurrence of each pixel value. With the help of the histogram, the image pixel values can be divided into different sets, thereby realizing the image segmentation operation based on the threshold. The position of the intensity quantile in the histogram of the original image is set as the preliminary value of the edge b. Step S303: To further refine the exploration of the best value of edge b, perform neighbor exploration on the value of edge b, with a step length of m, perform n value explorations to the left and right, and obtain a value set B of edge b, as shown in the following formula: B=[bn×m...b-2m,bm,b,b+m,b+2m...b+m×n]; Step S304: Use the values in set B as the edge b to perform image deblurring and reconstruction. In order to evaluate the quality of the reconstructed image under each value, use the image evaluation function Q to evaluate the quality of all the obtained deblurred and reconstructed images. The formula is as follows: Q(x,y)=l 2 (x,y)c(x,y)s(x,y) Among them, l(x,y), c(x,y) and s(x,y) represent the brightness contrast function, contrast contrast function and structure contrast function respectively, and the formulas are as follows. The brightness contrast function l(x,y) compares the mean and variance of the brightness of the original image and the reconstructed image, and normalizes them to obtain a brightness contrast index. The larger the brightness contrast index, the more inconsistent the brightness of the image and the lower the quality; conversely, the smaller the brightness contrast index, the more consistent the brightness of the image and the higher the quality. Different from the brightness contrast function, the contrast contrast function c(x,y) focuses on the contrast of each position in the image, which can better reflect the local characteristics of the image. The larger the contrast index, the greater the difference in contrast between the two images, and the lower the quality; conversely, the smaller the contrast index, the closer the contrast between the two images, and the higher the quality. The structural contrast function s(x, y) calculates the similarity of the structural information of the two images to obtain the structural contrast index. The larger the structural contrast index, the lower the structural similarity between the original image and the reconstructed image, and the worse the quality; conversely, the smaller the structural contrast index, the more similar the structures of the two images, and the higher the quality. In summary, when the image evaluation function Q is smaller, the quality of the reconstructed image is higher. Step S305, using the value of b when the image quality evaluation value is minimum as the constraint edge of P(k); b = argmin(Q(m,n)); Step 4: Use the color constraint module to calculate the ratio of the brightness and illumination value of each pixel in the original image and transfer this feature to the reconstructed image; Step S401, calculate the illumination value L(x) of each pixel, where I(y) represents the brightness at position y in the original image, t(y) represents the light perspective at position y in the original image, and Ω(x) represents a small window centered on x. The formula is as follows: Step S402, the ratio of the brightness and illumination value of each pixel in the original image is transferred to the reconstructed image to ensure that the illumination distribution of the reconstructed image is consistent with that of the original image, and to implement the local brightness constraint on the deblurred reconstructed image, where J(x) represents the image after brightness constraint, and L 0 It is expressed as the average value of the light intensity in the original image; Step 5: Calculate the mean and standard deviation of each channel of the original image and the reconstructed image. Subtract the mean of each channel from the value of each pixel of the reconstructed image, multiply it by the ratio of the standard deviation of the original image and the reconstructed image, and finally add the mean of the original image. Step S501, calculate the mean μ of each channel of the original image and the reconstructed image c , μ c ′ and standard deviation σ c , σ c ′, these two statistics can effectively represent the distribution law of image color, where c∈{R,G,B} represents the channel, N represents the number of pixels, and I c (x i ), I c ′(x i ) represents pixel x i The value on channel c is as follows: Step S502: Subtract the mean value of each channel from the value of each pixel of the reconstructed image, multiply it by the standard deviation ratio of the original image and the reconstructed image, and finally add the mean value of the original image, so as to transfer the color of the original image to the reconstructed image and realize the color constraint of the deblurred reconstructed image. c (x) represents the final clear image, and the formula is as follows: Step 6: The image output module outputs the deblurred clear image.
3. An image deblurring method according to claim 2, Features: The formula for constructing the atmospheric environment model in step 2 is as follows: I 真实 =I 清晰 (x)t(x)+A(1-t(x)) Among them, I 真实 The camera is affected by light and haze, resulting in blurred, degraded, and unclear images. 清晰 It is an idealized clear image that is not affected by the environment, that is, the image that we want to reconstruct and restore; It is used to indicate the light transmittance of the environment. When t(x) is larger, it means that more light can pass through the air, that is, the environment has less impact on the image. When t(x) = 1, it is an absolutely pure environment, and when t(x) = 0, it is an opaque environment. A is the ambient light value, which represents the intensity of the light in the environment. When the light intensity is greater, the image will be more blurred and degraded. 清晰 (x)t(x) indicates that the suspended matter in the environment blocks the light and affects the image, and A(1-t(x)) indicates that the suspended matter in the environment refracts the light and affects the image. This formula represents the process of image blurring due to the influence of the environment.
