1. Field of the Invention
The present invention relates to a method of, and an apparatus for, measuring the position of a hole, such as a connecting hole which is formed in a workpiece, such as a sub-frame of a motor vehicle, for the purpose of connecting a suspension element.
2. Description of the Related Art
Conventionally, the measuring of the position of a hole is performed in the following manner. Namely, a measuring head which is provided with two cameras disposed such that the optical axes thereof cross at an angle to each other, as well as a spot light source, is mounted on an operating end of a robot. A spot light is irradiated onto a workpiece in a state in which the measuring head is aligned in a predetermined measuring position which lies opposite to the hole. In this state the workpiece is pictured by the two cameras. The position of the center of the hole on a screen of each of the cameras is obtained by image processing, and the position of the center of the hole in the spatial coordinate system is computed by the principle of triangulation.
In the above-described conventional example, that light/dark border portion on the periphery of the hole which appears as a dark portion on the screen of the camera is defined to be a hole edge portion. The center of the hole is obtained based on the position of this hole edge portion. However, the light/dark border portion is likely to become dim or obscure due to the effect of noises, or the like. As a result, the position of the hole edge portion to be detected deviates to thereby cause a measuring error. Further, at least one of the two cameras is operated to picture the workpiece in a slanted or inclined direction. Therefore, in measuring a deep hole, such as a thread hole, the shape of the image to appear on the screen of the camera is distorted due to the reflected light on an inner surface of the hole. As a result, the position of the center of the detected hole deviates to thereby give rise to an error in measuring the coordinates of the center of the hole in the spatial coordinate system.
Furthermore, because the two cameras must be provided, the measuring head becomes large in size. Therefore, the measuring head cannot enter a complicated or congested place of the workpiece, with the result that the measuring of a hole formed in such a place becomes difficult.
In view of the above-described points, the present invention has an object of enabling to measure the position of a hole at a high accuracy as well as to measure a hole formed in a complicated place of a workpiece.