Li Jiadong, Tong Chunya, Yuan Hongxing, Huang Wennan
School of Cyber Science and Engineering, Ningbo University of Technology, Ningbo 315211, China.
School of Electronic and Information Engineering, Ningbo University of Technology, Ningbo 315211, China.
Sensors (Basel). 2024 Aug 13;24(16):5235. doi: 10.3390/s24165235.
The existing methods for water-level recognition often suffer from inaccurate readings in complex environments, which limits their practicality and reliability. In this paper, we propose a novel approach that combines an improved version of the YOLOv5m model with contextual knowledge for water-level identification. We employ the adaptive threshold Canny operator and Hough transform for skew detection and correction of water-level images. The improved YOLOv5m model is employed to extract the water-level gauge from the input image, followed by refinement of the segmentation results using contextual priors. Additionally, we utilize a linear regression model to predict the water-level value based on the pixel height of the water-level gauge. Extensive experiments conducted in real-world environments encompassing daytime, nighttime, occlusion, and lighting variations demonstrate that our proposed method achieves an average error of less than 2 cm.
现有的水位识别方法在复杂环境中常常存在读数不准确的问题,这限制了它们的实用性和可靠性。在本文中,我们提出了一种新颖的方法,该方法将改进版的YOLOv5m模型与上下文知识相结合用于水位识别。我们采用自适应阈值Canny算子和霍夫变换对水位图像进行倾斜检测和校正。使用改进的YOLOv5m模型从输入图像中提取水位计,然后使用上下文先验对分割结果进行细化。此外,我们利用线性回归模型根据水位计的像素高度预测水位值。在包含白天、夜间、遮挡和光照变化的真实环境中进行的大量实验表明,我们提出的方法平均误差小于2厘米。