A water quality judgment method, system, device and storage medium suitable for a robot

By using speckle images on an underwater robot to calculate the water attenuation coefficient, the problems of complexity and insufficient applicability of water quality monitoring equipment in existing technologies are solved, and a simple and economical water quality assessment is achieved, which is suitable for different water environments.

CN119310248BActive Publication Date: 2025-10-10SHENZHEN GUANGJIAN TECH CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411415231.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-11
Publication Date
2025-10-10
Estimated Expiration
2044-10-11

AI Technical Summary

Technical Problem

Existing online water quality monitoring systems require complex chemical reagents and specialized equipment and are difficult to be widely applied in different water bodies. Turbidity, as an important indicator for evaluating water quality, lacks a simple measurement method.

Method used

By using speckle images at different distances on an underwater robot to calculate the water attenuation coefficient and combining it with the Lambert-Beer law, non-contact water quality assessment can be achieved, and water quality judgment can be made using the robot's mobility and imaging technology.

Benefits of technology

It simplifies the water quality measurement process, reduces the requirement for known data, is applicable to different water bodies, has good economy and wide applicability, is simple to operate and low cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119310248B_ABST
    Figure CN119310248B_ABST
Patent Text Reader

Abstract

A water quality judgment method, system, device and storage medium suitable for a robot, wherein the method comprises: step S1: controlling the robot to reach a first position, obtaining a first speckle image of an underwater target object, and calculating a first depth according to the first speckle image; step S2: moving the robot to reach a second position, obtaining a second speckle image of the underwater target object, and calculating a second depth according to the second speckle image; step S3: extracting a speckle region in the first speckle image to obtain a first brightness; extracting a speckle region in the second speckle image to obtain a second brightness; step S4: calculating a water body attenuation coefficient according to the first brightness, the first depth, the second brightness and the second depth. The application calculates the attenuation coefficient of the water body by using the speckle images at different distances, is suitable for underwater robots, and has the advantages of simple operation, low cost, easy expansion and the like.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of water quality judgment, in particular to a water quality judgment method, system, device and storage medium suitable for robots. BACKGROUND

[0002] Online monitoring method sets up special monitoring equipment in water body, uses sensor, instrument and other technical means to monitor various parameters of water quality in real time, such as temperature, pH value, dissolved oxygen, turbidity, nutrient salt, organic pollutants and heavy metal ions. These monitoring equipment can automatically collect data and transmit it to data receiving end or data processing center for further analysis and evaluation.

[0003] Online monitoring system usually consists of the following parts:

[0004] Signal transmission unit: responsible for converting water quality parameters into electrical signals or other transmissible signal forms.

[0005] Signal processing unit: pre-processes the collected signals, such as amplification, filtering, etc., to improve the accuracy and reliability of the data.

[0006] Data acquisition unit: responsible for converting processed signals into digital data and storing and transmitting them.

[0007] Data transmission unit: transmits the collected data to the data receiving end or data processing center through 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 method is widely used in various water quality monitoring scenarios, such as:

[0010] Drinking water source: monitors the water quality status of water source in real time to ensure the safety and reliability of drinking water.

[0011] Sewage treatment plant: monitors water quality changes during sewage treatment process, optimizes sewage treatment process and improves effluent water quality.

[0012] River, lake and reservoir: monitors the water quality status of surface water body to provide data support for environmental protection and management.

[0013] Industrial water: monitors the water quality status of industrial water to ensure the stability of production process and product quality.

[0014] Irrigation in agriculture: monitors 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 measure of water quality, generally defined as the degree of cloudiness or opacity in a liquid due to organic or inorganic particles. It is often used to evaluate the physical properties of natural and drinking water. Although the early definition of turbidity was not strict from an optical perspective, an increasing number of countries and organizations are considering turbidity as a key indicator of 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 this application. Summary of the Invention

[0018] To this end, the present invention uses speckle images at different distances to calculate the attenuation coefficient of the water body, which is suitable for underwater robots and has the advantages of simple operation, low cost, and easy expansion.

[0019] In a first aspect, the present invention provides a water quality determination method applicable to a robot, characterized by comprising:

[0020] Step S1: controlling the robot to reach a first position, obtaining a first speckle image of an underwater target object, and calculating a first depth based on the first speckle image;

[0021] Step S2: moving the robot to a second position, obtaining a second speckle image of the underwater target object, and calculating a second depth based on the second speckle image; wherein the first position and the second position are at different distances from the underwater target object;

[0022] 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;

[0023] Step S4: Calculate a water attenuation coefficient based on the first brightness, the first depth, the second brightness, and the second depth.

[0024] Optionally, the water quality determination method applicable to a robot is characterized in that the robot has the same projection parameters and exposure parameters when acquiring the first speckle image and the second speckle image.

[0025] Optionally, the water quality determination method applicable to a robot is characterized in that step S1 comprises:

[0026] Step S11: controlling the robot to capture a first adjustment image and perform three-dimensional reconstruction to obtain a first plane;

[0027] Step S12: calculating a first angle of the first plane in the camera coordinate system, and calculating a first distance of the first plane;

[0028] Step S13: determining a rotation angle of the robot according to the first angle, rotating and moving the robot according to the first distance and the rotation angle so that the robot is perpendicular to the first plane, and capturing a second adjustment image;

[0029] 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.

[0030] Optionally, the water quality determination method applicable to a robot is characterized in that step S3 comprises:

[0031] Step S31: extracting a first speckle region from the first speckle image, and extracting a second speckle region from the second speckle image;

[0032] Step S32: pairing the first speckle area with the second speckle area to obtain a corresponding relationship between corresponding speckles;

[0033] 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.

[0034] Optionally, the water quality determination method applicable to a robot is characterized in that step S33 includes:

[0035] Step S331: Pairing the position of the first speckle area with the position of the second speckle image to obtain a first corresponding relationship;

[0036] Step S332: calculating the depth value difference and the mean of the depth value difference of the corresponding speckle according to the first corresponding relationship;

[0037] Step S333: removing the speckle pairs whose deviations between 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;

[0038] Step S334: calculating the brightness of the speckle in the second correspondence located in the first speckle region to obtain a first brightness; and calculating the brightness of the speckle in the second correspondence located in the second speckle region to obtain a second brightness.

[0039] Optionally, the water quality judgment method suitable for robots has the characteristics that in step S4, the water body attenuation coefficient is calculated according to the formula ; wherein, Φ(l 1i ) represents the brightness of the i th speckle at a first depth l 1i ; and Φ(l 2i ) represents the brightness of the i th speckle at a second depth l 2i .

[0040] Optionally, the water quality judgment method suitable for robots has the characteristics that in step S4, the water body attenuation coefficient is calculated according to the formula ; wherein, Φ(l 1i 1) represents the average brightness of multiple speckles at a first depth l 1i 1; and Φ(l 2i 2) represents the average brightness of multiple speckles at a second depth l 2i 2.

[0041] In a second aspect, the present application provides a water quality judgment system suitable for robots, which is used to realize the water quality judgment method suitable for robots as described in any of the preceding aspects, and has the characteristics that it comprises:

[0042] a first distance module, which is used to control the robot to reach a first position, obtain a first speckle image of an underwater target object, and calculate a first depth according to the first speckle image;

[0043] a second distance module, which is used to move the robot to reach a second position, obtain a second speckle image of the underwater target object, and calculate a second depth according to the second speckle image; wherein the first position and the second position are different in distance from the underwater target object;

[0044] an extraction module, which is used to extract a speckle region in the first speckle image to obtain a first brightness, and extract a speckle region in the second speckle image to obtain a second brightness;

[0045] a calculation module, which is used to calculate a water body attenuation coefficient according to the first brightness, the first depth, the second brightness, and the second depth.

[0046] In a third aspect, the present application provides a water quality judgment device suitable for robots, which has the characteristics that it comprises:

[0047] a processor;

[0048] a memory storing executable instructions for the processor;

[0049] Wherein, the processor is configured to execute the steps of any of the aforementioned water quality determination methods applicable to robots by executing the executable instructions.

[0050] In a fourth aspect, the present invention provides a computer-readable storage medium for storing a program, characterized in that when the program is executed, the steps of any of the aforementioned water quality judgment methods applicable to a robot are implemented.

[0051] Compared with the prior art, the present invention has the following beneficial effects:

[0052] The present invention obtains the brightness change of speckles through speckle 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 water quality through the attenuation of light by water, and can monitor water quality while performing measurements, without the need for specialized equipment, and has good economic efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for the embodiments or the description of the prior art. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without inventive work. Other features, purposes and advantages of the present invention will become more apparent by reading the detailed description of the non-limiting embodiments with reference to the following drawings:

[0055] Figure 1 This is a flowchart of a water quality determination method applicable to a robot in an embodiment of the present invention;

[0056] Figure 2 is a schematic diagram of a first position and a second position in an embodiment of the present invention;

[0057] Figure 3 This is a flow chart of steps for obtaining a first depth according to an embodiment of the present invention;

[0058] Figure 4 This is a flow chart of steps for obtaining a first brightness and a second brightness in an embodiment of the present invention;

[0059] Figure 5 This is another flowchart of steps for obtaining the first brightness and the second brightness in an embodiment of the present invention;

[0060] Figure 6This is a schematic structural diagram of a water quality determination system applicable to a robot in an embodiment of the present invention;

[0061] Figure 7 is a structural diagram of a water quality determination device suitable for a robot in an embodiment of the present invention; and

[0062] Figure 8 Schematic diagram of the structure of a computer-readable storage medium in an embodiment of the present invention.

[0063] 1 - first position;

[0064] 2- second position; DETAILED DESCRIPTION

[0065] The present invention will be described in detail below with reference to 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 skilled in the art, several variations and improvements can be made without departing from the scope of the present invention. These all fall within the scope of protection of the present invention.

[0066] The terms "first," "second," "third," "fourth," and the like (if any) in the description and claims of the present invention and in the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a particular order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, so that the embodiments of the 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 apparatus comprising a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to these processes, methods, products, or apparatus.

[0067] The embodiment of the present invention provides a water quality determination method suitable for a robot, aiming to solve the problems existing in the prior art.

[0068] The following describes in detail the technical solutions of the present invention and how the technical solutions of this application solve the above-mentioned technical problems using specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. The following embodiments of the present invention are described in conjunction with the accompanying drawings.

[0069] The present invention uses speckle images at different distances to calculate the attenuation coefficient of a water body, is suitable for underwater robots, and has the advantages of simple operation, low cost, and easy expansion.

[0070] Figure 1 FIG. 1 is a flow chart of a method for determining water quality applicable to a robot in an embodiment of the present invention. Figure 1 As shown, in an embodiment of the present invention, a method for determining water quality applicable to a robot includes the following steps:

[0071] Step S1: controlling the robot to reach a first position, obtaining a first speckle image of an underwater target object, and calculating a first depth according to the first speckle image.

[0072] In this step, the robot is first controlled to reach a preset first position. This position should ensure that the 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 robot reaches the first position, the camera device it carries is activated to capture a speckle image of the underwater target object. A speckle image is a pattern formed when light is irradiated onto the surface of the underwater target object. Using image processing technology and depth perception algorithms, the acquired first speckle image is analyzed to calculate the first depth between the robot and the target object. It should be noted that the first position only needs to meet the pre-selected distance requirement and does not require a fixed position, which makes the measurement more flexible.

[0073] Step S2: moving the 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.

[0074] In this step, the robot is moved to the second position. Figure 2 As shown, the robot has the same direction to the target object at the first position and the second position, but different distances. Figure 2 In step S1, the robot faces vertically toward the target object (wall). The second position is at a different distance from the first position to obtain speckle images from different perspectives. When the robot reaches the second position, the camera is activated again to capture 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 a depth perception algorithm to calculate a second depth between the robot and the target object. When acquiring the first and second speckle images, the robot uses the same projection and exposure parameters, so that the difference between the first and second speckle images is caused by the water body and the target object, eliminating the influence of the shooting parameters.

[0075] 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.

[0076] In this step, speckle regions are extracted from the first and second speckle images using image processing techniques (such as threshold segmentation and edge detection). 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 and second brightness. Brightness calculation typically involves statistical analysis of image pixel values.

[0077] Step S4: Calculate a water attenuation coefficient based on the first brightness, the first depth, the second brightness, and the second depth.

[0078] In this step, using optical principles and knowledge of water quality monitoring, a mathematical model is established based on the relationship between the first brightness, the first depth, the second brightness, and the second depth to calculate the water attenuation coefficient. The water attenuation coefficient describes the degree of absorption and scattering of light during propagation in water and reflects the clarity and transparency of the water.

[0079] In some embodiments, the calculation is performed using the Lambert-Beer law. This law describes the attenuation of light as it propagates through a medium, whereby light intensity decays exponentially with increasing propagation distance. By comparing brightness values ​​at different depths, the water attenuation coefficient can be estimated.

[0080] Use the formula to calculate the attenuation coefficient: According to the first brightness I1, the first depth l1, the second brightness I2 and the second depth l2, the attenuation coefficient c of the water body can be calculated using the following formula:

[0081]

[0082] Here, ln represents the natural logarithm.

[0083] The attenuation coefficient reflects the attenuation of light when it propagates through water and is affected by suspended particles, dissolved matter, and other factors. By comparing speckle patterns at different locations and depths, the transparency and cleanliness of water can be more accurately estimated.

[0084] This embodiment does not require complex chemical reagents or specialized measuring equipment, but instead utilizes the robot's mobility and imaging technology to perform non-contact water quality assessment.

[0085] 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 l 2iThe 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 can have different values ​​for different speckles. It is a general term for the depth values ​​of different speckles in the second speckle image. This embodiment calculates each speckle separately to obtain multiple speckle calculated brightness values, which can better evaluate the attenuation at different angles or positions and can handle complex scenes.

[0086] In some embodiments, in step S4, according to the formula Calculate the water attenuation coefficient; where Φ(l1) represents the average brightness of multiple speckles at a first depth l1, and Φ(l2) represents the average brightness of multiple speckles at a second depth l2. This embodiment processes the average brightness of the speckles to obtain a more stable result.

[0087] Figure 3 FIG. 1 is a flow chart of steps for obtaining a first depth in an embodiment of the present invention. Figure 3 As shown, in an embodiment of the present invention, a step of obtaining a first depth includes:

[0088] Step S11: controlling the robot to capture a first adjustment image and perform three-dimensional reconstruction to obtain a first plane.

[0089] In this step, the robot activates its camera at a first position to capture an image of the underwater target object. This image is called the first adjustment image. Using image processing techniques and 3D reconstruction algorithms, the first adjustment image is processed to obtain 3D information about the plane where the target object resides, i.e., the first plane. This typically involves steps such as feature point extraction, matching, and 3D coordinate calculation.

[0090] Step S12: Calculate a first angle of the first plane in the camera coordinate system, and calculate a first distance of the first plane.

[0091] In this step, the angle between the first plane and the camera optical axis, known as the first angle, is calculated in the camera coordinate system. This angle reflects the degree of inclination between the robot and the target plane. Simultaneously, the vertical distance from the robot to the first plane, known as the first distance, is calculated. This can be calculated using the plane model obtained through 3D reconstruction. This distance provides an estimate of the actual distance between the robot and the target object.

[0092] Step S13: determining a rotation angle of the robot according to the first angle, rotating and moving the robot according to the first distance and the rotation angle, so that the robot is perpendicular to the first plane, and capturing a second adjusted image.

[0093] In this step, according to the first angle, the angle that the robot needs to rotate to make the optical axis of the camera perpendicular to the first plane is calculated. The robot is controlled to rotate according to the calculated rotation angle, and the position of the robot is adjusted (i.e., the robot is moved) as needed to ensure that the camera can capture an image perpendicular to the first plane. After the robot is rotated and moved into position, an adjusted image, i.e., a second adjusted image, is captured again.

[0094] Step S14: performing three-dimensional reconstruction on the second adjusted image to obtain a second plane, calculating a second angle and a second distance of the second plane, and if both meet the preset values, marking the second adjusted image as the first speckle image and marking the second distance as the first depth, otherwise performing step S13.

[0095] In this step, the second adjusted image is three-dimensionally reconstructed to obtain a second plane. This plane should be closer to the ideal state of the robot being perpendicular to the target plane than the first plane. In the camera coordinate system, the angle between the second plane and the optical axis of the camera (the second angle) and the vertical distance from the robot to the second plane (the second distance) are calculated. The second angle and the second distance are compared with the preset threshold values. If both meet the preset values (i.e., both are within the allowed error range), it is considered that the robot has correctly perpendicular to the target plane, and the second adjusted image is marked as the first speckle image and the second distance is marked as the first depth. If the preset values are not met, step S13 is repeated until the conditions are 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.

[0096] The robot in this embodiment can accurately adjust its position and attitude to ensure that the captured speckle image is perpendicular to the target plane and that the depth information is accurate, providing a reliable data basis for subsequent water quality judgment.

[0097] Figure 4 A flowchart of a step in the embodiment of the application for obtaining a first brightness and a second brightness is shown in FIG. Figure 4 As shown in FIG.

[0098] Step S31: extracting a first speckle region in the first speckle image and extracting a second speckle region in the second speckle image.

[0099] In this step, image processing techniques (such as threshold segmentation, edge detection, and morphological processing) are used to extract regions containing speckle features from the first speckle image, referred to as first speckle regions. Similarly, regions containing speckle features are extracted from the second speckle image, referred to as second speckle regions. These regions should roughly correspond in position to the first speckle regions, but may differ due to factors such as the shooting angle and the range of the target object.

[0100] Step S32: Pairing the first speckle area with the second speckle area to obtain a corresponding relationship between corresponding speckles.

[0101] In this step, a feature matching algorithm (such as SIFT, SURF, ORB, etc.) or other related algorithms is used to establish a correspondence between the first and second speckle regions. This means finding the corresponding speckle in the second region for each speckle in the first region. This correspondence is determined based on the similarity of speckle features such as position, shape, size, and texture. When the speckle is coded, the correspondence is primarily determined by the position of the speckles and their relationship to each other. The matching algorithm generates a series of corresponding point pairs, representing similar speckle patterns found between the first and second regions. These correspondences are used for subsequent calculations and analysis.

[0102] 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.

[0103] In this step, based on the previously established correspondence, a third speckle region corresponding to the corresponding speckle in the second speckle region is determined within the first speckle region, and a fourth speckle region corresponding to the corresponding speckle in the first speckle region is determined within the second speckle region. The third and fourth speckle regions contain only speckles with corresponding relationships and exclude uncorrelated speckles. For each of the third and fourth speckle regions, the average brightness or peak brightness (or other appropriate brightness metric) is calculated. This can be achieved by statistically analyzing and averaging the brightness values ​​of all pixels within the region. The resulting first and second brightness values ​​are used in the subsequent calculation of the water attenuation coefficient.

[0104] This embodiment ensures that identical feature points or regions in speckle images acquired from two different locations are correctly associated, allowing accurate comparison of their brightness changes. This comparison is crucial for estimating the attenuation coefficient of water, as speckle brightness changes directly reflect the attenuation of light as it propagates through water. By precisely measuring and comparing these brightness values, water quality can be more accurately assessed.

[0105] Figure 5 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:

[0106] Step S331: Pairing the position of the first speckle area with the position of the second speckle image to obtain a first corresponding relationship.

[0107] In this step, the position information of each speckle in the first speckle region is used to match the speckle at the corresponding position in the second speckle image. The positional deviation of the speckles on the image is always within a certain range. That is, each speckle in the first speckle region has a preliminary region in the second speckle region where the corresponding speckle is located. By searching within this preliminary region, the corresponding speckle can be found. Through position matching, a series of speckle pairs are obtained. These speckle pairs establish a preliminary correspondence between the first speckle region and the second speckle region, which is called the first correspondence.

[0108] Step S332: Calculating the depth value difference and the mean of the depth value difference of the corresponding speckle according to the first corresponding relationship.

[0109] In this step, for each pair of matched speckle patterns, the difference in depth is calculated. This involves extracting the depth data from each speckle's position information 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 differences. These depth differences are then averaged to obtain the mean depth difference.

[0110] Step S333: removing the speckle pairs whose deviations between the depth value difference and the depth value difference mean exceed a first threshold from the first corresponding relationship to obtain a second corresponding relationship.

[0111] 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, and therefore 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.

[0112] Step S334: calculating the brightness of the speckles located in the first speckle area in the second corresponding relationship to obtain a first brightness; calculating the brightness of the speckles located in the second speckle area in the second corresponding relationship to obtain a second brightness.

[0113] In this step, for each speckle in the first speckle region in the second correspondence, its brightness value (such as average brightness or peak brightness) is calculated to obtain the first brightness. Similarly, for each speckle in the second speckle region in the second correspondence, its brightness value is calculated to obtain the second brightness.

[0114] This embodiment ensures that speckle pairs that may be caused by mismatches or noise are removed through depth verification before brightness calculation, thereby improving the accuracy and reliability of brightness calculation. These brightness values ​​are used in the subsequent calculation of water attenuation coefficients to assess water quality.

[0115] Figure 6 FIG. 1 is a schematic diagram of a water quality determination system suitable for a robot according to an embodiment of the present invention. Figure 6 As shown, in an embodiment of the present invention, a water quality determination system suitable for a robot includes:

[0116] a first distance module, configured to control the robot to reach a first position, obtain a first speckle image of the underwater target object, and calculate a first depth based on the first speckle image;

[0117] a second distance module, configured to move the robot to a second position, obtain a second speckle image of the underwater target object, and calculate a second depth based on the second speckle image; wherein the first position and the second position are at different distances from the underwater target object;

[0118] an extraction module, configured to extract a speckle area from the first speckle image to obtain a first brightness; and extract a speckle area from the second speckle image to obtain a second brightness;

[0119] A calculation module is used to calculate a water attenuation coefficient based on the first brightness, the first depth, the second brightness, and the second depth.

[0120] This embodiment uses speckle images at different distances to calculate the attenuation coefficient of a water body, is applicable to underwater robots, and has the advantages of simple operation, low cost, and easy expansion.

[0121] An embodiment of the present invention further provides a water quality determination device suitable for use with a robot, comprising a processor and a memory storing executable instructions for the processor. The processor is configured to execute the executable instructions to perform steps of a water quality determination method suitable for use with the robot.

[0122] As described above, this embodiment uses speckle images at different distances to calculate the attenuation coefficient of a water body, which is suitable for underwater robots and has the advantages of simple operation, low cost, and easy expansion.

[0123] Those skilled in the art will appreciate that various aspects of the present invention may be implemented as systems, methods, or program products. Accordingly, various aspects of the present invention may be implemented in the following forms: entirely in hardware, entirely in software (including firmware, microcode, etc.), or in a combination of hardware and software, collectively referred to herein as "circuits," "modules," or "platforms."

[0124] Figure 7 This is a schematic diagram of the structure of a water quality judgment device suitable for a robot in an embodiment of the present invention. Figure 7 An electronic device 600 according to this embodiment of the present invention will be described. Figure 7 The electronic device 600 shown is merely an example and should not limit the functions and scope of use of the embodiments of the present invention.

[0125] like Figure 7 As shown, electronic device 600 is implemented as a general-purpose computing device. Components of electronic device 600 may include, but are not limited to, at least one processing unit 610, at least one storage unit 620, a bus 630 connecting different platform components (including storage unit 620 and processing unit 610), and a display unit 640.

[0126] The storage unit stores program codes, which can be executed by the processing unit 610, so that the processing unit 610 executes the steps of various exemplary embodiments of the present invention described in the above-mentioned water quality determination method applicable to robots. For example, the processing unit 610 can execute the following steps: Figure 1 Follow the steps shown in .

[0127] The storage unit 620 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 6201 and / or a cache memory unit 6202 , and may further include a read-only memory unit (ROM) 6203 .

[0128] The storage unit 620 may also include a program / utility 6204 having a set (at least one) of program modules 6205, such program modules 6205 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a grid environment.

[0129] Bus 630 may represent one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0130] The electronic device 600 may also communicate with one or more external devices 700 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), one or more devices that enable a user to interact with the electronic device 600, and / or any device that enables the electronic device 600 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed through an input / output (I / O) interface 650. Furthermore, the electronic device 600 may also communicate with one or more grids (e.g., a local area network (LAN), a wide area network (WAN), and / or a public grid, such as the Internet) through a grid adapter 660. The grid adapter 660 may communicate with other modules of the electronic device 600 through the bus 630. It should be understood that although Figure 7 Not shown, other hardware and / or software modules may be used in conjunction with electronic device 600, including but not limited to microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage platforms.

[0131] Embodiments of the present invention also provide a computer-readable storage medium for storing a program that, when executed, implements the steps of a method for determining water quality applicable to a robot. In some possible implementations, various aspects of the present invention may also be implemented as a program product, comprising program code. When the program product is executed on a terminal device, the program code causes the terminal device to execute the steps according to various exemplary embodiments of the present invention described in the aforementioned section of this specification regarding a method for determining water quality applicable to a robot.

[0132] As shown above, this embodiment uses speckle images at different distances to calculate the attenuation coefficient of the water body, which is suitable for underwater robots and has the advantages of simple operation, low cost, and easy expansion.

[0133] Figure 8 Schematic diagram of the structure of the computer-readable storage medium in an embodiment of the present invention. Figure 8 , a program product 800 for implementing the above method according to an embodiment of the present invention is described. The program product 800 may be a portable compact disc read-only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, a readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0134] The program product can employ any combination of one or more of a readable medium. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium, for example, can include but is not limited to an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include an electrical connection having one or more wires, a portable disc, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0135] The computer readable storage medium can include a data signal traveling in a baseband or a propagated data signal traveling in a carrier wave. Such a propagated signal can take a wide variety of forms, including but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable storage medium can be any medium that can be read by a computer or a readable medium that can store or transfer a program for use by or in connection with an instruction execution system, apparatus, or device. Program code contained on a computer readable storage medium can be transmitted as a carrier wave or other transport medium via a communication link, including a wireless link, wireline, optical fiber cable, Rf, etc., or any suitable combination thereof.

[0136] The program code for carrying out operations of the present application can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++, or the like, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's device and partly on a remote computing device or entirely on the remote computing device or server. In the latter scenario, the remote computing device can be connected to the user's device through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computing device, such as through the Internet using an Internet Service Provider.

[0137] The embodiment calculates the attenuation coefficient of the water body by using the speckle images at different distances, is suitable for underwater robots, and has the advantages of simple operation, low cost, and easy expansion.

[0138] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the various 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 apparent 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 the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

[0139] 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 variations or modifications within the scope of the claims, which do not affect the essence of the present invention.

Claims

1. A water quality judgment method suitable for a robot, characterized in that: include: Step S1: controlling the robot to reach a first position, obtaining a first speckle image of an underwater target object, and calculating a first depth based on the first speckle image; Step S2: moving the robot to a second position, obtaining a second speckle image of the underwater target object, and calculating a second depth based on 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: Calculating a water body attenuation coefficient according to the first brightness, the first depth, the second brightness, and the second depth; Wherein, step S3 includes: Step S31: extracting a first speckle region from the first speckle image, and extracting a second speckle region from 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; 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 of the depth value difference of the corresponding speckle according to the first corresponding relationship; Step S333: removing the speckle pairs whose deviations between the depth value difference and the depth value difference mean exceed a first threshold from the first corresponding relationship to obtain a second corresponding relationship; Step S334: calculating the brightness of the speckles located in the first speckle area in the second corresponding relationship to obtain a first brightness; calculating the brightness of the speckles located in the second speckle area in the second corresponding relationship to obtain a second brightness.

2. A water quality determination method suitable for a robot according to claim 1, characterized in that: The robot has the same projection parameters and exposure parameters when acquiring the first speckle image and the second speckle image.

3. A water quality determination method suitable for a robot according to claim 1, characterized in that: Step S1 includes: Step S11: controlling the 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 robot according to the first angle, rotating and moving the robot according to the first distance and the rotation angle so that the 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.

4. A water quality determination method suitable for a robot according to claim 1, characterized in that: In step S4, according to the formula Calculate the water body attenuation coefficient; wherein, Indicates the distance is the first depth The brightness of the i-th speckle, Indicates the distance is the second depth The brightness of the i-th speckle.

5. The water quality determination method suitable for a robot according to claim 1, characterized in that: In step S4, according to the formula Calculate the water body attenuation coefficient; wherein, Indicates the distance is the first depth The average brightness of multiple speckles, Indicates the distance is the second depth The average brightness of multiple speckles.

6. A water quality judgment system suitable for a robot, used to implement the water quality judgment method suitable for a robot according to any one of claims 1 to 5, characterized in that: include: a first distance module, configured to control the robot to reach a first position, obtain a first speckle image of the underwater target object, and calculate a first depth based on the first speckle image; a second distance module, configured to move the robot to a second position, obtain a second speckle image of the underwater target object, and calculate a second depth based on the second speckle image; wherein the first position and the second position are at different distances from the underwater target object; an extraction module, configured to extract a speckle area from the first speckle image to obtain a first brightness; and extract a speckle area from the second speckle image to obtain a second brightness; a calculation module, configured to calculate a water attenuation coefficient based on the first brightness, the first depth, the second brightness, and the second depth; The extraction module includes: Step S31: extracting a first speckle region from the first speckle image, and extracting a second speckle region from 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; 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 of the depth value difference of the corresponding speckle according to the first corresponding relationship; Step S333: removing the speckle pairs whose deviations between the depth value difference and the depth value difference mean exceed a first threshold from the first corresponding relationship to obtain a second corresponding relationship; Step S334: calculating the brightness of the speckles located in the first speckle area in the second corresponding relationship to obtain a first brightness; calculating the brightness of the speckles located in the second speckle area in the second corresponding relationship to obtain a second brightness.

7. A water quality judgment device suitable for a robot, characterized in that: include: processor; a memory storing executable instructions for the processor; The processor is configured to execute the steps of the water quality determination method applicable to a robot according to any one of claims 1 to 5 by executing the executable instructions.

8. A computer-readable storage medium for storing a program, characterized in that: When the program is executed, the steps of the water quality determination method suitable for a robot according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Underwater robot for judging water quality

    CN119354960A