目的:针对平板茧检测自动化程度低,识别效率不高等问题,提出一种基于局部阈值分割的平板茧表面印痕提取算法。方法:首先采用Canny算子提取图像边缘后进行膨胀处理获取平板茧表面印痕感兴趣区域(region of interest,ROI)。其次将ROI作为掩码统计平板茧原图对应区域的像素值均值,利用该均值与波动幅值设置局部分割阈值寻找平板茧印痕区域边缘。最后通过形态学处理与轮廓填充得到蚕茧表面完整印痕图像。结果:算法在主观表现评估与客观评价指标方面均有较好的提取效果,平均交并比mIOU与Dice系数分别达到86。42%、92。08%。结论:算法对平板茧的高精度辨别具有重要意义。
Research on flat cocoon surface mark extraction algorithm based on local threshold segmentation algorithm
Aims:A flat cocoon surface mark extraction algorithm based on local threshold segmentation was proposed to improve the efficiency the flat cocoon automation detection and recognition.Methods:After the extraction of image edges by using the Canny operator,the images were performed with dilation to obtain the region of interest(region of interest,ROI))on the surface imprint of flat cocoons.The ROI was used as a mask to count the mean value of the pixel value in the corresponding region of the original image of the flat cocoon;and the mean value and the fluctuation amplitude were used to set the local segmentation threshold to search for the edges of the region of the flat cocoon imprint.The overall imprint image of the silkworm cocoon surface was obtained through morphological processing and contour filling.Results:The algorithm had good extraction performance in both subjective and objective evaluation indicators,with an average intersection to union ratio(mIOU)of 86.42%and a Dice coefficient of 92.08%,respectivelys.Conclusions:The algorithm is of great significance for high-precision discrimination of flat cocoons.