1. Technical Field
The present invention relates to a technique of measuring the profile of a surface or surface normals of a measuring object.
2. Related Art
A technique of using color information and a technique of using luminance information are conventionally known as a technique of measuring a normal profile of a measuring target.
A color highlight method is known as a technique of measuring the normal profile using the color information. As shown in
An illuminance difference stereo method is known as a technique of measuring the normal profile to be measured using the luminance information. As shown in
In the color highlight method using color features, an object whose reflectance property is not uniform cannot be measured. Furthermore, the measurement accuracy decreases due to color mixture of the reflected light when an imperfect mirror surface (that includes a specular lobe) is used even if the reflectance property is uniform. The term specular lobe here indicates spread of specular reflection caused by concave-convex microsurface, called microfacet, on the measurement surface. The larger the direction variance of the microfacet is (the rougher the surface is), the wider the specular lobe is. Conversely, small direction variance of microfacet means that the surface is mirror-like one.
In the illuminance difference stereo method using the luminance information, the object whose reflectance property is uniform can be measured other than the perfect mirror surface, but the accuracy in normal calculation decreases if the reflectance property is not uniform since the luminance value varies depending on the reflectance property. The accuracy in the normal calculation decreases even if the object has uniform reflectance property when the reflectance properties of the object (reference object) used in creating a table and the measuring object are different.
One or more embodiments of the present invention provides a technique capable of calculating, with satisfactory accuracy, the normal information (XYZ component of unit vector, or zenith angle component and azimuth angle component) even for a measurement target in which the reflectance property is not uniform, or in which the reflectance property is uniform but the reflectance property itself differs from the reference object.
In one or more embodiments of the present invention, a lighting device having a distribution in which a radiance of a reflected light when a measuring target having arbitrary reflectance property is irradiated with light becomes the same as a radiance in the perfect mirror surface. In other words, a lighting device that can handle the target which contains specular lobe similar to the perfect mirror surface when a measuring target is photographed under such lighting is used.
A profilometer for measuring a surface profile of a measuring target according to one or more embodiments of the present invention includes a lighting device for irradiating the measuring target with light, an imaging device for imaging a reflected light from the measuring target, and a normal calculation means for calculating a normal direction of a surface at each position of the measuring target from an imaged image, where the lighting device has the following features.
In order for the lighting device to have the above features, the lighting device merely needs to have a light source distribution in which a radiance of center of gravity of the light source distribution of a point symmetric region coincides with a radiance of the center of the point symmetric region for an arbitrary point symmetric region of the light emission region.
Assuming the light source distribution in the light emission region of the lighting device is Li(p, θ, φ), the radiance (camera luminance value) Lr(p, θr, φr) at position p on surface can be generally expressed as below with the reflectance property of the object surface as f(p, θi, φi, θr, φr).
L
r(p,θr,φr)=∫∫ΩLi(p,θi,φi)·f(p,θi,φiθr,φr)cos θi sin θidθidφi (1)
Here, Ω is a solid angle of a hemispherical surface.
In particular, if the object surface is a perfect mirror surface, the radiance Lr can be expressed as below.
L
r(p,θr,φr)=Li(p,θis,φis+π) (2)
Here, in an arbitrary region (range of light source distribution) Ω(θis, φis) internally including (θis, φis), the object can be handled as a perfect mirror surface, even with respect to an object whose target surface is an imperfect mirror surface, by using a light source distribution Li(p, θ, φ) that satisfies the right side of the equation (1)=the right side of the equation (2).
However, it is analytically difficult to obtain the light source distribution Li(p, θ, φ) that precisely satisfies the right side of the equation (1)=the right side of the equation (2). Thus, consider the light source distribution Li(p,θ,φ) in which the right side of the equation (2)—the right side of the equation (1) becomes a sufficiently small value.
A specific example of an approximation solution satisfying the above condition includes a light source distribution in which the light source distribution linearly changes with respect to the longitude, assuming a sphere in which the measuring target is at the center and both poles are on a plane including the measuring target. Another example is a light source distribution in which the light source distribution linearly changes with respect to the latitude. Another further example is a light source distribution in which the light emission region has a planar shape, and which linearly changes on the plane thereof.
Such light source distributions are the approximate solutions for (1)=(2), where even the object whose target surface is an imperfect mirror surface can be handled as if the target is a perfect mirror surface by using such lighting device.
It is preferable to use the light source distribution that satisfies the above condition, and in which a plurality of light source distributions different from each other is overlapped. A normal vector of a target in plurals and with different reflectance property thus can be uniquely calculated with the same degree of freedom as the number of overlapped light sources
According to one or more embodiments of the present invention, a surface profile measurement method includes some of the above-described processes, and one or more embodiments of the present invention includes a program for realizing such a method. The above-described means and processes can be respectively combined to each other as much as possible to configure one or more embodiments of the present invention.
According to one or more embodiments of the present invention, the normal information (XYZ component of unit vector, or zenith angle component and azimuth angle component) can be calculated with satisfactory accuracy even on a measuring target in which the reflectance property is not uniform, or in which the reflectance property is uniform but which reflectance property itself differs from the reference object.
Preferred embodiments of the invention will now be illustratively described in detail with reference to the drawings.
A profilometer (normal measurement device) according to a first embodiment is used as one part of a three-dimensional measurement device for performing a three-dimensional measurement of a mirror surface object. As shown in
If the measuring target is a mirror surface object, the luminance value photographed in the image does not represent the feature quantity of the object surface itself, but is determined by the reflection of the surrounding object. Therefore, when the mirror surface object is photographed with two cameras, as shown in
The cause of such error is that the luminance information reflecting on the surface of the mirror surface object is not the feature of the surface itself of the mirror surface object. That is, in order to correctly perform the three-dimensional measurement, the correspondence of the pixel between the imaged images needs to be examined focusing on the feature of the surface of the mirror surface object. The direction of the normal vector can be used for the feature of the surface of the mirror surface object. Thus, in the three-dimensional measurement device according to the present embodiment, the three-dimensional measurement is performed focusing on the direction of the normal line of the object surface.
The computer 6 functions as a surface profile calculation unit 7, a coordinate transformation unit 8, a correspondence point calculation unit 9, and a triangulation unit 10, as shown in
The images photographed by the cameras 1, 2 are respectively input to the surface profile calculation unit 7. The surface profile calculation unit 7 calculates the direction of the normal line at each position of the photographed measuring target 4. The details of the calculation process of the normal direction will be hereinafter described in detail.
The coordinate transformation unit 8 performs a coordinate transformation process of aligning the direction of the normal line calculated from the image photographed by the camera 2 to the coordinate system of the camera 1. The positional relationship of the cameras 1, 2 is adjusted in calibration performed prior to the measurement. A transformation matrix for transforming from the coordinate system of the camera 2 to the coordinate system of the camera 1 is obtained from the parameters acquired in the calibration.
The correspondence point calculation unit 9 calculates the corresponding pixel from two normal images, which coordinate systems are unified. This process is performed by obtaining the normal line of the same direction as the normal line at the focusing pixel in the normal image of the camera 1 from the normal image of the camera 2. In this case, the corresponding pixel exists on an epipolar line, and thus the relevant line merely needs to be searched. When searching for the pixel having the normal line of the same direction, the pixel having the highest similarity is searched using not only the information on only one focusing pixel but also information on the surrounding pixels thereof. The similarity can be obtained using a 7 pixel by 7 pixel window having the focusing pixel as a center with the position at where the direction of the normal lines matches the most as the correspondence pixel.
After the correspondence point in two images is obtained in the above manner, the depth information (distance) is calculated for each position of the measuring target 4 by the triangulation unit 10. This process is a known technique, and thus detailed description will be omitted.
<Surface Profile Measurement>
A process of calculating the surface profile (normal) of the measuring target 4 will now be described in detail.
[Lighting Device]
First, a configuration of a device for measuring the surface profile will be described. As shown in
In the present embodiment, a configuration of using two cameras is adopted since the surface profile is measured for three-dimensional measurement, but only one camera may be arranged as shown in
The lighting device 3 has a dome-shape as shown in the figure, and the entire dome shape is the light emission region. Such lighting device 3 can be configured by, for example, a dome-shaped color filter and a light source for radiating white light from the exterior thereof. Furthermore, a configuration in which a plurality of LED chips is arrayed on the inner side of the dome to radiate light through a diffusion plate may be adopted. A liquid crystal display, an organic EL display, and the like may be formed to a dome shape to configure the lighting device 3.
The profile of the light emission region of the lighting device 3 is preferably a hemispherical dome-shape such that light can be radiated from all directions of the measuring target. The normal line in every direction thus can be measured. However, as long as the shape is such that light is radiated from a position corresponding to the normal direction to be measured, the shape of the light emission region may be of any shape. For instance, if the direction of the normal line of the surface is limited to substantially the vertical direction, the light does not need to be radiated in the horizontal direction (from direction of shallow angle)
The light emission at each position of the light emission region of the lighting device 3 is set to emit light of spectral distribution different at all positions. For instance, when light emission is realized by synthesizing light components of three colors of red light (R), green light (G), and blue light (B), the light emission intensity of each component of RGB is changed with respect to different directions on the dome as shown in
Through the use of the lighting device 3 having such light source distribution, the surface profile (normal) can be measured even with respect to the measuring target 4 in which the reflectance property is not uniform. Specular lobe occurs when the surface of the measuring target 4 is an imperfect mirror surface. Therefore, the reflected light of the light entered to the object surface includes sharp and narrow light (specular spike) in the regular reflection direction and faintly spread light (specular lobe) in the direction shifted from the regular reflection direction, as shown in
With the presence of spread of the lobe, the luminance value in the photographed image is subjected to influence of not only the light from the light emission region corresponding to the regular reflection direction of the object, but also the light from the periphery thereof. For instance, if a stripe-form lighting is projected as shown in
In this case, if the light from the periphery is canceled and color feature (R/(R+G) etc.) similar to the case of perfect mirror surface is maintained, it can be handled similar to as if performing the measurement with the object of perfect mirror surface as the target. The following description describes canceling the influence of light from the periphery by using the lighting pattern in the present embodiment to thereby enable photography of the image having a color feature similar to the case of the perfect mirror surface.
As shown in
Therefore, the radiation illuminance dEi(p, Ω) to point p by the light entering from the small solid angle dωi can be expressed as below.
Therefore, the radiance Lr(p, θr, φr) from point p to (θr, φr) can be expressed as below using the reflectance property f of the object surface.
Here, Ω of the integral range represents the solid angle on the hemispherical surface, that is, the range of the light source distribution.
If the object surface is a perfect mirror surface, the radiance is expressed as below.
L
r(p,θr,φr)=Li(p,θis,φis+π) (2)
Here, (θis, φis) represents the regular reflection direction from position p in the (θr, φr) direction.
Here, in an arbitrary region (range of light source distribution) Ω(θis, φis) interiorly including (θis, φis), the target can be handled as if the target is the mirror surface even if the target surface is not a mirror surface considering the light source distribution Li(p, θi, φi) satisfying the right side of the equation (1)=the right side of the equation (2). That is, the spectral characteristic in the regular reflection direction is always detectable even if the reflectance property of the measuring target changes. The light source distribution satisfying the right side of the equation (1)=the right side of the equation (2) can be expressed as being the light source distribution in which the radiance of the center of gravity of the light source distribution of a point symmetric region coincides with the radiance of the center of the point symmetric region in an arbitrary point symmetric region on the light emission region.
Since such light source distribution Li(p, θi, φi) is difficult to derive analytically, it is realistic to use approximation solution. The pattern (
The canceling out of the influence of the specular lobe (diffuse reflection) by the lighting pattern in which the luminance linearly changes with respect to the longitude direction as shown in
The equatorial direction is the direction most ideal effects are obtained. In other directions, the linearity described above is broken and in a narrow sense, the influence of the diffuse reflection (specular lobe) cannot be canceled out, but the influence of the diffuse reflection can be removed in a range not posing practical problems.
The periphery of the lighting region is blurred between a case in which the mirror surface object is irradiated with the lighting of the present embodiment as shown in
As described above, through the use of the lighting device 3 according to the present embodiment, the target can be handled the same way as the perfect mirror surface object irrespective of the reflectance property of the measuring target. The lighting pattern of the lighting device 3 combines patterns in which RGB gradually changes in different directions, as shown in
[Normal Calculation Section]
The details of the surface profile calculation process will be described below while describing the surface profile calculation unit 7 in the computer 6.
The image input section 71 is a function section for accepting the input of images photographed by the cameras 1, 2. When receiving the analog data from the cameras 1, 2, the image input section 71 converts the analog data to digital data. The image input section 71 may receive image of digital data by USB terminal, IEEE 1394 terminal, and the like. In addition, a configuration of reading images from a portable storage medium through a LAN cable may be adopted.
The feature quantity calculation section 72 calculates the feature quantity related to the spectral component of the reflected light for each pixel reflecting the measuring target 4 from the input photographed image. In the present embodiment, the lighting device 3 projects light combining three component lights of red light (R), green light (G), and blue light (B), and thus the ratio of each component of RGB is used for the feature quantity. For instance, for each component of RGB, the combination of (R, G, B) is set as the feature quantity after normalizing the maximum luminance at one. The ratio of another color with respect to a certain color (here, G) such as the combination of the values of R/(R+G), B/(B+G) and G may be set as the feature.
As described above, the color of the measuring target 4, that is, the feature quantity calculated by the feature quantity calculation section 72 correspond to the direction of the normal line at one to one. The normal line—feature quantity table 73 is a storage section for storing such correspondence relationship. The normal line—feature quantity table 73 can be created by performing photography using the lighting device 3 and the cameras 1, 2 on an object which shape such as perfect sphere is known, and examining the correspondence relationship between the normal line and the feature quantity in advance. For instance, when using an object of a perfect sphere, the direction of the normal line can be obtained through calculation by examining the position from the center of the focusing pixel. The correspondence relationship between the direction of the normal line and the feature quantity can be examined by calculating the feature quantity at the relevant position.
The normal calculation section 74 calculates the direction of the normal line at each position of the measuring target from the feature quantity calculated from the input image, and the normal line—feature quantity table 73.
1. Surface Profile of an Object in Which the Reflectance Property or Surface Roughness is Not Uniform is Measurable
As described above, the profilometer according to the present embodiment can photograph an image having spectral characteristics similar to a perfect mirror surface even on a target in which the reflectance property is not uniform. Therefore, even with respect to a target in which the reflectance property is not uniform, or even with respect to a target in which the reflectance property is uniform but is different from the reflectance property of the reference object, the surface profile (direction of normal line) thereof can be calculated with satisfactory accuracy.
The following additional effects can be obtained by using the lighting device 3 of the present embodiment.
2. Normal Line Can be Calculated Only From One Image
The profilometer according to the present embodiment uses the lighting device such that light of different spectral distribution enters for all incident angle directions, and thus the direction of the normal line of the object to be measured can be obtained only from one image with respect to both the zenith angle component and the azimuth angle component. Since the photographing of the image is performed only once, and the calculation of the direction of the normal line is carried out by simply examining the table storing the correspondence relationship of the normal line and the feature quantity, the surface profile of the measuring target can be easily (at high speed) measured.
3. Natural Observation is Possible on Diffuse Object (Lambertian Surface)
When photographing a diffuse object (Lambertian surface), the image is a mixture of incident light from various directions. In the present embodiment, the light emission region of the lighting device 3 has the light of three components of RGB changed in equal directions (direction of 120 degrees with respect to each other) as shown in
4. Alleviation of Luminance Dynamic Range Problem
Through the use of the lighting device of the present embodiment, even if an object including both specular spike and specular lobe, the luminance of the mirror reflection light and the specular lobe becomes small compared to a case where observing them under a point light source. Therefore, the dynamic range of the image sensor (camera) does not need to be widened.
<Variant>
In the description of the embodiment above, the lighting device in which patterns that change with angle with respect to a direction in which the light emission intensity of three colors of RGB differs by 120 degrees are overlapped is used, but the light emission pattern is not limited thereto. For instance, a combination of patterns in which the three colors respectively change with respect to different directions such as patterns in which three colors change to downward direction, rightward direction, and leftward direction as shown in
The light emission of the lighting device 3 of the present embodiment is configured to also exhibit the above-described additional effects. If only the effect that the object in which the reflectance property is not uniform can be photographed same as the perfect mirror surface is to be obtained, the lighting patterns of three colors of RGB do not need to be overlapped. For instance, the lighting of RGB that respectively linearly changes with angle may be sequentially activated to photograph three images, and the three images may be analyzed to calculate the surface profile of the measuring target.
In the above description, the image is photographed in advance using an object which shape is known, the relationship between the feature quantity of the spectral distribution and the direction of the normal line is obtained based on the image, and the normal line—feature quantity table is created. The direction of the normal line is obtained from the feature quantity of the spectral distribution of the measuring target with reference to the normal line —feature quantity table. However, if the relationship of the direction of the normal line and the spectral distribution photographed by the camera can be formulated from the geometric arrangement and the like, the normal line may be calculated using such calculation formula.
In the first embodiment, a pattern in which the light emission intensity linearly changes with respect to the angle in the longitude direction as shown in
In a profilometer according to the third embodiment, a lighting device having a shape different from the first and the second embodiments is used. As shown in
The lighting pattern in which the light emission intensity linearly changes with respect to position on a plane is one approximation solution of a lighting pattern that cancels out the influence of diffusion light. Therefore, through the use of such lighting pattern, the calculation of the surface profile can be performed similar to the perfect mirror surface regardless of the reflectance property of the measuring target.
The light combining each component light of RGB has different spectral distribution at all positions. Therefore, in the present embodiment as well, the surface profile of the measuring target can be obtained only from one photographed image, similar to the first embodiment.