Resumen
The current template-matching algorithm can match the target workpiece but cannot give the position and orientation of the irregular workpiece. Aiming at this problem, this paper proposes a template-matching algorithm for irregular workpieces based on the contour phase difference. By this, one can firstly gain the profile curve of the irregular workpiece by measuring its radius in orderly fashion and then, calculate the similarity of the template workpiece profile and the target one by phase-shifting and finally, compute the rotation measure between the two according to the number of phase movements. The experimental results showed that in this way one could not only match the shaped workpiece in the template base accurately, but also accurately calculate the rotation angle of the irregular workpiece relative to the template with the maximum error controlled within 1%.