Underwater robot for judging water quality
By integrating structured light cameras and driving components on underwater robots, using structural optical images at different distances to calculate the attenuation coefficient of the water body, solve the problem of being difficult to evaluate the factor and turbidity of the water body in the existing technology, and achieve efficient and accurate, accurate and accurate Water quality monitoring.
Patent Information
- Application Number
- CN202411415295.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-11
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2044-10-11
AI Technical Summary
The prior art is difficult to effectively evaluate the attenuation coefficient and turbidity of water bodies, especially when reflectivity data is not required, and traditional methods have problems with risk of pollution and low data acquisition efficiency.
An underwater robot composed of a structured light camera and driving components can calculate the attenuation coefficient of the water body by acquiring structured light images of the target object at different distances. The robot includes a structured light camera for acquiring images, a driving component for changing position, and a controller for calculating depth and brightness to calculate the attenuation coefficient of the water body.
It achieves accurate measurement of the attenuation coefficient of water without the need for reflectivity data, greatly reduces the requirements for known data, has wide applicability, avoids pollution problems through non-contact measurement, and can quickly and continuously assess water conditions.
Smart Images

Figure CN119354960A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of water quality judgment, and in particular to an underwater robot for judging water quality. Background Art
[0002] The online monitoring method uses sensors, instruments and other technical means to monitor various parameters of water quality in real time, such as temperature, pH value, dissolved oxygen, turbidity, nutrients, organic pollutants, heavy metal ions, etc. by setting up special monitoring equipment in the water body. These monitoring devices can automatically collect data and transmit it to the data receiving end or data processing center for further analysis and evaluation.
[0003] Online monitoring systems usually consist of the following parts:
[0004] Signal transmission unit: responsible for converting water quality parameters into electrical signals or other transmittable signal forms.
[0005] Signal processing unit: pre-process the collected signals, such as amplification and filtering, to improve the accuracy and reliability of the data.
[0006] Data acquisition unit: responsible for converting the processed signal into digital data, storing it and transmitting it.
[0007] Data transmission unit: transmits the collected data to the data receiving end or data processing center via wired or wireless means.
[0008] Data Analysis and Evaluation Unit: Processes, analyzes and evaluates the received data to draw conclusions about the water quality status.
[0009] Online monitoring methods are widely used in various water quality monitoring scenarios, such as:
[0010] Drinking water source: Real-time monitoring of water quality at the water source to ensure the safety and reliability of drinking water.
[0011] Sewage treatment plant: monitor water quality changes during sewage treatment, optimize sewage treatment technology, and improve effluent quality.
[0012] Rivers, lakes and reservoirs: monitor the water quality of surface water bodies and provide data support for environmental protection and governance.
[0013] Industrial water: Monitor the water quality of industrial water to ensure the stability of the production process and product quality.
[0014] Agricultural irrigation: Monitor the quality of irrigation water to ensure the healthy growth of crops and the safety of agricultural products.
[0015] When evaluating water bodies, the attenuation coefficient (Attenuation Coefficients) of water bodies is a comprehensive parameter for evaluating water quality including absorption and scattering.
[0016] Turbidity is also a parameter to measure water quality. It is usually defined as the degree of turbidity or opacity of a liquid caused by organic or inorganic particles. It is often used to evaluate the physical properties of natural water and drinking water. Although the early definition of turbidity was not strict from an optical point of view, more and more countries and organizations regard turbidity as an important indicator for evaluating water quality.
[0017] The disclosure of the above background technology content is only used to assist in understanding the inventive concept and technical solution of the present invention. It does not necessarily belong to the prior art of this patent application. In the absence of clear evidence that the above content has been disclosed on the filing date of this patent application, the above background technology should not be used to evaluate the novelty and creativity of the present application. Summary of the invention
[0018] To this end, the present invention uses structured light images at different distances to calculate the attenuation coefficient of the water body, which has the advantages of simple operation, low cost, and easy expansion.
[0019] The present invention provides an underwater robot for judging water quality, characterized by comprising:
[0020] A structured light camera is used to obtain an image of the target object;
[0021] A driving component, used to drive the underwater robot to change its position in the water;
[0022] A controller is used to control the structured light camera at a first position to obtain a first image of the target object and calculate a first depth; control the driving component to move the underwater robot to a second position, control the structured light camera to obtain a second image of the target object and calculate a second depth; and calculate a water attenuation coefficient according to the first image, the second image, the first depth and the second depth.
[0023] Optionally, the underwater robot for judging water quality is characterized in that the structured light camera projects speckle structured light, and the processing process of the controller includes:
[0024] Step S1: at a first position, controlling the structured light camera to obtain a first speckle image of an underwater target object, and calculating a first depth according to the first speckle image;
[0025] Step S2: controlling the driving component to move the underwater robot to a second position, obtaining a second speckle image of the underwater target object, and calculating a second depth according to the second speckle image; wherein the first position and the second position are at different distances from the underwater target object;
[0026] Step S3: extracting a speckle area in the first speckle image to obtain a first brightness; extracting a speckle area in the second speckle image to obtain a second brightness;
[0027] Step S4: Calculate the water body attenuation coefficient according to the first brightness, the first depth, the second brightness and the second depth.
[0028] Optionally, the underwater robot for judging water quality is characterized in that the underwater robot has the same projection parameters and exposure parameters when acquiring the first speckle image and the second speckle image.
[0029] Optionally, the underwater robot for determining water quality is characterized in that step S1 comprises:
[0030] Step S11: controlling the underwater robot to capture a first adjustment image and perform three-dimensional reconstruction to obtain a first plane;
[0031] Step S12: calculating a first angle of the first plane in the camera coordinate system, and calculating a first distance of the first plane;
[0032] Step S13: determining a rotation angle of the underwater robot according to the first angle, rotating and moving the underwater robot according to the first distance and the rotation angle so that the underwater robot is perpendicular to the first plane, and capturing a second adjustment image;
[0033] Step S14: perform three-dimensional reconstruction on the second adjusted image to obtain a second plane, calculate a second angle and a second distance of the second plane, and if both meet preset values, mark the second adjusted image as a first speckle image and mark the second distance as a first depth; otherwise, execute step S13.
[0034] Optionally, the underwater robot for determining water quality is characterized in that step S3 comprises:
[0035] Step S31: extracting a first speckle region in the first speckle image, and extracting a second speckle region in the second speckle image;
[0036] Step S32: pairing the first speckle area with the second speckle area to obtain a corresponding relationship between corresponding speckles;
[0037] Step S33: obtaining a third speckle area in the first speckle area according to the corresponding relationship, and calculating a first brightness; obtaining a fourth speckle area in the second speckle area according to the corresponding relationship, and calculating a second brightness.
[0038] Optionally, the underwater robot for determining water quality is characterized in that step S33 comprises:
[0039] Step S331: Pairing the position of the first speckle area with the position of the second speckle image to obtain a first corresponding relationship;
[0040] Step S332: calculating the depth value difference and the mean value of the depth value difference of the corresponding speckle according to the first corresponding relationship;
[0041] Step S333: removing the speckle pairs whose deviations from the depth value difference and the mean of the depth value differences exceed a first threshold from the first corresponding relationship, to obtain a second corresponding relationship;
[0042] Step S334: calculating the brightness of the speckle located in the first speckle area in the second corresponding relationship to obtain a first brightness; calculating the brightness of the speckle located in the second speckle area in the second corresponding relationship to obtain a second brightness.
[0043] Optionally, the underwater robot for judging water quality is characterized in that in step S4, according to the formula Calculate the water body attenuation coefficient; where Φ(l 1i ) indicates the distance is the first depth l 1i The brightness of the i-th speckle, Φ(l 2i ) indicates the distance is the second depth l 2i The brightness of the i-th speckle.
[0044] Optionally, the underwater robot for judging water quality is characterized in that in step S4, according to the formula Calculate the water body attenuation coefficient; where Φ(l 1 ) indicates the distance is the first depth l 1 The average brightness of multiple speckles, Φ(l 2 ) indicates the distance is the second depth l 2 The average brightness of multiple speckles.
[0045] Optionally, the underwater robot for judging water quality is characterized in that the structured light camera projects stripe structured light, and the processing process of the controller includes:
[0046] Step M1: at a first position, controlling the structured light camera to obtain a first fringe image of an underwater target object, and calculating a first depth according to the first fringe image;
[0047] Step M2: controlling the driving component to move the underwater robot to a second position, obtaining a second fringe image of the underwater target object, and calculating a second depth according to the second fringe image; wherein the first position and the second position are at different distances from the underwater target object;
[0048] Step M3: extracting a bright stripe region in the first stripe image to obtain a first brightness; extracting a bright stripe region in the second stripe image to obtain a second brightness;
[0049] Step M4: Calculate the water body attenuation coefficient according to the first brightness, the first depth, the second brightness and the second depth.
[0050] Optionally, the underwater robot for judging water quality is characterized in that the average brightness in the width direction of the bright stripe is used as the brightness value of the pixel points on both sides.
[0051] Compared with the prior art, the present invention has the following beneficial effects:
[0052] The present invention obtains brightness changes through structured light images at different distances, and can achieve measurement of different water bodies without reflectivity data, greatly reducing the requirement for known data and having wide applicability.
[0053] The present invention evaluates the quality of water bodies through the attenuation effect of water bodies on light. While measuring, the water quality can be monitored without the need for dedicated equipment, and has good economic efficiency.
[0054] The present invention avoids the pollution problem that may be introduced by the traditional sampling method through non-contact measurement.
[0055] The present invention is suitable for rapid screening of large areas of water by being able to continuously and quickly assess water conditions.
[0056] The present invention improves the accuracy and efficiency of measurement by combining advanced imaging technology and automatic control system. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings in the following descriptions are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without creative work. By reading the detailed description of the non-limiting embodiments with reference to the following drawings, other features, purposes and advantages of the present invention will become more obvious:
[0058] Figure 1 This is a schematic diagram of the structure of an underwater robot for judging water quality in an embodiment of the present invention;
[0059] Figure 2 A schematic diagram of a first position and a second position in an embodiment of the present invention;
[0060] Figure 3 is a flow chart of processing steps of a controller in an embodiment of the present invention;
[0061] Figure 4 A flowchart of a step of obtaining a first depth in an embodiment of the present invention;
[0062] Figure 5 A flowchart of steps for obtaining a first brightness and a second brightness in an embodiment of the present invention;
[0063] Figure 6 Another flowchart of steps for obtaining the first brightness and the second brightness in an embodiment of the present invention;
[0064] Figure 7 The figure is a flowchart of processing steps of another controller in an embodiment of the present invention.
[0065] 1 - first position;
[0066] 2 - second position;
[0067] 3- Underwater robots;
[0068] 4-Structured light camera;
[0069] 5- Controller;
[0070] 6- driving components; DETAILED DESCRIPTION
[0071] The present invention is described in detail below in conjunction with specific embodiments. The following embodiments will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, for those of ordinary skill in the art, several variations and improvements may be made without departing from the concept of the present invention. These all belong to the protection scope of the present invention.
[0072] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein, for example, can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0073] An underwater robot for judging water quality provided in an embodiment of the present invention is intended to solve the problems existing in the prior art.
[0074] The following specific embodiments are used to describe in detail the technical solutions of the present invention and how the technical solutions of the present application solve the above-mentioned technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present invention will be described below in conjunction with the accompanying drawings.
[0075] The present invention uses structured light images at different distances to calculate the attenuation coefficient of a water body, and has the advantages of simple operation, low cost, and easy expansion.
[0076] Figure 1 FIG. 1 is a schematic diagram of the structure of an underwater robot for judging water quality according to an embodiment of the present invention. Figure 1 As shown, an underwater robot for judging water quality in an embodiment of the present invention includes:
[0077] A structured light camera is used to obtain images of target objects.
[0078] Specifically, the structured light camera is one of the core components of this embodiment, which uses structured light technology to acquire images of target objects. Structured light technology usually involves projecting a known pattern of light (such as laser stripes, grids, or speckles, etc.) onto an object and calculating the three-dimensional shape and depth of the object by observing how the pattern is distorted or deformed by the surface of the object.
[0079] The driving component is used to drive the underwater robot to change its position in water.
[0080] Specifically, the drive components are key to the movement of underwater robots. They are responsible for changing the position of the robot in the water under the command of the controller. The drive components may include thrusters, propellers or other underwater propulsion technologies that can accurately control the movement of the robot in three-dimensional space. The drive components are used to move the robot from a first position to a second position in order to capture images of the target object at different viewing angles, which are used to calculate the water attenuation coefficient.
[0081] A controller is used to control the structured light camera at a first position to obtain a first image of the target object and calculate a first depth; control the driving component to move the underwater robot to a second position, control the structured light camera to obtain a second image of the target object and calculate a second depth; and calculate a water attenuation coefficient according to the first image, the second image, the first depth and the second depth.
[0082] Specifically, the controller is the brain of the underwater robot, responsible for receiving sensor data, processing information and issuing commands to control the robot's behavior and operation.
[0083] At the first position, the controller instructs the structured light camera to capture a first image of the target object and calculate a first depth.
[0084] The controller then instructs the drive component to move the robot to the second position.
[0085] At the second position, the controller again instructs the structured light camera to capture a second image of the target object and calculates a second depth. Figure 2 As shown, the underwater robot is in the same direction from the target object at the first position and the second position, but at different distances. Figure 2 In the process, the underwater robot faces the target object (wall) vertically. Walls are widely used in various artificial application scenarios such as swimming pools and dams. The second position is at a different distance from the first position to obtain speckle images at different viewing angles.
[0086] The controller uses these two sets of images and depth data, combined with appropriate algorithms (such as water attenuation models), to calculate the water attenuation coefficient. The water attenuation coefficient is an indicator of the water's ability to absorb and scatter light, which reflects the clarity of the water and the strength of light penetration. By comparing the images and depth data captured at different locations, the controller can estimate the degree to which light is absorbed and scattered by the water during propagation, thereby calculating the water attenuation coefficient.
[0087] In summary, this underwater robot for judging water quality can achieve accurate measurement of the water attenuation coefficient by integrating structured light cameras, drive components and intelligent controllers, providing strong technical support for water quality monitoring and water resources management.
[0088] Figure 3 is a flowchart of the processing steps of a controller in an embodiment of the present invention. The structured light camera projects speckle structured light. Figure 3 As shown, the processing steps of a controller in an embodiment of the present invention include:
[0089] Step S1: at a first position, controlling the structured light camera to obtain a first speckle image of an underwater target object, and calculating a first depth according to the first speckle image.
[0090] In this step, the first position should ensure that the underwater robot can clearly capture the underwater target object and obtain an effective speckle image. Preferably, the underwater target object is a planar object, such as a swimming pool wall. When the underwater robot reaches the first position, the camera device it carries is started to capture the speckle image of the underwater target object. The speckle image is a pattern formed when light is irradiated onto the surface of the underwater target object. The acquired first speckle image is analyzed using image processing technology and depth perception algorithms to calculate the first depth between the underwater robot and the target object. It should be noted that the first position only needs to meet the pre-selected distance requirements, and does not require a fixed position, which makes the measurement more flexible.
[0091] Step S2: controlling the driving component to move the underwater robot to a second position, obtaining a second speckle image of the underwater target object, and calculating a second depth according to the second speckle image; wherein the first position and the second position are at different distances from the underwater target object.
[0092] In this step, the underwater robot is moved to a second position. When the underwater robot reaches the second position, the camera device is started again to shoot a second speckle image of the underwater target object. The second position is farther or closer to the target object than the first position. Similar to step S1, the second speckle image is analyzed using image processing technology and depth perception algorithm to calculate the second depth between the underwater robot and the target object. When the underwater robot acquires the first speckle image and the second speckle image, the underwater robot has the same projection parameters and exposure parameters, so that the difference between the first speckle image and the second speckle image is caused by the water body and the target object, excluding the influence of the shooting parameters.
[0093] Step S3: extracting a speckle area in the first speckle image to obtain a first brightness; extracting a speckle area in the second speckle image to obtain a second brightness.
[0094] In this step, the speckle regions are extracted from the first speckle image and the second speckle image by image processing techniques (such as threshold segmentation, edge detection, etc.). These regions contain key information about the brightness and contrast of the speckle images. For the extracted speckle regions, their average brightness or peak brightness is calculated as the first brightness and the second brightness. The calculation of brightness usually involves statistics and analysis of image pixel values.
[0095] Step S4: Calculate the water body attenuation coefficient according to the first brightness, the first depth, the second brightness and the second depth.
[0096] In this step, using optical principles and relevant knowledge of water quality monitoring, a mathematical model is established to calculate the water attenuation coefficient based on the relationship between the first brightness, the first depth, the second brightness and the second depth. The water attenuation coefficient is a parameter that describes the degree of absorption and scattering of light during propagation in water, and it reflects the clarity and transparency of water quality.
[0097] In some embodiments, the Lambert-Beer law is used for calculation. This law describes the attenuation law of light when it propagates in a medium, that is, the light intensity decays exponentially with the increase of the propagation distance. By comparing the brightness values at different depths, the water attenuation coefficient can be estimated.
[0098] Use the formula to calculate the attenuation coefficient: According to the first brightness I1, the first depth l 1 , a second brightness I2 and a second depth l 2 , the attenuation coefficient c of the water body can be calculated using the following formula:
[0099]
[0100] Here, ln represents the natural logarithm.
[0101] The attenuation coefficient reflects the degree of attenuation of light when it propagates in water, and it is affected by suspended particles, dissolved substances and other factors in the water. By comparing the speckle images and depths at different locations, the transparency and cleanliness of the water body can be estimated more accurately.
[0102] This embodiment does not require complex chemical reagents or specialized measuring equipment, but instead utilizes the mobility and imaging technology of an underwater robot to perform non-contact water quality assessment.
[0103] In some embodiments, in step S4, according to the formula Calculate the water body attenuation coefficient; where Φ(l 1i ) indicates the distance is the first depth l 1i The brightness of the i-th speckle, Φ(l 2i ) indicates the distance is the second depth l2i The brightness of the i-th speckle. It should be noted that the first depth l 1i It is not a fixed value, but can have different values for different speckles. It is a general term for the depth values of different speckles in the first speckle image. Similarly, the second depth l 2i It is not a fixed value, but different values can be used for different speckles, and is a general term for the depth values of different speckles in the second speckle image. In this embodiment, each speckle is calculated separately to obtain brightness values of multiple speckles after calculation, which can better evaluate the attenuation at different angles or positions and cope with complex scenes.
[0104] In some embodiments, in step S4, according to the formula Calculate the water body attenuation coefficient; where Φ(l 1 ) indicates the distance is the first depth l 1 The average brightness of multiple speckles, Φ(l 2 ) indicates the distance is the second depth l 2 In this embodiment, by processing the brightness mean of the speckles, a more stable result can be obtained.
[0105] Figure 4 FIG. 1 is a flow chart of steps for obtaining a first depth in an embodiment of the present invention. Figure 4 As shown, in an embodiment of the present invention, a step of obtaining a first depth includes:
[0106] Step S11: controlling the underwater robot to capture a first adjustment image and perform three-dimensional reconstruction to obtain a first plane.
[0107] In this step, the underwater robot starts the camera at the first position to capture an image containing the underwater target object, which is called the first adjustment image. The first adjustment image is processed using image processing technology and a three-dimensional reconstruction algorithm to obtain three-dimensional information of the plane where the target object is located, that is, the first plane. This usually involves steps such as feature point extraction, matching, and three-dimensional coordinate calculation.
[0108] Step S12: Calculate a first angle of the first plane in the camera coordinate system, and calculate a first distance of the first plane.
[0109] In this step, in the camera coordinate system, the angle between the first plane and the camera optical axis, i.e., the first angle, is calculated. This angle reflects the degree of inclination between the underwater robot and the target plane. At the same time, the vertical distance from the underwater robot to the first plane, i.e., the first distance, is calculated, which can be calculated by the plane model obtained by three-dimensional reconstruction. This distance is an estimate of the actual distance between the underwater robot and the target object.
[0110] Step S13: determining the rotation angle of the underwater robot according to the first angle, rotating and moving the underwater robot according to the first distance and the rotation angle so that the underwater robot is perpendicular to the first plane, and capturing a second adjustment image.
[0111] In this step, the angle that the underwater robot needs to rotate is calculated based on the first angle so that the optical axis of the camera is perpendicular to the first plane. The underwater robot is controlled to rotate according to the calculated rotation angle, and the position of the underwater robot is adjusted as needed (i.e., the underwater robot is moved) to ensure that the camera can shoot perpendicular to the first plane. After the underwater robot rotates and moves into place, an adjusted image is taken again, i.e., the second adjusted image.
[0112] Step S14: perform three-dimensional reconstruction on the second adjusted image to obtain a second plane, calculate a second angle and a second distance of the second plane, and if both meet preset values, mark the second adjusted image as a first speckle image and mark the second distance as a first depth; otherwise, execute step S13.
[0113] In this step, the second adjustment image is three-dimensionally reconstructed to obtain a second plane. This plane should be closer to the ideal state of the underwater robot being perpendicular to the target plane than the first plane. In the camera coordinate system, the angle (second angle) between the second plane and the optical axis of the camera and the vertical distance (second distance) from the underwater robot to the second plane are calculated. The second angle and the second distance are compared with a preset threshold. If both meet the preset value (i.e., they are within the allowable error range), it is considered that the underwater robot is correctly perpendicular to the target plane, and the second adjustment image is marked as the first speckle image, and the second distance is marked as the first depth. If it does not meet the preset value, step S13 is repeated until the condition is met. When step S13 is repeated, the first distance in step S13 is replaced by the second distance, and the first plane in step S13 is replaced by the second plane.
[0114] The underwater robot in this embodiment can accurately adjust its position and posture to ensure that the captured speckle image is perpendicular to the target plane and the depth information is accurate, providing a reliable data basis for subsequent water quality judgment.
[0115] Figure 5 FIG. 1 is a flow chart of steps for obtaining a first brightness and a second brightness in an embodiment of the present invention. Figure 5 As shown, in an embodiment of the present invention, a step of obtaining a first brightness and a second brightness includes:
[0116] Step S31: extracting a first speckle region in the first speckle image, and extracting a second speckle region in the second speckle image.
[0117] In this step, the region containing speckle features is extracted from the first speckle image using image processing techniques (such as threshold segmentation, edge detection, morphological processing, etc.), which is called the first speckle region. Similarly, the region containing speckle features is extracted from the second speckle image, which is called the second speckle region. These regions should roughly correspond to the first speckle region in position, but may be different due to factors such as shooting angles and the range of target objects.
[0118] Step S32: Pairing the first speckle area with the second speckle area to obtain a corresponding relationship between corresponding speckles.
[0119] In this step, a correspondence is established between the first speckle area and the second speckle area using a feature matching algorithm (such as SIFT, SURF, ORB, etc.) or other related algorithms. This means finding the corresponding speckle in the second speckle area for each speckle in the first speckle area. This correspondence is determined based on the similarity of the features such as the position, shape, size, and texture of the speckles. When the speckle is a coded speckle, the correspondence is mainly determined by the position of the speckles and the relationship between them. Through the matching algorithm, a series of corresponding point pairs are obtained, which represent similar speckles found between the first speckle area and the second speckle area. These correspondences will be used for subsequent calculations and analysis.
[0120] Step S33: obtaining a third speckle area in the first speckle area according to the corresponding relationship, and calculating a first brightness; obtaining a fourth speckle area in the second speckle area according to the corresponding relationship, and calculating a second brightness.
[0121] In this step, according to the previously established correspondence, a third speckle region corresponding to the corresponding speckle in the second speckle region is determined in the first speckle region, and a fourth speckle region corresponding to the corresponding speckle in the first speckle region is determined in the second speckle region. The third speckle region and the fourth speckle region only contain speckles with a corresponding relationship, but do not contain non-corresponding speckles. For the third speckle region and the fourth speckle region, their average brightness or peak brightness (or other suitable brightness metrics) are calculated respectively. This can be achieved by taking statistics and averaging the brightness values of all pixels in the region. The obtained first brightness and second brightness will be used for the subsequent calculation of the water attenuation coefficient.
[0122] This embodiment ensures that the same feature points or areas in the speckle images acquired from two different locations are correctly associated so that their brightness changes can be accurately compared. This comparison is crucial for estimating the attenuation coefficient of the water body, because the brightness change of the speckle directly reflects the attenuation of light when it propagates in water. By accurately measuring and comparing these brightness values, water quality can be assessed more accurately.
[0123] Figure 6 FIG. 1 is another flowchart of steps for obtaining the first brightness and the second brightness in an embodiment of the present invention. Compared with the above embodiment, step S33 in the above embodiment includes:
[0124] Step S331: pairing the position of the first speckle area with the position of the second speckle image to obtain a first corresponding relationship.
[0125] In this step, the position information of each speckle in the first speckle area is used to pair the speckle at the corresponding position in the second speckle image. The position deviation of the speckle on the image is always within a certain range, that is, each speckle in the first speckle area has a preliminary area for the corresponding speckle in the second speckle area. By searching in the preliminary area, the corresponding speckle can be obtained. Through position pairing, a series of speckle pairs are obtained, and these speckle pairs establish a preliminary correspondence between the first speckle area and the second speckle area, which is called the first correspondence.
[0126] Step S332: Calculate the depth value difference and the mean value of the depth value difference of the corresponding speckle according to the first corresponding relationship.
[0127] In this step, for each pair of matched speckles, their difference in depth is calculated. This involves extracting the depth data from the position information of each speckle and then calculating the difference between the two depth values. This process is repeated for all matched speckle pairs to obtain a series of depth difference values. Next, the average of these depth difference values is calculated to obtain the mean depth difference value.
[0128] Step S333: removing the speckle pairs whose deviations from the depth value difference and the depth value difference mean value exceed a first threshold from the first corresponding relationship to obtain a second corresponding relationship.
[0129] In this step, a threshold is set to determine which depth differences are acceptable. If the difference between the depth difference of a speckle pair and the mean depth difference exceeds this threshold, it is considered that this pair of speckles may be caused by noise or other non-water attenuation factors, so it is removed from the correspondence. This process helps to eliminate abnormal data and improve the accuracy of subsequent analysis. For each speckle pair, the deviation between its depth value difference and the mean depth value difference is calculated. If the deviation exceeds the preset first threshold (this threshold is set according to the application requirements and the accuracy requirements of water quality monitoring), it is considered that this speckle pair may be caused by mismatching or noise in the image and should be removed. After removing the speckle pairs with excessive deviations, the remaining valid speckle pairs constitute the second correspondence. This correspondence is more accurate and can be used for subsequent brightness calculations and water quality assessments.
[0130] Step S334: calculating the brightness of the speckle located in the first speckle area in the second corresponding relationship to obtain a first brightness; calculating the brightness of the speckle located in the second speckle area in the second corresponding relationship to obtain a second brightness.
[0131] In this step, for each speckle located in the first speckle area in the second corresponding relationship, its brightness value (such as average brightness or peak brightness) is calculated to obtain the first brightness. Similarly, for each speckle located in the second speckle area in the second corresponding relationship, its brightness value is calculated to obtain the second brightness.
[0132] This embodiment can ensure that before calculating the brightness, speckle pairs that may be caused by mismatching or noise have been removed through depth value verification, thereby improving the accuracy and reliability of brightness calculation. These brightness values will be used in subsequent water body attenuation coefficient calculations to evaluate water quality.
[0133] Figure 7 FIG. 1 is a flowchart of another processing step of a controller in an embodiment of the present invention. Compared with the above-mentioned embodiment, the structured light camera projects stripe structured light. Figure 7 In the embodiment of the present invention, another processing step of the controller includes:
[0134] Step M1: at a first position, controlling the structured light camera to obtain a first fringe image of an underwater target object, and calculating a first depth according to the first fringe image.
[0135] In this step, the controller sends a startup command to the structured light camera and configures the camera parameters (such as exposure time, frame rate, resolution, etc.) to adapt to the underwater environment. The infrared light source inside the structured light camera is activated, projecting a series of specific stripe patterns onto the underwater target object. The infrared camera of the structured light camera captures the reflected light pattern to form a first stripe image. The image data is transmitted to the controller for further processing. The controller uses the structured light algorithm to calculate the depth information of each pixel at the edge of the stripe by comparing the original projection pattern with the captured reflection pattern. Based on this depth information, a depth map is generated, in which the value of each pixel represents the distance from the pixel to the camera, that is, the first depth.
[0136] Step M2: Control the driving component to move the underwater robot to a second position, obtain a second fringe image of the underwater target object, and calculate a second depth based on the second fringe image; wherein the first position and the second position are at different distances from the underwater target object.
[0137] In this step, the controller controls the driving component (such as a propeller) to move the underwater robot to the second position according to a preset path or instruction. During the movement, the controller may monitor the position and speed of the robot through sensors (such as sonar, GPS, etc.). When the robot reaches the second position, the image capture and depth calculation process in step M1 is repeated. The structured light camera projects the infrared light pattern again and captures the second fringe image. The controller calculates the second depth by comparing the original pattern with the reflected pattern in the second fringe image.
[0138] Step M3: extracting the bright stripe area in the first stripe image to obtain a first brightness; extracting the bright stripe area in the second stripe image to obtain a second brightness.
[0139] In this step, the controller preprocesses the first fringe image and the second fringe image, such as denoising, contrast enhancement, etc. The preprocessed image is easier to extract the bright fringe area. The controller uses an image processing algorithm (such as threshold segmentation, edge detection, etc.) to extract the bright fringe area in the image. The extracted bright fringe area should contain enough pixels to accurately measure the brightness. For the extracted bright fringe area, the controller calculates its average brightness or peak brightness as the first brightness and the second brightness. The calculation of brightness may involve statistics and analysis of pixel values.
[0140] Step M4: Calculate the water body attenuation coefficient according to the first brightness, the first depth, the second brightness and the second depth.
[0141] In this step, the controller integrates the data of the first brightness, the first depth, the second brightness, and the second depth. These data will be used to calculate the water attenuation coefficient. The controller calculates the water attenuation coefficient based on the brightness data and the depth data using a known water attenuation model or algorithm. The water attenuation coefficient is usually expressed as the ratio of the energy attenuation of light after propagating a certain distance in the water body. The calculated water attenuation coefficient is output to the display screen of the controller or stored in the memory. This coefficient can be used for applications such as evaluating water quality conditions and monitoring water pollution.
[0142] This embodiment uses stripe structured light to perform underwater measurement, and can obtain depth data even when the water quality is poor, which has broad application prospects.
[0143] In some embodiments, the average brightness in the width direction of the bright stripe is used as the brightness value of the pixels on both sides. The brightness in the width direction of the bright stripe is used as the brightness value of the two points in the width direction, so that the brightness has better robustness, stable data can be obtained even in the case of poor water quality, and the detection ability of different water quality is improved.
[0144] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same and similar parts between the embodiments can be referred to each other. The above description of the disclosed embodiments enables professionals and technicians in this field to implement or use the present invention. Various modifications to these embodiments will be obvious to professionals and technicians in this field, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to these embodiments shown in this article, but will comply with the widest range consistent with the principles and novel features disclosed herein.
[0145] The above describes the specific embodiments of the present invention. It should be understood that the present invention is not limited to the above specific embodiments, and those skilled in the art may make various modifications or variations within the scope of the claims, which do not affect the essence of the present invention.
Claims
1. An underwater robot for judging water quality, characterized in that: include: A structured light camera is used to obtain an image of the target object; A driving component, used to drive the underwater robot to change its position in the water; A controller is used to control the structured light camera at a first position to obtain a first image of the target object and calculate a first depth; control the driving component to move the underwater robot to a second position, control the structured light camera to obtain a second image of the target object and calculate a second depth; and calculate a water attenuation coefficient according to the first image, the second image, the first depth and the second depth.
2. The underwater robot for judging water quality according to claim 1, characterized in that: The structured light camera projects speckle structured light, and the processing process of the controller includes: Step S1: at a first position, controlling the structured light camera to obtain a first speckle image of an underwater target object, and calculating a first depth according to the first speckle image; Step S2: controlling the driving component to move the underwater robot to a second position, obtaining a second speckle image of the underwater target object, and calculating a second depth according to the second speckle image; wherein the first position and the second position are at different distances from the underwater target object; Step S3: extracting a speckle area in the first speckle image to obtain a first brightness; extracting a speckle area in the second speckle image to obtain a second brightness; Step S4: Calculate the water body attenuation coefficient according to the first brightness, the first depth, the second brightness and the second depth.
3. The underwater robot for judging water quality according to claim 2, characterized in that: The underwater robot has the same projection parameters and exposure parameters when acquiring the first speckle image and the second speckle image.
4. The underwater robot for judging water quality according to claim 2, characterized in that: Step S1 includes: Step S11: controlling the underwater robot to capture a first adjustment image and perform three-dimensional reconstruction to obtain a first plane; Step S12: calculating a first angle of the first plane in the camera coordinate system, and calculating a first distance of the first plane; Step S13: determining a rotation angle of the underwater robot according to the first angle, rotating and moving the underwater robot according to the first distance and the rotation angle so that the underwater robot is perpendicular to the first plane, and capturing a second adjustment image; Step S14: perform three-dimensional reconstruction on the second adjusted image to obtain a second plane, calculate a second angle and a second distance of the second plane, and if both meet preset values, mark the second adjusted image as a first speckle image and mark the second distance as a first depth; otherwise, execute step S13.
5. The underwater robot for judging water quality according to claim 2, characterized in that: Step S3 includes: Step S31: extracting a first speckle region in the first speckle image, and extracting a second speckle region in the second speckle image; Step S32: pairing the first speckle area with the second speckle area to obtain a corresponding relationship between corresponding speckles; Step S33: obtaining a third speckle area in the first speckle area according to the corresponding relationship, and calculating a first brightness; obtaining a fourth speckle area in the second speckle area according to the corresponding relationship, and calculating a second brightness.
6. The underwater robot for judging water quality according to claim 5, characterized in that: Step S33 includes: Step S331: Pairing the position of the first speckle area with the position of the second speckle image to obtain a first corresponding relationship; Step S332: calculating the depth value difference and the mean value of the depth value difference of the corresponding speckle according to the first corresponding relationship; Step S333: removing the speckle pairs whose deviations from the depth value difference and the mean of the depth value differences exceed a first threshold from the first corresponding relationship, to obtain a second corresponding relationship; Step S334: calculating the brightness of the speckle located in the first speckle area in the second corresponding relationship to obtain a first brightness; calculating the brightness of the speckle located in the second speckle area in the second corresponding relationship to obtain a second brightness.
7. The underwater robot for judging water quality according to claim 2, characterized in that: In step S4, according to the formula Calculate the water body attenuation coefficient; where Φ(l 1i ) indicates the distance is the first depth l 1i The brightness of the i-th speckle, Φ(l 2i ) indicates the distance is the second depth l 2i The brightness of the i-th speckle.
8. The underwater robot for judging water quality according to claim 2, characterized in that: In step S4, according to the formula The water body attenuation coefficient is calculated; wherein Φ(l1) represents the brightness average of multiple speckles at a first depth l1, and Φ(l2) represents the brightness average of multiple speckles at a second depth l2.
9. The underwater robot for judging water quality according to claim 1, characterized in that: The structured light camera projects stripe structured light, and the processing process of the controller includes: Step M1: at a first position, controlling the structured light camera to obtain a first fringe image of an underwater target object, and calculating a first depth according to the first fringe image; Step M2: controlling the driving component to move the underwater robot to a second position, obtaining a second fringe image of the underwater target object, and calculating a second depth according to the second fringe image; wherein the first position and the second position are at different distances from the underwater target object; Step M3: extracting a bright stripe region in the first stripe image to obtain a first brightness; extracting a bright stripe region in the second stripe image to obtain a second brightness; Step M4: Calculate the water body attenuation coefficient according to the first brightness, the first depth, the second brightness and the second depth.
10. The underwater robot for judging water quality according to claim 9, characterized in that: The average brightness of the bright stripe in the width direction is taken as the brightness value of the pixels on both sides.
Citation Information
Patent Citations
Remote sensing method for measuring shallow-seawater attenuation coefficient with streak-tube laser imaging radar sea-surface echo distortion
CN104199048A
Method, apparatus, computer device and storage medium for determining attenuation coefficient
CN109410180A
Structured light camera row deviation detection method and device
CN112330751A
Water quality analysis method and system based on machine vision
CN117233116A
Water quality judgment method, system and equipment suitable for robot and storage medium
CN119310248A
Cited By
Water quality judgment method, system and equipment suitable for robot and storage medium
CN119310248A
A water quality judgment method, system, device and storage medium suitable for a robot
CN119310248B