摘要 |
PROBLEM TO BE SOLVED: To prevent false detection in searching a feature point of an object on an epipolar line of a second image, while calculating a distance from a first camera to the object with high accuracy.SOLUTION: An image processing device acquires a first image formed by imaging a workpiece W by a main camera 3a, and a second image formed by imaging the workpiece W by a sub camera 3b having a line of sight different from the main camera 3a. The image processing device searches on an epipolar line EP of the second image, to specify a feature point of the workpiece W on the second image, and calculates a distance L to the workpiece W by stereo method. On the basis of the number of pixels of a feature quantity of the workpiece stored in advance in the storage device and the distance to the workpiece, an approximate value of the distance L between the main camera 3a and the workpiece W is calculated from the number of pixels of the feature quantity of the workpiece in the first image. According to the approximate value of the distance L, a search range for searching a feature point of the workpiece W on the epipolar line EP in the second image is set to be between positions A' and B'. |