A method for constructing a foggy image dataset of sea scenes

Through the image fogging method, SLIC super-pixel segmentation and atmospheric scattering models are used to generate foggy images of sea scenes, which solves the problem of lack of foggy image data sets of sea scenes in the existing technology and improves the performance of unmanned ships in heavy fog weather. With high target detection capabilities, it provides a high-quality foggy image data set.

CN115100408BActive Publication Date: 2024-09-20SHANGHAI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210710901.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-22
Publication Date
2024-09-20
Estimated Expiration
2042-06-22

AI Technical Summary

Technical Problem

There is a lack of effective methods in the existing technology to construct hazy image data sets of sea scene scenes, resulting in insufficient target detection and recognition capabilities of unmanned ships in foggy weather, and the existing dehazing and repairing methods are computationally intensive and have unsatisfactory results, resulting in The picture is single and the semantic information is weak.

Method used

The image fogging method is used to collect left-view and right-view images of the same scene through imaging equipment. SLIC super-pixel segmentation and Euclidean distance formula matching are used to calculate the depth of field information and atmospheric light transmission rate, and the image is fogged based on the atmospheric scattering model. , to generate realistic and natural foggy images.

Benefits of technology

The fog thickness in the generated fogged image is uniform, more real and natural, and consistent with the actual sea scene. It helps to improve the target detection and recognition capabilities of unmanned ships in foggy weather, and provides a high-quality foggy image data set.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115100408B
    Figure CN115100408B
Patent Text Reader

Abstract

The present invention belongs to the field of computer image processing, and discloses an image fogging method, which is specifically as follows: S1: collecting a left-view image and a right-view image of the same scene, wherein the left-view image and the right-view image overlap; S2: performing super-pixel segmentation on the left-view image and the right-view image respectively to obtain corresponding super-pixel blocks; selecting effective super-pixel blocks effective for scene depth estimation from the super-pixel blocks of the left-view image and the right-view image; S3: matching the effective super-pixel blocks of the left-view image and the right-view image to obtain a horizontal disparity map of the left-view image and the right-view image; calculating the distance h(h) between the pixel points P1 and P2 imaged by any target point P in the scene in the left and right view images according to the horizontal disparity map. x ); S4: According to h( x ) Calculate the depth information d of the left and right view images ( x ); S5: According to d( x )Calculate the atmospheric light transmission rate t( x ), fogging is performed on the left view image and / or the right view image according to the atmospheric scattering model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computer image processing, and in particular to a method for constructing a sea scene foggy image data set. Background Art

[0002] Unmanned ship navigation technology at sea is an indispensable key technology for sea area management and monitoring, and sea target detection and tracking. However, unmanned driving at sea often causes accidents at sea due to bad weather conditions. The most common bad weather conditions are rain, fog, snow, etc. Under foggy conditions, the detection and identification capabilities of unmanned ship systems at sea for islands, reefs, fishing boats, ships, etc. will be greatly reduced, resulting in delayed and unstable navigation operations at sea. The navigation system cannot make reasonable plans to avoid obstacles in time, so collision accidents at sea occur from time to time. Nowadays, unmanned boats are not only used in production and life, but also in the military field. In the case of militarized operations or patrol monitoring, which urgently require high precision, high accuracy, and high robustness, the disadvantages brought by foggy conditions may even be unpredictable injuries and losses.

[0003] Fog is caused by the scattering of light by particles in the atmosphere. When light hits an object, an image is formed due to reflection on the surface of the object, but particles in the atmosphere will also scatter. The scattering is more serious under foggy conditions, which will weaken the imaging level of the imaging device. Therefore, imaging in foggy days will have disadvantages such as low contrast and severe attenuation of image quality. In addition, under foggy conditions, our ability to perceive the environment will also decrease with the increase of fog thickness. Surface navigation systems usually need to detect and identify targets in the long-range situation, but the background of sea and sky scene images is monotonous and the features are not clear enough. At this time, foggy weather conditions will bring about the disadvantages of unclear target contours and blurred texture features, which will bring great difficulties to identification and detection. Therefore, it is urgent to improve the ability of existing unmanned ships to detect and identify targets in foggy weather. At present, the main method to improve the ability of unmanned ships to detect and identify targets in foggy weather is to use deep neural networks to perform defogging and repair processing on foggy images collected by imaging equipment. In order to improve the defogging and repair ability of deep neural networks for foggy images, it is necessary to use foggy image datasets to train deep neural networks.

[0004] Due to the lack of foggy datasets and the high cost of obtaining foggy sea scene datasets, there are very few methods to produce synthetic foggy image datasets so far. In addition, obtaining paired training data, that is, clear scene images and corresponding foggy scene images, requires high manpower and material resources. The previously proposed method of using domain adaptive unsupervised generative adversarial networks to achieve style conversion of datasets in two domains without changing the content. Although clever, this method often has a complex network structure, a large amount of calculation, and the effect is not very ideal. Background texture changes and blur often occur, and the generated images are single, which weakens the semantic information of the image and lacks diversity and robustness. Therefore, it is urgent to study a new method for constructing a foggy image dataset for sea scenes. Summary of the invention

[0005] In view of the problems and shortcomings in the prior art, the object of the present invention is to provide a method for constructing a foggy image dataset of sea scenes.

[0006] To achieve the purpose of the invention, the technical solution adopted by the present invention is as follows:

[0007] A first aspect of the present invention provides an image fogging method, comprising the following steps:

[0008] S1: an imaging device is used to capture a left-view image and a right-view image of the same scene, the contents of the left-view image and the right-view image overlap, and the imaging planes of the left-view image and the right-view image are on the same plane, and the imaging device for capturing the left-view image of the scene and the imaging device for capturing the right-view image of the scene have the same focal length and the same distance to the scene;

[0009] S2: Use the SLIC method (Simple Linear Iterative Clustering) to perform superpixel segmentation on the left view image and the right view image respectively to obtain the corresponding superpixel blocks; then select the effective superpixel blocks that are effective for scene depth estimation from the superpixel blocks of the left view image and the right view image respectively;

[0010] S3: Use the Euclidean distance formula to match the centroid similarity and image content similarity of the effective superpixel blocks of the left-view image and the right-view image, and obtain the horizontal disparity map of the left-view image and the right-view image after matching; calculate the distance h(x) between the pixel point P1(x1, y1) imaged by any target point P in the scene in the left-view image and the pixel point P2(x2, y2) imaged by the target point P in the right-view image according to the horizontal disparity map, and the calculation formula of h(x) is shown in Formula 1;

[0011] h(x)=|x2-x1| Formula 1

[0012] Wherein, x1 represents the horizontal coordinate of pixel point P1, and x2 represents the horizontal coordinate of pixel point P2;

[0013] S4: Calculate the depth information d(x) of the left-view image and the right-view image according to h(x). The calculation formula of the depth information d(x) is shown in Formula 2.

[0014]

[0015] Wherein, c represents the horizontal distance between the imaging device for collecting the left-view image and the imaging device for collecting the right-view image; f is the focal length of the imaging device;

[0016] S5: Calculate the atmospheric light transmission rate t(x) according to the depth of field information d(x) calculated in step S4, and then perform fogging processing on the left-view image and / or the right-view image according to the atmospheric scattering model formula to obtain a fogged image of the corresponding image; the calculation formula of the atmospheric light transmission rate t(x) is shown in Formula 3, and the atmospheric scattering model formula is shown in Formula 4;

[0017] t(x)=e -βd(x) Formula 3

[0018] I(x)=J(x)t(x)+A(1-t(x)) Formula 4

[0019] Among them, β represents the atmospheric light transmission attenuation coefficient, I(x) represents the fogged image, J(x) represents the clear image, A represents the atmospheric light constant, and x represents the spatial coordinates of the pixel point in the image.

[0020] According to the above-mentioned image fogging method, preferably, the Euclidean distance formula in step S3 is as shown in Formula 5 to Formula 7:

[0021] E(l, r)=||C l -C r || 2 +α||x l -x r || 2 Formula 5

[0022]

[0023]

[0024] Among them, l represents the effective super pixel block of the left view image, r represents the effective super pixel block of the right view image, and C l represents the average chromaticity value of the effective superpixel block of the left view image in the CIE space, C r represents the average chromaticity value of the effective superpixel block of the right view image in the CIE space, x l Indicates the centroid value of the effective superpixel block of the left view image, x rrepresents the centroid value of the effective superpixel block of the right view image, α represents the weight factor, m represents a constant, S represents the image superpixel division related factor, N represents the number of pixels of the left view image or the right view image, and K represents the number of superpixel blocks of the left view image or the right view image.

[0025] According to the above-mentioned image fogging method, preferably, the value of m in Formula 6 is 10.

[0026] According to the above-mentioned image fogging method, preferably, in step S2, a formula for selecting effective superpixel blocks effective for scene depth estimation from superpixel blocks of the left-view image and the right-view image is as shown in Formula 8;

[0027] Sel(K / M)≥max{P,μK} Equation 8

[0028] Among them, K represents the number of superpixel blocks in the left view image or the right view image, M represents the missing part of the image pixels, P represents a constant, and μ represents a weight parameter.

[0029] According to the above-mentioned image fogging method, preferably, the value of P in Formula 8 is 20, and the value of μ is 0.5.

[0030] According to the above-mentioned image fogging method, preferably, the overlap rate of the contents of the left-view image and the right-view image is greater than or equal to 50%.

[0031] According to the above-mentioned image fogging method, preferably, before superpixel segmentation is performed on the left-view image and the right-view image using the SLIC method in step S2, the pixel values ​​of the left-view image and the right-view image are normalized to between 0 and 1 to reduce the amount of subsequent calculations.

[0032] According to the above-mentioned image fogging method, preferably, an imaging device for collecting a left-view image of a scene and an imaging device for collecting a right-view image of the scene are arranged at the same height.

[0033] According to the above-mentioned image fogging method, preferably, in Formula 3, adjusting the magnitude of the atmospheric light transmission attenuation coefficient β can effectively control the concentration of fog, and the value range of β is preferably 0.05 to 0.09.

[0034] According to the above-mentioned image fogging method, preferably, in Formula 4, the larger the value of the atmospheric light constant A is, the higher the image brightness is, and the value range of the atmospheric light constant A is preferably 0.4 to 0.75.

[0035] According to the above-mentioned image fogging method, preferably, the scene of the image collected in step S1 is a sea scene.

[0036] The second aspect of the present invention provides a method for constructing a foggy image dataset, which comprises: using the image fogging method described in the first aspect to perform fogging processing on the collected original image to obtain a fogged image, and pairing and combining the fogged image with its original image to obtain a foggy image dataset.

[0037] A third aspect of the present invention provides a foggy image dataset obtained using the construction method described in the second aspect.

[0038] The derivation process of the depth of field information d(x) shown in Formula 2 of the present invention is as follows:

[0039]

[0040] C1 is the principal point of the imaging device for collecting left-view images, C2 is the principal point of the imaging device for collecting right-view images, the distance between the imaging device for collecting left-view images and the imaging device for collecting right-view images is c, the focal length of the imaging device for collecting left-view images is the same as that of the imaging device for collecting left-view images, which is f. The pixel point imaged by any target point P(x, y, z) in the scene in the left-view image is P1(x1, y1), and the pixel point imaged by the target point P(x, y, z) in the left-view image is P2(x2, y2) (the imaging process is as follows Figure 3 As shown); Based on the similar triangle theorem, we get the following formula:

[0041]

[0042] Thus, the horizontal coordinates x1 and x2 of the pixel point P1 (x1, y1) and the pixel point P2 (x2, y2) can be expressed as follows:

[0043]

[0044] According to the formula 1, the parallax is calculated as:

[0045]

[0046] Since the three-dimensional scene is imaged on a two-dimensional plane, the required depth of field is the coordinate value z. Therefore, the depth of field information can be expressed as:

[0047]

[0048] Compared with the prior art, the present invention has the following positive and beneficial effects:

[0049] (1) The existing image fogging method is mainly based on the fog center. Specifically, the geometric center of the image is defined as the fog center of the image for fogging, and then the fog concentration is adjusted by adjusting A and β in the atmospheric scattering model formula. The fog thickness of the image based on the fog center diffuses and decreases from the fog center (i.e., the center of the image set) outward, which will cause the fog to be the thickest at the fog center and the fog thickness around the image boundary to be thin (when the image size is large, such as 600×500, the fog thickness around the image boundary after fogging is almost zero), resulting in the fog in the fogged image having obvious unevenness between the boundary and the center. When there are multiple contrasting scenes in the scene, such as foggy city streets (such as Figure 1 As shown in the figure, the human eye can feel that the fog tends to spread from the center to the surroundings, that is, the effect of adding fog to the atomization center. However, for sea scene images with a relatively simple background, the thickness of the fog in the foggy image of the sea scene should be uniform and the thickness variation is very small; when the traditional method of adding fog to the image based on the atomization center is used to add fog to the captured sea scene image, the difference between the fog thickness at the geometric center of the fogged image and the fog thickness at the image boundary is too large, which is obviously distorted and does not meet the fogging requirements of the actual sea scene image.

[0050] The present invention uses a fogging method based on scene depth, fully combines the depth of field information from the imaging device to the scene target, and uses the depth of field information to regulate the atmospheric light transmission rate, so as to add fog to the real and clear sea area images collected from the sea area scene. The thickness of the generated fogged image around the image center and the image boundary is uniform, and the fogged image is more realistic and natural, and fits the fog image actually taken in the foggy scene.

[0051] (2) The present invention utilizes the scene semantic information and depth information of the image when estimating the atmospheric light transmission rate, and realizes the linear iterative clustering of image feature information through the SLIC superpixel segmentation method, so that the semantic information in the image field is easier to express, and the image depth information obtained by subsequent matching is more accurate.

[0052] (3) The present invention divides the imaging images of the left and right perspectives into pixel blocks, then compares and matches the pixel blocks of the two images, establishes the position correspondence between the targets in the images to be matched, obtains the disparity map, and finally obtains the image depth information of the three-dimensional scene using the principle of stereoscopic vision. After obtaining the depth information, the parameters required for modeling can be estimated using the atmospheric light scattering physical model, thereby obtaining a fog image from known parameters and a clear image. Obtaining depth information is actually a three-dimensional reconstruction process. The fog scene sea area map obtained by this method is more realistic and more realistic. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] Figure 1 This is a schematic diagram of the imaging process using two imaging devices in the present invention;

[0054] Figure 2 A schematic diagram of a foggy image obtained by fogging a city street using an image fogging method based on the fog center;

[0055] Figure 3 The fogged image is obtained by fogging a clear sea scene image using the image fogging method of the present invention, wherein the left image is the original clear image, and the right image is the fogged image obtained using the fogging method of the present invention. DETAILED DESCRIPTION

[0056] The present invention is further described below in conjunction with specific embodiments, but the scope of the present invention is not limited thereto.

[0057] Embodiment 1:

[0058] A method for adding fog to an image, the specific steps are as follows:

[0059] S1: Using an imaging device to capture a left-view image and a right-view image of the same scene, the content of the left-view image and the content of the right-view image overlap, the overlap rate is greater than or equal to 50%, and the imaging planes of the left-view image and the right-view image are on the same plane, the imaging device for capturing the left-view image of the scene and the imaging device for capturing the right-view image of the scene are set at the same height, the focal lengths of the two imaging devices are the same, and the distances from the two imaging devices to the scene are the same. The scene is a sea scene.

[0060] S2: Use the SLIC method (simple linear iterative clustering method) to perform superpixel segmentation on the left view image and the right view image respectively to obtain the corresponding superpixel blocks; then select the effective superpixel blocks that are effective for scene depth estimation from the superpixel blocks of the left view image and the right view image respectively according to Formula 8;

[0061] Sel(K / M)≥max{P,μK} Equation 8

[0062] Wherein, K represents the number of superpixel blocks of the left view image or the right view image; M represents the missing part of the image pixels; P represents a constant, and the value of P is preferably 20; μ represents a weight parameter, and the value of μ is preferably 0.5.

[0063] S3: Use the Euclidean distance formula to match the centroid similarity and image content similarity of the effective superpixel blocks of the left-view image and the right-view image, and obtain the horizontal disparity map of the left-view image and the right-view image after matching.

[0064] The Euclidean distance formula is shown in Formula 5 to Formula 7:

[0065] E(l, r)=||C l -C r || 2+α||x l -x r || 2 Formula 5

[0066]

[0067]

[0068] Among them, l represents the effective super pixel block of the left view image, r represents the effective super pixel block of the right view image, and C l represents the average chromaticity value of the effective superpixel block of the left view image in the CIE space, C r represents the average chromaticity value of the effective superpixel block of the right view image in the CIE space, x l Indicates the centroid value of the effective superpixel block of the left view image, x r represents the centroid value of the effective superpixel block of the right view image, α represents the weight factor, m represents a constant, and the value of m is preferably 10, S represents the image superpixel division related factor, N represents the number of pixels of the left view image or the right view image, and K represents the number of superpixel blocks of the left view image or the right view image.

[0069] According to the horizontal disparity map, the distance h(x) between the pixel point P1(x1, y1) where any target point P in the scene is imaged in the left-view image and the pixel point P2(x2, y2) where the target point P is imaged in the right-view image is calculated. The calculation formula of h(x) is shown in Formula 1.

[0070] h(x)=|x2-x1| Formula 1

[0071] Among them, x1 represents the horizontal coordinate of the pixel point P1, and x2 represents the horizontal coordinate of the pixel point P2.

[0072] S4: Calculate the depth information d(x) of the left-view image and the right-view image according to h(x). The calculation formula of the depth information d(x) is shown in Formula 2.

[0073]

[0074] Wherein, c represents the horizontal distance between the imaging device for capturing the left-view image and the imaging device for capturing the right-view image; and f represents the focal length of the imaging device.

[0075] S5: Calculate the atmospheric light transmission rate t(x) according to the depth of field information d(x) calculated in step S4, and then perform fogging processing on the left-view image and / or the right-view image according to the atmospheric scattering model formula to obtain a fogged image of the corresponding image; the calculation formula of the atmospheric light transmission rate t(x) is shown in Formula 3, and the atmospheric scattering model formula is shown in Formula 4;

[0076] t(x)=e-βd(x) Formula 3

[0077] I(x)=J(x)t(x)+A(1-t(x)) Formula 4

[0078] Among them, β represents the atmospheric light transmission attenuation coefficient, I(x) represents the fogged image, J(x) represents the clear image (in specific applications, when generating a fogged image corresponding to a left-view image, the clear image is the left-view image; when generating a fogged image corresponding to a right-view image, the clear image is the right-view image), A represents the atmospheric light constant, and x represents the spatial coordinates of the pixel point in the image.

[0079] In Formula 3, adjusting the atmospheric light transmission attenuation coefficient β can effectively control the concentration of fog, and the value range of β is preferably 0.05 to 0.09. In Formula 4, the larger the value of the atmospheric light constant A, the higher the image brightness, and the value range of the atmospheric light constant A is preferably 0.4 to 0.75.

[0080] Embodiment 2:

[0081] The content of Example 2 is basically the same as that of Example 1, except that: before superpixel segmentation of the left-view image and the right-view image using the SLIC method in step S2, the pixel values ​​of the left-view image and the right-view image are normalized to between 0 and 1.

[0082] Embodiment 3:

[0083] A method for constructing a foggy image dataset, the construction method comprising: using the image fogging method described in the above-mentioned embodiment 1 to perform fogging processing on the collected original clear image to obtain a fogged image, and pairing and combining the fogged image with its original clear image to obtain a foggy image dataset.

[0084] The above description is only a preferred embodiment of the present invention, but is not limited to the above examples. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for adding fog to an image, characterized in that: The following steps are involved: S1: an imaging device is used to capture a left-view image and a right-view image of the same scene. The content of the left-view image and the content of the right-view image overlap, and the imaging planes of the left-view image and the right-view image are on the same plane. The imaging device for capturing the left-view image of the scene and the imaging device for capturing the right-view image of the scene have the same focal length and the same distance to the scene. S2: Use the SLIC method to perform superpixel segmentation on the left view image and the right view image respectively to obtain corresponding superpixel blocks; then select effective superpixel blocks that are effective for scene depth estimation from the superpixel blocks of the left view image and the right view image respectively; S3: Use the Euclidean distance formula to match the centroid similarity and image content similarity of the effective superpixel blocks of the left-view image and the right-view image, and obtain the horizontal disparity map of the left-view image and the right-view image after matching; calculate the distance h(x) between the pixel point P1(x1, y1) imaged by any target point P in the scene in the left-view image and the pixel point P2(x2, y2) imaged by the target point P in the right-view image according to the horizontal disparity map, and the calculation formula of h(x) is shown in Formula 1; h(x)=|x2-x1| Formula 1 Wherein, x1 represents the horizontal coordinate of pixel point P1, and x2 represents the horizontal coordinate of pixel point P2; S4: Calculate the depth information d(x) of the left-view image and the right-view image according to h(x). The calculation formula of the depth information d(x) is shown in Formula 2. Wherein, c represents the horizontal distance between the imaging device for collecting the left-view image and the imaging device for collecting the right-view image; f is the focal length of the imaging device; S5: Calculate the atmospheric light transmission rate t(x) according to the depth of field information d(x) calculated in step S4, and then perform fogging processing on the left-view image and / or the right-view image according to the atmospheric scattering model formula to obtain a fogged image of the corresponding image; the calculation formula of the atmospheric light transmission rate t(x) is shown in Formula 3, and the atmospheric scattering model formula is shown in Formula 4; t(x)=e -βd(x) Formula 3 I(x)=J(x)t(x)+A(1-t(x)) Formula 4 Among them, β represents the atmospheric light transmission attenuation coefficient, I(x) represents the fogged image, J(x) represents the clear image, A represents the atmospheric light constant, and x represents the spatial coordinates of the pixel point in the image.

2. The image fogging method according to claim 1, characterized in that: The Euclidean distance formula in step S3 is shown in Formula 5 to Formula 7: E(l,r) = ||C l -C r || 2 +α||x l -x r || 2 Equation 5 Among them, l represents the effective super pixel block of the left view image, r represents the effective super pixel block of the right view image, and C l represents the average chromaticity value of the effective superpixel block of the left view image in the CIE space, C r represents the average chromaticity value of the effective superpixel block of the right view image in the CIE space, x l Indicates the centroid value of the effective superpixel block of the left view image, x r represents the centroid value of the effective superpixel block of the right view image, α represents the weight factor, m represents a constant, S represents the image superpixel division related factor, N represents the number of pixels of the left view image or the right view image, and K represents the number of superpixel blocks of the left view image or the right view image.

3. The image fogging method according to claim 2, characterized in that: The value of m is 10.

4. The image fogging method according to claim 2, characterized in that: In step S2, the formula for selecting effective superpixel blocks that are effective for scene depth estimation from the superpixel blocks of the left view image and the right view image is shown in Formula 8; Sel(K / M)≥max{P,μK} Equation 8 Among them, K represents the number of superpixel blocks in the left view image or the right view image, M represents the missing part of the image pixels, P represents a constant, and μ represents a weight parameter.

5. The image fogging method according to claim 4, characterized in that: The value of P is 20, and the value of μ is 0.

5.

6. The image fogging method according to any one of claims 1 to 5, characterized in that: The overlap rate of the contents of the left-view image and the right-view image is greater than or equal to 50%.

7. The image fogging method according to claim 6, characterized in that: In step S2, before performing superpixel segmentation on the left-view image and the right-view image using the SLIC method, the pixel values ​​of the left-view image and the right-view image are normalized to between 0 and 1.

8. The image fogging method according to claim 7, characterized in that: The imaging device for collecting the left-view image and the imaging device for collecting the right-view image are set at the same height, and the scene is a sea scene.

9. A method for constructing a foggy image dataset, characterized in that: The collected original image is fogged using the image fogging method described in any one of claims 1 to 8 to obtain a fogged image, and the fogged image is paired and combined with the original image to obtain a foggy image data set.

10. A foggy image dataset obtained using the construction method described in claim 9.