针对一款手机U盘芯片的二维尺寸的测量问题,提出运用图像处理的方法,实现手机U盘芯片长度和偏角的非接触式测量;通过COMS工业相机采集到U盘芯片的背光图像,在边缘检测的基础上,用Hough变换检测和定位U盘芯片边缘直线;针对在一条边上Hough变换对应检测到多条直线的情况,提出采用直线参数平均法拟合边缘直线,从而获得较精准的边缘位置;通过对已知尺寸的标准块进行相机标定,由此计算出精确的U盘芯片的尺寸和倾斜角度;实验表明:该算法能够满足工程上较高精度的检测要求。
In this paper, for two dimensional size and angle of mobile U disk. an image processing methods was presented. It realized a non-contact measurement of the length and angle on mobile U-disk. Based on edge detection, it adopted Hough transformation to detect and locate the straight edge line of Usb chip through the backlighting image of Usb chip photographed by the COMS industrial camera. In the case that Hough transformation might detect to multiple straight lines on one straight edge. The method of linear parameter on average to fit the edge of a straight line was presented, so as to obtain accurate edge positions. Through the known size block for camera calibration, we can calculate the exact size and the angle of inclination of the Usb chip. The experimental results show that this algorithm can meet the de- tection requirements for higber accuracy in engineering.