Abstract:There are many types of optical lenses, and there are many objects to be tested on each type of lens. Traditional image processing methods have low measurement accuracy and poor adaptability to multiple types of workpieces. In response to the above problems, an optical lens measurement method based on machine vision is now proposed. Firstly, the corner points of the workpiece are located based on the improved Harris corner point detection. Secondly, the geometric primitives between the corner points are fitted by the least square method. Finally, the index information of the template size of each type of target is extracted, and the geometric basis is measured. The size between yuan. The experimental results show that this method can not only target a variety of workpieces, but also can perform high-precision measurement on workpieces with burr edges. By comparing the deviation of the measurement in this paper with that of the Keyence three-dimensional measuring instrument, the paper is obtained by analyzing the deviation and calculating the mean square error. The accuracy of the method is ±0.02mm, and the mean square error of the repeated measurement deviation is within 0.01mm.