| Machine vision technology has broad application prospects in the industrial automation manufacturing process, such as automated welding, sorting, assembly, quality inspection, etc. Visual localization is a very important direction of research of machine vision technology. The core algorithm of visual localization module is mainly designed by referencing the principle of image registration. More specifically, it is using the geometric transformation between the template and target image. Image registration technology is widely used in many fields. In recent years, the line feature based method is a hot research topic because of the small amount of data and the easy line feature extraction. Domestic research of machine vision technology started later, and the results has a little practicability. Most domestic company are using the foreign commercial algorithm library, leading to high development costs. In order to get rid of the dependence on foreign technology, it is necessary to study the key techniques and methods in machine vision.In the light of requirements of the industrial automation manufacturing process to the visual localization module, this paper selected the method based on contour, and proposed a high precision and efficiency method based on contour polygon fitting, to locate the work piece on the target image by solving template and target image geometric transformation model. By analyzing the characteristics of common contour extraction method, considering the actual scene image quality and processing speed and accuracy, the method based on mathematical morphology was adopted. Then the contour is simplified by polygon fitting, and the key information of polygon is described using statistical theory to calculate the similarity between the template and target contour polygon. After contour matching, the vertices of templates and target contour polygon are used to solve the geometric transformation model, and the optimized registration parameters model can be applied to visual localization.Through the simulation visual localization experiments, the results show that the localization accuracy and processing speed can meet the basic requirements of actual localization module. |