To address the issues such as existing water level sensors being susceptible to environmental interference or water quality conditions, and traditional image processing methods having poor adaptability of open channel water level monitoring in irrigation area, a water level line detection method based on the semantic segmentation models and maximum contour detection algorithms is proposed. A segmented reference water level calibration model is established to calculate the water level. Using MobileNetV2 as the backbone network, additional skip connections and CBAM attention modules are introduced to improve the U-Net model and enhance the segmentation accuracy of the water level edge. The maximum contour detection algorithm is combined to extract the water level line, which could effectively eliminate interference factors such as floating objects. To achieve precise conversion from pixel coordinates to actual water level values, a segmented reference water level calibration model is built to obtain the mapping relationship between pixel coordinates and world coordinates. The performance tests of the improved semantic segmentation model were conducted on datasets, while an experimental platform was set up to simulate real irrigation scenarios. Water level images captured by cameras were used for water level calculations. The experimental results show that: 1) Compared to the baseline model, the improved model achieved average intersection-over-union (IoU) improvements of 1.37% and 0.88% on general surface recognition datasets and model test surface recognition datasets, respectively, compared to the baseline model; 2) Using manual observations as the benchmark, the mean absolute error of the water level calculated by the image-based monitoring method was approximately 0.21 cm, with a mean relative error of about 1.0%. The improved model and water level image monitoring method proposed in this study demonstrate excellent adaptability and stability under different channel shapes and materials, as well as various lighting conditions, which can provide a feasible solution for open channel water level monitoring in actual irrigation scenarios.
ZhuL, LuS L, MaG H, LiuP H, WangF P, LeiC M. Intelligent water level meter by the buoy[J]. Transducer and Microsystem Technologies, 2006, 25(6): 52-54 (in Chinese)
LiuC G, ZhaoG, KongL C, FanC Y, FanJ Y. Observation error and test method of digital pressure type water level instrument[J]. Journal of Geodesy and Geodynamics, 2018, 38(1): 97-101 (in Chinese)
ZhangY, ShenQ. Application and discussion of ultrasonic and float type water level gauge in sluice pump station of tidal river[J]. Jiangsu Water Resources, 2017(6): 6-9, 15 (in Chinese)
NieD, ZhangY, LiuY, ShangF, HuangT. Water level measurement method of small reservoir based on image processing[J]. Water Resources and Power, 2019, 37(11): 28-32 (in Chinese)
ZhangZ, ZhouY, WangH B, GaoH M, LiuH Y. Image-based water level measurement with standard bicolor staff gauge[J]. Chinese Journal of Scientific Instrument, 2018, 39(9): 236-245 (in Chinese)
ZhouH, ZhongS D. Research on water level monitoring based on image processing[J]. Semiconductor Optoelectronics, 2019, 40(3): 390-394, 400 (in Chinese)
LiuM H, CheG L, ZhangK, WangJ P, OuyangX. A water level measurement method for indefinite water gauge image[J]. Chinese Journal of Scientific Instrument, 2021, 42(7): 250-258 (in Chinese)
JiangH Y, LiuL H, LiH S. Scene processing methods and technology for image recognition of water level[J]. Water Resources Informatization, 2020(1): 39-43 (in Chinese)
[27]
LinY T, LinY C, HanJ Y. Automatic water-evel detection using single-camera images with varied poses[J]. Measurement, 2018, 127: 167-174
SunY H, DingY, LiD H, XieD H. Research on measuring technique of water level without scale based on image recognition[J]. Hydro-Science and Engineering, 2023(4): 91-97 (in Chinese)
LiuZ Q, LiD X, ZhuD J, CaoL K. Monocular vision-based gaugeless water level measurement[J]. Chinese Journal of Scientific Instrument, 2024, 45(7): 27-37 (in Chinese)
[34]
SteccanellaL, BloisiD D, CastelliniA, FarinelliA. Waterline and obstacle detection in images from low-cost autonomous boats for environmental monitoring[J]. Robotics and Autonomous Systems, 2020, 124: 103346
[35]
ChenJ F, LiaoY T, WangP C. Development and deployment of a virtual water gauge system utilizing the ResNet-50 convolutional neural network for real-time river water level monitoring: A case study of the Keelung River in Taiwan [J]. Water, 2024, 16(1): 158
DingX R, GengY B. Water level detection algorithm featured by a context attention mechanism[J]. Beijing Water, 2024(2): 66-72 (in Chinese)
[40]
RonnebergerO, FischerP, BroxT. U-Net: Convolutional networks for biomedical image segmentation[M]. In:Medical Image Computing and Computer-Assisted Intervention‑MICCAI 2015. Cham: Springer International Publishing, 2015: 234-241
[41]
SandlerM, HowardA, ZhuM L, ZhmoginovA, ChenL C. MobileNetV2: Inverted residuals and linear bottlenecks[C]. In:2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition. Salt Lake: IEEE, 2018: 4510-4520
CaoW Z, WangT G, XuB, FengY K, WangH M. Research on water level detection of ship lock based on semantic segmentation[J]. Chinese Journal of Scientific Instrument, 2023, 44(2): 238-247 (in Chinese)
[44]
ZhouB L, ZhaoH, PuigX, FidlerS, BarriusoA, TorralbaA. Scene parsing through ADE20K dataset[C]. In:2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR). Honolulu: IEEE, 2017: 5122-5130
[45]
LiangY Q, JafariN, LuoX, ChenQ, CaoY P, LiX. WaterNet: An adaptive matching pipeline for segmenting water with volatile appearance[J]. Computational Visual Media, 2020, 6(1): 65-78
[46]
OktayO, SchlemperJ, Le FolgocL, LeeM, HeinrichM, MisawaK, MoriK, McDonaghS, HammerlaN Y, KainzB, GlockerB, RueckertD. Attention U-Net: Learning where to look for the pancreas[EB/OL].2018:1804.03999.
[47]
ZhouZ W, Rahman SiddiqueeM M, TajbakhshN, LiangJ M. UNet++: A nested U-Net architecture for medical image segmentation[C]. In:Deep Learning in Medical Image Analysis and Multimodal Learning for Clinical Decision Support. Cham: Springer International Publishing, 2018: 3-11
[48]
ChenL C, ZhuY K, PapandreouG, SchroffF, AdamH. Encoder-decoder with atrous separable convolution for semantic image segmentation[C]. In:Computer Vision‑ECCV 2018. Cham: Springer International Publishing, 2018: 833-851
[49]
GB/T 50138—2010水位观测标准 [S]. 北京: 中国计划出版社, 2010
[50]
GB/T 50138—2010Standard for stage observation [S]. Beijing: China Planning Press, 2010 (in Chinese)