论文部分内容阅读
黄花梨是中国的一种重要水果 ,果径和果面缺陷面积是黄花梨分级的两项关键指标。通过研究黄花梨的分光反射特性 ,研制了一套适合黄花梨品质检测的机器视觉系统。为了适应实际生产中水果方向的随机性和水果外形的不规则性的要求 ,使水果尺寸检测的方法有更好的适应性 ,设计了一种利用水果的最小外接矩形 (MER)法求最大横径的方法 ,并进行了试验验证 ,得出了表示实际最大横径与预测最大横径的关系的回归方程式 ,两者的相关系数为 0 .9962。分析了黄花梨缺陷区域的 R、G、B各分量灰度的变化特点 ,利用 R分量灰度和 G分量灰度在缺陷区域和完好区域交界处有明显突变这一特点 ,采用梯度算法求得了可疑缺陷点 ,然后再用区域生长法 ,找出了缺陷点像素的最大连通集及所有的缺陷区域 ;采用像素点变换法 ,实现了根据三维物体的二维投影图像恢复物体表面的真实几何面积的设想 ,大大降低了缺陷面积计算的误差 ;另外 ,还提出了一种新的面积修正方法 ,即用实际缺陷面积等于经像素点变换后的缺陷面积减去缺陷区域周长的一半加上1个像素点的面积来进行修正 ,进一步提高了缺陷面积计算的精度 ,而且该修正方法同样适用于其它图像面积的计算
Huanghua pear is an important fruit in China, fruit diameter and fruit defects area is two key indicators pear classification. By studying the spectral reflectance characteristics of Huanghua pear, a set of machine vision system suitable for the quality inspection of Huanghua pear was developed. In order to adapt to the randomness of fruit orientation and irregularity of fruit shape in practical production, the method of fruit size detection has better adaptability, and a method of using the minimum bounding rectangle (MER) of fruit to find the maximum horizontal Diameter method and verified by experiments. The regression equation which shows the relationship between the actual maximum diameter and the predicted maximum diameter is obtained. The correlation coefficient between the two is 0.9962. The characteristics of the grayscale changes of R, G, B components in the defect region of Huanghua pear were analyzed. By using the gradient algorithm, the grayscale of R component and G component were obviously changed at the interface between the defect region and intact region. Then the region growing method is used to find out the maximum connected set of defective pixels and all the defective regions. By using the pixel point transformation method, the real geometric area of the object surface is restored according to the two-dimensional projection image of the three-dimensional object In addition, a new area correction method is also proposed, that is, the actual defect area is equal to the pixel area after the transformation of the defect area less the length of the defect area plus one half Pixel area to be amended to further improve the defect area calculation accuracy, and the correction method is also applicable to other image area calculation