中文题名: | 基于Kinect相机的苹果外形指标估测方法研究 |
姓名: | |
学号: | 2017814019 |
保密级别: | 公开 |
论文语种: | chi |
学科代码: | 095112 |
学科名称: | 农业信息化 |
学生类型: | 硕士 |
学位: | 农业硕士 |
学校: | 南京农业大学 |
院系: | |
专业: | |
研究方向: | 果蔬品质分级检测 |
第一导师姓名: | |
第一导师单位: | |
完成日期: | 2019-05-24 |
答辩日期: | 2019-05-24 |
外文题名: | Research on apple shape index estimation method based on Kinect camera |
中文关键词: | |
外文关键词: | Apple ; shape index ; point cloud ; Kinect ; 3D measurement ; estimation |
中文摘要: |
水果产业在我国国民经济中占有重要地位。随着人们生活水平的不断提高,各种水果的消费量不断增加,其中,苹果消费量占有很大比例。因此,为了满足人们需求,在如何提高苹果产量的同时,保证苹果品质成为了苹果产业的发展趋势。近年来,计算机技术不断发展,机器视觉、三维点云等技术逐渐成为水果品质检测的研究热点,这些技术的引入使水果品质检测更加标准化、智能化。果实外形指标是果实品质分级的一个重要指标。本文以苹果为研究对象,分别研究了基于彩色图像和基于局部点云的苹果外形指标估测方法,为苹果的外部品质检测提供理论参考,具体研究内容如下: 首先进行苹果外形指标测量、苹果彩色图像及点云数据获取。选取250个陕西红富士作为实验样本,通过游标卡尺获取苹果的高度和直径,采用排水法获取苹果体积,利用电子秤获取苹果质量;通过分析KinectV2相机在不同安装高度下的苹果点云图像,得到相机的最佳安装高度范围为650~750mm,并分别采集650mm、700mm和750mm三个高度下不同角度(顶面、侧面和底部,分别记为角度1、角度2和角度3)的苹果点云数据和苹果彩色图像。 其次,对采集的彩色图像和点云数据进行处理。对采集到的彩色图像进行感兴趣区域选择后得到大小为400×250的只包含黑色背景及苹果的图像后,选取(R-B)颜色因子作为颜色特征,采用Otsu(大津法)阈值分割方法分割图像,利用形态学方法填补果实内部细小孔洞和去除噪点,得到完整的苹果分割图像;采用PLY格式存储原始点云,利用直通滤波法去除点云背景,得到只包含苹果信息的点云数据,经包围盒算法得到精简后的苹果局部点云数据。 在彩色图像处理的基础上,通过彩色图像估测苹果的外形指标。采用最小外接矩形法检测苹果果实,并根据最小外接矩形的长和宽估测苹果的高度和直径。利用该方法估测不同高度下的苹果外形指标,通过数学统计法与线性回归分析估测结果可得:当相机安装在650mm高度时,苹果高度和直径估测结果最好,苹果果实高度估测值与实测值的R2(R-squared,线性拟合度)为0.785,RMSE(Root Mean Square Error,均方根误差)为3.236mm,平均估测误差为3.7mm;苹果直径估测值与实测值的R2为0.933,RMSE为2.03mm,平均估测误差为2.55mm;分别采用SVR(Support Vector Regression, 支持向量回归)和BP(Back Propagation)算法建立苹果体积估测模型,并对不同高度下的苹果体积进行预测。经实验结果分析可知,基于BP神经网络的苹果体积估测模型效果优于基于SVR的苹果体积估测模型,且相机安装高度为750mm时苹果体积估测结果最佳,与实测值的R2为0.926,RMSE为15.37mL,平均估测误差为17.71mL。 在点云数据处理的基础上,通过局部点云估测苹果的外形指标。利用粒子群算法将苹果局部点云和苹果几何模型进行空间匹配,采用遗传算法获取最优匹配模型,并用最优匹配模型的外形指标估测真实苹果的外形指标(高度,两个不同角度的直径,记为直径1、直径2和体积)。采用该方法估测650mm、700mm、750mm三个高度下角度1、角度2、角度3的苹果外形指标,经实验结果分析可得,在相机高度为650mm时,在角度2下获取的苹果点云估测的外形指标结果最好,苹果高度、直径1、直径2、体积与对应实测值的R2分别为0.842、0.933、0.921和0.944,RMSE分别为2.18mm、1.68mm、1.81mm和18.11mL,估测平均误差分为1.69mm、1.34mm、1.49mm和13.28mL。与基于彩色图像的苹果外形指标估测结果进行对比,该方法估测的苹果果实外形指标结果精度更高,高度、直径的估测精度提高了1.06-2.01mm,体积估测精度提高了1.55-4.43mL。 最后,通过局部点云估测的体积对苹果质量进行估测。利用线性回归对点云估测体积与实测苹果质量进行相关性分析,在650mm、角度2时苹果体积估测结果与质量的线性回归R2最高为0.95,在750mm、角度3时,其R2最低为0.87。结果表明,苹果体积估测值与质量之间具有较高的相关性,因此,采用BP算法建立苹果质量估测模型,对高度为650mm、角度2时的苹果质量进行预测,结果的平均误差值为13.82g。 |
外文摘要: |
The fruit industry plays an important role in Chinese national economy. With the continuous improvement of people living standards, the consumption of various fruits is increasing, among which, apple consumption accounts for a large proportion. Therefore, how to improve the apple production while ensuring the quality of apples to meet people needs has become the development trend of the apple industry. In recent years, computer technology has been continuously developed. Machine vision, three-dimensional point cloud and other technologies have gradually become the research hotspots of fruit quality testing. The introduction of these technologies has made fruit quality testing more standardized and intelligent. The fruit shape index is an important indicator of fruit quality grading. Taking apple as the research object, this paper studies the apple shape index estimation method based on color image processing and local point cloud data respectively, which provides a theoretical reference for apple external quality detection. The specific research contents are as follows: First, apple shape indicator had been measured, apple color image and point cloud data acquisition. Apples color images and point cloud data had been acquired. 250 shaanxi red Fuji apples were selected as experimental samples. The height and diameter of apples were measured by vernier calipers. The volume of apples was measured by drainage method, and the quality of apples was measured by electronic scales. By analyzing the apple point cloud images of KinectV2 camera at different installation heights, the optimal installation height range of the camera was obtained as 650~750mm. At the same time, apple point cloud data and apple color images at 650mm, 700mm and 750mm heights at different angles (top, side and bottom, denoted as angle 1, angle 2 and angle 3 respectively) were collected. Secondly, color images and point cloud data are processed. After selecting the region of interest for the collected color image, we select the (R-B) color factor as the color feature, and use the Otsu threshold segmentation method to segment the image. Finally, the morphological processing is used to fill the small holes in the fruit to obtain a complete apple segmentation image. At the same time, we use the PLY format to store the original point cloud, the pass-though filtering method is used to remove the background of the point cloud, and the bounding box algorithm is used to obtain the simplified apple local point cloud data. On the basis of color image processing, apples shape index was estimated by color image. The minimum external rectangle method was used to measure the height and diameter of apple. Through mathematical statistics and linear regression analysis, we can know when the camera is installed at 650mm, the apple height and diameter estimation results are best. The R2 (R-squared) of apple fruit height estimate is 0.785, the RMSE(Root Mean Square Error) is 3.236 mm and the average estimated error is 3.7 mm; The R2 of apple diameter estimate is 0.933, the RMSE is 2.03mm and the average estimated error is 2.55 mm; At the same time, the SVR(Support Vector Regression)and BP(Back Propagation)algorithms are used to establish the apple volume estimation model to predict the apple volume. The experimental results show that the apple volume estimation model based on BP neural network is better than the SVR-based apple volume estimation model, and the apple volume estimation result is the best when the camera installation height is 750mm, its R2 is 0.926 and the RMSE is 15.37mL. The average estimated error is 17.71mL. Based on the point cloud data processing, the apple shape index was estimated by the local point cloud. The particle swarm algorithm was used to spatially match the apple local point cloud and the apple geometric model. The genetic algorithm was used to obtain the optimal matching model, and the shape index of the optimal matching model was used to estimate the shape index of the real apple, such as height, diameter 1, diameter 2 and volume. This method was used to estimate the apple shape index of angle 1, angle 2, angle 3 at three heights of 650mm, 700mm and 750mm. According to the analysis of the experimental results, when the camera height was 650mm, the apple point cloud obtained under angle 2 was estimated to have the best results. The R2 of apple height, diameter 1, diameter 2 and volume were 0.842, 0.933, 0.921 and 0.944, respectively, the RMSE were 2.18mm,1.68mm,1.81mm and 18.11mL, respectively. Their estimated average errors were 1.69mm, 1.34mm, 1.49mm and 13.28mL. Compared with the results of color images, the apple fruit profile index estimated by this method were more accurate, the apple height and diameter estimate were increased by 1.06-2.01mm on average, and the volume estimate was increased by 1.55-4.43mL. Finally, the apple mass was estimated by the volume estimated by the local point cloud. Linear regression was used to analyze the correlation between the estimated apple volume and the measured apple quality. At various angles of different heights, the linear regression R2 of apple volume estimation results and quality was 0.95 and the lowest was 0.87. The results show that there was a high correlation between apple volume estimation and quality. Therefore, the BP algorithm was used to establish the apple weight estimation model, and the minimum average error value of the prediction results at different angles under different heights was 13.82g. |
中图分类号: | TP3 |
开放日期: | 2020-06-30 |