提出基于Lab颜色模型的蛋鸡与背景自动分割方法和基于极限腐蚀和凹点搜寻的粘连蛋鸡分离与计数算法。实验前期将通过计算机视觉系统获取的RGB图像转换成Lab图像,每张图像中均选取蛋鸡及最接近蛋鸡颜色的背景2个小样本区域,分别计算这两类区域在。、b分量的数学期望作为分割阈值。随后将采集的图像像素聚类于与n、b分割阈值的欧氏距离最小的区域,从而实现蛋鸡与背景区域的自动分割。针对经常出现的蛋鸡群聚造成蛋鸡个体之间相互粘连的情况,研究利用改进的极限腐蚀及凹点搜寻处理算法分离出独立的蛋鸡并正确计数。108幅蛋鸡图像识别结果表明,该算法能将蛋鸡个体从复杂背景中有效提取、计数和粘连分离,蛋鸡计数正确率为93.5%,综合分离正确率为89.8%。
The Lab color model was selected as the segmentation color space. The developed system was able to classify each pixel by calculating the smallest Euclidean distance between the pixel and a set of color markers. The RGB images were taken at an early stage of the experiment, and then converted to Lab images. Small regions, which include some regions from the background and the hens, were chosen. The average color of each region was calculated to segment the hen and the background. For automatically separating overlap hens and counting the number of hens in group-housed environments, an algorithm based on ultimate erosion and concavity seek was used to provide the most accurate results. With the results of 108 images, it showed that the algorithm was able to achieve an accuracy of 93.5% for counting the number of hens in image, and an accuracy of 89.8% under conglutination condition.