在线检测技术具有避免多次装夹、检测效率高等优点。本文对数控工具磨床加工可转位刀片的过程采用在线、非接触式的方法对刀片装夹后进行中心定位与尺寸检测。即采用背光源的方式拍摄刀片图像,通过HAlCOn提供的EdgE算子提取刀片图像边缘。并利用ArEA算子获得中心坐标,最后计算获得所需要的刀片尺寸信息。根据刀片中心坐标与尺寸参数,获取加工余量,进而实现刀片的高精度磨削加工。On-line detection technology has many advantages such as avoiding multiple clamping,high detection efficiency,etc.In this paper,the numerical control tool grinder process of indexable insert adopts the on-line and non-contact method to test center location and size after the blade is clamped,namely adopts the way of back light to shoot the image of the blade,extracts image edge by the edge operator provided by Halcon,uses the area operator to get the center coordinate and finally calculates for the blade size information you need.According to the blade center coordinate and size parameters,machining allowance is obtained,thus achieving high accuracy of blade grinding