English

中国农机化学报

中国农机化学报 ›› 2024, Vol. 45 ›› Issue (6): 149-155.DOI: 10.13733/j.jcam.issn.2095-5553.2024.06.023

• 农业信息化工程 • 上一篇    下一篇

基于RGB图像处理预测哈密瓜叶片叶绿素研究

李龙杰1,史勇1, 2,刘彦岑1, 2,郭俊先1, 2   

  1. (1. 新疆农业大学机电工程学院,乌鲁木齐市,830052; 2. 新疆智能农业装备重点实验室,乌鲁木齐市,830052)
  • 出版日期:2024-06-15 发布日期:2024-06-08
  • 基金资助:
    国家自然科学基金面上项目(61367001);新疆维吾尔自治区教育厅自然科学重点项目(XJEDU2020I009)

Research on predicting Hami melon leaf chlorophyll based on RGB image processing

Li Longjie1, Shi Yong1, 2, Liu Yancen1, 2, Guo Junxian1, 2   

  1. (1. College of Electrical and Mechanical Engineering, Xinjiang Agricultural University, Urumqi, 830052, China; 2. Xinjiang Key Laboratory of Intelligent Agricultural Equipment, Urumqi, 830052, China)
  • Online:2024-06-15 Published:2024-06-08

摘要:

为提高植物叶绿素检测设备的普遍性和实用性,通过研究手机和单片机拍摄的RGB图像与植物叶片叶绿素含量有无拟合关系,以图像处理的方式进行叶绿素预测的相关试验,为将来基于深度学习的植物叶绿素动态无损检测提供试验依据。通过OpenCV对图像提取感兴趣区域(RoI),并进行均值滤波、高斯滤波和中值滤波,对原图和三种滤波后的图像进行三通道颜色特征分离,利用最小二乘法(LS)将颜色特征参数的多种组合与叶绿素实测值进行拟合分析,发现4种图像中均值滤波的拟合效果都普遍较好。在均值滤波中,手机K40拍摄的图像存在(B-G-R)/(B+G)特征组合与叶片叶绿素拟合决定系数为0.912。单片机ESP32_CAM拍摄的图像存在(G-B)B/(R+G)特征组合与叶片叶绿素拟合决定系数为0.778。运用梯度运算将均值滤波的RoI进行迭代处理,发现K40的决定系数略微下降,ESP32_CAM的决定系数出现好转。通过对K40与ESP32_CAM进行预测模型验证,两者都表现为随机森林(RF)回归模型的性能最好,在K40中训练集决定系数为0.953、训练集均方根误差为1.161,预测集决定系数为0.930、预测集均方根误差为1.516,在ESP32_CAM中训练集决定系数为0.794、训练集均方根误差为2.510,预测集决定系数为0.695、预测集均方根误差为2.985。

关键词: 哈密瓜, 叶绿素, RGB图像, 图像识别, 回归预测

Abstract:

In order to improve the universality and practicality of plant chlorophyll detection equipment, this study investigates whether there is a fitting relationship between RGB images captured by mobile phones and microcontrollers and the chlorophyll content of plant leaves. The purpose is to determine the relevant experiments that can predict chlorophyll through image processing, providing experimental basis for future dynamic nondestructive detection of plant chlorophyll based on deep learning. By using OpenCV to extract the region of interest (RoI) from the image and applying mean filtering, Gaussian filtering, and median filtering, the original image and the three filtered images are subjected to threechannel color feature separation. The least squares method (LS) is used to perform fitting analysis on various combinations of color feature parameters and measured chlorophyll values. It is found that the fitting effect of mean filtering is generally better among the four types of images. In mean filtering, the image captured by the mobile phone K40 has a feature combination of (B-G-R)/(B+G) with a coefficient of determination of 0.912 for fitting the leaf chlorophyll. The image captured by the microcontroller ESP32_CAM has a feature combination of (G-B)B/(R+G) with a coefficient of determination of 0.778 for fitting the leaf chlorophyll. By applying gradient operation to iteratively process the RoI of mean filtering, it is found that the coefficient of determination of K40 slightly decreases, while the coefficient of determination of ESP32_CAM improves. Through the verification of prediction models for K40 and ESP32_CAM, both show that the random forest (RF) regression model performs the best. In K40, the coefficient of determination for the training set is 0.953, the root mean square error for the training set is 1.161, the coefficient of determination for the prediction set is 0.930, and the root mean square error for the prediction set is 1.516. In ESP32_CAM, the coefficient of determination for the training set is 0.794, the root mean square error for the training set is 2.510, the coefficient of determination for the prediction set is 0.695, and the root mean square error for the prediction set is 2.985.

Key words: Hami melon, Chlorophyll, RGB image, image recognition, regression forecasting

中图分类号: