The present invention relates to a technique for measuring a three-dimensional shape of a measurement object, and particularly a measurement object having a mirror surface.
As shown in
When a measurement object is a mirror surface object, the luminance values captured in the images, rather than expressing the feature value of the object surface itself, are determined by reflection of peripheral objects. Therefore, when a mirror surface object is photographed by two cameras 101, 102, as shown in
In a conventional three-dimensional measurement technique for eliminating the effect of an error caused by differences in the positions and characteristics of the cameras, a normal-line map is determined using an illumination difference stereo method, area division is performed using the normal-line map, and associations are formed in each area using average normal values (Patent Literature 1).
Patent Literature 1: Japanese Patent Application Publication No. S61-198015
When a conventional three-dimensional measurement method is applied to a mirror surface object using the luminance value as the feature value, the luminance values of the captured images are affected by differences in the characteristics of the plurality of cameras and the camera arrangement, and therefore errors occur in the pixel associations. When the surface of the measurement object is a mirror surface, this effect increases.
The method described in Patent Literature 1 focuses on the normal line, i.e. information that is unique to the measurement object, and thus errors caused by differences in the arrangement and characteristics of the cameras can be reduced, but an error occurs due to area division. With respect to a measurement object having a smooth continuous surface, such as a sphere, in particular, a surface resolution is roughened by the area division, and therefore the measurement object can only be measured as an angulated three-dimensional shape. Further, when determining associations, a convergence angle of the cameras is assumed to be small and the plurality of cameras are assumed to share an identical coordinate system. Therefore, when the convergence angle is enlarged, the precision of the associations deteriorates due to differences among the normal coordinate systems.
Therefore, one or more embodiments of the present invention provides a technique with which a three-dimensional shape of a mirror surface object can be measured precisely and without being affected by differences in camera positions and camera characteristics.
According to one or more embodiments of the present invention, a three-dimensional measurement apparatus for measuring a three-dimensional shape of a measurement object which is a mirror surface object includes: a plurality of cameras; feature obtaining means for obtaining a physical feature of a surface of the measurement object from respective images captured by the plurality of cameras; corresponding pixel retrieving means for retrieving corresponding pixels of the images captured by the plurality of cameras using the physical feature; and measuring means for performing a three-dimensional measurement on a basis of a parallax between the corresponding pixels.
The reason why errors occur when pixel associations are formed using information relating to a luminance reflected on the surface of a mirror surface object is that the luminance information is not a feature of the surface of the mirror surface object itself, but rather information that varies according to conditions such as peripheral illumination. Hence, in embodiments of the present invention, a physical feature of the surface of the mirror surface object is obtained and pixel associations are formed using this feature, and therefore high-precision matching can be performed without being affected by positions and attitudes of the cameras. As a result, the three-dimensional shape of the measurement object can be measured precisely.
A normal direction of the surface is used as the physical feature of the surface of the measurement object. A spectral characteristic or a reflection characteristic of the measurement object surface may be used instead of the normal. These physical features are all information that is unique to the measurement object, and are not therefore affected by the positions and attitudes of the cameras.
In one or more embodiments of the present invention, coordinate transforming means for transforming coordinate systems of the images captured by the plurality of cameras into a common coordinate system using a transformation parameter are further provided. In this case, the corresponding pixel retrieving means retrieves the corresponding pixels of the images using a normal direction transformed into the common coordinate system by the coordinate transforming means.
By performing matching after implementing coordinate transformation processing for unifying the coordinate systems of the plurality of captured images, the precision of the matching operation does not deteriorate even if a convergence angle of the cameras increases. As a result, the camera arrangement can be determined more flexibly.
Note that the transformation parameter used by the coordinate transforming means is extracted from a parameter obtained during a camera calibration performed in advance.
Further, the corresponding pixel retrieving means according to one or more embodiments of the present invention retrieves the corresponding pixels of the images by comparing the physical feature in an area of a predetermined size including a focus pixel. By performing the comparison including peripheral physical features, the precision of the matching operation can be improved even further.
Note that embodiments of the present invention may be taken as a three-dimensional measurement apparatus having at least a part of the means described above. Embodiments of the present invention may also be taken as a three-dimensional measurement method including at least a part of the processing described above, and as a program for realizing this method. Embodiments of the present invention may be configured by as many combinations the means and processing described above as possible.
According to one or more embodiments of the present invention, a three-dimensional shape of a mirror surface object can be measured precisely without being affected by differences in camera positions and camera characteristics.
Embodiments of the present invention will be described in detail below as examples, with reference to the drawings.
As shown in
Note that the arrangements of the cameras 1, 2 and the illumination apparatuses 3a to 3c described here are merely specific examples, and these arrangements do not necessarily have to be employed. For example, the azimuth angles of the illumination apparatuses do not have to be equal. Further, here, the cameras and illumination apparatuses have identical zenith angles, but the zenith angles thereof may be different.
The surface shape calculation unit 7 is a function unit for calculating a normal direction in each position of the measurement object from the three images captured by each of the cameras 1, 2.
The image input unit 71 is a function unit for receiving input of an image captured by the cameras 1, 2. Upon reception of analog data from the cameras 1, 2, the image input unit 71 converts the received analog data into digital data using a capture board or the like. The image input unit 71 may also receive digital data images using a USB terminal, an IEEE1394 terminal, or the like. Alternatively, the image input unit 71 may be configured to read an image from a LAN cable, a portable storage medium, or the like.
The normal-luminance table 72 is a storage unit that stores correspondence relationships between the normal directions and the luminance values of the images captured while illuminating the three illumination apparatuses 3a to 3c in sequence. Note that the normal-luminance table 72 is prepared for each camera, and in this embodiment, two normal-luminance tables are used in accordance with the cameras 1, 2.
A method of creating the normal-luminance table 72 will now be described with reference to
The normal direction (a zenith angle θ and an azimuth angle φ) and a luminance value (La, Lb, Lc) of each image are then obtained in relation to each position of the table creation images 10a to 10c, whereupon the obtained normal directions and luminance values are stored in association. By associating combinations of the normal direction and the luminance value in all points of the captured images, the normal-luminance table 72 can be created to store combinations of the normal direction and the luminance value in relation to all normal directions.
As shown in
The coordinate transformation unit 8 uses coordinate transformation processing to represent the normal directions calculated from the images captured by the cameras 1, 2 on a unified coordinate system. The normal directions obtained from the images captured by the cameras 1, 2 are expressed by respective camera coordinate systems, and therefore an error occurs when the normal directions are compared as is. This error becomes particularly large when a difference in image pickup directions of the cameras is large.
In this embodiment, the coordinate systems are unified by transforming the normal directions obtained from the images captured by the camera 2, which captures images from an upper diagonal location, into the coordinate system of the camera 1. Note, however, that the coordinate systems may be unified by transforming the normal directions obtained from the images captured by the camera 1 into the coordinate system of the camera 2, or by transforming the normal directions obtained from the images captured by the cameras 1, 2 into a different coordinate system.
As shown in
Further, in a camera calibration performed in advance, a calibration parameter such as the following is obtained.
Note that x1, y1 represent coordinates within the image captured by the camera 1, and x2, y2 represent coordinates within the image captured by the camera 2.
The rotation matrix R is typically expressed as follows.
In Equation 1, pa11, pa12, pa13, pa21, pa22, pa23 are respectively equal to R1
The corresponding point calculation unit 9 calculates corresponding pixels from the two normal images having a unified coordinate system. This processing is performed by determining a normal having an identical direction to the normal of a focus pixel in the normal image of the camera 1 from the normal image of the camera 2. The processing performed by the corresponding point calculation unit 9 will now be described with reference to a flowchart shown in
First, the corresponding point calculation unit 9 obtains two normal images A, B having a unified coordinate system (S1). Here, an image obtained from the surface shape calculation unit 7 is used as is as the normal image A obtained from the image of the camera 1, whereas an image transformed to the coordinate system of the camera 1 by the coordinate transformation unit 8 is used as the normal image B obtained from the image of the camera 2.
Next, an arbitrary pixel in one of the normal images (assumed to be the normal image A here) is selected as a focus point (a focus pixel) (S2). A comparison point is then selected from an epipolar line of the other normal image (the normal image B here) (S3).
A similarity between the focus point of the normal image A and the comparison point of the normal image B is then calculated using a similarity evaluation function (S4). Here, an erroneous determination may occur if the normal directions are compared at a single point, and therefore the similarity is calculated using the normal directions of pixels on the periphery of the focus point and comparison point as well.
The similarity between the focus point and the comparison point is calculated on the basis of an agreement rate of all of the normal directions within the retrieval window. More specifically, an inner product of a normal vector is calculated between the normal images A, B at each point in the retrieval window using a following equation, and the similarity is calculated on the basis of a sum of the inner products (see
The corresponding point is on the epipolar line, and therefore the similarity calculation is performed in relation to pixels on the epipolar line. Hence, after calculating the similarity with regard to one point, a determination is made as to whether or not the similarity calculation processing has been executed in relation to all of the points on the epipolar line, and if a point for which the similarity has not yet been calculated exists, the routine returns to the step S3, where the similarity calculation is performed again (S5).
When the similarity has been calculated in relation to all of the points on the epipolar line, a point having the greatest similarity is determined, whereupon this point is determined to be a corresponding point of the normal image B corresponding to the focus point of the normal image A (S6).
The processing described above is performed on every point of the normal image A subjected to triangulation, and therefore a determination is made as to whether or not the processing has been performed on every point. When an unprocessed point exists, the routine returns to the step S2, where a corresponding point corresponding to this point is retrieved (S7).
Once the corresponding points of the two images have been determined in the manner described above, the triangulation unit 10 calculates depth information (a distance) in relation to each position of the measurement object 4. A well known technique is employed for this processing, and therefore detailed description has been omitted.
<Actions and Effects of this Embodiment>
With the three-dimensional measurement apparatus according to this embodiment, corresponding points between two images are retrieved using a normal direction as a physical feature of the measurement object, and therefore three-dimensional measurement can be performed without being affected by differences in the characteristics and arrangement of the cameras. In conventional corresponding point retrieval processing based on a color (luminance value) of a physical surface, an error increases in a case where the subject surface is a mirror surface, making precise three-dimensional measurement difficult. However, when the method according to this embodiment is used, three-dimensional measurement can be performed precisely even on a mirror surface object.
Further, the corresponding points are retrieved after transforming the different coordinate systems of the plurality of cameras into a common coordinate system using a transformation parameter extracted from a calibration parameter obtained during camera calibration, and therefore three-dimensional measurement can be performed precisely without a reduction in the precision of the associations even if a convergence angle of the cameras is large.
In the above embodiment, the normal direction is calculated from the image captured by the camera 2 by referring to the normal-luminance table, whereupon the coordinate system of the normal image is aligned with the coordinate system of the camera 1 through coordinate transformation. However, as long as the coordinate systems are ultimately unified, other methods may be employed. For example, transformation processing for aligning the coordinate system of the camera 2 with the coordinate system of the camera 1 may be implemented on the normal data stored in the normal-luminance table corresponding to the camera 2. In so doing, normal direction calculation results obtained by the surface shape calculation unit 7 in relation to the image of the camera 2 are expressed by the coordinate system of the camera 1.
In the above embodiment, images are captured by illuminating the three illumination apparatuses 3a to 3c that emit white light in sequence, and the normal directions are calculated from the three images. However, any method of capturing images and obtaining normal directions therefrom may be employed. For example, by setting colors of the light emitted respectively by the three illumination apparatuses as R, G, B, emitting light in these three colors simultaneously, and obtaining an intensity of each component light, similar effects to those described above can be obtained in a single image pickup operation.
In the first embodiment, the normal direction is used as the physical feature of the measurement object surface, but in this embodiment, corresponding points between stereo images are retrieved using a spectral characteristic of the subject.
To measure the spectral characteristic of the measurement object surface, the measurement object is illuminated in sequence by light sources having different spectral characteristics from identical positions. As shown in
Associations are then formed using a spectral characteristic map for each pixel obtained from the plurality of cameras. Subsequent processing is similar to that of the first embodiment.
In this embodiment, corresponding points between stereo images are retrieved using a reflection characteristic as the physical feature of the measurement object surface.
To measure the reflection characteristic of the measurement object surface, a plurality of light sources that emit light from different directions are disposed, and image pickup is performed by the cameras while illuminating these light sources in sequence. Further, similarly to the first embodiment, a sample having a known shape and a known reflection characteristic, such as a sphere, is prepared in advance. Here, a plurality of samples having different reflection characteristics are used, and luminance values of the respective samples under each light source are stored as example data.
The measurement object is then illuminated similarly by the plurality of light sources in sequence, whereby luminance value combinations under the respective light sources are obtained. The luminance values are then combined and compared with the example data to calculate a corresponding reflection characteristic for each pixel.
Pixel associations are then formed between the images captured by the plurality of cameras using a reflection characteristic map for each pixel obtained from the plurality of cameras. Subsequent processing is similar to that of the first embodiment.
Number | Date | Country | Kind |
---|---|---|---|
2008-239114 | Sep 2008 | JP | national |
Filing Document | Filing Date | Country | Kind | 371c Date |
---|---|---|---|---|
PCT/JP2009/066272 | 9/17/2009 | WO | 00 | 6/6/2011 |