A method for measuring water transparency based on image recognition
Through computer vision technology based on image recognition and mechanical transmission, the transparency of water bodies is automatically measured, which solves the problems of subjective judgment and external factors caused by manual participation in the prior art, and achieves high-precision, stable and automated water body transparency measurement.
Patent Information
- Application Number
- CN202011427760.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-07
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2040-12-07
AI Technical Summary
Existing water transparency measurement methods rely on manual participation and are easily affected by subjective judgments. They cannot avoid the instability caused by external factors, especially the insufficient water level measurement function, and additional external data or manual readings are required.
Using an image recognition method, computer vision technology and neural network model are used to automatically identify the boundary line and water surface height of the Serbian disc, and automatic measurement is achieved through mechanical transmission and motion control, reducing manual intervention, combining grating odometer to calculate the water depth, using upper and lower Two detections reduce the impact of fluctuations.
It realizes automatic measurement without manual participation, improves measurement accuracy and stability, simplifies the measurement process, reduces the need for manual cleaning of Serbian disc attachments, and avoids the influence of external factors.
Smart Images

Figure CN114594072B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a method for measuring water body transparency, and in particular to a method for measuring water body transparency based on image recognition. Background Art
[0002] The Secchi disk is slowly lowered into the water manually using a vertical line. The critical point is found by observing whether the dividing line of the Secchi disk is discernible by human eyes, and the draft depth of the vertical line is read at this moment.
[0003] This method involves many manual steps such as manual laying out of lines, manual determination of whether the intersection lines on the disk are discernible, and manual reading of water levels. It is related to personal vision and experience, and is easily affected by manual subjective judgment. Therefore, the accuracy and stability of the readings are difficult to guarantee.
[0004] Recently, some measurement methods have introduced the use of computer vision technology to distinguish the boundary lines on the disk.
[0005] It does not have the function of measuring water level, and requires the introduction of external water level data or manual readings, which fails to avoid the impact of external factors. Summary of the invention
[0006] The purpose of the present invention is to provide a method for measuring water transparency based on image recognition, which makes full use of computer vision technology to improve various links involving manual participation in water transparency measurement, including the recognition of disk boundary lines, water surface height measurement, etc., so that the measurement can be completed automatically without manual participation throughout the process, so as to solve the problems raised in the above-mentioned background technology.
[0007] To achieve the above object, the present invention provides the following technical solutions:
[0008] A method for measuring water transparency based on image recognition comprises the following steps:
[0009] Step 1: When the edge terminal device is remotely awakened or scheduled awakened, the edge terminal device is initialized, including starting the camera, the Secchi disk detection model service, and the image acquisition service;
[0010] Step 2: Start the Secchi disc pay-off program, the motor drives the driving wheel to rotate clockwise, and the Secchi disc is slowly lowered;
[0011] Step 3: Send the collected image frame to the trained neural network model for prediction analysis to obtain the judgment result of whether the Secchi disk boundary line in the image can be distinguished. If the detection result is yes, return to step 2; if the detection result is no, execute step 4;
[0012] Step 4: The edge terminal device controls the motor to stop rotating;
[0013] Step 5: The sampled image is input into the positioning ball detection model to calculate the pixel length of the positioning ball diameter; combined with the pixel length of the positioning ball diameter calibration at the initial position, the distance between the positioning ball and the initial position can be calculated according to the perspective transformation principle, which is recorded as Lb1;
[0014] Step 6: Obtain the cable release length according to the grating odometer, recorded as Lw1;
[0015] Step 7: Calculate the first immersion depth of the Secchi disk into the water, recorded as L1, L1 = Lw1 + r - Lb1, r is the radius of the positioning ball;
[0016] Step 8: The edge terminal device controls the motor to continuously release the wire for 10 cm and then stops;
[0017] Step 9: The edge terminal device controls the motor to rotate counterclockwise to drive the active wheel to retract the cable, slowly lift the Secchi disk, and at the same time send the sampled image to the Secchi disk detection model;
[0018] Step 10: Send the collected frame of image to the trained neural network model for prediction analysis of the image to obtain a judgment result of whether the Secchi disk boundary line in the image can be distinguished. If the detection result is yes, return to step 11; if the detection result is no, execute step 9;
[0019] Step 11: The edge terminal device controls the motor to stop rotating;
[0020] Step 12: The sampled image is sent to the water surface positioning ball detection model to calculate the pixel length of the positioning ball diameter; combined with the pixel length of the positioning ball diameter calibration at the initial position, the distance between the positioning ball and the initial position can be calculated according to the perspective transformation principle, which is recorded as Lb2;
[0021] Step 13: Obtain the cable release length according to the grating odometer, recorded as Lw2;
[0022] Step 14: Calculate the first immersion depth of the Secchi disk into the water, recorded as L2, L2 = Lw2 + r - Lb2, r is the radius of the positioning ball;
[0023] Step 15: Take the average of the two measurements as the final measurement value, recorded as L, L = (L1 + L2) / 2;
[0024] Step 16: The edge terminal device controls the motor to retract the cable back to the initial position and waits for the next measurement.
[0025] Furthermore, it comprises a measuring device, which is divided into a mechanical transmission part, a motion control part, and a calculation and measurement part.
[0026] Furthermore, the mechanical transmission part includes a column, a cross arm, a driving wheel, a changing wheel, a cable and a dust cover. The bottom of the column is plugged into the base, a cross arm is welded to the top of the column, a driving wheel is installed at one end of the cross arm, the driving wheel is connected to the changing wheel installed on the cross arm through a cable, and a dust cover is installed on the outside of the cross arm.
[0027] Furthermore, the motion control part includes an edge terminal device, a motor and a limit switch, the edge terminal device is electrically connected to the motor, the output shaft of the motor is connected to the driving wheel, and the limit switch is installed obliquely below the turning wheel.
[0028] Furthermore, the motor contains a grating odometer.
[0029] Furthermore, the calculation and measurement part includes a camera, a positioning ball and a Secchi disk. The camera is installed at the bottom end of the cross arm, and the end of the cable away from the driving wheel is connected to the Secchi disk. The positioning ball is contact-connected on the Secchi disk, and the cable passes through its aperture.
[0030] Compared with the prior art, the present invention has the following beneficial effects:
[0031] (1) The measurement process does not require human intervention, reducing the influence of subjective judgment.
[0032] (2) The water surface height can be determined through image analysis without the need for other measuring equipment.
[0033] (3) The measurement action is simple and fast. The camera image includes both the Secchi disk and the positioning ball. One set of actions can complete the measurement of water level and transparency.
[0034] (4) The impact of water surface fluctuations, sampling intervals, etc. is further reduced by performing two detections, one above the other.
[0035] (5) Compared with the measurement method of fixing the spiral Secchi disk in the water, the Secchi disk is put into the water during measurement, which avoids the problem of algae, silt, etc. adhering to the Secchi disk in the water for a long time, affecting the observation, and reduces the manual cleaning work. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 is an overall structural diagram of the measuring device of the present invention;
[0037] Figure 2 It is a measurement flow chart of the present invention.
[0038] In the figure: 1. column; 2. cross arm; 3. driving wheel; 4. turning wheel; 5. cable; 6. dust cover; 7. edge terminal device; 8. motor; 9. limit switch; 10. camera; 11. positioning ball; 12. Secchi disk. DETAILED DESCRIPTION
[0039] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0040] See also Figure 1 ,A method for measuring water transparency based on image recognition, includes a measuring device, which is divided into a mechanical transmission part, a motion control part, and a calculation and measurement part, such as Figure 1 shown.
[0041] The mechanical transmission part includes a column 1, a cross arm 2, a driving wheel 3, a changing wheel 4, a cable 5 and a dust cover 6. The bottom of the column 1 is plugged into the base, the column 1 fixes and supports the measuring device, the top of the column 1 is welded with a cross arm 2, the cross arm 2 extends the Secchi disk 12 and other components above the water surface, a driving wheel 3 is installed at one end of the cross arm 2, driven by the bearing of the motor 8 to rotate clockwise and counterclockwise, the driving wheel 3 is connected to the changing wheel 4 installed on the cross arm 2 through a cable 5, the changing wheel 4 is installed at the end of the cross arm 2 close to the water surface, the cable 5 is vertical to the water surface through the changing wheel 4, one end of the cable 5 is wrapped around the driving wheel 3, and the other end is fixed to the bottom of the Secchi disk 12, which is used to control the Secchi disk 12 to descend and rise, a dust cover 6 is installed on the outside of the cross arm 2, the Secchi disk 12 is in a recovered state to block external dust to prevent long-term accumulation from affecting observation.
[0042] The motion control part includes an edge terminal device 7, a motor 8 and a limit switch 9. The edge terminal device 7 is electrically connected to the motor 8. The edge terminal device 7 is used to control the rotation of the motor 8, image acquisition and analysis and calculation. The motor 8 contains a grating odometer. The output shaft of the motor 8 is connected to the driving wheel 3. The motor 8 is used to drive the driving wheel 3 to rotate to realize the rise and fall of the Secchi disk 12. The limit switch 9 is installed obliquely below the changing wheel 4. The limit switch 9 is used to determine whether the Secchi disk 12 is in the initial position, and at the same time ensure that the motor 8 stops rotating after the Secchi disk 12 returns to the initial position.
[0043] The calculation and measurement part includes a camera 10, a positioning ball 11 and a Secchi disk 12. The camera 10 is installed at the bottom end of the cross arm 2. The camera 10 is installed near the turning wheel 4 on the cross arm 2. The focal plane is parallel to the horizontal plane and is used to collect real-time images of the positioning ball 11 and the Secchi disk 12. The end of the cable 5 away from the driving wheel 3 is connected to the Secchi disk 12. The positioning ball 11 is contact-connected to the Secchi disk 12. The positioning ball 11 is a small plastic ball with a through hole in the center. The cable 5 passes through its aperture and can float on the water. The Secchi disk 12 is a plastic disc, which is evenly divided into 4 90° sector-shaped parts in black and white.
[0044] like Figure 2 As shown, a method for measuring water transparency based on image recognition comprises the following steps:
[0045] Step 1: When the edge terminal device 7 is remotely awakened or timed awakened, the edge terminal device 7 is initialized, including starting the camera, the Secchi disk detection model service, and the image acquisition service (sampling images from the video stream of the camera 10 at a frequency of 12 frames per second);
[0046] Step 2: Start the Secchi disc 12 release program, the motor 8 drives the driving wheel 3 to rotate clockwise, and the Secchi disc 12 is slowly lowered;
[0047] Step 3: Send the collected frame of image to the trained neural network model for prediction analysis of the image to obtain the judgment result of whether the Secchi disk 12 boundary line in the image can be distinguished. If the detection result is yes, return to step 2; if the detection result is no, execute step 4;
[0048] Step 4: The edge terminal device 7 controls the motor 8 to stop rotating;
[0049] Step 5: The sampled image is input into the positioning ball 11 detection model to calculate the pixel length of the diameter of the positioning ball 11; combined with the pixel length of the diameter calibration of the positioning ball 11 at the initial position, the distance between the positioning ball 11 and the initial position can be calculated according to the perspective transformation principle, which is recorded as Lb1;
[0050] Step 6: Obtain the length of cable 5 released according to the grating odometer, recorded as Lw1;
[0051] Step 7: Calculate the first immersion depth of the Secchi disk 12 into the water, recorded as L1, L1 = Lw1 + r - Lb1 (r is the radius of the positioning ball);
[0052] Step 8: The edge terminal device 7 controls the motor 8 to continuously release the wire for 10 cm and then stops;
[0053] Step 9: The edge terminal device 7 controls the motor 8 to rotate counterclockwise to drive the driving wheel 3 to retract the cable, slowly lift the Secchi disk 12, and at the same time send the sampled image to the Secchi disk 12 detection model;
[0054] Step 10: Send the collected frame of image to the trained neural network model for prediction analysis of the image to obtain a judgment result of whether the boundary line of the Secchi disk 12 in the image can be distinguished. If the detection result is yes, return to step 11; if the detection result is no, execute step 9;
[0055] Step 11: The edge terminal device 7 controls the motor 8 to stop rotating;
[0056] Step 12: The sampled image is sent to the water surface positioning ball 11 detection model to calculate the pixel length of the diameter of the positioning ball 11; combined with the pixel length calibrated by the diameter of the positioning ball 11 at the initial position, the distance between the positioning ball 11 and the initial position can be calculated according to the perspective transformation principle, which is recorded as Lb2;
[0057] Step 13: Obtain the length of the cable 5 released according to the grating odometer, recorded as Lw2;
[0058] Step 14: Calculate the first immersion depth of the Secchi disk 12 into the water, recorded as L2, L2 = Lw2 + r - Lb2 (r is the radius of the positioning ball);
[0059] Step 15: Take the average of the two measurements as the final measurement value, recorded as L, L = L1 + L2) / 2;
[0060] Step 16: The edge terminal device 7 controls the motor 8 to retract the cable 5 back to the initial position and wait for the next measurement.
[0061] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A method for measuring water transparency based on image recognition, characterized in that: The steps include: Step 1: When the edge terminal device (7) is remotely awakened or timed awakened, the edge terminal device (7) is initialized, including starting the camera, the Secchi disk detection model service, and the image acquisition service; Step 2: Start the Secchi disc (12) release program, the motor (8) drives the driving wheel (3) to rotate clockwise, and the Secchi disc (12) is slowly lowered; Step 3: Send the collected frame of image to the trained neural network model for prediction analysis of the image to obtain a judgment result of whether the boundary line of the Secchi disk (12) in the image can be distinguished. If the detection result is yes, return to step 2; if the detection result is no, execute step 4; Step 4: The edge terminal device (7) controls the motor (8) to stop rotating; Step 5: The sampled image is input into the positioning ball (11) detection model to calculate the pixel length of the diameter of the positioning ball (11); combined with the pixel length of the diameter calibration of the positioning ball (11) at the initial position, the distance between the positioning ball (11) and the initial position can be calculated according to the perspective transformation principle, which is recorded as Lb1; Step 6: Obtain the length of the cable (5) released according to the grating odometer, denoted as Lw1; Step 7: Calculate the first immersion depth of the Secchi disk (12) into the water, denoted as L1, where L1=Lw1+r-Lb1, and r is the radius of the positioning ball; Step 8: The edge terminal device (7) controls the motor (8) to continuously release the wire for 10 cm and then stops; Step 9: The edge terminal device (7) controls the motor (8) to rotate counterclockwise to drive the driving wheel (3) to retract the cable, slowly lift the Secchi disk (12), and at the same time send the sampled image to the Secchi disk (12) detection model; Step 10: Send the collected frame of image to the trained neural network model for prediction analysis of the image to obtain a judgment result of whether the boundary line of the Secchi disk (12) in the image can be distinguished. If the detection result is yes, return to step 11; if the detection result is no, execute step 9; Step 11: The edge terminal device (7) controls the motor (8) to stop rotating; Step 12: The sampled image is sent to the water surface positioning ball (11) detection model to calculate the pixel length of the diameter of the positioning ball (11); combined with the pixel length of the diameter calibration of the positioning ball (11) at the initial position, the distance between the positioning ball (11) and the initial position can be calculated according to the perspective transformation principle, which is recorded as Lb2; Step 13: Obtain the length of the cable (5) released according to the grating odometer, denoted as Lw2; Step 14: Calculate the first immersion depth of the Secchi disk (12) into the water, recorded as L2, L2 = Lw2 + r - Lb2, r is the radius of the positioning ball; Step 15: Take the average of the two measurements as the final measurement value, recorded as L, L = (L1 + L2) / 2; Step 16: The edge terminal device (7) controls the motor (8) to retract the cable (5) back to the initial position and wait for the next measurement.
2. The method for measuring water transparency based on image recognition according to claim 1, characterized in that: It includes a measuring device, which is divided into a mechanical transmission part, a motion control part, and a calculation and measurement part.
3. The method for measuring water transparency based on image recognition according to claim 2, characterized in that: The mechanical transmission part comprises a column (1), a cross arm (2), a driving wheel (3), a direction-changing wheel (4), a cable (5) and a dust cover (6); the bottom of the column (1) is plugged into a base, the top of the column (1) is welded with a cross arm (2), one end of the cross arm (2) is equipped with a driving wheel (3), the driving wheel (3) is connected to the direction-changing wheel (4) installed on the cross arm (2) through a cable (5), and the dust cover (6) is installed outside the cross arm (2).
4. The method for measuring water transparency based on image recognition according to claim 3, characterized in that: The motion control part comprises an edge terminal device (7), a motor (8) and a limit switch (9); the edge terminal device (7) is electrically connected to the motor (8); the output shaft of the motor (8) is connected to the driving wheel (3); and the limit switch (9) is installed obliquely below the direction-changing wheel (4).
5. The method for measuring water transparency based on image recognition according to claim 2, characterized in that: The motor (8) contains a grating odometer.
6. The method for measuring water transparency based on image recognition according to claim 3, characterized in that: The calculation and measurement part comprises a camera (10), a positioning ball (11) and a Secchi disk (12); the camera (10) is installed at the bottom end of the cross arm (2); the end of the cable (5) away from the driving wheel (3) is connected to the Secchi disk (12); and the cable (5) passes through the aperture of the positioning ball.
