摘要:针对当前工件检测中,工件表面缺陷检测存在处理速度慢的问题,设计出一种具有高速互联总线的SocFPGA架构解决方案。首先将图像数据灰度化、中值滤波、自适应阈值分割以及形态学操作,消除图像中的污损部分,凸显缺陷像素。其次,利用像素阈值算法与投票算法,标注了图像表面缺陷位置。最后,采用铜板试样并结合OV5640摄像头,搭建了一套工件表面缺陷检测系统。测试表明,当缺陷直径不小于0.5mm,缺陷检出率约为90.24%,处理1帧图像的时间约为0.62μs,实现了工件表面缺陷图像的实时在线检测,为该领域研究提供一定的参考。