欢迎访问《中国农学通报》,

中国农学通报 ›› 2015, Vol. 31 ›› Issue (35): 236-244.doi: 10.11924/j.issn.1000-6850.casb15080012

• 农业科技信息 • 上一篇    下一篇

基于OpenCV的Android手机植物叶片几何参数测量系统

徐义鑫,李凤菊,王建春,花登峰,张雪飞,吕雄杰,钱春阳   

  1. 天津市农业科学院信息研究所,天津市农业科学院信息研究所,天津市农业科学院信息研究所,农业部农业机械化技术开发推广总站,天津市农业科学院信息研究所,天津市农业科学院信息研究所,天津市农业科学院信息研究所
  • 收稿日期:2015-08-03 修回日期:2015-11-17 接受日期:2015-08-19 出版日期:2015-12-18 发布日期:2015-12-18
  • 通讯作者: 王建春
  • 基金资助:
    天津市农业科学院院长基金项目“基于智能手机的黄瓜田间数据采集分析系统”(15013)

OpenCV-Based Measurement System for Plant Leaf Geometry Parameters Using Android Mobile Phone

  • Received:2015-08-03 Revised:2015-11-17 Accepted:2015-08-19 Online:2015-12-18 Published:2015-12-18

摘要: 通过Android 手机对植物叶片图像进行处理以测量其长、宽、周长、面积等几何参数,避免其他测量方法的缺点,提高数据采集效率。首先,获取含有已知尺寸矩形框的叶片图像。然后,对图像进行校正以消除倾斜失真。在校正阶段,采用了更为鲁棒的特征点检测法代替可能出现错误结果的Hough 变换法来处理矩形框,得到其4 个角点。根据求得的角点与标准图像的角点对图像进行映射得到校正图像。最后,处理校正图像计算叶片几何参数。参数计算提出以叶片轮廓为基础的方法,所有参数均通过对轮廓的处理求出,提高了计算效率。此外,基于轮廓求面积不需要对叶片进行形态学处理消除空隙及不连续,还可避免统计像素方法中将噪声像素误认为叶片造成的计算不精确。在求叶片长、宽时,给出了2 种方法供用户根据叶片实际形状选择。另外,在编程方面,采用了OpenCV-Android-SDK,大幅提高了图像处理速度。结果表明,精确度测试中,对打印出的规则图形几何参数测量的结果误差均在2%以内;而实际叶片的测量结果中长、宽的误差在2%以内,周长误差小于4%,面积误差低于3%。耗时测试中,相同图像处理算法采用OpenCV后,处理速度明显提升;对多部不同配置手机的测试中,处理1 幅分辨率为2448×3264 的叶片图像的耗时均在3 s 以内。另外,对于同一叶片图像,不同手机测量的结果完全一致。实验表明,该系统不仅操作简单、速度快、通用性强,而且对叶片几何参数的测量精确度也较高。

关键词: 建设用地, 建设用地, 多元回归分析, BP神经网络, 行为金融学

Abstract: The study aims to use Android mobile phone to measure the plant leaf geometry parameters, including length, width, perimeter, area, etc., to avoid the weakness of other methods and improve the data collection efficiency. Firstly, the authors obtained the image of leaf and a known size rectangular box. Then, the image correction was conducted to eliminate the distortion. In the correction step, a more robust method of detecting the feature points was used instead of the method of Hough transform to process the rectangular box and got its 4 corner points. According to these points and the corner points of the standard image, the authors mapped the matrix to make the image correction. Finally, the authors calculated the leaf geometry parameters by processing the corrected image. The parameters were calculated based on the leaf contour. There were 3 advantages of using contour: it can avoid the phenomenon of mistaking noise pixels for leaf pixels in the counting pixels method; morphological processing which was used for eliminating the gap and discontinuity of leaf would not be necessary; it was convenient to obtain the geometry parameters because all of them were calculated based on the contour. And there were 2 methods that users could choose to calculate the length and width. In addition, the OpenCV-Android-SDK was used in programing which could process image fast. The results showed that: in the accuracy test, the measurement error of printed regular shape geometry parameters was less than 2%; and in the measurement of real leaves, the error of length and width were less than 2%, the error of perimeter was under 4% and the error of area was below 3%. In the accuracy test, it was faster by using OpenCV in the same image processing algorithm. In test of several phones of different configurations, all phones processed a 2448×3264 resolution leaf image within 3 seconds. Moreover, for the same image, different phones had the same measurement results. The experiment results showed that this system not only had the advantages of easy operation, fast speed, strong universality, but also had a high accuracy on the measurement of leaf geometry parameters.

中图分类号: