A method for underwater environment detection

By collecting and processing images in underwater environment detection to generate grid maps, and using the D* algorithm to optimize the path, the problem of traditional underwater unmanned submarine navigation paths and obstacles fit too tightly in underwater detection, improving path safety and obstacle detection capabilities.

CN114627160BActive Publication Date: 2025-04-25JIANGNAN IND GRP CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210340600.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-31
Publication Date
2025-04-25
Estimated Expiration
2042-03-31

AI Technical Summary

Technical Problem

During underwater detection, traditional underwater unmanned submarines have problems such as the navigation path and obstacles that are too tightly fitted with each other, which is prone to collisions and equipment damage, and the path discovery algorithm update speed is too slow.

Method used

A method of underwater environment detection is adopted, including collecting underwater environment images, using underwater image enhancement algorithm for image enhancement and binarization, generating underwater grid map images, and using the D* algorithm to perform path planning in the grid map, optimizing driving trajectory points, and avoiding obstacles.

Benefits of technology

By generating grid maps and optimizing path planning, the path safety and obstacle detection capabilities of underwater environment detection devices are improved, the collision risk is reduced, and the efficiency of path planning is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114627160B_ABST
    Figure CN114627160B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of underwater path detection, and discloses a method for underwater environment detection, comprising: collecting underwater environment images, and enhancing the collected underwater environment images using an underwater image enhancement algorithm; binarizing the enhanced underwater environment images to generate underwater grid map images; using a D* algorithm to perform path planning in the underwater grid map images to determine the driving track points of an underwater path detection device detected underwater; optimizing the driving track points of the underwater environment detection device to obtain the obstacle avoidance path track of the underwater environment detection device, and marking underwater obstacles detected during driving. The method of the present invention realizes path planning in the underwater grid map image by realizing the generation of an underwater environment grid map, thereby using the D* algorithm.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of underwater path detection, and in particular to a method for underwater environment detection. Background Art

[0002] Path planning is one of the research hotspots in intelligent control, and a series of research results have been achieved, but there are still many deficiencies in its application in autonomous navigation systems. The main reason is that unmanned underwater vehicles are large in size and highly underactuated. Directly planning the path of unmanned underwater vehicles as particles cannot guarantee the safety of the path.

[0003] At the same time, during underwater detection, traditional underwater unmanned submersibles have problems such as the navigation path being too close to obstacles, which can easily lead to collisions and damage to the equipment, and the path discovery algorithm updating speed being too slow. In response to the above problems, this patent proposes a path detection method for underwater environment detection. Summary of the invention

[0004] The present invention provides a method for underwater environment detection, the purpose of which is to (1) realize the generation of an underwater environment grid map; and (2) realize the path planning of an unmanned underwater vehicle in the underwater grid map image using a D* algorithm.

[0005] To achieve the above object, the present invention provides a method for underwater environment detection, comprising the following steps:

[0006] S1: Collect underwater environment images, and use underwater image enhancement algorithm to enhance the collected underwater environment images;

[0007] S2: Binarize the enhanced underwater environment image to generate an underwater raster map image;

[0008] S3: Using the D* algorithm to perform path planning in the underwater grid map image, determine the underwater driving trajectory points of the underwater environment detection device;

[0009] S4: Optimizing the driving trajectory points of the underwater environment detection device to obtain an obstacle avoidance path trajectory of the underwater environment detection device, and the underwater environment detection device marks underwater obstacles detected during driving.

[0010] As a further improvement method of the present invention:

[0011] In step S1, the underwater environment image is enhanced by using an underwater image enhancement algorithm, including:

[0012] The underwater image enhancement algorithm process is as follows:

[0013] 1) Extract the illumination component of underwater environment images:

[0014]

[0015]

[0016] in:

[0017] I(s,t) represents the pixel value of pixel (s,t) in the underwater environment image;

[0018] I G (i, j) represents the illumination component value of pixel (i, j) in the underwater environment image;

[0019] represents the kernel function;

[0020] b represents the distance parameter, which is set to 2;

[0021] c represents the brightness parameter, which is set to 0.2;

[0022] 2) Extract the brightness value of the underwater environment image:

[0023] I V (i,j)=max{R(i,j),G(i,j),B(i,j)}

[0024] in:

[0025] R(i,j), G(i,j), B(i,j) represent the color values ​​of pixel (i,j) in the underwater environment image on the RGB color channels respectively;

[0026] I V (i, j) represents the brightness value of pixel (i, j) in the underwater environment image;

[0027] 3) Calculate the gamma enhancement coefficient values ​​of different pixels in the underwater environment image:

[0028]

[0029] in:

[0030] γ i,j Represents the gamma enhancement coefficient value of pixel (i, j) in the underwater environment image;

[0031] Mean represents the average illumination component value of the underwater environment image;

[0032] 4) Each pixel in the underwater environment image is enhanced using the gamma enhancement coefficient value, and the enhancement formula is:

[0033]

[0034] in:

[0035] I′ v (i, j) is the enhanced brightness value of pixel (i, j) in the underwater environment image.

[0036] In the step S2, the enhanced underwater environment image is subjected to binarization processing, including:

[0037] The enhanced underwater environment image is preprocessed by using a grayscale method, and the RGB color components of the underwater environment image pixels are converted into grayscale values ​​to obtain a grayscale image of the underwater environment image. The formula of the grayscale method is:

[0038] Gray (i,j) =R (i,j) ×0.314+G (i,j) ×0.591+B (i,j) ×0.113

[0039] in:

[0040] R (i,j) ,G (i,j) ,B (i,j) are the color values ​​of the underwater environment image pixel (i, j) in the three color components of R, G, and B;

[0041] Gray (i,j) is the gray value of pixel (i, j);

[0042] The grayscale image of the underwater environment image is preprocessed into a binary form, and the process of the binary preprocessing is as follows:

[0043] 1) Calculate the average grayscale of the underwater image grayscale image:

[0044]

[0045]

[0046] in:

[0047] M×N pixels is the size of the grayscale image;

[0048] k represents the gray level of the grayscale image;

[0049] ρ(k) is the probability of a pixel with gray level k appearing;

[0050] n(k) is the number of pixels with gray level k;

[0051] 2) Take the gray level m as the segmentation threshold, the gray level less than this threshold is the background, and the gray level greater than or equal to this threshold is the foreground, so that the gray image is divided into foreground and background. The background gray value is:

[0052]

[0053] The background ratio is:

[0054]

[0055] The foreground grayscale value is:

[0056]

[0057] The ratio of the number of prospects is:

[0058]

[0059] 3) Calculate the variance of foreground and background

[0060] σ=w b ×(μ b -μ) 2 +w f ×(μ f -μ) 2

[0061] By modifying the segmentation threshold m, the variance of the foreground and background is maximized. The segmentation threshold at this time is the optimal segmentation threshold, and the grayscale image is binarized with the optimal segmentation threshold to obtain a binary underwater environment image, in which the foreground of the binary underwater environment is the underwater obstacles photographed by the underwater environment detection device.

[0062] In the step S2, an underwater grid map image is generated according to the binarized underwater environment image, including:

[0063] The underwater environment detection device forms a grid space C of size M×M with the underwater environment image after binary processing, and takes the position coordinates of the current underwater environment detection device as the coordinate origin, and establishes a rectangular coordinate system in the grid space with the horizontal direction and the vertical direction as the X axis and the Y axis respectively. In a specific embodiment of the present invention, the head direction of the underwater environment detection device is the positive half axis of the Y axis;

[0064] In a rectangular coordinate system under a grid space C, the unit length of the coordinate axis is the length a of a grid, and the shape of the grid is a square. The position of the grid in the rectangular coordinate system is represented by (x, y), and the distance between adjacent grids is a; the grid space C is divided into a free space C1 and an obstacle space C2, and C1∪C2=C is satisfied, the free grid in the free space C1 is represented by 0, and the obstacle grid in the obstacle space C2 is represented by 1, and the constructed rectangular coordinate system is combined into an underwater grid map image, wherein the color of the obstacle grid is black and the color of the free grid is white; the obstacle space represents a grid space where obstacles exist, and the obstacles are obstacles detected in an underwater environment image, that is, the foreground of a binary underwater environment image, including reefs, shipwrecks, boxes, etc.; in a specific embodiment of the present invention, the present invention processes obstacles whose actual size is smaller than a unit grid according to the unit grid size, so that obstacles whose actual size is less than a grid are expanded to fill a grid.

[0065] In the step S3, the D* algorithm is used to perform path planning in the underwater grid map image, including:

[0066] The D* algorithm is used to plan the path of the underwater environment detection device in the underwater grid map image. The D* algorithm process is as follows:

[0067] 1) Initialize the queue Open, mark all free grids with a value of 0 in the underwater grid map image as State, and initialize the state of all States to New, where New means that State has never been placed in the queue Open, and store the State_Goal corresponding to the target grid in the queue Open;

[0068] 2) Calculate the K value of each State in the queue Open. For any State in the queue Open, K(State) represents the cost H(State) of the State reaching State_Goal. The State with the smallest K value is placed at the head of the queue. The cost H(State) is the distance between the State and State_Goal.

[0069] 3) Remove the State at the head of the queue from the queue Open, and transfer the overhead cost H(State) to the neighbor State. The neighbor's overhead cost is the sum of its own overhead cost and the transferred overhead cost, and add the neighbor State to the queue Open; the pointer of the neighbor State points to the State that is out of the queue;

[0070] 4) Repeat steps 2)-4) until the state of the underwater environment detection device is removed from the queue Open; all the removed state sets are used as the driving trajectory point set {L1, L2, L3, ..., L r}, where L r Indicates the State that is first out of the queue;

[0071] 5) The underwater environment detection device moves along the direction of the pointer until it reaches the target grid. In a specific embodiment of the present invention, the target grid is a free grid closest to the target position in the current underwater grid map image.

[0072] The step S4 optimizes the driving trajectory points of the underwater environment detection device, including:

[0073] The process of optimizing the driving trajectory points of the underwater environment detection device is as follows:

[0074] For the driving trajectory point set {L1, L2, L3, ..., L r}, connect any three adjacent driving trajectory coordinate points. If the connecting driving trajectory coordinate point line segment is a straight line, delete the middle driving trajectory coordinate point, and repeat this step until no driving trajectory points can be deleted;

[0075] For the set of redundant driving trajectory points {P1, P2, P3, ..., P q}, connect P1 and P3. If P1 and P3 do not intersect with the obstacle grid, and the distance between the line segment P1P3 and the obstacle grid is greater than the preset threshold ω, continue to connect P1 and P4 until P1 and P g Intersect the obstacle and delete P1 and P g The driving trajectory points between g+1 The above operations are repeated until the final driving trajectory point is reached. The final optimized driving trajectory point set is {Q1, Q2, Q3, …, Q y}, where Q y Indicates the target position of the underwater environment detection device.

[0076] In step S4, the underwater environment detection device travels along the obstacle avoidance path and marks underwater obstacles detected during the travel, including:

[0077] The underwater environment detection device follows the optimized driving trajectory points {Q1, Q2, Q3, …, Q y}Driving and marking underwater obstacles detected during driving.

[0078] Compared with the prior art, the present invention proposes a detection method of an underwater environment detection device, which has the following advantages:

[0079] First, this scheme proposes an underwater image enhancement algorithm by extracting the illumination component of the underwater environment image:

[0080]

[0081]

[0082] Where: I(s, t) represents the pixel value of pixel (s, t) in the underwater environment image; I G (i, j) represents the illumination component value of pixel (i, j) in the underwater environment image; represents the kernel function; b represents the distance parameter, which is set to 2; c represents the brightness parameter, which is set to 0.2; extract the brightness value of the underwater environment image:

[0083] I V (i,j)=max{R(i,j),G(i,j),B(i,j)}

[0084] Where: R(i,j), G(i,j), B(i,j) represent the color values ​​of pixel (i,j) in the underwater environment image on the RGB color channels respectively; I V (i, j) represents the brightness value of pixel (i, j) in the underwater environment image; calculate the gamma enhancement coefficient values ​​of different pixels in the underwater environment image:

[0085]

[0086] Where: γ i,j represents the gamma enhancement coefficient value of the pixel (i, j) in the underwater environment image; mean represents the average illumination component value of the underwater environment image; each pixel in the underwater environment image is enhanced using the gamma enhancement coefficient value, and the enhancement formula is:

[0087]

[0088] Where: I′ v (i, j) is the enhanced brightness value of pixel (i, j) in the underwater environment image. Compared with the traditional method, this scheme proposes an adaptive gamma enhancement algorithm based on the dark channel of the image. When the brightness value of the pixel point of the underwater image is less than the average brightness value, the gamma function proposed in this scheme can adaptively increase the brightness of the point. When the brightness value of the pixel point of the underwater image is greater than the average brightness value, the brightness of the point can be appropriately reduced after correction.

[0089] At the same time, this scheme proposes a path planning method for an underwater unmanned submersible. First, the D* algorithm is used to plan the path of an underwater environment detection device in an underwater grid map image. The D* algorithm process is as follows: 1) Initialize the queue Open, mark all free grids with values ​​of 0 in the underwater grid map image as State, and initialize the states of all States to New, where New means that State has never been placed in the queue Open, and store the State_Goal corresponding to the target grid in the queue Open; 2) Calculate the K value of each State in the queue Open. For any State in the queue Open, K(State) represents the cost H(Sta) of the State reaching State_Goal. te), the State with the smallest K value is stored at the head of the queue; the cost H(State) is the distance between State and State_Goal; 3) the State at the head of the queue is removed from the queue Open, and the cost H(State) is transferred to the neighbor State, then the neighbor's cost is the sum of its own cost and the cost of the transfer, and the neighbor State is added to the queue Open; the pointer of the neighbor State points to the State that is out of the queue; 4) repeat steps 2)-4) until the State where the underwater environment detection device is located is out of the queue Open; all the out-of-queue State sets are used as the driving trajectory point set {L1,L2,L3,…,L r}, where L r Indicates the State that leaves the queue first; 5) The underwater environment detection device moves along the pointer direction until it reaches the target grid. Compared with the traditional solution, this solution optimizes the path obtained by the path planning algorithm. For the set of driving trajectory points of the underwater environment detection device {L1, L2, L3, …, L r}, connect any three adjacent driving trajectory coordinate points. If the connecting driving trajectory coordinate point line segment is a straight line, delete the middle driving trajectory coordinate point, and repeat this step until no driving trajectory points can be deleted, thereby deleting the redundant driving trajectory points in the planned path; for the set of deleted redundant driving trajectory points {P1, P2, P3, …, P q}, connect P1 and P3. If P1 and P3 do not intersect with the obstacle grid, and the distance between the line segment P1P3 and the obstacle grid is greater than the preset threshold ω, continue to connect P1 and P4 until P1 and P g Intersect the obstacle and delete P1 and P g The driving trajectory points between g+1 The above operations are repeated until the final driving trajectory point is reached. The final optimized driving trajectory point set is {Q1, Q2, Q3, …, Q y}, where Q yIndicates the target position of the underwater environment detection device. BRIEF DESCRIPTION OF THE DRAWINGS

[0090] Figure 1 A schematic flow chart of a detection method of an underwater environment detection device provided by an embodiment of the present invention;

[0091] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0092] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0093] S1: Collect underwater environment images, and use underwater image enhancement algorithm to enhance the collected underwater environment images.

[0094] In step S1, the underwater environment image is enhanced by using an underwater image enhancement algorithm, including:

[0095] The underwater image enhancement algorithm process is as follows:

[0096] 1) Extract the illumination component of underwater environment images:

[0097]

[0098]

[0099] in

[0100] I(s,t) represents the pixel value of pixel (s,t) in the underwater environment image;

[0101] I G (i, j) represents the illumination component value of pixel (i, j) in the underwater environment image;

[0102] represents the kernel function;

[0103] b represents the distance parameter, which is set to 2;

[0104] c represents the brightness parameter, which is set to 0.2;

[0105] 2) Extract the brightness value of the underwater environment image:

[0106] I V (i,j)=max{R(i,j),G(i,j),B(i,j)}

[0107] in:

[0108] R(i,j), G(i,j), B(i,j) represent the color values ​​of pixel (i,j) in the underwater environment image on the RGB color channels respectively;

[0109] I V (i, j) represents the brightness value of pixel (i, j) in the underwater environment image;

[0110] 3) Calculate the gamma enhancement coefficient values ​​of different pixels in the underwater environment image:

[0111]

[0112] in:

[0113] γ i,j Represents the gamma enhancement coefficient value of pixel (i, j) in the underwater environment image;

[0114] Mean represents the average illumination component value of the underwater environment image;

[0115] 4) Each pixel in the underwater environment image is enhanced using the gamma enhancement coefficient value, and the enhancement formula is:

[0116]

[0117] in:

[0118] I′ v (i, j) is the enhanced brightness value of pixel (i, j) in the underwater environment image.

[0119] S2: Binarize the enhanced underwater environment image to generate an underwater raster map image.

[0120] In the step S2, the enhanced underwater environment image is subjected to binarization processing, including:

[0121] The enhanced underwater environment image is preprocessed by using a grayscale method, and the RGB color components of the underwater environment image pixels are converted into grayscale values ​​to obtain a grayscale image of the underwater environment image. The formula of the grayscale method is:

[0122] Gray (i,j) =R (i,j) ×0.314+G (i,j) ×0.591+B (i,j) ×0.113

[0123] in:

[0124] R (i,j) ,G (i,j) ,B (i,j)are the color values ​​of the underwater environment image pixel (i, j) in the three color components of R, G, and B;

[0125] Gray (i,j) is the gray value of pixel (i, j);

[0126] The grayscale image of the underwater environment image is preprocessed into a binary form, and the process of the binary preprocessing is as follows:

[0127] 1) Calculate the average grayscale of the underwater image grayscale image:

[0128]

[0129]

[0130] in:

[0131] M×N pixels is the size of the grayscale image;

[0132] k represents the gray level of the grayscale image;

[0133] ρ(k) is the probability of a pixel with gray level k appearing;

[0134] n(k) is the number of pixels with gray level k;

[0135] 2) Take the gray level m as the segmentation threshold, the gray level less than this threshold is the background, and the gray level greater than or equal to this threshold is the foreground, so that the gray image is divided into foreground and background. The background gray value is:

[0136]

[0137] The background ratio is:

[0138]

[0139] The foreground grayscale value is:

[0140]

[0141] The ratio of the number of prospects is:

[0142]

[0143] 3) Calculate the variance of foreground and background:

[0144] σ=w b ×(μ b -μ) 2 +w f ×(μ f -μ) 2

[0145] By modifying the segmentation threshold m, the variance of the foreground and background is maximized. The segmentation threshold at this time is the optimal segmentation threshold, and the grayscale image is binarized with the optimal segmentation threshold to obtain a binary underwater environment image, in which the foreground of the binary underwater environment is the underwater obstacles photographed by the underwater environment detection device.

[0146] In the step S2, generating an underwater grid map image according to the binarized underwater environment image includes:

[0147] The underwater environment detection device forms a grid space C of size M×M with the underwater environment image after binary processing, and takes the position coordinates of the current underwater environment detection device as the coordinate origin, and establishes a rectangular coordinate system in the grid space with the horizontal direction and the vertical direction as the X axis and the Y axis respectively. In a specific embodiment of the present invention, the head direction of the underwater environment detection device is the positive half axis of the Y axis;

[0148] In a rectangular coordinate system under a grid space C, the unit length of the coordinate axis is the length a of a grid, and the shape of the grid is a square. The position of the grid in the rectangular coordinate system is represented by (x, y), and the distance between adjacent grids is a; the grid space C is divided into a free space C1 and an obstacle space C2, and C1∪C2=C is satisfied, the free grid in the free space C1 is represented by 0, and the obstacle grid in the obstacle space C2 is represented by 1, and the constructed rectangular coordinate system is combined into an underwater grid map image, wherein the color of the obstacle grid is black and the color of the free grid is white; the obstacle space represents a grid space where obstacles exist, and the obstacles are obstacles detected in an underwater environment image, that is, the foreground of a binary underwater environment image, including reefs, shipwrecks, boxes, etc.; in a specific embodiment of the present invention, the present invention processes obstacles whose actual size is smaller than a unit grid according to the unit grid size, so that obstacles whose actual size is less than a grid are expanded to fill a grid.

[0149] S3: Use the D* algorithm to perform path planning in the underwater grid map image to determine the driving trajectory points of the underwater environment detection device during underwater detection.

[0150] In the step S3, the D* algorithm is used to perform path planning in the underwater grid map image, including:

[0151] The D* algorithm is used to plan the path of the underwater environment detection device in the underwater grid map image. The D* algorithm process is as follows:

[0152] 1) Initialize the queue Open, mark all free grids with a value of 0 in the underwater grid map image as State, and initialize the state of all States to New, where New means that State has never been placed in the queue Open, and store the State_Goal corresponding to the target grid in the queue Open;

[0153] 2) Calculate the K value of each State in the queue Open. For any State in the queue Open, K(State) represents the cost H(State) of the State reaching State_Goal. The State with the smallest K value is placed at the head of the queue. The cost H(State) is the distance between the State and State_Goal.

[0154] 3) Remove the State at the head of the queue from the queue Open, and transfer the overhead cost H(State) to the neighbor State. The neighbor's overhead cost is the sum of its own overhead cost and the transferred overhead cost, and add the neighbor State to the queue Open; the pointer of the neighbor State points to the State that is out of the queue;

[0155] 4) Repeat steps 2)-4) until the state of the underwater environment detection device is removed from the queue Open; all the removed state sets are used as the driving trajectory point set {L1, L2, L3, ..., L r}, where L r Indicates the State that is first out of the queue;

[0156] 5) The underwater environment detection device moves along the direction of the pointer until it reaches the target grid. In a specific embodiment of the present invention, the target grid is a free grid closest to the target position in the current underwater grid map image.

[0157] S4: Optimizing the driving trajectory points of the underwater environment detection device to obtain an obstacle avoidance path trajectory of the underwater environment detection device, and the underwater environment detection device marks underwater obstacles detected during driving.

[0158] The step S4 optimizes the driving trajectory points of the underwater environment detection device, including:

[0159] The process of optimizing the driving trajectory points of the underwater environment detection device is as follows:

[0160] For the driving trajectory point set {L1, L2, L3, ..., L r}, connect any three adjacent driving trajectory coordinate points. If the connecting driving trajectory coordinate point line segment is a straight line, delete the middle driving trajectory coordinate point, and repeat this step until no driving trajectory points can be deleted;

[0161] For the set of redundant driving trajectory points {P1, P2, P3, ..., P q}, connect P1 and P3. If P1 and P3 do not intersect with the obstacle grid, and the distance between the line segment P1P3 and the obstacle grid is greater than the preset threshold ω, continue to connect P1 and P4 until P1 and P g Intersect the obstacle and delete P1 and P g The driving trajectory points between g+1 The above operations are repeated until the final driving trajectory point is reached. The final optimized driving trajectory point set is {Q1, Q2, Q3, …, Q y}, where Q y Indicates the target position of the underwater environment detection device.

[0162] In step S4, the underwater environment detection device travels along the obstacle avoidance path and marks underwater obstacles detected during the travel, including:

[0163] The underwater environment detection device follows the optimized driving trajectory points {Q1, Q2, Q3, …, Q y}Driving and marking underwater obstacles detected during driving.

[0164] It should be noted that the serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments. And the terms "including", "comprising" or any other variants thereof in this article are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, device, article or method. In the absence of further restrictions, an element defined by the sentence "including a ..." does not exclude the presence of other identical elements in the process, device, article or method including the element.

[0165] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0166] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A method for underwater environment detection, characterized in that: The method comprises: S1: Collect underwater environment images, and use underwater image enhancement algorithm to enhance the collected underwater environment images; In step S1, the underwater environment image is enhanced by using an underwater image enhancement algorithm, including: The underwater image enhancement algorithm process is as follows: 1) Extract the illumination component of underwater environment images: in: I(s,t) represents the pixel value of pixel (s,t) in the underwater environment image; I G (i, j) represents the illumination component value of pixel (i, j) in the underwater environment image; represents the kernel function; b represents the distance parameter, which is set to 2; c represents the brightness parameter, which is set to 0.2; 2) Extract the brightness value of the underwater environment image: I V (i,j)=max{R(i,j),G(i,j),B(i,j)} in: R(i,j), G(i,j), B(i,j) represent the color values ​​of pixel (i,j) in the underwater environment image on the RGB color channels respectively; I V (i, j) represents the brightness value of pixel (i, j) in the underwater environment image; 3) Calculate the gamma enhancement coefficient values ​​of different pixels in the underwater environment image: in: γ i,j Represents the gamma enhancement coefficient value of pixel (i, j) in the underwater environment image; Mean represents the average illumination component value of the underwater environment image; 4) Each pixel in the underwater environment image is enhanced using the gamma enhancement coefficient value, and the enhancement formula is: in: I' v (i, j) is the enhanced brightness value of pixel (i, j) in the underwater environment image; S2: Binarize the enhanced underwater environment image to generate an underwater raster map image; S3: Path planning is performed in the underwater grid map image using the D* algorithm to determine the driving trajectory points of the underwater environment detection device during underwater detection; S4: Optimizing the driving trajectory points of the underwater environment detection device to obtain an obstacle avoidance path trajectory of the underwater environment detection device, and marking underwater obstacles detected during driving; The step S4 optimizes the driving trajectory points of the underwater environment detection device, including: The process of optimizing the driving trajectory points of the underwater environment detection device is as follows: For the driving trajectory point set {L1, L2, L3, ..., L r }, connect any three adjacent driving trajectory coordinate points. If the connecting driving trajectory coordinate point line segment is a straight line, delete the middle driving trajectory coordinate point, and repeat this step until no driving trajectory points can be deleted; For the set of redundant driving trajectory points {P1, P2, P3, ..., P q }, connect P1 and P3. If P1 and P3 do not intersect with the obstacle grid, and the distance between the line segment P1P3 and the obstacle grid is greater than the preset threshold ω, continue to connect P1 and P4 until P1 and P g Intersect the obstacle and delete P1 and P g The driving trajectory points between g+1 The above operations are repeated until the final driving trajectory point is reached. The final optimized driving trajectory point set is {Q1, Q2, Q3, …, Q y }, where Q y Indicates the target position of the underwater environment detection device.

2. The underwater environment detection device detection method according to claim 1, characterized in that: In the step S2, the enhanced underwater environment image is subjected to binarization processing, including: The enhanced underwater environment image is preprocessed by using a grayscale method, and the RGB color components of the underwater environment image pixels are converted into grayscale values ​​to obtain a grayscale image of the underwater environment image. The formula of the grayscale method is: Gray (i,j) =R (i,j) ×0.314+G (i,j) ×0.591+B (i,j) ×0.113 in: R (i,j) ,G (i,j) ,B (i,j) are the color values ​​of the underwater environment image pixel (i, j) in the three color components of R, G, and B; Gray (i,j) is the gray value of pixel (i, j); The grayscale image of the underwater environment image is preprocessed into a binary form, and the process of the binary preprocessing is as follows: 1) Calculate the average grayscale of the underwater image grayscale image: in: M×N pixels is the size of the grayscale image; k represents the gray level of the grayscale image; ρ(k) is the probability of a pixel with gray level k appearing; n(k) is the number of pixels with gray level k; 2) Take the gray level m as the segmentation threshold, the gray level less than this threshold is the background, and the gray level greater than or equal to this threshold is the foreground, so that the gray image is divided into foreground and background. The background gray value is: The background ratio is: The foreground grayscale value is: The ratio of the number of prospects is: 3) Calculate the variance of foreground and background: σ=w b ×(μ b -m) 2 +w f ×(μ f -m) 2 By modifying the segmentation threshold m, the variance of the foreground and background is maximized. The segmentation threshold at this time is the optimal segmentation threshold, and the grayscale image is binarized with the optimal segmentation threshold to obtain a binary underwater environment image, in which the foreground of the binary underwater environment is the underwater obstacles photographed by the underwater environment detection device.

3. The underwater environment detection device detection method according to claim 2, characterized in that: In the step S2, an underwater grid map image is generated according to the binarized underwater environment image, including: The underwater environment detection device forms a grid space C of size M×M with the underwater environment image after binary processing, and takes the position coordinates of the current underwater environment detection device as the coordinate origin, and establishes a rectangular coordinate system in the grid space with the horizontal direction and the vertical direction as the X axis and the Y axis respectively; In the rectangular coordinate system under the grid space C, the unit length of the coordinate axis is the length a of a grid, and the shape of the grid is a square. The position of the grid in the rectangular coordinate system is represented by (x, y), and the distance between adjacent grids is a; the grid space C is divided into a free space C1 and an obstacle space C2, and C1∪C2=C is satisfied. The free grid in the free space C1 is represented as 0, and the obstacle grid in the obstacle space C2 is represented as 1, and the constructed rectangular coordinate system is combined into an underwater grid map image, wherein the color of the obstacle grid is black and the color of the free grid is white; the obstacle space represents a grid space where obstacles exist, and the obstacles are obstacles detected in the underwater environment image, that is, the foreground of the binary underwater environment image, including reefs, shipwrecks, and boxes.

4. The method for underwater environment detection according to claim 1, characterized in that: In the step S3, the D* algorithm is used to perform path planning in the underwater grid map image, including: The D* algorithm is used to plan the path of the underwater environment detection device in the underwater grid map image. The D* algorithm process is as follows: 1) Initialize the queue Open, mark all free grids with a value of 0 in the underwater grid map image as State, and initialize the state of all States to New, where New means that State has never been placed in the queue Open, and store the State_Goal corresponding to the target grid in the queue Open; 2) Calculate the K value of each State in the queue Open. For any State in the queue Open, K(State) represents the cost H(State) of the State reaching State_Goal. The State with the smallest K value is placed at the head of the queue. The cost H(State) is the distance between the State and State_Goal. 3) Remove the State at the head of the queue from the queue Open, and transfer the overhead cost H(State) to the neighbor State. The neighbor's overhead cost is the sum of its own overhead cost and the transferred overhead cost, and add the neighbor State to the queue Open; the pointer of the neighbor State points to the State that is out of the queue; 4) Repeat steps 2)-4) until the state of the underwater environment detection device is removed from the queue Open; all the removed state sets are used as the driving trajectory point set {L1, L2, L3, ..., L r }, where L r Indicates the State that is first out of the queue; 5) The underwater environment detection device moves along the direction of the pointer until it reaches the target grid, which is the free grid closest to the target position in the current underwater grid map image.

5. The method for underwater environment detection according to claim 4, characterized in that: In step S4, the underwater environment detection device travels along the obstacle avoidance path and marks underwater obstacles detected during the travel, including: The underwater environment detection device follows the optimized driving trajectory points {Q1, Q2, Q3, …, Q y }Driving and marking underwater obstacles detected during driving.

Citation Information

Patent Citations

  • Path planning device and method for unmanned underwater vehicle based on detection threat domain

    CN107368086A

  • Improved ant colony path planning algorithm based on non-uniform modeling

    CN109506655A