Polarization image sea fog removing method combined with Hough transformation

By combining Hough transform and polarization image dehazing methods, the problem of color distortion in sea water areas in sea fog scenes is solved, high-quality restoration of sea fog images is achieved, and a new technical means is provided for maritime target detection and monitoring.

CN120852224APending Publication Date: 2025-10-28DALIAN MARITIME UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510794427.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-13
Publication Date
2025-10-28

AI Technical Summary

Technical Problem

Traditional polarization dehazing methods cause color distortion in the seawater area of ​​the dehazed image in sea fog scenes, and existing improved methods cannot be effectively applied.

Method used

The polarization image dehazing method combined with Hough transform obtains the polarization image, separates the seawater and non-seawater areas, uses the bias coefficient to correct the atmospheric light in the seawater area, combines the Gaussian low-pass filter to suppress noise, selects the contrast function to automatically select the bias coefficient, and fuses the dehazed image.

Benefits of technology

It significantly improves the visual quality of sea fog images, provides new ideas for maritime target detection and maritime monitoring, and solves the problem of color distortion in sea fog scenes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120852224A_ABST
    Figure CN120852224A_ABST
Patent Text Reader

Abstract

The invention provides a polarization image sea fog removing method combined with Hough transformation, and the method comprises the steps: obtaining a polarization degree image, and calculating the polarization degree; segmenting the acquired polarization degree image, and distinguishing a seawater region and a non-seawater region; after segmentation is completed, a bias coefficient epsilon 2 is selected to be used, atmospheric light of the seawater area is corrected, and a defogged image of the seawater area is obtained; calculating a polarization angle in the foggy polarization image, determining atmospheric light according to the definition of the polarization degree, and suppressing noise by adopting a Gaussian low-pass filter and utilizing low-pass filtering to obtain filtered atmospheric light; selecting a contrast function to realize automatic selection of a bias coefficient epsilon 1, and calculating to obtain a defogged image of a non-seawater area; and through image fusion of the defogged images of the seawater region and the non-seawater region, a complete defogged image is finally obtained. According to the method, the fogless image can be recovered, and a new thought is provided for practical application of the polarization defogging technology in sea target detection, target identification, sea monitoring and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of polarization image defogging technology, and more particularly to a polarization image defogging method combining Hough transform. Background Technology

[0002] In severe weather conditions such as smog and haze, suspended particles in the atmosphere scatter light, causing images captured by imaging devices (such as cameras, drones, and vehicle cameras) to suffer from reduced contrast, color distortion, and blurred details. This degradation not only affects the visual experience but also severely interferes with fields that rely on high-quality images, such as remote sensing and security monitoring. Traditional image dehazing methods (such as algorithms based on dark channel priors) mainly enhance contrast through image processing techniques, but are easily limited by the complexity of the scene. Polarization dehazing technology, as a method based on photophysical properties, can more accurately separate scattered light from target light and is gradually becoming a research hotspot. The core of polarization dehazing technology lies in utilizing the polarization characteristics of light. After natural light is scattered by suspended particles in the atmosphere, the polarization state of the scattered light changes, while the target reflected light (i.e., useful information) that directly penetrates the fog usually retains its original polarization characteristics. By analyzing the intensity distribution of light in different polarization directions, scattered light and transmitted light can be distinguished, thereby restoring a clear image. There are two main implementation methods for polarization dehazing: the polarization difference-based method and the Stokes vector-based method.

[0003] However, polarization dehazing methods are all based on the theoretical assumption that "scene reflected light does not have polarization characteristics," but this has limitations when applied to real-world scenarios. Especially in sea fog scenes, polarized images typically show large areas of seawater, and the reflected light from seawater after sunlight exposure has strong polarization characteristics. When processing surfaces with specular reflectivity close to the detector (especially seawater and glass surfaces), the strong polarization of sunlight reflected from these surfaces causes color distortion (often appearing as black) in the dehazed image of areas containing these objects. A few researchers have studied the color distortion problem in dehazed images. However, the improved methods all assume that the specular objects are small in area and isolated in the image, which is clearly unsuitable for sea fog scenes. Summary of the Invention

[0004] Traditional polarization image dehazing methods, primarily designed for land-based fog and haze scenes, often lead to color distortion in the seawater region of the dehazed image when directly applied to sea fog scenes. This invention proposes a polarization image dehazing method combining Hough transform. By accurately extracting the region containing specular reflectors and suppressing excessively high atmospheric light values ​​(A), the color distortion problem in the image can be solved. The method of this invention recovers a fog-free image, providing a new approach for the practical application of polarization dehazing technology in maritime target detection, target recognition, and maritime surveillance.

[0005] The technical means employed in this invention are as follows:

[0006] A method for removing sea fog from polarization images using Hough transform, comprising:

[0007] S1. Obtain the polarization degree image and calculate the polarization degree;

[0008] S2. Segment the acquired polarization image to distinguish between seawater and non-seawater regions;

[0009] S3. After completing the segmentation, select the bias coefficient ε2 to correct the atmospheric light in the seawater area and obtain the dehazed image of the seawater area.

[0010] S4. Calculate the polarization angle in the foggy polarized image, determine the atmospheric light according to the definition of polarization degree, and use a Gaussian low-pass filter to suppress noise and obtain the filtered atmospheric light.

[0011] S5. Select the contrast function to automatically select the bias coefficient ε1 and calculate the defogging image of the non-seawater area;

[0012] S6. By fusing the dehazed images of the seawater area and the non-seawater area, a complete dehazed image is finally obtained.

[0013] Further, step S1 specifically includes:

[0014] S11. Images with different polarization directions are captured by a polarization camera, and the Stokes vector is calculated using the following formula:

[0015]

[0016] Where S0 represents the total light intensity, S1 represents the intensity difference between the 0° and 90° directions, S2 represents the intensity difference between the 45° and 135° directions, and I(0), I(45), I(90) and I(135) represent the images of the polarization directions of 0°, 45°, 90° and 135°, respectively.

[0017] S12. Based on the calculated Stokes vector, calculate the degree of polarization using the following formula:

[0018]

[0019] Where p represents the degree of polarization.

[0020] Further, step S2 specifically includes:

[0021] S21. The Otsu algorithm and morphological closing operation are used to process the polarization degree image of sea fog, and the generated binary image is used as the input of the segmentation method.

[0022] S22. Use the Canny edge detection algorithm to enhance the edge features of the image;

[0023] S23. Extract the sea surface line using Hough transform;

[0024] S24. Use the detected sea line to segment the sea fog image. With the obtained sea line as the boundary, the part above the line is the non-seawater area, and the part below the line is the seawater area.

[0025] Further, step S21 specifically includes:

[0026] S211. Assume the pixel grayscale value range of a grayscale image is [0, K-1]. Let the normalized grayscale histogram of the image be:

[0027]

[0028] Where q(i) is the normalized probability of gray level i, i.e., the pixel distribution, n i This represents the number of pixels with gray level i, where N is the total number of pixels in the image;

[0029] S212. Divide the image into background C0 and target C1;

[0030] S213. The grayscale range of background C0 is [0,T]. Calculate the probability of its occurrence using the following formula:

[0031]

[0032] S214. The grayscale range of target C1 is [T+1, K-1]. Calculate the probability of its occurrence using the following formula:

[0033]

[0034] Where ω0(T)+ω1(T)=1 means that the total probability of all pixels appearing in the image is 1;

[0035] S215. Calculate the mean value of the background pixels and the mean value of the target pixels using the following formula:

[0036]

[0037] Where μ0(T) represents the mean value of the background pixels and μ1(T) represents the mean value of the target pixels;

[0038] S216. Calculate the mean of the entire image using the following formula:

[0039]

[0040] Where, μ T This represents the mean of the entire image, which is the weighted average of the gray values ​​of all pixels.

[0041] S217. According to the definition of between-class variance, calculate the between-class variance using the following formula:

[0042]

[0043] in, Represents the variance between classes;

[0044] S218. Find the optimal threshold T by iterating through the data. * This maximizes the inter-class variance:

[0045]

[0046] S219. Morphological closing operation is used to correct binary images. The formula for morphological closing operation is:

[0047]

[0048] Where E represents the input image as a binary image, and F represents the structuring element.

[0049] Further, step S23 specifically includes:

[0050] S231, Edge Detection:

[0051] The polarization degree binary image obtained by Otsu's algorithm and morphological processing is subjected to Canny edge detection to extract clear edge images, which are then used as input for Hough transform.

[0052] S232, Parameter space discretization:

[0053] Suppose there is a straight line in the rectangular coordinate system xy that passes through the points (x1, y1) and (x2, y2):

[0054]

[0055] Where k represents the slope and b represents the slope distance;

[0056] In polar coordinate parameter space, the line in the rectangular coordinate system is represented by the following formula:

[0057] ρ=xcosθ+ysinθ

[0058] Where ρ represents the polar radius, which is the distance between the origin and the straight line, θ represents the polar angle, which is the angle between the x-axis and the perpendicular line of the straight line. The value range of ρ is from 0 to the length of the diagonal of the image, and the value range of θ is [0°, 180°].

[0059] In polar coordinate space, a straight line is represented by dividing ρ and θ into a certain step size and range, forming a two-dimensional accumulator array A(ρ,θ);

[0060] S233, Voting Accumulation:

[0061] After mapping the coordinates of points in the edge image to the parameter space, voting is performed in the accumulator array, as follows:

[0062] After discretizing the parameter space, a two-dimensional grid is obtained, namely the accumulator array A(ρ,θ);

[0063] Iterate through each edge point (x, y) and all possible θ values, and calculate the corresponding ρ value according to the formula ρ = xcosθ + ysinθ. Then find the corresponding A(ρ, θ) in the accumulator array and increment it by 1. This process is called voting.

[0064] After the voting ends, find the peak element in the accumulator array, that is, (ρ,θ) corresponding to the maximum number of votes, and then obtain the line parameters through inverse transformation;

[0065] S234. Find the peak value and draw a straight line:

[0066] By finding the maximum value in the accumulator array, i.e., determining the (ρ,θ) with the most votes, the obtained peak point (ρ,θ) is then mapped to the image space and the corresponding straight line is drawn, thus completing the Hough transform for the identification of the sea-line.

[0067] Further, step S3 specifically includes:

[0068] S31. After segmentation, use the bias coefficient to adjust the atmospheric light A in the seawater region. sea To obtain the appropriate value, the formula is as follows:

[0069] p A′ =p A ·ε2

[0070] Where, p A′ p represents the degree of polarization of the corrected sky region. A ε represents the degree of polarization in the sky region; ε2 represents the bias coefficient, ε2 > 1;

[0071] S32. Calculate atmospheric light based on the degree of polarization in the sky region, using the following formula:

[0072]

[0073] Where A represents atmospheric light; A p Represents the polarization component in the atmosphere; θ A Indicates the polarization angle of the sky region;

[0074] S33. Combining the bias parameter ε2 with the degree of polarization, we obtain the corrected atmospheric light A over the sea area. sea The formula is as follows:

[0075]

[0076] S34, Atmospheric light A based on corrected sea surface area sea The formula for calculating the defogging image of a seawater area is as follows:

[0077]

[0078] Among them, L sea A defogging image representing a seawater area; A ∞ It represents the atmospheric light intensity at infinity.

[0079] Further, step S4 specifically includes:

[0080] S41. Calculate the polarization angle in a hazy polarized image using the following formula:

[0081]

[0082] Where θ represents the polarization angle;

[0083] S42. Take the most frequently occurring θ as the θ region of the sky. A And calculate the degree of polarization p, while satisfying θ = θ A The maximum value among the p values ​​of the region is selected as the polarization degree p of the sky region. A ;

[0084] S43. When the denominator is 0, θ = kπ + π / 4. Let θ = (1 ± 0.001)θ A After obtaining the degree of polarization p in the sky region A After determining the polarization angle, atmospheric light A is calculated according to the definition of the degree of polarization, as follows:

[0085]

[0086] S44. To reduce the noise of atmospheric light A, a low-pass filter is used to suppress the noise. A Gaussian low-pass filter is used, and the filtered atmospheric light A′ is obtained as follows:

[0087]

[0088] Where (a0,b0) are the center coordinates of the Gaussian kernel, (a,b) are the image coordinates, * represents convolution, and σ represents the standard deviation. The value of the standard deviation is determined by the actual situation of the scene.

[0089] Further, step S5 specifically includes:

[0090] S51. Select the contrast function C(I) to select the bias coefficient ε1. The contrast function C(I) is as follows:

[0091]

[0092] Where N represents the number of pixels in the image, I(x,y) represents the average pixel value of the image, and I(x,y) represents the image intensity at position (x,y).

[0093] S52. The final defogging image of the non-seawater area is calculated using the following formula:

[0094]

[0095] Where L represents the defogging image of the non-seawater area; A′ represents the filtered atmospheric light.

[0096] Compared with the prior art, the present invention has the following advantages:

[0097] This invention addresses the problems encountered by traditional polarization dehazing methods when applied to sea fog scenes. It utilizes and improves upon traditional polarization dehazing methods, taking into account the characteristics of sea fog scenes and making full use of polarization information to design a polarization dehazing method suitable for sea fog scenes. This method significantly improves the visual quality of sea fog images and provides new ideas for the practical application of polarization dehazing technology in marine target detection, target recognition, and marine monitoring.

[0098] Based on the above reasons, this invention can be widely applied in fields such as defogging of polarized images. Attached Figure Description

[0099] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0100] Figure 1 This is a flowchart of the method of the present invention.

[0101] Figure 2 This is a schematic diagram of the internal structure of the polarization camera of the present invention.

[0102] Figure 3 This is an image of sea fog captured by the polarization camera of this invention.

[0103] Figure 4 Image I(0) is taken at the 0° direction by a polarization camera according to the present invention.

[0104] Figure 5 Image I (45) is taken by a polarizing camera at a 45° angle according to the present invention.

[0105] Figure 6 Image I (90) is a 90° image captured by a polarizing camera according to the present invention.

[0106] Figure 7 Image I (135) is taken by a polarizing camera at a 135° angle according to the present invention.

[0107] Figure 8 The polarization degree image is calculated for this invention.

[0108] Figure 9 This is a diagram showing the polarization degree image processing of sea fog using the Otsu algorithm in this invention.

[0109] Figure 10 This is a diagram of the morphological closing operation of the present invention.

[0110] Figure 11 This is a schematic diagram of the Hough transform principle of the present invention.

[0111] Figure 12 This invention uses the Canny edge detection algorithm to enhance the image.

[0112] Figure 13 This invention extracts the sea surface line using the Hough transform.

[0113] Figure 14 This is the S0 image of the present invention.

[0114] Figure 15 The location for selecting atmospheric light intensity at infinity in this invention.

[0115] Figure 16 This is the dehazed image when the bias coefficient ε2 of this invention is 2.0.

[0116] Figure 17 This is the dehazed image when the bias coefficient ε2 of this invention is 2.4.

[0117] Figure 18 This is the dehazed image when the bias coefficient ε2 of this invention is 2.8.

[0118] Figure 19 This is the dehazed image when the bias coefficient ε2 of this invention is 3.2.

[0119] Figure 20 This is the dehazed image when the bias coefficient ε2 of this invention is 5.8.

[0120] Figure 21 This is a fog-free image obtained for a non-seawater area in this invention. Detailed Implementation

[0121] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0122] It should be noted that the terms "comprising" and "having" and any variations thereof in the specification, claims and accompanying drawings of this invention are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to such processes, methods, products or devices.

[0123] like Figure 1 This invention provides a method for removing sea fog from polarization images using Hough transform, comprising:

[0124] S1. Obtain the polarization degree image and calculate the polarization degree;

[0125] S2. Segment the acquired polarization image to distinguish between seawater and non-seawater regions;

[0126] S3. After completing the segmentation, select the bias coefficient ε2 to correct the atmospheric light in the seawater area and obtain the dehazed image of the seawater area.

[0127] S4. Calculate the polarization angle in the foggy polarized image, determine the atmospheric light according to the definition of polarization degree, and use a Gaussian low-pass filter to suppress noise and obtain the filtered atmospheric light.

[0128] S5. Select the contrast function to automatically select the bias coefficient ε1 and calculate the defogging image of the non-seawater area;

[0129] S6. By fusing the dehazed images of the seawater area and the non-seawater area, a complete dehazed image is finally obtained.

[0130] In a specific implementation, as a preferred embodiment of the present invention, step S1 specifically includes:

[0131] S11, such as Figure 2 The image shown is a schematic diagram of the internal structure of a polarization camera. Figure 3 The image shown is a sea fog image captured by a polarization camera. The Stokes vector is calculated from images taken with different polarization directions using the polarization camera, and the calculation formula is as follows:

[0132]

[0133] Where S0 represents the total light intensity, S1 represents the intensity difference between the 0° and 90° directions, S2 represents the intensity difference between the 45° and 135° directions, and I(0), I(45), I(90), and I(135) represent the images in the polarization directions of 0°, 45°, 90°, and 135°, respectively. Figure 4-7 As shown.

[0134] S12. Based on the calculated Stokes vector, calculate the degree of polarization using the following formula:

[0135]

[0136] Where p represents the degree of polarization. For example... Figure 8 The image shown is the calculated polarization degree image.

[0137] In a specific implementation, as a preferred embodiment of the present invention, step S2 specifically includes:

[0138] S21. The Otsu algorithm and morphological closing operation are used to process the polarization degree image of sea fog, and the generated binary image is used as the input of the segmentation method.

[0139] S22. The edge features of the image are enhanced using the Canny edge detection algorithm; in this embodiment, such as... Figure 12 The image shown is an enhanced image using the Canny edge detection algorithm.

[0140] S23. Extract the sea surface line using Hough transform;

[0141] S24. Use the detected sea line to segment the sea fog image. With the obtained sea line as the boundary, the part above the line is the non-seawater area, and the part below the line is the seawater area.

[0142] In a specific implementation, as a preferred embodiment of the present invention, step S21 specifically includes:

[0143] S211. Assume the pixel grayscale value range of a grayscale image is [0, K-1]. Let the normalized grayscale histogram of the image be:

[0144]

[0145] Where q(i) is the normalized probability of gray level i, i.e., the pixel distribution, n i This represents the number of pixels with gray level i, where N is the total number of pixels in the image;

[0146] S212. Divide the image into background C0 and target C1;

[0147] S213. The grayscale range of background C0 is [0,T]. Calculate the probability of its occurrence using the following formula:

[0148]

[0149] S214. The grayscale range of target C1 is [T+1, K-1]. Calculate the probability of its occurrence using the following formula:

[0150]

[0151] Where ω0(T)+ω1(T)=1 means that the total probability of all pixels appearing in the image is 1;

[0152] S215. Calculate the mean value of the background pixels and the mean value of the target pixels using the following formula:

[0153]

[0154] Where μ0(T) represents the mean value of the background pixels and μ1(T) represents the mean value of the target pixels;

[0155] S216. Calculate the mean of the entire image using the following formula:

[0156]

[0157] Where, μ T This represents the mean of the entire image, which is the weighted average of the gray values ​​of all pixels.

[0158] S217. According to the definition of between-class variance, calculate the between-class variance using the following formula:

[0159]

[0160] in, Represents the variance between classes;

[0161] S218. Find the optimal threshold T by iterating through the data. * This maximizes the inter-class variance:

[0162]

[0163] like Figure 9 The image shown is an example of the polarization degree image processing of sea fog using the Otsu algorithm.

[0164] S219. Morphological closing operation is used to correct binary images. The formula for morphological closing operation is:

[0165]

[0166] Where E represents that the input image is a binary image, and F represents the structuring element. For example... Figure 10 The image shown is a diagram processed by morphological closing operations.

[0167] In this embodiment, the binary image obtained by processing the sea fog polarization degree image using the Otsu algorithm may exhibit holes. To further optimize the polarization degree image segmentation result, a morphological closing operation is used to correct the binary image. Morphological operations have the effects of filling holes in the target region, smoothing boundaries, and removing isolated noise points, making the target region more complete and enhancing the segmentation effect. The goal of the Otsu algorithm is to find the optimal global threshold T. * The image is segmented into two parts: the target and the background. The difference between the foreground and background is maximized by maximizing the inter-class variance. Inter-class variance measures the mean difference between the target and the background; a larger inter-class variance indicates higher discrimination between the two parts, lower misclassification probability, and better segmentation results.

[0168] In a specific implementation, as a preferred embodiment of the present invention, step S23 specifically includes:

[0169] S231, Edge Detection:

[0170] In this embodiment, the detection accuracy of the Hough transform is affected by the quality of the input image. The clearer the edge information and the less noise, the more obvious the voting peak in the parameter space. Therefore, the polarization degree binary image obtained by Otsu's algorithm and morphological processing is subjected to Canny edge detection to extract clear edge images, which are then used as the input of the Hough transform.

[0171] S232, Parameter space discretization:

[0172] Suppose there is a straight line in the rectangular coordinate system xy that passes through the points (x1, y1) and (x2, y2):

[0173] y = kx + b

[0174] Where k represents the slope and b represents the slope distance;

[0175] In polar coordinate parameter space, the line in the rectangular coordinate system is represented by the following formula:

[0176] ρ=xcosθ+ysinθ

[0177] Where ρ represents the polar radius, i.e., the distance between the origin and the straight line, and θ represents the polar angle, i.e., the angle between the x-axis and the perpendicular line to the straight line. The value range of ρ is from 0 to the length of the image diagonal, and the value range of θ is [0°, 180°]. In this embodiment, Figure 11 The Hough transform in polar coordinates is demonstrated. Figure 11 (b) The coordinates (x1, y1) and (x2, y2) on the line in the image space are mapped to form two curves in the parameter space, and the intersection of the curves is (ρ0, θ0).

[0178] In polar coordinate space, a straight line is represented by dividing ρ and θ into a certain step size and range, forming a two-dimensional accumulator array A(ρ,θ);

[0179] S233, Voting Accumulation:

[0180] After mapping the coordinates of points in the edge image to the parameter space, voting is performed in the accumulator array, as follows:

[0181] After discretizing the parameter space, a two-dimensional grid is obtained, namely the accumulator array A(ρ,θ);

[0182] Iterate through each edge point (x, y) and all possible θ values, and calculate the corresponding ρ value according to the formula ρ = xcosθ + ysinθ. Then find the corresponding A(ρ, θ) in the accumulator array and increment it by 1. This process is called voting.

[0183] After the voting ends, find the peak element in the accumulator array, that is, (ρ,θ) corresponding to the maximum number of votes, and then obtain the line parameters through inverse transformation;

[0184] S234. Find the peak value and draw a straight line:

[0185] By finding the maximum value in the accumulator array, i.e., determining the (ρ,θ) with the most votes, and then mapping the obtained peak point (ρ,θ) to the image space and drawing the corresponding straight line, the Hough transform is used to identify the sea-line area. Figure 13 As shown, the sea line is extracted using the Hough transform.

[0186] In a specific implementation, as a preferred embodiment of the present invention, step S3 specifically includes:

[0187] S31. After segmentation, use the bias coefficient to adjust the atmospheric light A in the seawater region. sea To obtain the appropriate value, the formula is as follows:

[0188] p A′ =pA ·ε2

[0189] Among them, p A′ p represents the degree of polarization of the corrected sky region. A ε represents the degree of polarization in the sky region; ε2 represents the bias coefficient, ε2 > 1;

[0190] S32. Calculate atmospheric light based on the degree of polarization in the sky region, using the following formula:

[0191]

[0192] Where A represents atmospheric light; A p Represents the polarization component in the atmosphere; θ A Indicates the polarization angle of the sky region;

[0193] S33. Combining the bias parameter ε2 with the degree of polarization, we obtain the corrected atmospheric light A over the sea area. sea The formula is as follows:

[0194]

[0195] S34, Atmospheric light A based on corrected sea surface area sea The formula for calculating the defogging image of a seawater area is as follows:

[0196]

[0197] Among them, L sea A defogging image representing a seawater area; A ∞ This represents the atmospheric light intensity at infinity. In this embodiment, the atmospheric light intensity A at infinity is... ∞ There are various selection methods; this invention uses a four-part method to automatically select atmospheric light intensity at infinity. For example... Figure 15 As shown, the box represents the atmospheric light intensity region found at infinity, and the maximum value is taken as the atmospheric light intensity at infinity.

[0198] In this embodiment, as shown in the above formula, the value of the bias coefficient ε2 directly affects the quality of the dehazed image, and its selection is a key parameter determining the quality of the restored image. For example... Figure 16-20 The images shown are dehazed images with bias coefficient ε2 values ​​of 2.0, 2.4, 2.8, 3.2, and 5.8, respectively. When the bias coefficient ε2 is 5.8, the obtained image has moderate brightness and a high image entropy value. Therefore, the image obtained at this value is used as the final dehazed image. The value of the bias coefficient can be set empirically, but subjective adjustment may introduce random errors, leading to a decrease in the robustness of the method. However, by introducing an image function for selection, human uncertainty can be eliminated. The entropy function, as an efficient image quality evaluation index, can objectively reflect the amount of image information content.

[0199] In a specific implementation, as a preferred embodiment of the present invention, step S4 specifically includes:

[0200] S41. Calculate the polarization angle in a hazy polarized image using the following formula:

[0201]

[0202] Where θ represents the polarization angle;

[0203] S42. Take the most frequently occurring θ as the θ region of the sky. A And calculate the degree of polarization p, while satisfying θ = θ A The maximum value among the p values ​​of the region is selected as the polarization degree p of the sky region. A ;

[0204] S43. When the denominator is 0, θ = kπ + π / 4. Let θ = (1 ± 0.001)θ A After obtaining the degree of polarization p in the sky region A After determining the polarization angle, atmospheric light A is calculated according to the definition of the degree of polarization, as follows:

[0205]

[0206] S44, typical sky region polarization degree p A The noise in atmospheric light A, calculated directly from the above formula, is very small and easily amplified. Furthermore, the background noise of the polarization camera also affects the estimation of atmospheric light A. To reduce the noise in atmospheric light A, a low-pass filter is used to suppress it. A Gaussian low-pass filter is employed, resulting in the filtered atmospheric light A′:

[0207]

[0208] Where (a0,b0) are the center coordinates of the Gaussian kernel, (a,b) are the image coordinates, * represents convolution, and σ represents the standard deviation. The value of the standard deviation is determined by the actual situation of the scene.

[0209] In a specific implementation, as a preferred embodiment of the present invention, step S5 specifically includes:

[0210] S51. Select the contrast function C(I) to select the bias coefficient ε1. The contrast function C(I) is as follows:

[0211]

[0212] Where N represents the number of pixels in the image, I(x,y) represents the average pixel value of the image, and I(x,y) represents the image intensity at position (x,y).

[0213] S52. The final defogging image of the non-seawater area is calculated using the following formula:

[0214]

[0215] Where L represents the dehazed image of a non-seawater area; A′ represents the filtered atmospheric light. For example... Figure 21 The image shown is a fog-free image obtained from a non-seawater area.

[0216] 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 above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for removing sea fog from polarization images using Hough transform, characterized in that, include: S1. Obtain the polarization degree image and calculate the polarization degree; S2. Segment the acquired polarization image to distinguish between seawater and non-seawater regions; S3. After completing the segmentation, select the bias coefficient ε2 to correct the atmospheric light in the seawater area and obtain the dehazed image of the seawater area. S4. Calculate the polarization angle in the foggy polarized image, determine the atmospheric light according to the definition of polarization degree, and use a Gaussian low-pass filter to suppress noise and obtain the filtered atmospheric light. S5. Select the contrast function to automatically select the bias coefficient ε1 and calculate the defogging image of the non-seawater area; S6. By fusing the dehazed images of the seawater area and the non-seawater area, a complete dehazed image is finally obtained.

2. The method for removing sea fog from polarization images using Hough transform according to claim 1, characterized in that, Step S1 specifically includes: S11. Images with different polarization directions are captured by a polarization camera, and the Stokes vector is calculated using the following formula: Where S0 represents the total light intensity, S1 represents the intensity difference between the 0° and 90° directions, S2 represents the intensity difference between the 45° and 135° directions, and I(0), I(45), I(90) and I(135) represent the images of the polarization directions of 0°, 45°, 90° and 135°, respectively. S12. Based on the calculated Stokes vector, calculate the degree of polarization using the following formula: Where p represents the degree of polarization.

3. The method for removing sea fog from polarization images using Hough transform according to claim 1, characterized in that, Step S2 specifically includes: S21. The Otsu algorithm and morphological closing operation are used to process the polarization degree image of sea fog, and the generated binary image is used as the input of the segmentation method. S22. Use the Canny edge detection algorithm to enhance the edge features of the image; S23. Extract the sea surface line using Hough transform; S24. Use the detected sea line to segment the sea fog image. With the obtained sea line as the boundary, the part above the line is the non-seawater area, and the part below the line is the seawater area.

4. The method for removing sea fog from polarization images by combining Hough transform according to claim 3, characterized in that, Step S21 specifically includes: S211. Assume the pixel grayscale value range of a grayscale image is [0, K-1]. Let the normalized grayscale histogram of the image be: Where q(i) is the normalized probability of gray level i, i.e., the pixel distribution, n i This represents the number of pixels with gray level i, where N is the total number of pixels in the image; S212. Divide the image into background C0 and target C1; S213. The grayscale range of background C0 is [0,T]. Calculate the probability of its occurrence using the following formula: S214. The grayscale range of target C1 is [T+1, K-1]. Calculate the probability of its occurrence using the following formula: Where ω0(T)+ω1(T)=1 means that the total probability of all pixels appearing in the image is 1; S215. Calculate the mean value of the background pixels and the mean value of the target pixels using the following formula: Where μ0(T) represents the mean value of the background pixels and μ1(T) represents the mean value of the target pixels; S216. Calculate the mean of the entire image using the following formula: Where, μ T This represents the mean of the entire image, which is the weighted average of the gray values ​​of all pixels. S217. According to the definition of between-class variance, calculate the between-class variance using the following formula: in, Represents the variance between classes; S218. Find the optimal threshold T by iterating through the data. * This maximizes the inter-class variance: S219. Morphological closing operation is used to correct binary images. The formula for morphological closing operation is: Where E represents the input image as a binary image, and F represents the structuring element.

5. A method for removing sea fog from polarization images using Hough transform according to claim 3, characterized in that, Step S23 specifically includes: S231, Edge Detection: The polarization degree binary image obtained by Otsu's algorithm and morphological processing is subjected to Canny edge detection to extract clear edge images, which are then used as input for Hough transform. S232, Parameter space discretization: Suppose there is a straight line in the rectangular coordinate system xy that passes through the points (x1, y1) and (x2, y2): y = kx + b Where k represents the slope and b represents the slope distance; In polar coordinate parameter space, the line in the rectangular coordinate system is represented by the following formula: ρ=xcosθ+ysinθ Where ρ represents the polar radius, which is the distance between the origin and the straight line, θ represents the polar angle, which is the angle between the x-axis and the perpendicular line of the straight line. The value range of ρ is from 0 to the length of the diagonal of the image, and the value range of θ is [0°, 180°]. In polar coordinate space, a straight line is represented by dividing ρ and θ into a certain step size and range, forming a two-dimensional accumulator array A(ρ,θ); S233, Voting Accumulation: After mapping the coordinates of points in the edge image to the parameter space, voting is performed in the accumulator array, as follows: After discretizing the parameter space, a two-dimensional grid is obtained, namely the accumulator array A(ρ,θ); Iterate through each edge point (x, y) and all possible θ values, and calculate the corresponding ρ value according to the formula ρ = xcosθ + ysinθ. Then find the corresponding A(ρ, θ) in the accumulator array and increment it by 1. This process is called voting. After the voting ends, find the peak element in the accumulator array, that is, (ρ,θ) corresponding to the maximum number of votes, and then obtain the line parameters through inverse transformation; S234. Find the peak value and draw a straight line: By finding the maximum value in the accumulator array, i.e., determining the (ρ,θ) with the most votes, the obtained peak point (ρ,θ) is then mapped to the image space and the corresponding straight line is drawn, thus completing the Hough transform for the identification of the sea-line.

6. The method for removing sea fog from polarization images using Hough transform according to claim 1, characterized in that, Step S3 specifically includes: S31. After segmentation, use the bias coefficient to adjust the atmospheric light A in the seawater region. sea To obtain the appropriate value, the formula is as follows: p A′ =p A ·ε2 Among them, p A′ p represents the degree of polarization of the corrected sky region. A ε represents the degree of polarization in the sky region; ε2 represents the bias coefficient, ε2 > 1; S32. Calculate atmospheric light based on the degree of polarization in the sky region, using the following formula: Where A represents atmospheric light; A p Represents the polarization component in the atmosphere; θ A Indicates the polarization angle of the sky region; S33. Combining the bias parameter ε2 with the degree of polarization, we obtain the corrected atmospheric light A over the sea area. sea , the formula is as follows: S34, Atmospheric light A based on corrected sea surface area sea The formula for calculating the defogging image of a seawater area is as follows: Among them, L sea A defogging image representing a seawater area; A ∞ It represents the atmospheric light intensity at infinity.

7. The method for removing sea fog from polarization images by combining Hough transform according to claim 1, characterized in that, Step S4 specifically includes: S41. Calculate the polarization angle in a hazy polarized image using the following formula: Where θ represents the polarization angle; S42. Take the most frequently occurring θ as the θ region of the sky. A And calculate the degree of polarization p, while satisfying θ = θ A The maximum value among the p values ​​of the region is selected as the polarization degree p of the sky region. A ; S43. When the denominator is 0, θ = kπ + π / 4. Let θ = (1 ± 0.001)θ A After obtaining the degree of polarization p in the sky region A After determining the polarization angle, atmospheric light A is calculated according to the definition of the degree of polarization, as follows: S44. To reduce the noise of atmospheric light A, a low-pass filter is used to suppress the noise. A Gaussian low-pass filter is used, and the filtered atmospheric light A′ is obtained as follows: Where (a0,b0) are the center coordinates of the Gaussian kernel, (a,b) are the image coordinates, * represents convolution, and σ represents the standard deviation. The value of the standard deviation is determined by the actual situation of the scene.

8. A method for removing sea fog from polarization images using Hough transform according to claim 1, characterized in that, Step S5 specifically includes: S51. Select the contrast function C(I) to select the bias coefficient ε1. The contrast function C(I) is as follows: Where N represents the number of pixels in the image, I(x,y) represents the average pixel value of the image, and I(x,y) represents the image intensity at position (x,y). S52. The final defogging image of the non-seawater area is calculated using the following formula: Where L represents the defogging image of the non-seawater area; A′ represents the filtered atmospheric light.