1. Field of the Invention
The present invention relates to a three-dimensional measuring method of measuring a three-dimensional position or pose of a measurement object, and particularly, to a three-dimensional measuring method of using images taken by cameras to measure a three-dimensional position or pose of a measurement object.
2. Description of the Related Art
In general, a method called a stereo method is widely known as a method of imaging a measurement object by cameras to obtain coordinates of a three-dimensional point of the measurement object from taken images. The stereo method is a method of using parallax of cameras to measure a three-dimensional position. The method obtains a corresponding point of a point for measuring the three-dimensional position, on the images taken by two cameras with different viewpoints. The three-dimensional position is calculated by a principle of triangulation based on the corresponding points on the images and based on a known positional relationship between the cameras.
The stereo method is widely utilized in a three-dimensional measurement technique used in production inspection and used by an industrial robot to recognize the measurement object. For example, the stereo method is used to calculate a formula of a three-dimensional line of a line section, such as a straight edge section of the measurement object.
More specifically, if design data of the measurement object is known, the three-dimensional position of the measurement object can be obtained from the design data when the pose of the measurement object is determined by calculating the formulas of the three-dimensional lines of two or more parts of the line sections, such as straight edge sections of the measurement object. Three-dimensional positions of two or more points on the line sections are generally used to calculate the formulas of the three-dimensional lines of the line sections. The stereo method is used to calculate the positions of the points on the line sections.
However, unlike in the calculation of the three-dimensional position of a point-like object, it is difficult to specify a point on a line section of the image taken by the other camera corresponding to a point on a line section of the image taken by one of the cameras.
To detect the corresponding points of the line sections on the image planes, the use of a virtual reference line called an epipolar line is known. The epipolar line is obtained by projecting a line of sight from one of the cameras to an object (for example, a point on a line section of the measurement object) to the image taken by the other camera. It can be stated that the corresponding point to be obtained is on the epipolar line. Therefore, to specify a point on the other image corresponding to a point on the line section on the one of the images, the epipolar line can be drawn on the other image, and an intersection point of the epipolar line and the line section of the other image can be determined as the corresponding point.
However, the epipolar line is projected on image planes as a line where a plane (epipolar plane), which includes the viewpoints of the two cameras and a point of the measurement object, intersects the image planes of the two cameras. Therefore, the slope is unambiguously determined based on the positional relationship between the two cameras. As a result, the epipolar line and the line section overlap in the line section where the slope is parallel to the epipolar line, and the corresponding point cannot be specified.
If the relative angle between the epipolar line and the line section is close to parallel on the image, a detection error of the corresponding point in relation to an error in the detection of the line section on the image exerts a significant influence, and the measurement accuracy may be reduced.
Conventionally, proposed is using an operator for extracting a line section where the relative angle with respect to the epipolar line is close to a right angle to extract only a line section with an enough relative angle with respect to the epipolar line (see Japanese Patent Application Laid-Open No. H05-005609).