摘要 |
<p>PROBLEM TO BE SOLVED: To provide a key pattern detection method that enables a key pattern to be detected with high accuracy.SOLUTION: A key pattern detection method for detecting a key pattern Pk on a workpiece 11b comprises: a registration step of registering a key pattern image which is formed by photographing a feature point on the workpiece and has the first number of pixels; a workpiece photographing image formation step of photographing a surface of the workpiece and forming a workpiece picked-up image 40b having a field wider than the key pattern image and having the second number of pixels; a threshold value setting step of calculating an average value of a degree of shading to be obtained by dividing a totaled value of a degree of shading of each pixel of the key pattern image and a degree of shading of each pixel of the workpiece picked-up image with a sum of the first number of pixels and the second number of pixels, and setting the average value thereof as a binarization process threshold value; and a binarization process step of performing a binarization process to the key pattern image by the binarization process threshold value set in the threshold value setting step.</p> |