A binocular vision correction method for underwater robots

By analyzing the illumination characteristic area and scattering uniformity in the binocular image, and adaptively adjusting the contrast, the problem of binocular camera image distortion in the underwater environment is solved, and the accuracy of the three-dimensional reconstruction and the operating efficiency of the underwater robot are improved.

CN118396982BActive Publication Date: 2024-09-03SHENZHEN TECH UNIV
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202410814320.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-24
Publication Date
2024-09-03
Estimated Expiration
2044-06-24

AI Technical Summary

Technical Problem

Light scattering and refraction in the underwater environment cause distortion of images captured by binocular cameras, affecting the accuracy of three-dimensional reconstruction and reducing the operating efficiency of underwater robots. It is difficult for existing technology to adapt to different light conditions for correction.

Method used

By collecting binocular images, analyzing the lighting direction of pixels, dividing lighting characteristic areas, calculating scattering uniformity and lighting correction coefficients, adaptively adjusting contrast, and performing binocular image enhancement to correct distortion.

Benefits of technology

It improves the accuracy of binocular matching, reduces the computational load of underwater robots, and enhances operating efficiency in complex underwater environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118396982B
    Figure CN118396982B
Patent Text Reader

Abstract

The present invention relates to the field of image processing technology, and in particular to a binocular vision correction method for an underwater robot, comprising: collecting binocular images at each collection moment, obtaining several illumination characteristic regions of each monocular image according to the illumination direction of the pixel points in the binocular image, calculating the scattering uniformity, thereby obtaining a non-uniform illumination region; obtaining a corresponding region group of each non-uniform illumination region in each monocular image according to the region range of the non-uniform illumination region between the binocular images; obtaining an illumination correction coefficient of each non-uniform illumination region according to the region area difference of each non-uniform illumination region, combined with the difference in scattering uniformity in the corresponding region group, thereby calculating an adaptive contrast coefficient, enhancing the binocular image, obtaining a binocular matching result, and completing the binocular correction of the underwater robot. The present invention adaptively corrects the binocular vision of the underwater robot by analyzing different illumination conditions between the binocular images.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of image processing, and in particular to a binocular vision correction method for an underwater robot. Background Art

[0002] An underwater robot is a robot that can perform tasks such as detection, measurement, observation, and sampling in an underwater environment. It can perform tasks that humans cannot complete, such as deep-sea exploration, maintenance of submarine pipelines, and search and rescue in the event of a shipwreck. A binocular camera is a visual system that simulates human eyes. It uses dual cameras to capture images from different angles, and through stereo matching technology, it can determine the distance of objects in the image relative to the robot, thereby helping the robot to perform visual perception and complete corresponding operations.

[0003] However, the underwater imaging environment is often special. The suspended sediment and plankton in the water will scatter the light. The propagation of light is also affected by the refraction of natural light in the water. The different influences work together to affect the image during the shooting process of the underwater robot's binocular camera, resulting in distortion in the effect of direct binocular stereo matching. When performing three-dimensional reconstruction, there is a deviation in the accuracy of the distance from the object to the robot, which reduces the efficiency of the robot in underwater operation tasks. Therefore, for the stereo matching algorithm, the better the contrast of the input underwater image is processed, the better the stereo matching effect will be. Therefore, for the limited computing power of the underwater robot, matching after enhancement can greatly reduce the robot's computing load, but the complex underwater environment is not suitable for fixed light scattering correction conditions, and adaptive adjustments are required for different underwater light conditions. Summary of the invention

[0004] The invention provides a binocular vision correction method for an underwater robot to solve the existing problems.

[0005] The binocular vision correction method for an underwater robot of the present invention adopts the following technical solution:

[0006] An embodiment of the present invention provides a binocular vision correction method for an underwater robot, the method comprising the following steps:

[0007] Collect binocular images at each acquisition moment;

[0008] According to the uniformity of the illumination direction of the pixel points in the binocular image, several illumination characteristic areas of each monocular image are obtained; according to the difference in illumination direction and area between the multiple illumination characteristic areas, the scattering uniformity of each illumination characteristic area in each monocular image is obtained; according to the scattering uniformity of each illumination characteristic area, several non-uniform illumination areas in each monocular image are obtained; according to the area range of the non-uniform illumination area between the binocular images, the corresponding area group of each non-uniform illumination area in each monocular image is obtained; according to the area difference between each non-uniform illumination area in each monocular image and each non-uniform illumination area in the corresponding area group, combined with the difference in scattering uniformity of each non-uniform illumination area in the corresponding area group, the illumination correction coefficient of each non-uniform illumination area in each monocular image is obtained;

[0009] According to the illumination correction coefficient of each non-uniform illumination area in each monocular image, an adaptive contrast coefficient is calculated; according to the adaptive contrast coefficient, the binocular image is enhanced to obtain an enhanced binocular image; according to the enhanced binocular image, a binocular matching result is obtained to complete the binocular correction of the underwater robot.

[0010] Furthermore, the step of obtaining the illumination characteristic regions of the binocular images according to different illumination effects in the binocular images comprises the following specific steps:

[0011] A neighborhood is constructed with each pixel in the monocular image as the center, and the direction from the pixel at the center of the neighborhood to the pixel with the smallest grayscale value in the neighborhood is taken as the illumination direction of the pixel at the center of the neighborhood. Adjacent pixels with the same illumination direction in the monocular image are merged, and each connected domain obtained is recorded as an illumination characteristic region.

[0012] Furthermore, the step of obtaining the scattering uniformity of each illumination characteristic region in each monocular image according to the illumination direction difference and the area difference between the plurality of illumination characteristic regions includes the following specific steps:

[0013]

[0014] In the formula, Indicates the number of The scattering uniformity of the illumination characteristic area, Indicates the number of The number of pixels in the illumination characteristic area; Indicates the minimum number of pixels in all illumination feature areas in the monocular image at the current acquisition moment; Indicates the monocular image at the current acquisition time and the The number of adjacent illumination characteristic regions of an illumination characteristic region; Indicates the number of The angle between the illumination direction of each illumination characteristic area and the x-axis of the image coordinate system, Indicates the number of The angle between the illumination direction of the jth adjacent illumination characteristic area of ​​the illumination characteristic area and the x-axis of the image coordinate system; Indicates the number of The standard deviation of the illumination direction between an illumination characteristic area and adjacent illumination characteristic areas.

[0015] Furthermore, the specific steps for obtaining the uniform illumination area and the non-uniform illumination area are as follows:

[0016] The scattering uniformity of each illumination feature area is normalized to The normalized evaluation of the scattering uniformity of each illumination characteristic area is obtained, and the area judgment threshold is preset. The illumination characteristic area whose normalized evaluation of the scattering uniformity is greater than or equal to the area judgment threshold is recorded as a uniform illumination area, and the illumination characteristic area whose normalized evaluation of the scattering uniformity is less than the area judgment threshold is recorded as a non-uniform illumination area.

[0017] Furthermore, the obtaining of the corresponding region group for each non-uniform illumination region in each monocular image includes the following specific steps:

[0018] Take one of the monocular images at the current acquisition moment as the reference image, and for each non-uniform illumination area in the reference image, obtain the connected domain range of the non-uniform illumination area. In another monocular image at the current acquisition moment, obtain all non-uniform illumination areas that have an intersection with the connected domain range of each non-uniform illumination area in the reference image and the intersection is not empty, to form a corresponding area group for each non-uniform illumination area in the reference image.

[0019] Furthermore, the specific steps for obtaining the illumination correction coefficient are as follows:

[0020] The normalized evaluation of the scattering uniformity of the Fth non-uniform illumination area in the reference image is recorded as , the illumination correction coefficient of the Fth non-uniform illumination area in the reference image is calculated as:

[0021]

[0022] In the formula, represents the illumination correction coefficient of the Fth non-uniform illumination area in the reference image, represents the number of non-uniformly illuminated regions in the region group corresponding to the Fth non-uniformly illuminated region in the reference image; represents the number of pixels in the Fth non-uniform illumination area in the reference image; represents the number of pixels in the region group corresponding to the Fth non-uniform illumination region in the reference image; represents the scattering uniformity of the Fth non-uniform illumination area in the reference image; represents the maximum value of the scattering uniformity in the corresponding area group of the Fth non-uniform illumination area in the reference image, Indicates the minimum value of the scattering uniformity in the area group corresponding to the Fth non-uniform illumination area in the reference image.

[0023] Furthermore, the specific steps of obtaining the adaptive contrast coefficient are as follows:

[0024]

[0025] In the formula, represents the adaptive contrast coefficient of the Fth non-uniform illumination region in the reference image; is the preset contrast coefficient of the Fth non-uniform illumination area in the reference image; Represents the normalized illumination correction coefficient of the Fth non-uniform illumination region in the reference image.

[0026] Furthermore, the specific method of obtaining the preset contrast coefficient and the normalized illumination correction coefficient is as follows:

[0027] The Fth non-uniform illumination area is input into the createCLAHE function, and the obtained default contrast coefficient is recorded as the preset contrast coefficient of the Fth non-uniform illumination area in the reference image;

[0028] The illumination correction coefficients of all non-uniform illumination areas in the reference image are input into the premnmx function for normalization, and the normalized result of the illumination correction coefficient of each non-uniform illumination area is recorded as the normalized illumination correction coefficient of each non-uniform illumination area.

[0029] Furthermore, the step of enhancing the binocular image according to the adaptive contrast coefficient to obtain the enhanced binocular image includes the following specific steps:

[0030] According to the adaptive contrast coefficient of each non-uniform illumination area, the non-uniform illumination area in each monocular image is adaptively histogram equalized to obtain the enhancement result of each non-uniform illumination area; each uniform illumination area in each monocular image is input into the createCLAHE function, and the obtained default contrast coefficient is recorded as the preset contrast coefficient of each uniform illumination area in each monocular image, and the preset contrast coefficient of the uniform illumination area is used as the adaptive contrast coefficient, and the enhancement result of each uniform illumination area is obtained by using adaptive histogram equalization; the images composed of the enhancement result of the uniform illumination area in each monocular image and the enhancement result of the non-uniform illumination area are respectively used as the enhanced binocular images.

[0031] Furthermore, the binocular matching result is obtained according to the enhanced binocular image to complete the binocular correction of the underwater robot, and the specific steps include the following:

[0032] The enhanced binocular image pair is input into the semi-global stereo matching algorithm to obtain the disparity map corresponding to the current acquisition moment; the corresponding pixel positions of the binocular images are merged through the disparity map, and the binocular matching result at the current frame position is output.

[0033] The technical solution of the present invention has the following beneficial effects: binocular images at each acquisition moment are collected, and the scattering uniformity is calculated by obtaining several illumination characteristic areas of each monocular image according to the illumination direction of the pixel points in the binocular image, thereby obtaining a non-uniform illumination area, which reflects the illumination characteristics of different areas; according to the area range of the non-uniform illumination area between the binocular images, a corresponding area group of each non-uniform illumination area in each monocular image is obtained, which is beneficial to improving the accuracy of subsequent correction; according to the area difference of each non-uniform illumination area, combined with the difference in scattering uniformity in the corresponding area group, an illumination correction coefficient of each non-uniform illumination area is obtained, thereby calculating an adaptive contrast coefficient, enhancing the binocular image, ensuring the accuracy of binocular image matching, obtaining a binocular matching result, and completing the binocular correction of the underwater robot. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0035] Figure 1 The present invention is a flowchart of the steps of a binocular vision correction method for an underwater robot. DETAILED DESCRIPTION

[0036] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the binocular vision correction method for an underwater robot proposed by the present invention, its specific implementation, structure, features and effects, in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.

[0037] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

[0038] The following is a detailed description of a specific scheme of a binocular vision correction method for an underwater robot provided by the present invention in conjunction with the accompanying drawings.

[0039] See also Figure 1 , which shows a flowchart of a binocular vision correction method for an underwater robot provided by an embodiment of the present invention, the method comprising the following steps:

[0040] Step S001: Acquire binocular images of the underwater robot.

[0041] The purpose of this embodiment is to correct the binocular vision of the underwater robot. Therefore, the binocular camera of the underwater robot is used to capture images in a continuous frame mode to obtain a binocular image at each acquisition moment. The shooting speed in this embodiment is 24 frames per second. Other embodiments may use other shooting speeds, which are not specifically limited in this embodiment.

[0042] Step S002: Obtain illumination characteristic areas of the binocular image according to different illumination influences; obtain the scattering uniformity of each illumination characteristic area of ​​the monocular image according to the illumination conditions between different illumination characteristic areas; obtain each non-uniform illumination area according to the scattering uniformity of each illumination characteristic area.

[0043] It should be noted that due to the complexity of the underwater environment itself, when the underwater robot collects images, the natural light in the robot's working environment is affected by the interference of the forward scattering phenomenon generated by the water body and objects. However, the emission angle and light intensity of the robot's own light source can be controlled. By analyzing the changes in the forward scattering phenomenon between binocular images, the light interference area in the monocular image can be located. Due to the different scattering uniformity caused by forward scattering in the monocular image, it is necessary to distinguish different scattering areas. The more similar the difference change amplitude between adjacent pixels in the monocular image, and the more similar the grayscale difference direction between pixels, it means that the water body is more due to the relatively fixed lighting trend formed by the robot's own lighting.

[0044] Specifically, first, a neighborhood range is constructed with each pixel in the current monocular image as the center, and the direction from the pixel at the center of the neighborhood range to the pixel with the smallest grayscale value in the neighborhood range is taken as the illumination direction of the pixel at the center of the neighborhood range. The adjacent pixels with the same illumination direction in the monocular image are merged, and each connected domain obtained is recorded as an illumination characteristic area. The neighborhood range set in this embodiment is 3x3, which is used as an example for description. It can be set to other values ​​in other implementation modes, and this embodiment is not limited.

[0045] It should be further explained that in forward scattering, the intensity of natural light cannot reflect the relatively constant light intensity of the robot's own light source, and the path consistency of natural light propagation at different positions in the water is poor. Therefore, the different distribution conditions of the illumination characteristic areas are locally judged based on the significant change in the direction of the illumination caused by the distance between the location of the illumination characteristic area and the robot's location, and the scattering uniformity of each illumination characteristic area is obtained.

[0046] Specifically, for any monocular image at the current acquisition time, the first The calculation method of scattering uniformity of each illumination characteristic area is:

[0047]

[0048] In the formula, Indicates The scattering uniformity of the illumination characteristic area, Indicates The number of pixels in the illumination characteristic area; Indicates the minimum number of pixels in all illumination feature areas in the monocular image at the current acquisition moment; Indicates The number of adjacent illumination characteristic regions of an illumination characteristic region; Indicates The angle between the illumination direction of each illumination characteristic area and the x-axis of the image coordinate system, Indicates The angle between the illumination direction of the jth adjacent illumination characteristic area of ​​the illumination characteristic area and the x-axis of the image coordinate system; Indicates The standard deviation of the illumination direction between an illumination characteristic area and adjacent illumination characteristic areas.

[0049] As the The larger the area ratio between the first illumination characteristic area and the smallest illumination characteristic area, the larger the value is. The illumination characteristic region is more likely to be a large area of ​​illumination characteristic region formed by illumination with relatively uniform intensity; For the The change in the angle between the illumination direction of the illumination characteristic area and all adjacent areas. The larger the value, the There is a large difference in the lighting direction between the current lighting characteristic area and the surrounding lighting characteristic areas, that is, the current lighting characteristic area and the adjacent lighting characteristic area show changing characteristics under different interferences of lighting conditions on the image, reflecting that the material or depth of the adjacent lighting characteristic area is less similar than that of the current lighting characteristic area, that is, the lighting scattering of the current lighting characteristic area is more uniform.

[0050] Traverse all the illumination characteristic areas in the monocular image at the current acquisition time, obtain the scattering uniformity of each illumination characteristic area, and normalize the scattering uniformity of each illumination characteristic area to The normalized evaluation of the scattering uniformity of each illumination characteristic area is obtained, and a regional judgment threshold is preset. The illumination characteristic area whose normalized evaluation of the scattering uniformity is greater than or equal to the regional judgment threshold is recorded as a uniform illumination area, and the illumination characteristic area whose normalized evaluation of the scattering uniformity is less than the regional judgment threshold is recorded as a non-uniform illumination area. In this embodiment, the preset regional judgment threshold is 0.7, and other embodiments may set other values, which are not specifically limited in this embodiment.

[0051] Step S003: According to the different lighting conditions between the binocular images, obtain the corresponding area group of each non-uniform lighting area in the monocular image in the other image; and obtain the lighting correction coefficient of each non-uniform lighting area according to the difference between the non-uniform lighting area and the corresponding area group.

[0052] It should be noted that, in the change of light scattering between different camera viewing angles, the non-uniform illumination area in the monocular image reflects the influence of a part of natural light on the image collected by the robot's camera unit, and the light scattering in the image taken by the other camera is different due to the different positions of the camera unit, and the shooting unit has differences due to different specific shooting angles, which affects the forward scattering. Therefore, this embodiment analyzes the difference in distribution of different non-uniform illumination areas in the local area composed of multiple non-uniform illumination areas in the binocular image, obtains the illumination correction coefficient of the local area, and further uses the illumination correction coefficient to correct the parallax deviation during parallax calculation.

[0053] Since different viewing angles bring different changes in lighting conditions, the areas of the non-uniform lighting regions screened in the left and right images taken by the binocular camera are different. Therefore, it is necessary to correspond the different non-uniform lighting regions in the left and right images to obtain the corresponding area group for each non-uniform lighting region.

[0054] Specifically, one of the monocular images at the current acquisition moment is used as the reference image, and for each non-uniform illumination area in the reference image, a connected domain range of the non-uniform illumination area is obtained, and in another monocular image at the current acquisition moment, all non-uniform illumination areas that have an intersection with the connected domain range of each non-uniform illumination area in the reference image and whose intersection is not empty are obtained to form a corresponding area group for each non-uniform illumination area in the reference image.

[0055] It should be further explained that, since the illumination change caused by forward scattering has a large impact range but poor similarity in the degree of impact, the more regions appearing in the corresponding region group, the greater the degree of forward scattering interference to the corresponding region group, and the greater the difference in the direction of the forward scattering light, the lower the authenticity of the corresponding region group's contribution to the current non-uniform illumination region, that is, it is more difficult for the non-uniform illumination region to restore accurate parallax through the pixels in the corresponding region group. Therefore, the illumination correction coefficient of the non-uniform illumination region is obtained by the direction of weakening presented by the similarity distribution of the scattering uniformity in the corresponding region group of a single non-uniform illumination region in the reference image.

[0056] Specifically, the normalized evaluation of the scattering uniformity of the Fth non-uniform illumination area in the reference image is recorded as , the illumination correction coefficient of the Fth non-uniform illumination area in the reference image is calculated as:

[0057]

[0058] In the formula, represents the illumination correction coefficient of the Fth non-uniform illumination area in the reference image, represents the number of non-uniformly illuminated regions in the region group corresponding to the Fth non-uniformly illuminated region in the reference image; represents the number of pixels in the Fth non-uniform illumination area in the reference image; represents the number of pixels in the region group corresponding to the Fth non-uniform illumination region in the reference image; represents the scattering uniformity of the Fth non-uniform illumination area in the reference image; represents the maximum value of the scattering uniformity in the corresponding area group of the Fth non-uniform illumination area in the reference image, Indicates the minimum value of the scattering uniformity in the area group corresponding to the Fth non-uniform illumination area in the reference image.

[0059] is the ratio of the area of ​​the Fth non-uniform illumination area in the reference image to the area between the corresponding area groups. The larger the value of this formula is, the more areas there are in the corresponding area group, which reflects that the Fth non-uniform illumination area in the reference image is less similar than the corresponding range between its corresponding area groups, that is, the deviation characteristics of the influence of illumination in the binocular image are more unbalanced, and the degree of illumination correction in the current non-uniform illumination area should be greater.

[0060] is the deviation of the scattering uniformity of the Fth non-uniform illumination area in the reference image relative to the corresponding area group. The larger the value of this formula is, the closer the uniformity of the current non-uniform illumination area itself is to the non-uniform area in its corresponding area group, which means that the current non-uniform illumination area is more affected by the illumination, resulting in the need for a greater degree of illumination correction.

[0061] Similarly, the illumination correction coefficient of each non-uniform illumination area in the reference image is obtained, and the illumination correction coefficients of all non-uniform illumination areas in the reference image are input into the premnmx function for normalization. The normalized result of the illumination correction coefficient of each non-uniform illumination area is recorded as the normalized illumination correction coefficient of each non-uniform illumination area. It should be noted that the present embodiment uses the premnmx function as a normalization model to normalize the illumination correction coefficient, and the range of the normalization result is , other embodiments may use other normalization models, which are not specifically limited in this embodiment.

[0062] Step S004: adjusting the image according to the illumination correction coefficient of each non-uniform illumination area, and processing the binocular image to obtain a binocular matching result.

[0063] It should be noted that the histogram equalization algorithm has the effect of stretching the grayscale range to increase the visual effect of low contrast. Therefore, the contrast stretching of the histogram equalization algorithm is adjusted by the illumination correction coefficient, so as to achieve the effect of adaptively correcting the illumination condition. According to the createCLAHE function, the binocular image is adaptively histogram equalized. The function has a contrast coefficient (clipLimit coefficient) for limiting the contrast range. The more obvious the illumination effect is, the more contrast suppression is required to avoid distorted areas in the image. It should be noted that the histogram equalization algorithm in this embodiment is a well-known technology and will not be described in detail in this embodiment.

[0064] Specifically, the adaptive contrast coefficient of the Fth non-uniform illumination area in the reference image at the current acquisition moment is calculated as follows:

[0065]

[0066] In the formula, represents the adaptive contrast coefficient of the Fth non-uniform illumination region in the reference image; is a preset contrast coefficient of the Fth non-uniform illumination area in the reference image, wherein the preset contrast coefficient is obtained by inputting the Fth non-uniform illumination area into the createCLAHE function, and the obtained default contrast coefficient is recorded as the preset contrast coefficient of the Fth non-uniform illumination area in the reference image; Represents the normalized illumination correction coefficient of the Fth non-uniform illumination region in the reference image.

[0067] Similarly, the adaptive contrast coefficient of each non-uniform illumination area in the reference image and another monocular image is obtained; according to the adaptive contrast coefficient of each non-uniform illumination area, the non-uniform illumination area in each monocular image is adaptively histogram equalized to obtain the enhancement result of each non-uniform illumination area; each uniform illumination area in each monocular image is input into the createCLAHE function, and the obtained default contrast coefficient is recorded as the preset contrast coefficient of each uniform illumination area in each monocular image, and the preset contrast coefficient of the uniform illumination area is used as the adaptive contrast coefficient, and the enhancement result of each uniform illumination area is obtained by using adaptive histogram equalization; the images composed of the enhancement result of the uniform illumination area in each monocular image and the enhancement result of the non-uniform illumination area are respectively used as enhanced binocular images; the enhanced binocular image pair is input into the semi-global stereo matching algorithm to obtain the disparity map corresponding to the current acquisition time; it should be noted that the semi-global stereo matching algorithm in this embodiment is a well-known technology, and this embodiment will not be described in detail; the corresponding pixel positions of the binocular images are merged through the disparity map, and the binocular matching result at the current frame position is output.

[0068] So far, the present invention is completed.

[0069] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A binocular vision correction method for underwater robots. It is characterized in that The method comprises the following steps: Collect binocular images at each acquisition moment; According to the uniformity of the illumination direction of the pixel points in the binocular image, a plurality of illumination characteristic regions of each monocular image are obtained; according to the difference in illumination direction and area between the plurality of illumination characteristic regions, the scattering uniformity of each illumination characteristic region in each monocular image is obtained; The step of obtaining the scattering uniformity of each illumination characteristic region in each monocular image according to the illumination direction difference and the area difference between the multiple illumination characteristic regions includes the following specific steps: In the formula, Indicates the number of The scattering uniformity of the illumination characteristic area, Indicates the number of The number of pixels in the illumination characteristic area; Indicates the minimum number of pixels in all illumination feature areas in the monocular image at the current acquisition moment; Indicates the monocular image at the current acquisition time and the The number of adjacent illumination characteristic regions of an illumination characteristic region; Indicates the number of The angle between the illumination direction of each illumination characteristic area and the x-axis of the image coordinate system, Indicates the number of The angle between the illumination direction of the jth adjacent illumination characteristic area of ​​the illumination characteristic area and the x-axis of the image coordinate system; Indicates the number of The standard deviation of the illumination direction between the illumination characteristic area and the adjacent illumination characteristic areas; According to the scattering uniformity of each illumination characteristic area, a number of non-uniform illumination areas in each monocular image are obtained; according to the area range of the non-uniform illumination area between the binocular images, a corresponding area group for each non-uniform illumination area in each monocular image is obtained; according to the area difference between each non-uniform illumination area in each monocular image and each non-uniform illumination area in the corresponding area group, combined with the difference in scattering uniformity of each non-uniform illumination area in the corresponding area group, an illumination correction coefficient for each non-uniform illumination area in each monocular image is obtained; According to the illumination correction coefficient of each non-uniform illumination area in each monocular image, an adaptive contrast coefficient is calculated; according to the adaptive contrast coefficient, the binocular image is enhanced to obtain an enhanced binocular image; according to the enhanced binocular image, a binocular matching result is obtained to complete the binocular correction of the underwater robot.

2. According to the binocular vision correction method for underwater robots as described in claim 1, It is characterized in that The specific steps of obtaining the illumination characteristic areas of the binocular images according to different illumination effects in the binocular images are as follows: A neighborhood is constructed with each pixel in the monocular image as the center, and the direction from the pixel at the center of the neighborhood to the pixel with the smallest grayscale value in the neighborhood is taken as the illumination direction of the pixel at the center of the neighborhood. Adjacent pixels with the same illumination direction in the monocular image are merged, and each connected domain obtained is recorded as an illumination characteristic region.

3. According to the binocular vision correction method for underwater robots as described in claim 1, It is characterized in that The specific steps of obtaining the uniform illumination area and the non-uniform illumination area are as follows: The scattering uniformity of each illumination feature area is normalized to The normalized evaluation of the scattering uniformity of each illumination characteristic area is obtained, and a regional judgment threshold is preset. The illumination characteristic area whose normalized evaluation of the scattering uniformity is greater than or equal to the regional judgment threshold is recorded as a uniform illumination area, and the illumination characteristic area whose normalized evaluation of the scattering uniformity is less than the regional judgment threshold is recorded as a non-uniform illumination area.

4. According to the binocular vision correction method for underwater robots as described in claim 1, It is characterized in that The specific steps of obtaining the corresponding region group of each non-uniform illumination region in each monocular image are as follows: Take one of the monocular images at the current acquisition moment as the reference image, and for each non-uniform illumination area in the reference image, obtain the connected domain range of the non-uniform illumination area. In another monocular image at the current acquisition moment, obtain all non-uniform illumination areas that have an intersection with the connected domain range of each non-uniform illumination area in the reference image and the intersection is not empty, to form a corresponding area group for each non-uniform illumination area in the reference image.

5. According to the binocular vision correction method for underwater robots as described in claim 4, It is characterized in that The specific steps for obtaining the illumination correction coefficient are as follows: The normalized evaluation of the scattering uniformity of the Fth non-uniform illumination area in the reference image is recorded as , the illumination correction coefficient of the Fth non-uniform illumination area in the reference image is calculated as: In the formula, represents the illumination correction coefficient of the Fth non-uniform illumination area in the reference image, represents the number of non-uniformly illuminated regions in the region group corresponding to the Fth non-uniformly illuminated region in the reference image; represents the number of pixels in the Fth non-uniform illumination area in the reference image; represents the number of pixels in the region group corresponding to the Fth non-uniform illumination region in the reference image; represents the scattering uniformity of the Fth non-uniform illumination area in the reference image; represents the maximum value of the scattering uniformity in the corresponding area group of the Fth non-uniform illumination area in the reference image, Indicates the minimum value of the scattering uniformity in the area group corresponding to the Fth non-uniform illumination area in the reference image.

6. According to the binocular vision correction method for underwater robots as described in claim 1, It is characterized in that The specific steps of obtaining the adaptive contrast coefficient are as follows: In the formula, represents the adaptive contrast coefficient of the Fth non-uniform illumination region in the reference image; is the preset contrast coefficient of the Fth non-uniform illumination area in the reference image; Represents the normalized illumination correction coefficient of the Fth non-uniform illumination region in the reference image.

7. A binocular vision correction method for an underwater robot according to claim 6, It is characterized in that The specific method of obtaining the preset contrast coefficient and the normalized illumination correction coefficient is as follows: The Fth non-uniform illumination area is input into the createCLAHE function, and the obtained default contrast coefficient is recorded as the preset contrast coefficient of the Fth non-uniform illumination area in the reference image; The illumination correction coefficients of all non-uniform illumination areas in the reference image are input into the premnmx function for normalization, and the normalized result of the illumination correction coefficient of each non-uniform illumination area is recorded as the normalized illumination correction coefficient of each non-uniform illumination area.

8. According to the binocular vision correction method for underwater robots as described in claim 3, It is characterized in that The step of enhancing the binocular image according to the adaptive contrast coefficient to obtain the enhanced binocular image includes the following specific steps: According to the adaptive contrast coefficient of each non-uniform illumination area, adaptive histogram equalization is performed on the non-uniform illumination area in each monocular image to obtain the enhancement result of each non-uniform illumination area; Input each uniformly illuminated area in each monocular image into the createCLAHE function, record the obtained default contrast coefficient as the preset contrast coefficient of each uniformly illuminated area in each monocular image, use the preset contrast coefficient of the uniformly illuminated area as the adaptive contrast coefficient, and use adaptive histogram equalization to obtain the enhancement result of each uniformly illuminated area; The images formed by the enhancement results of the uniform illumination area and the enhancement results of the non-uniform illumination area in each monocular image are respectively used as enhanced binocular images.

9. According to the binocular vision correction method for underwater robots as described in claim 1, It is characterized in that The binocular matching result is obtained according to the enhanced binocular image to complete the binocular correction of the underwater robot, and the specific steps include the following: The enhanced binocular image pair is input into the semi-global stereo matching algorithm to obtain the disparity map corresponding to the current acquisition moment; the corresponding pixel positions of the binocular images are merged through the disparity map, and the binocular matching result at the current frame position is output.

Citation Information

Patent Citations

  • Inhomogeneous light field underwater target detection image enhancing method based on threshold segmentation

    CN104008528A

  • Binocular stereo matching method based on machine vision

    CN116309757A

  • Image restoration method based on physical scattering model

    US20240046421A1