An underwater image restoration method based on dark channel prior
By combining dark channel prior and superpixel segmentation algorithm with modified red channel prior, adaptive selection of background light and transmittance, and integration of Lab color space and Gamma model, the accuracy and robustness issues of underwater image restoration methods are solved, achieving higher quality image restoration results.
Patent Information
- Application Number
- CN202211436297.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-16
- Publication Date
- 2026-01-20
- Estimated Expiration
- 2042-11-16
AI Technical Summary
Existing underwater image restoration methods are not accurate enough in estimating transmittance and background light, lack robustness, and cannot adapt to different types of degraded images, resulting in poor restoration results.
By employing a dark channel prior-based approach, combined with superpixel segmentation algorithm and modified red channel prior, and by adaptively selecting background light value and transmittance, and combining color compensation in Lab color space and Gamma model, the image contrast and saturation are adjusted to achieve adaptive image restoration.
It improves the clarity and color saturation of underwater images, enhances image contrast, improves the detail restoration of restored images, and has greater adaptability and wider applicability to various scenarios.
Smart Images

Figure CN115908178B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image processing, in particular, especially relates to an underwater image restoration method based on dark channel prior. BACKGROUND
[0002] About two-thirds of the area on the earth is ocean, and the ocean contains abundant marine resources, including marine power resources, marine mineral resources, marine biological resources, marine space resources, etc. With the development of economy, science and military, and the shortage of natural resources on land, the proportion of marine economic output value in the gross domestic product is increasing year by year. Reasonable development of marine resources will make up for the problem of resource shortage in China to some extent, which is very important for the development of China's economy and society.
[0003] However, unlike general images collected on the ground, due to the complexity and particularity of the underwater environment, the original images obtained usually show low contrast, color distortion and detail loss, and it is difficult to obtain high-quality underwater images. The existing underwater image sharpening technology can be roughly divided into three categories: image enhancement method, model-based image restoration method and deep learning-based method.
[0004] The deep learning-based method has some common problems, such as large sample size, long training time and unknown physical mechanism. Although the image enhancement method is simple and fast, it often produces over-enhancement or under-enhancement. Compared with the above two methods, the model-based image restoration method is relatively complex in theory, and needs to solve many parameters, but the imaging model is relatively consistent with the objective degradation mechanism, and can better process underwater images taken in different environments, and the restored image is closer to the real image, so the underwater image restoration method has better application prospect.
[0005] At present, most of the restoration methods based on physical model are not accurate in estimating transmittance and background light, cannot be applied to special environments, have insufficient robustness, and cannot make adaptive adjustments when restoring different types of degraded images. SUMMARY
[0006] In view of the deficiencies of the prior art, the present application provides an underwater image restoration method based on dark channel prior. The present application determines the background light value by using the distribution characteristics of the background light candidate point aggregation and the smoothness characteristics of the neighborhood around the candidate point, combines the characteristics and respective advantages of the traditional dark channel prior and the modified red channel prior transmittance expression, equivalently converts to obtain a transmittance applicable to a wider scene, preliminarily restores the underwater image, then performs color compensation in the Lab color space, and finally adjusts the contrast and saturation of the image by using the modified Gamma model to obtain the final restored image.
[0007] A dark channel prior-based underwater image restoration method, comprising the following steps:
[0008] S1: obtaining an original image, and constructing an underwater image restoration model based on the original image;
[0009] S2: segmenting the original image using an SLIC superpixel segmentation algorithm, replacing a dark channel fixed square filter window with a superpixel segmentation block obtained, and obtaining a dark channel image, wherein the SLIC superpixel segmentation algorithm is used to locally cluster image pixels according to a distance measurement standard;
[0010] S3: adaptively selecting a background light candidate point in the dark channel of the underwater image according to distribution characteristics of the background light candidate point and smooth characteristics of a neighborhood of the background light candidate point, and finally determining a background light value;
[0011] S4: calculating an adaptive transmittance according to an input image and the background light value;
[0012] S5: solving a preliminary restoration image based on the underwater image restoration model, the final background light value and the adaptive transmittance image;
[0013] S6: performing color compensation on color channel a and b components of the preliminary restoration image in a Lab color space, and adjusting contrast and saturation of the color-compensated image as a whole using a Gamma correction model to obtain a final restoration image.
[0014] Further, the underwater image restoration model in S1 is:
[0015] I λ (x)=J λ (x)t λ (x)+B λ (x)(1-t λ (x))
[0016] wherein I λ (x) is an original input image, J λ (x) is a restored output image, t λ (x) represents transmittance, B λ (x) represents global background light, and λ∈(R, G, B).
[0017] Further, the SLIC superpixel segmentation algorithm used in S2 to segment the original image comprises:
[0018] S21: initializing seed points, and uniformly distributing the seed points in the image according to a set number of superpixels;
[0019] S22: reselecting the seed point in the n*n neighborhood of the seed point, calculating the gradient value of all pixel points in the neighborhood, and moving the seed point to the minimum gradient position in the neighborhood;
[0020] S23: assigning a class label to each pixel point in the neighborhood around each seed point;
[0021] S24: for each searched pixel point, calculating the judgment distance of it and the seed point respectively, taking the seed point corresponding to the minimum value of the judgment distance of each pixel point and the surrounding seed point as the clustering center of the pixel point, the distance includes color component distance and spatial component distance, and the specific calculation process is as follows
[0022]
[0023] wherein, d s (k,i) represents the spatial component distance between the kth seed point (x k ,y k ) of the image pixel and the image pixel (x i ,y i ), d c (k,i) represents the color component distance between the kth seed point (x k ,y k ) of the CIE LAB color space and the image pixel (x i ,y i ), (x i ,y i ) ∈ δ, δ is a neighborhood with (x k ,y k ) as the center and S as the radius, N s is the maximum spatial distance in the class, defined as N s =sqrt(N / K), N c is the maximum color distance, D(k,i) is the judgment distance of the pixel point (x i ,y i ) and the seed point (x k ,y k ), and the seed point corresponding to the minimum value is taken as the clustering center of the pixel point;
[0024] Step S25: repeatedly performing S22 to S24 for iteration optimization until the error converges.
[0025] Further, the obtained superpixel segmentation block in S2 replaces the dark channel fixed square filter window, including obtaining the dark channel image according to the following formula:
[0026]
[0027] wherein, J λ(x) represents the RGB three channels of the image J, λ∈(R, G, B), Ω(x) is the superpixel block region, J D (x) represents the dark channel of the image J.
[0028] Further, in S3, the distribution characteristics of the background light candidate point aggregation and the smooth characteristics of the neighborhood of the candidate point are used to adaptively select the background light candidate point in the dark channel of the underwater image, and finally determine the background light value, including the following steps:
[0029] Step S31: select the top 1% brightest pixel points in the dark channel image, which correspond to the candidate points in the original image pixels;
[0030] Step S32: according to the number distribution of the candidate points in the superpixel block of the original image and the smooth characteristics of the neighborhood of the candidate point set, select the candidate point set, specifically including: comparing the number of point sets contained in each two superpixel blocks, if the number of point sets in one superpixel block is greater than that in the other superpixel block and the difference between the number of point sets of the two superpixel blocks is greater than half of the number of point sets of the superpixel block with fewer point sets, then the point set in the superpixel block with more point sets is the candidate point set, otherwise the point set of the superpixel block with smaller average gradient in the two superpixel blocks is selected as the candidate point set, and the final candidate point set is selected by traversing each superpixel block in the original image;
[0031] Step S33: select the pixel value of the point in the original image pixel corresponding to the candidate point set which satisfies max(V G OR V B -V R ) as the background light value, wherein V G ,V B ,V R are the pixel values of the R, G and B color channels of the pixel points in the candidate point set.
[0032] Further, in S4, the characteristics of the transmission rate expression are obtained by combining the dark channel prior and the modified red channel prior, including calculating the adaptive transmission rate according to the following formula:
[0033]
[0034] Where I λ (y) is the original input image, t ap (x) represents the new adaptive transmission rate, B λ represents the global background light, λ∈(R, G, B).
[0035] Further, S5 is based on the underwater image restoration model, the final background light value and the adaptive transmission map to solve the preliminary restored image, including obtaining the preliminary restored image according to the following formula:
[0036]
[0037] wherein I λ is the original input image, J λ (x) is the output image after restoration, t ap (x) represents the adaptive transmittance, t0 represents the transmittance threshold, B λ represents the global background light.
[0038] Further, in S6, color compensation is performed on the color channels a, b components of the preliminary restored image in the Lab color space, including compensating the preliminary restored image according to the following formula:
[0039]
[0040] wherein a new is the compensated a channel, b new is the compensated b channel, a, b are the color channels of the preliminary restored image, are the a, b channel mean values respectively.
[0041] Further, in S6, a Gamma correction model is used to adjust the contrast and saturation of the preliminary restored image as a whole, including adjusting the preliminary restored image according to the following formula:
[0042]
[0043] wherein O(x) represents the output pixel value, I(x) represents the input pixel value, I low is the minimum intensity value of the input image interval, I high is the maximum intensity value of the input image interval, O low represents the desired minimum stretching value, O high is the desired maximum stretching value.
[0044] Compared with the prior art, the present application has the following advantages:
[0045] 1. In order to solve the problem of misjudgment of bright pixels or white object pixels in the foreground of the underwater environment to the background light of the underwater image, the present application introduces a superpixel segmentation algorithm on the basis of the dark channel prior to distinguish different depth of field objects and backgrounds, reduces the negative impact of the dark channel acquisition at the place where the depth of field changes sharply, and obtains a more accurate dark channel. Secondly, the adaptive selection of the background light candidate points in the dark channel of the underwater image is performed by using the distribution characteristics of the aggregation of the background light candidate points and the smoothing characteristics of the neighborhood of the candidate points, and the final background light value is determined.
[0046] 2. The application is more prepared to estimate the transmittance by combining the dark channel prior and the characteristics of the modified red channel prior expression, which is equivalent to the adaptive transmittance expression with a wider use of scenes, so that the details of the preliminary restored image are greatly improved;
[0047] 3. The application greatly improves the clarity, contrast and color saturation of the final restored image by performing color compensation on the color channels a and b components in the Lab color space, and adjusting the image contrast and saturation using a Gamma correction model for the entire image.
[0048] Based on the above reasons, the application can be widely used in the field of image processing. BRIEF DESCRIPTION OF DRAWINGS
[0049] In order to more clearly illustrate the technical solutions in the embodiments of the application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are some embodiments of the application, and for those skilled in the art, other drawings can also be obtained without creative labor.
[0050] Figure 1 The flowchart of the underwater image restoration method based on the dark channel prior of the application.
[0051] Figure 2 The comparison chart of the restoration effect of the restoration method and other restoration methods on the coral image, wherein (a) represents the initial image before restoration, (b) represents the result image processed by using the UDCP method, (c) represents the result image processed by using the MSRCR method, (d) represents the result image processed by using the Fusion method, (e) represents the result image processed by using the application, and (f) represents the original image of the image set.
[0052] Figure 3 The comparison chart of the restoration effect of the restoration method and other restoration methods on the diver image, wherein (a) represents the initial image before restoration, (b) represents the result image processed by using the UDCP method, (c) represents the result image processed by using the MSRCR method, (d) represents the result image processed by using the Fusion method, (e) represents the result image processed by using the application, and (f) represents the original image of the image set.
[0053] Figure 4The comparison chart of the restoration effects of the restoration method of the present application and other restoration methods on school images, wherein (a) represents the initial image before restoration, (b) represents the result image processed by using the UDCP method, (c) represents the result image processed by using the MSRCR method, (d) represents the result image processed by using the Fusion method, (e) represents the result image processed by using the present application, and (f) represents the original image of the image set. DETAILED DESCRIPTION
[0054] In order to make the personnel in the technical field better understand the present application scheme, the technical scheme in the embodiments of the present application will be clearly and completely described below in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by the person of ordinary skill in the art without making creative labor should belong to the protection scope of the present application.
[0055] As shown in Figure 1 The present application provides an underwater image restoration method based on dark channel prior, comprising the following steps:
[0056] S1: obtaining an original image, and creating an underwater image restoration model for the original image.
[0057] The underwater image restoration model is:
[0058] I λ (x)=J λ (x)t λ (x)+B λ (x)(1-t λ (x))
[0059] Wherein, I λ (x) is the original input image, J λ (x) is the output image after restoration, t λ (x) represents the transmittance, B λ (x) represents the global background light, and λ∈(R,G,B).
[0060] Step S2: using the SLIC superpixel segmentation algorithm to segment the original image, and obtaining the dark channel image by replacing the dark channel fixed square filter window with the obtained superpixel segmentation block, wherein the SLIC superpixel segmentation algorithm is used to locally cluster the image pixels according to the distance measurement standard.
[0061] The SLIC superpixel segmentation algorithm is used to segment the original image in S2, comprising:
[0062] S21: Initialize seed points: Distribute seed points evenly within the image according to the set number of superpixels. Assuming the image has a total of N pixels, pre-segmented into K superpixels of the same size, then the size of each superpixel is N / K, and the distance (step size) between adjacent seed points is approximately S = sqrt(N / K).
[0063] S22: Reselect a seed point within the n*n neighborhood of the seed point (usually n=3). The specific method is: calculate the gradient values of all pixels within this neighborhood, and move the seed point to the location with the smallest gradient within that neighborhood. This is done to avoid the seed point falling on the contour boundary with a large gradient, which could affect subsequent clustering results.
[0064] S23: Assign a class label (i.e., which seed point it belongs to) to each pixel within the neighborhood of each seed point. Limiting the search range to 2S*2S can accelerate algorithm convergence.
[0065] S24: Distance metrics, including color distance and spatial distance. For each found pixel, calculate its distance to the corresponding seed point. Since each pixel is searched by multiple seed points, each pixel has a distance to its surrounding seed points. The seed point with the minimum distance is taken as the cluster center for that pixel. The specific calculation process is as follows:
[0066]
[0067] Where, d s (k,i) represents the k-th seed point (x) of the image pixel. k ,y k ) and image pixels (x i ,y i The spatial distance between ) and d c (k,i) represents the k-th seed point (x) in the CIE LAB color space. k ,y k ) and image pixels (x i ,y i The color component distance between (x) i ,y i )∈δ, δ is (x) k ,y k Let S be the neighborhood centered at point N, with radius S. s It is the maximum spatial distance within the class, defined as N. s =qrt(N / K), N c The maximum color distance varies depending on the image, and is generally replaced by a fixed constant m, where m∈[1,40]. D(k,i) represents the pixel (x) i ,y i ) and seed point (xk , y k ) of the distance discriminant, and the seed point corresponding to the minimum value is taken as the clustering center of the pixel point.
[0068] Step S25: Iterative optimization. In theory, S22 to S24 are iterated until the error converges. In practice, it is found that 10 iterations can achieve a relatively ideal effect for most pictures, so the number of iterations is generally 10.
[0069] The obtained superpixel segmentation block replaces the dark channel fixed square filter window, and the dark channel image is obtained according to the following formula:
[0070]
[0071] Wherein, J λ (x) represents the RGB three channels of the image J, λ ∈ (R, G, B), Ω (x) is the superpixel fast region, J D (x) represents the dark channel of the image J.
[0072] Step S3: Based on the distribution characteristics of the background light candidate points and the smooth characteristics of the neighborhood of the candidate points, the background light candidate points in the dark channel of the underwater image are adaptively selected, and the background light value is finally determined.
[0073] The final background light is determined based on the characteristics of the background light candidate points in step S3, including the following steps:
[0074] Step S31: Select the top 1% of the brightest pixel points in the dark channel image, which correspond to the candidate points in the original image pixels.
[0075] Step S32: According to the number distribution of the candidate points in the superpixel blocks of the original image and the smooth characteristics of the neighborhood of the candidate point set, the candidate point set is selected, which specifically includes: comparing the number of point sets contained in each two superpixel blocks, if the number of point sets in one superpixel block is greater than that in the other superpixel block and the difference between the number of point sets in the two superpixel blocks is greater than half of the number of point sets in the superpixel block with fewer point sets, then the point set in the superpixel block with more point sets is the candidate point set, otherwise, the point set in the superpixel block with smaller average gradient is selected as the candidate point set, and the final candidate point set is selected by traversing each superpixel block in the original image. For example, to illustrate the way to determine the candidate point set, if the number of candidate points in A and B superpixel blocks is compared, if the number of point sets in A is greater than that in B, and the difference between the number of point sets in A and B is greater than half of the number of point sets in B, then the point set in A is the candidate point set, if the condition is not met, the point set in the superpixel block with the smallest average gradient is selected as the candidate point set. According to this principle, the superpixel blocks in the original image are compared in turn, and the final candidate point set is selected.
[0076] Step S33: select the pixel value of the point in the original image corresponding to the point in the candidate point set satisfying max(V G OR V B -V R ) as the background light value, wherein V G ,V B ,V R are the pixel values of the R, G, and B color channels of the pixel point in the candidate point set, respectively.
[0077] Step S4: convert the transmittance expression corresponding to the dark channel prior and the modified red channel prior into an adaptive transmittance expression using a wider scene by equivalent conversion. Specifically, the adaptive transmittance is calculated according to the input image and the background light value:
[0078]
[0079] wherein I λ (y) is the original input image, t ap (x) represents the new adaptive transmittance, B λ represents the global background light, and λ ∈ (R, G, B).
[0080] Step S5: use the underwater image restoration model, the background light value obtained in step S3, and the adaptive transmittance map in step S4 to solve the preliminary restored image.
[0081] The formula for solving the preliminary restored image is:
[0082] wherein I λ is the original input image, J λ (x) is the restored output image, t ap (x) represents the adaptive transmittance, t0 represents the lower limit to avoid the transmittance being too small and causing the restored image to be too bright, and is set to 0.1, and B λ represents the global background light.
[0083] Step S6: perform color compensation on the a and b components in the Lab color space, and use a Gamma correction model to adjust the contrast and saturation of the entire image to obtain the final restored image.
[0084] The formula for color compensation on the a and b channels in the Lab color space in step S6 and the expression of the Gamma correction model are:
[0085] Step S61: perform color compensation on the a and b color channels in the Lab color space:
[0086]
[0087] wherein anew a channel after compensation, b new b channel after compensation, a, b are color channels of the preliminary restored image, a, b are the mean values of a, b channels respectively. When a = 0, b = 0, the color channel will present a neutral gray value.
[0088] Step S62: the expression of the Gamma correction model is used on the basis of the cumulative histogram as follows:
[0089]
[0090] wherein O(x) represents an output pixel value, I(x) represents an input pixel value, I low is a minimum intensity value of an input image interval, I high is a maximum intensity value of an input image interval, O low represents a desired stretching minimum value, O high is a desired stretching maximum value.
[0091] In order to verify the effectiveness of the underwater image restoration of the present application, underwater images of different scenes are selected as a test set, and the experimental results of the UDCP method, the MSRCR method and the Fusion method are compared and analyzed from the qualitative and quantitative aspects. Figure 2 , Figure 3 The data set used is UIEB (Underwater Image Enhancement Benchmark Dataset), which is a paired data set opened by Li et al., and the original image comes from an underwater real image, and the Ground truth comes from a variety of traditional methods. Figure 4 The data set used is SUID (Synthetic Underwater Image Dataset), which is opened on IEEE resource, wherein the Ground truth is a real image on land, and the original image is simulated by an algorithm.
[0092] As shown in Figure 2 , Figure 3 , Figure 4 The comparison chart of the underwater image restoration effect of the present application and other methods can be seen, the UDCP method cannot well eliminate color cast, and the restored image quality is not high, the MSRCR method and the Fusion method can eliminate color cast, but to a certain extent, cause image color distortion, introduce other color cast, and the long-range detail recovery is poor, and the definition is not high, the underwater image processed by the present application better solves the blur problem and the color cast problem, improves the overall contrast and color saturation of the underwater image, and the overall visual effect is better.
[0093] From the data in Table 1, Table 2 and Table 3, it can be seen that the UCIQE, UIQM and Entropy of the corresponding result images of the UDCP method, the MSRCR method, the Fusion method and the method of the present application are all greater than those of the original image, and all have certain improvement; among them, the UDCP method has smaller improvement in each index of the image, the MSRCR method and the Fusion method have higher improvement in the UCIQE and UIQM indexes of the image, but have smaller increase in the image information entropy, and the restored image has smaller average information amount. This shows that the UDCP method, the MSRCR method and the Fusion method improve the image quality to a certain extent, but the overall visual effect and the image information entropy are not greatly improved. From the overall data, it can be seen that the UCIQE, UIQM and image information entropy of the original underwater image are greatly improved by the method of the present application, and the method of the present application is superior to other underwater image restoration methods.
[0094] Table 1 Comparison of UCIQE of the processing results of the method of the present application and other methods
[0095]
[0096] Table 2 Comparison of UIQM of the processing results of the method of the present application and other methods
[0097]
[0098] Table 3 Comparison of Entropy of the processing results of the method of the present application and other methods
[0099]
[0100] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement to part or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for underwater image restoration based on dark channel prior, characterized in that, The method comprises the following steps: S1: obtaining an original image, and constructing an underwater image restoration model based on the original image; S2: using a SLIC superpixel segmentation algorithm to segment the original image, and replacing a dark channel fixed square filter window with a superpixel segmentation block obtained to obtain a dark channel image, the SLIC superpixel segmentation algorithm being used to locally cluster image pixels according to a distance measurement standard; S3: adaptively selecting a background light candidate point in the dark channel of the underwater image according to distribution characteristics of the background light candidate point and smooth characteristics of a neighborhood of the background light candidate point, and finally determining a background light value; S4: calculating an adaptive transmittance according to the input image and the background light value; S5: solving a preliminary restoration image based on the underwater image restoration model, the final background light value and the adaptive transmittance image; S6: performing color compensation on color channel a and b components of the preliminary restoration image in a Lab color space, and adjusting contrast and saturation of the color-compensated image as a whole by using a Gamma correction model to obtain a final restoration image.
2. The underwater image restoration method based on dark channel prior according to claim 1, characterized in that, The underwater image restoration model in S1 is as follows: I λ (x) = J λ (x)t λ (x) + B λ (x)(1-t λ (x)) where I λ (x) is the original input image, J λ (x) is the recovered output image, t λ (x) denotes the transmittance, B λ (x) denotes the global ambient light, λ ∈ (R, G, B).
3. The underwater image restoration method based on dark channel prior according to claim 1, characterized in that, In S2, the SLIC superpixel segmentation algorithm is used to segment the original image, comprising the following steps: S21: initializing seed points, and uniformly distributing the seed points in the image according to a set number of superpixels; S22: reselecting a seed point in an n*n neighborhood of the seed point, calculating gradient values of all pixel points in the neighborhood, and moving the seed point to a position with the minimum gradient in the neighborhood; S23: assigning a class label to each pixel point in a neighborhood around each seed point; S24: for each searched pixel point, calculating a judgment distance of the pixel point from each seed point, and taking a seed point corresponding to a minimum value of the judgment distances of the pixel point from the surrounding seed points as a clustering center of the pixel point, the distance including a color component distance and a spatial component distance, and the specific calculation process being as follows where d s (k,i) represents the spatial component distance between the kth seed point (x k ,y k ) and the image pixel (x i ,y i ), d c (k,i) represents the color component distance between the kth seed point (x k ,y k ) and the image pixel (x i ,y i ) in the CIE LAB color space, (x i ,y i ) ∈ δ, δ is a neighborhood with (x k ,y k ) as the center and S as the radius, N s is the maximum spatial distance within the class, defined as N s = sqrt(N / K), N c is the maximum color distance, D(k,i) is the discriminant distance between the pixel point (x i ,y i ) and the seed point (x k ,y k ), and the seed point corresponding to the minimum value is taken as the clustering center of the pixel point; Step S25: iteratively performing S22 to S24 until an error converges.
4. The method of claim 1, wherein, In S2, the superpixel segmentation block is used to replace the dark channel fixed square filter window, and a dark channel image is obtained according to the following formula: where J λ (x) denotes the RGB three channels of image J, λ ∈ (R, G, B), Ω(x) is the superpixel block region, J D (x) denotes the dark channel of image J.
5. The underwater image restoration method based on dark channel prior according to claim 1, characterized in that, In S3, the adaptive selection of the background light candidate point in the dark channel of the underwater image is performed according to distribution characteristics of the background light candidate point and smooth characteristics of a neighborhood of the background light candidate point, and finally the background light value is determined, comprising the following steps: Step S31: selecting the top 1% of the brightest pixel points in the dark channel image as candidate points corresponding to each point in the original image; Step S32: selecting a candidate point set according to the number distribution of the candidate points in the superpixel blocks of the original image and the smooth characteristics of the neighborhood of the candidate point set, specifically comprising: comparing the number of point sets contained in each two superpixel blocks, if the number of point sets in one superpixel block is greater than that in the other superpixel block and the difference between the number of point sets in the two superpixel blocks is greater than half of the number of point sets in the superpixel block with fewer point sets, then the point set in the superpixel block with more point sets is the candidate point set, otherwise, the point set in the superpixel block with smaller average gradient is selected as the candidate point set, and the final candidate point set is selected by traversing each superpixel block in the original image; Step S33: select the pixel value of the point in the original image pixel corresponding to the selected point set which satisfies max(V G OR V B -V R ) as the background light value, wherein V G ,V B ,V R are the pixel values of the R, G, and B color channels of the pixel point in the selected point set, respectively.
6. The underwater image restoration method based on dark channel prior according to claim 1, characterized in that, In S4, the adaptive transmittance expression is obtained by equivalent conversion according to the characteristics of the transmittance expression combined with the dark channel prior and the modified red channel prior, including calculating the adaptive transmittance according to the following formula: where I λ (y) is the original input image, t ap (x) denotes the new adaptive transmittance, B λ denotes the global background light, λ ∈ (R, G, B).
7. The underwater image restoration method based on dark channel prior according to claim 1, characterized in that, In S5, the preliminary restored image is solved based on the underwater image restoration model, the final background light value and the adaptive transmittance map, including obtaining the preliminary restored image according to the following formula: where I λ is the original input image, J λ (x) is the recovered output image, t ap (x) denotes the adaptive transmittance, t0denotes the transmittance threshold, B λ denotes the global background light.
8. The underwater image restoration method based on dark channel prior according to claim 1, characterized in that, In S6, the color compensation is performed on the color channels a and b components of the preliminary restored image in the Lab color space, including compensating the preliminary restored image according to the following formula: where a new is the compensated a channel, b new is the compensated b channel, a, b are color channels of the preliminary recovered image, are the a, b channel means, respectively.
9. The underwater image restoration method based on dark channel prior according to claim 8, characterized in that, In S6, the Gamma correction model is used to adjust the contrast and saturation of the preliminary restored image as a whole, including adjusting the preliminary restored image according to the following formula: In S6, the Gamma correction model is used to adjust the contrast and saturation of the preliminary restored image as a whole, including adjusting the preliminary restored image according to the following formula: where O(x) represents the output pixel value, I(x) represents the input pixel value, I low is the minimum intensity value of the input image interval, I high is the maximum intensity value of the input image interval, O low represents the minimum value of the desired stretch, O high is the maximum value of the desired stretch.
Citation Information
Patent Citations
Superpixel segmentation method based on fuzzy theory
CN103353987A
Image segmentation method based on superpixel segmentation and EM / MPM processing
CN106952271A