摘要
针对牛奶计量中使用的计量瓶测量法存在的问题,提出了一种牛奶液位标定算法。首先将灰度图像利用Bernsen算法二值化;然后求二值图像的水平投影曲线,为了消除随机误差的影响,利用五点三次平滑算法对曲线进行平滑处理;最后通过求曲线极值点,计算出每一对波峰值与波谷值差的序列,找出差值序列中的最大项,最大项中的波峰值对应牛奶的液位。实验结果表明,在不同的光照条件下,算法对反光点和液位进行了很好的区分,能够有效地识别计量瓶中的牛奶液位。
In order to solve problems in measurement method using measurement bottles, a milk liquid-level calibration algorithm is put forward. First, the gray image is converted to a binary image using Bernsen algorithm. Then the horizontal projection curve of the binary image is calculated. In order to eliminate the impact of random error, the cubical smoothing algorithm with five-point approximation is used to smooth the curve. Last the extreme value points of the curve are determined, which calculates the difference sequence of the each pair of wave peak and trough. The largest item in the difference sequence is found. The wave peak of the largest item is milk liquid-level. The ex- perimental result shows that the algorithm has a good distinction between reflex points and liquid level in different lighting conditions. And the algorithm can effectively identify the level of milk bottles.
出处
《中国农机化学报》
北大核心
2014年第1期224-228,共5页
Journal of Chinese Agricultural Mechanization
基金
内蒙古自治区科技计划项目(20090512)--内蒙古自治区奶业生产安全管理服务平台关键技术研究与应用集成
关键词
Bernsen
水平投影
五点三次平滑
牛奶液位标定
Bernsen
horizontal projection
cubical smoothing algorithm with five-point approximation
milk liquid-level calibration