Water quality judgment method, system and equipment suitable for robot and storage medium

Calculate the water attenuation coefficient through speckle images at different distances, and solve the problems of reflectivity data dependence and equipment complexity in the prior art, realize an economical and widely applicable water quality assessment method, and directly evaluate the quality of the water body.

CN119310248AActive Publication Date: 2025-01-14SHENZHEN GUANGJIAN TECH CO LTD +1

Patent Information

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

AI Technical Summary

Technical Problem

The existing online water quality monitoring system requires reflectivity data and complex equipment when evaluating water quality, which limits its wide application and economicality.

Method used

The attenuation coefficient of the water body is calculated by speckle images at different distances, and a robot is used to obtain speckle images underwater, calculate brightness changes, directly evaluate the quality of the water body, reduce dependence on reflectivity data. Image processing and depth perception algorithms are used to achieve Contactless water quality assessment.

Benefits of technology

The measurement of different water bodies is realized, the requirements for known data are reduced, and it has broad applicability and economicality, and it does not require special equipment, which can effectively evaluate the transparency and cleanliness of water quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119310248A_ABST
    Figure CN119310248A_ABST
Patent Text Reader

Abstract

The invention discloses a water quality judgment method, system and device suitable for a robot and a storage medium, and the method comprises the steps: S1, controlling the robot to reach a first position, obtaining a first speckle image of an underwater target object, and carrying out the calculation of a first depth according to the first speckle image; s2, the robot is moved to a second position, a second speckle image of the underwater target object is obtained, and a second depth is calculated according to the second speckle image; s3, extracting a speckle region in the first speckle image to obtain first brightness; extracting a speckle region in the second speckle image to obtain second brightness; and S4, calculating the attenuation coefficient of the water body according to the first brightness, the first depth, the second brightness and the second depth. The attenuation coefficient of the water body is calculated by using the speckle images at different distances, and the method is suitable for the underwater robot and has the advantages of simplicity in operation, low cost, easiness in expansion and the like.
Need to check novelty before this filing date? Find Prior Art

Description

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 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 in that it comprises:

[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 according to 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 according to 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 the water body attenuation coefficient according to 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 in the first speckle image, and extracting a second speckle region in 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 comprises:

[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 value of the depth value difference of the corresponding speckle according to the first corresponding relationship;

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

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

[0039] Optionally, the water quality determination method suitable for a robot 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.

[0040] Optionally, the water quality determination method suitable for a robot is characterized in that in step S4, according to the formula The water body attenuation coefficient is calculated; wherein Φ(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.

[0041] In a second aspect, the present invention provides a water quality determination system applicable to a robot, which is used to implement any of the aforementioned water quality determination methods applicable to a robot, and is characterized by comprising:

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

[0043] a second distance module, used to move the robot to 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 at different distances from the underwater target object;

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

[0045] A calculation module 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 invention provides a water quality determination device suitable for a robot, characterized in that it comprises:

[0047] processor;

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

[0049] Wherein, the processor is configured to execute the steps of any of the aforementioned water quality determination methods applicable to the robot 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 realize the measurement of different water bodies without reflectivity data, which greatly reduces the requirement for known data and has 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. 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 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:

[0055] Figure 1 A flow chart of the steps of a water quality determination method applicable to a robot in an embodiment of the present invention;

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

[0057] Figure 3 A flowchart of a step of obtaining a first depth in an embodiment of the present invention;

[0058] Figure 4 A flowchart of steps for obtaining a first brightness and a second brightness in an embodiment of the present invention;

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

[0060] Figure 6 This is a schematic diagram of the structure of a water quality judgment system suitable for a robot in an embodiment of the present invention;

[0061] Figure 7 is a schematic 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 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.

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

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

[0069] The present invention calculates the attenuation coefficient of a water body by using speckle images at different distances, 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 steps of a water quality determination method applicable to a robot in an embodiment of the present invention. Figure 1 As shown, the steps of a water quality determination method applicable to a robot in an embodiment of the present invention include:

[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, first, the robot is controlled to reach a preset first position. This position should ensure that the robot can clearly capture the underwater target object and obtain a valid 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 started to capture a 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. 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 requirements, 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 the embodiment, the robot faces the target object (wall) vertically. The distance between the second position and the first position is different to obtain speckle images at different viewing angles. When the robot reaches the second position, the camera device is started 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 depth perception algorithm to calculate the second depth between the robot and the target object. When the robot acquires the first speckle image and the second speckle image, the 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.

[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, 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.

[0077] Step S4: Calculate the water body attenuation coefficient according to the first brightness, the first depth, the second brightness and the second depth.

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

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

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

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

[0086] In some embodiments, in step S4, according to the formula The water body attenuation coefficient is calculated; wherein Φ(l1) represents the brightness mean of multiple speckles at a first depth l1, and Φ(l2) represents the brightness mean of multiple speckles at a second depth l2. In this embodiment, the brightness mean of the speckles is processed 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 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, i.e., the first plane. This usually involves steps such as feature point extraction, matching, and three-dimensional 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, 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 robot and the target plane. At the same time, the vertical distance from the robot to the first plane, i.e., the first distance, is calculated, which can be calculated by the plane model obtained by 3D reconstruction. This distance is 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 adjustment image.

[0093] In this step, the angle that the 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 robot is controlled to rotate according to the calculated rotation angle, and the position of the robot is adjusted as needed (i.e., the robot is moved) to ensure that the camera can shoot perpendicular to the first plane. After the robot rotates and moves into place, an adjusted image is taken again, i.e., the second adjusted image.

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

[0095] 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 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 a preset threshold. If both meet the preset value (i.e., they are within the allowable error range), it is considered that the 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.

[0096] The 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.

[0097] Figure 4 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 4 As shown, in an embodiment of the present invention, a step of obtaining a first brightness and a second brightness includes:

[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, 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.

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

[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, 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.

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

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

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

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

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

[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, 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.

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

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

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

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

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

[0117] a second distance module, used to move the robot to 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 at different distances from the underwater target object;

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

[0119] A calculation module is used to calculate a water body attenuation coefficient according to 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 suitable for an underwater robot, and has the advantages of simple operation, low cost, and easy expansion.

[0121] The present invention also provides a water quality determination device suitable for a robot, comprising a processor and a memory, wherein executable instructions of the processor are stored. The processor is configured to execute the steps of a water quality determination method suitable for the robot by executing the executable instructions.

[0122] As described 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.

[0123] It will be appreciated by those skilled in the art that various aspects of the present invention may be implemented as systems, methods or program products. Therefore, various aspects of the present invention may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software implementations, which may be 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 The electronic device 600 according to this embodiment of the present invention is described. Figure 7 The electronic device 600 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0125] like Figure 7 As shown, the electronic device 600 is in the form of a general computing device. The components of the 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 the storage unit 620 and the processing unit 610), a display unit 640, etc.

[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 unit bus or memory unit 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] In an embodiment of the present invention, a computer-readable storage medium is also provided for storing a program, and when the program is executed, the steps of a water quality determination method applicable to a robot are implemented. In some possible implementations, various aspects of the present invention can also be implemented in the form of a program product, which includes a program code. When the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps of various exemplary embodiments of the present invention described in the above-mentioned water quality determination method applicable to a robot section of this specification.

[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 a computer-readable storage medium in an embodiment of the present invention. Figure 8 As shown, a program product 800 for implementing the above method according to an embodiment of the present invention is described, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can 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 can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.

[0134] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0135] Computer readable storage media may include data signals propagated in baseband or as part of a carrier wave, wherein readable program codes are carried. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The readable storage medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, device, or device. The program codes contained on the readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination thereof.

[0136] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of grid, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., via the Internet using an Internet service provider).

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

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

[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 modifications or variations 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 according to 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 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.

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: 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.

5. A water quality determination method suitable for a robot according to claim 4, 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.

6. 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; 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.

7. A water quality determination method suitable for a robot according to claim 1, characterized in that: In step S4, according to the formula The water body attenuation coefficient is calculated; wherein Φ(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.

8. 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 7, characterized in that: include: a first distance module, used to control the robot to reach a first position, obtain a first speckle image of the underwater target object, and calculate a first depth according to the first speckle image; a second distance module, used to move the robot to 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 at different distances from the underwater target object; an extraction module, configured to extract a speckle area in the first speckle image to obtain a first brightness; and extract a speckle area in the second speckle image to obtain a second brightness; A calculation module is used to calculate a water body attenuation coefficient according to the first brightness, the first depth, the second brightness and the second depth.

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

10. 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 as described in any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Method, apparatus, computer device and storage medium for determining attenuation coefficient

    CN109410180A

  • Water quality detection method, device and system and storage medium

    CN115046943A

  • Water turbidity assessment using image sensor

    CN117405633A

  • Underwater robot for judging water quality

    CN119354960A

  • A method and an assembly for measuring particle size of particles suspended in a fluid

    WO2024091159A1

Cited By

  • Underwater robot for judging water quality

    CN119354960A

  • An underwater robot for judging water quality

    CN119354960B