WO2016186211A1 - 3次元計測システム、3次元計測方法及び3次元計測プログラム - Google Patents

3次元計測システム、3次元計測方法及び3次元計測プログラム Download PDF

Info

Publication number
WO2016186211A1
WO2016186211A1 PCT/JP2016/065084 JP2016065084W WO2016186211A1 WO 2016186211 A1 WO2016186211 A1 WO 2016186211A1 JP 2016065084 W JP2016065084 W JP 2016065084W WO 2016186211 A1 WO2016186211 A1 WO 2016186211A1
Authority
WO
WIPO (PCT)
Prior art keywords
pattern
image data
dimensional
depth
measurement
Prior art date
Application number
PCT/JP2016/065084
Other languages
English (en)
French (fr)
Inventor
洋 川崎
祐樹 堀田
智司 小野
慎作 日浦
亮 古川
Original Assignee
国立大学法人 鹿児島大学
公立大学法人広島市立大学
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 国立大学法人 鹿児島大学, 公立大学法人広島市立大学 filed Critical 国立大学法人 鹿児島大学
Priority to JP2017519422A priority Critical patent/JP6671589B2/ja
Publication of WO2016186211A1 publication Critical patent/WO2016186211A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/24Measuring arrangements characterised by the use of optical techniques for measuring contours or curvatures
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/24Measuring arrangements characterised by the use of optical techniques for measuring contours or curvatures
    • G01B11/25Measuring arrangements characterised by the use of optical techniques for measuring contours or curvatures by projecting a pattern, e.g. one or more lines, moiré fringes on the object
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/24Measuring arrangements characterised by the use of optical techniques for measuring contours or curvatures
    • G01B11/25Measuring arrangements characterised by the use of optical techniques for measuring contours or curvatures by projecting a pattern, e.g. one or more lines, moiré fringes on the object
    • G01B11/2545Measuring arrangements characterised by the use of optical techniques for measuring contours or curvatures by projecting a pattern, e.g. one or more lines, moiré fringes on the object with one projection direction and several detection directions, e.g. stereo
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing

Definitions

  • the present invention relates to a three-dimensional measurement system, a three-dimensional measurement method, and a three-dimensional measurement program.
  • a DfD (Depth from Defocus) method for estimating the depth from the blur of the observation pattern has been proposed (for example, see Non-Patent Document 2). Since the DfD method is premised on blurring of an observation pattern, there are few restrictions due to the depth of field. However, since the measuring device of this technique uses an array LED as a light source, there is a disadvantage that a dense pattern cannot be projected onto an object and the obtained depth map is sparse. That is, the DfD method has a disadvantage that the depth resolution is low because the change of the pattern with respect to the change of the depth is limited by the aperture of the lens. Moreover, since it is necessary to perform a large amount of deconvolution processing in estimating the depth, there is a disadvantage that the calculation amount becomes enormous.
  • the DfD method is generally known as a method based on camera blur, and the depth can be estimated from a single image as long as conditions are met.
  • a DfD method has been proposed that mathematically models both the blur of the pattern projection light and the blur of the photographing camera to realize distance measurement in real time (for example, see Non-Patent Document 3).
  • This is a method in which a checkered pattern is projected onto an object and DfD is performed from the blur of the imaging result. According to this method, measurement is possible even if there is no texture in the measurement target.
  • the technique described in Non-Patent Document 3 requires two images with different in-focus distances, and it is necessary to devise an optical system on the photographing side, such as installing a prism between the lens and the image sensor. It was.
  • Non-Patent Document 4 a method for analyzing the blur of the projected image of the projector and estimating the depth of the projection surface has been proposed (for example, see Non-Patent Document 4).
  • this method the depth for each pixel of the captured image can be estimated by acquiring an image while shifting the phase of the line-shaped projection pattern.
  • this method requires a plurality of images with different projection patterns, and thus has a disadvantage that it is difficult to measure the depth of a moving object.
  • a three-dimensional measurement method using structured light generated by mounting a coded aperture on a projection optical system of a projector is disclosed (for example, see Non-Patent Document 5).
  • a pattern is projected with a light source having a coded aperture in which a code pattern is provided in a grid pattern, and the distance of each point is calculated by DfD using the degree of blurring of the projected pattern observed on the measurement target object.
  • a parameter that defines the size of the blur of the projection pattern that is, the scale of a point spread function (hereinafter also referred to as PSF) is used as a scale parameter.
  • PSF point spread function
  • Non-Patent Document 5 since the deconvolution operation and the similarity calculation are performed for all the depths, the number of operations of the deconvolution operation with a large amount of calculation becomes enormous, and the calculation time Will become longer. In addition, the calculation result may become unstable.
  • each of the conventional three-dimensional measurement methods has advantages and disadvantages, and it is required to perform measurement with high accuracy while reducing the amount of calculation.
  • the present invention has been made to solve the above-described problems, and is a three-dimensional measurement system that can accurately measure a three-dimensional measurement object while reducing the amount of calculation.
  • An object is to provide a measurement method and a three-dimensional measurement program.
  • a three-dimensional measurement system provides: Reference acquired in advance in association with the image data obtained by imaging the measurement object on which the two-dimensional pattern is projected by the projection light via the projection optical system, and the depth of the measurement object.
  • a three-dimensional measurement system that estimates the depth of the measurement object by comparing image data groups, The two-dimensional pattern is projected onto the measurement object via an encoded aperture pattern provided in the projection optical system, The depth of the measurement object is determined by the stereo method for performing image matching based on the parallax of the projection optical system and the imaging unit with respect to the measurement object, and the optical axis direction of the encoded aperture pattern in the image data of the measurement object It is estimated by image processing to which both of the DfD methods based on blurring are applied.
  • the reference image data group is image data obtained by imaging by the imaging means or image data calculated by simulation. It is good as well.
  • the reference image data group may include image data of the two-dimensional plane obtained by imaging with the imaging unit when a two-dimensional plane is placed at a plurality of positions on the optical axis of the projection light. Good.
  • the two-dimensional plane is orthogonal to the optical axis of the projection optical system; It is good as well.
  • the reference image data group is: Including two-dimensional slope image data obtained when two-dimensional planes oblique to the optical axis of the projection optical system are respectively placed at a plurality of different angles with respect to the optical axis; It is good as well.
  • the image data of the two-dimensional slope is Created by partially combining the reference image data of the two-dimensional plane imaged by the imaging unit, It is good as well.
  • the image matching is performed using a matching window. It is good as well.
  • the two-dimensional pattern has a plurality of different projection patterns; While determining the search range in the depth direction without performing the deconvolution operation by the first projection pattern constituting the two-dimensional pattern, The depth of the measurement object using a hierarchical restoration method of an image by performing a deconvolution operation in the search range with a second projection pattern that forms the two-dimensional pattern and is different from the first projection pattern. Estimate It is good as well.
  • the combination of the two-dimensional pattern and the encoded aperture pattern may be any of line pattern rows that are optically aligned in the same direction, two-dimensionally arranged dot patterns, or a combination of the line pattern row and the dot pattern. And at least one of the two-dimensional pattern and the encoded aperture pattern is an irregular random pattern. It is good as well.
  • the two-dimensional pattern includes A first two-dimensional pattern group formed by the first color; A second two-dimensional pattern group formed of a second color and having a higher spatial frequency component than the first two-dimensional pattern group; It is included, It is good as well.
  • the two-dimensional pattern includes A first line pattern group formed of a first color; A second line pattern group formed of a second color and orthogonal to the first line pattern group; It is included, It is good as well.
  • the encoded aperture pattern includes: A first encoded aperture pattern comprising a color filter that blocks only the light of the first color; A second encoded aperture pattern comprising a color filter that blocks only the second color light; It is included, It is good as well.
  • the optical axis of the optical system of the imaging means is set to be non-coaxial with the optical axis of the projection light so as to shift in the arrangement direction of the pattern constituting the two-dimensional pattern, It is good as well.
  • the two-dimensional pattern is First projection means for projecting the two-dimensional pattern onto the measurement object from a first direction; Projected by the second projecting means for projecting the two-dimensional pattern onto the measurement object from a second direction, It is good as well.
  • the direction of the optical axis deviation between the first projection means and the imaging means is orthogonal to the direction of the optical axis deviation between the second projection means and the imaging means, It is good as well.
  • the optical axis of the imaging means and the optical axis of the projection light are set to coincide with each other, It is good as well.
  • the three-dimensional measurement method is: Reference acquired in advance in association with the image data obtained by imaging the measurement object on which the two-dimensional pattern is projected by the projection light via the projection optical system, and the depth of the measurement object.
  • a three-dimensional measurement method for estimating the depth of the measurement object by comparing image data groups The two-dimensional pattern is projected onto the measurement object via an encoded aperture pattern provided in the projection optical system, The depth of the measurement object is determined by the stereo method for performing image matching based on the parallax of the projection optical system and the imaging unit with respect to the measurement object, and the optical axis direction of the encoded aperture pattern in the image data of the measurement object It is estimated by image processing to which both of the DfD methods based on blurring are applied.
  • the three-dimensional measurement program is: Corresponds to the image data obtained by imaging the measurement object on which the two-dimensional pattern is projected through the projection optical system provided with the coded aperture pattern by the projection light and the depth of the measurement object.
  • a computer that estimates the depth of the measurement object by comparing the reference image data group that is attached and acquired in advance,
  • the stereo method for performing image matching based on the parallax of the measurement target with respect to the measurement target by the projection optical system and the imaging unit, and the optical axis direction of the encoded aperture pattern in the image data of the measurement target It is made to function as an estimation part estimated by the image processing which applied both DfD methods based on blur.
  • the two-dimensional pattern is projected onto the measurement object via the encoded aperture pattern.
  • the projected image projected onto the measurement object is an image formed by convolution of the two-dimensional pattern and the encoded aperture pattern, and an image having a large pattern change with respect to a change in the depth of the measurement object. Become. For this reason, the depth resolution of the measurement object can be improved.
  • the depth of the measurement object is estimated by image matching with a reference image data group acquired in advance in association with the depth of the measurement object. Therefore, it is not necessary to perform complicated operations such as deconvolution using the aperture pattern of the encoded aperture to estimate the depth of the measurement object, and high-precision measurement that combines the DfD method and the stereo method is possible. Accordingly, it is possible to reduce the estimation error due to the aberration of the optical system. That is, according to the present invention, the three-dimensional measurement of the measurement object can be performed with high accuracy while reducing the calculation amount.
  • FIG. 1 is a perspective view showing a schematic configuration of a three-dimensional measurement system according to Embodiment 1 of the present invention. It is a figure which shows the structure of the optical system of the three-dimensional measuring system of FIG. It is a figure which shows an example of the code
  • DOE diffractive
  • Embodiment 1 FIG. First, a first embodiment of the present invention will be described.
  • FIG. 1 shows a schematic configuration of the three-dimensional measurement system 100.
  • the three-dimensional measurement system 100 includes a projector 1, a camera 2, and a computer 3.
  • the projector 1 is a projection unit that projects projection light (structured light) onto the measurement object 4.
  • the camera 2 is an imaging unit that captures a projection pattern (projected image) projected onto the measurement object 4 by the projection light (structured light).
  • the camera 2 and the computer 3 are connected via a communication network. Through this communication network, image data can be transmitted and received between the camera 2 and the computer 3.
  • the computer 3 is a measurement unit that measures the three-dimensional shape of the measurement object 4 (the depth of the measurement object 4 viewed from the projector 1) based on image data obtained by imaging with the camera 2.
  • FIG. 2 shows the configuration of the optical system of the three-dimensional measurement system 100 of FIG.
  • the projector 1 includes an image plane 11, a projection optical system 12, and a coding aperture 13. Projection light emitted from the light source passes through the image plane 11.
  • the video screen 11 is, for example, a transmissive liquid crystal element, and a video (two-dimensional pattern) is displayed on the video screen 11. Therefore, the light transmitted through the video screen 11 becomes light including information on the video displayed on the video screen 11. This light is incident on the projection optical system 12.
  • Projection optical system 12 projects incident light to the outside.
  • the projection optical system 12 is a refractive optical system, and forms an image displayed on the image surface 11 on an image formation surface.
  • the encoding aperture 13 is mounted on the exit surface of the projection optical system 12. As shown in FIG. 3A, the coding opening 13 is provided with a code pattern (coding opening pattern) 5.
  • the code pattern 5 is a left-right asymmetric pattern.
  • the light emitted from the projection optical system 12 is emitted from the projector 1 through the opening portion of the code pattern 5.
  • the white portion shown in FIG. 3A transmits light.
  • the light emitted from the projector 1 becomes light (structured light) including information on the shape of the code pattern 5.
  • the origin of the coordinate axis d along the optical axis AX of the projection optical system 12 is set as the center of the projection optical system 12.
  • the light emitted from the projector 1 proceeds in the + d direction of the coordinate axis d with the optical axis AX of the projection optical system 12 as the center, and is focused at the point d p .
  • the image plane 11 of the projector 1 is in an imaging relationship with the point d p . Therefore, when a screen is placed at the point d p , an image displayed on the image plane 11 is formed on the screen. This imaging position is position B.
  • the coded aperture 13 has a convolutional relationship with the imaged image, and its property can be analyzed by Fourier transform or the like. Therefore, when a dot-like projection pattern is projected on the image plane 11, the code pattern 5 of the encoding aperture 13 becomes a point d p , that is, a dot-like pattern in the focused state, and the code pattern 5 of the code pattern 5 is defocused. An image appears.
  • the three-dimensional measurement system 100 processes the image data of the code pattern 5 in the defocused state, thereby forming the imaging position d of the projection pattern (two-dimensional pattern) formed by the projection optical system 12.
  • the depth in the direction of the optical axis AX (the direction of the coordinate axis d) of the measurement object 4 with respect to p is measured. Since the range in which the image of the code pattern 5 can be read is between the position A and the position C, the search range of the depth of the measurement target 4 is a range F from the position A to the position C. As shown in FIG. 3B, the projected image (projected pattern) of the code pattern projected onto the measurement object 4 changes according to the depth of the direction of the coordinate axis d (that is, the focus direction of the projection optical system 12).
  • FIG. 4A in the projection pattern 11A, a plurality of dot-like first projection patterns are provided in a 4 ⁇ 4 grid.
  • an image of the code pattern 5 (first projection pattern) is formed on the measurement object 4.
  • FIG. 4B shows a change in the pattern image related to the focus direction in the encoding aperture 13A.
  • the pattern image of the projection pattern 11A is a substantially 4 ⁇ 4 dot pattern, but at the positions A and C in the defocused state, the image of the code pattern 5 Are arranged in 4 rows and 4 columns.
  • the code pattern 5 Since the code pattern 5 is asymmetric, the image of the code pattern 5 is different between the position A defocused in the ⁇ d direction and the position C defocused in the + d direction. Therefore, if the shape (blurred state) of each code pattern 5 is analyzed, it is possible to determine how much the projected pattern is defocused in which direction.
  • the position A to the position C is the depth search range F with respect to the focus direction of the projection optical system 12, but in the search image F through the code pattern 5 of the encoding aperture 13A in the search range F,
  • the projection pattern 11A on the image plane 11 is sparsely arranged so that the image of the code pattern 5 has less interference with the image of the other code pattern 5. In particular, if they are arranged so as not to interfere at all, the arrangement density of the projection patterns 11A becomes sparse, but the processing is stable.
  • the computer 3 projects projection optics based on image data (first image data) of a plurality of projection patterns (isolated patterns) formed on the measurement object 4 by projecting structured light through the encoded aperture 13A.
  • the search range of the depth of each projection pattern with respect to the focus direction of the system 12 is measured.
  • a plurality of second dot patterns are provided in a 7-row 7-column grid pattern. That is, in the projection pattern 11B, the arrangement density of the dot patterns is denser than that of the projection pattern 11A.
  • the image of the projection pattern 11B is a 7 ⁇ 7 dot pattern at the in-focus position B, but the image of the code pattern 5 is 7 at the positions A and C in the defocused state.
  • the array pattern is arranged in rows and 7 columns.
  • the code pattern 5 Since the code pattern 5 is asymmetric, the image of the code pattern 5 is different between the position A defocused in the ⁇ d direction and the position C defocused in the + d direction. For this reason, if the shape (blurred state) of each code pattern 5 is analyzed, it is the same as the projection pattern 11A in that it is possible to determine how much the projected pattern is defocused in which direction. .
  • the code of the encoding aperture 13B is searched in the depth search range F (position A to position C) with respect to the focus direction of the projection optical system 12. A section where the patterns overlap greatly appears.
  • the deconvolution operation is performed by narrowing down the search range of the depth measured using 11A. By this deconvolution operation, a plurality of restoration patterns respectively corresponding to the plurality of projection patterns 11B are formed.
  • the computer 3 measures the depth of each restoration pattern related to the focus direction of the projection optical system 12 by calculating the similarity between the restoration pattern obtained by the calculation and the projection pattern 11B.
  • the encoding aperture 13A and the encoding aperture 13B are selectively attached to the projection optical system 12.
  • the selection may be performed manually or automatically, for example, under the control of the computer 3. Or you may arrange
  • the light that passes through the selectively mounted encoding apertures 13A and 13B becomes structured light including the structural information of each code pattern 5 as described above. This structured light is projected as projection light onto the measurement object 4 (a flat screen during calibration).
  • the camera 2 images the projection pattern projected onto the measurement object 4 with structured light.
  • the camera 2 may or may not be installed on the optical axis AX.
  • the projector 1 and the camera 2 are not coaxial, there is an advantage that a brighter pattern can be measured without using a half mirror, and the measurement accuracy using parallax can be improved.
  • the computer 3 measures the three-dimensional shape of the measurement object 4 based on the image data obtained by imaging with the camera 2. As described above, since the image formation state of each code pattern 5 of the measurement object 4 depends on the position of the coordinate axis d, the image formation state of each code pattern 5 of the measurement object 4 is analyzed by image analysis. The depth of the measurement object 4 in the focus direction can be obtained.
  • the computer 3 includes a control unit 31, a main storage unit 32, an external storage unit 33, an operation unit 34, a display unit 35, and a communication unit 36.
  • the main storage unit 32, the external storage unit 33, the operation unit 34, the display unit 35, and the communication unit 36 are all connected to the control unit 31 via the internal bus 30.
  • the control unit 31 includes a CPU (Central Processing Unit) and the like.
  • the CPU executes the program 39 stored in the external storage unit 33, thereby realizing each component of the computer 3 shown in FIG.
  • the main storage unit 32 is composed of RAM (Random-Access Memory) or the like.
  • the main storage unit 32 is loaded with a program 39 stored in the external storage unit 33.
  • the main storage unit 32 is used as a work area (temporary data storage area) of the control unit 31.
  • the external storage unit 33 includes a non-volatile memory such as a flash memory, a hard disk, a DVD-RAM (Digital Versatile Disc Random-Access Memory), a DVD-RW (Digital Versatile Disc ReWritable).
  • a program 39 to be executed by the control unit 31 is stored in advance. Further, the external storage unit 33 supplies data used when executing the program 39 to the control unit 31 in accordance with an instruction from the control unit 31, and stores the data supplied from the control unit 31.
  • the operation unit 34 includes a pointing device such as a keyboard and a mouse, and an interface device that connects the keyboard and the pointing device to the internal bus 30. Information regarding the content operated by the operator is input to the control unit 31 via the operation unit 34.
  • the display unit 35 is composed of a CRT (Cathode Ray Tube) or an LCD (Liquid Crystal Display) or the like, and an operation screen is displayed when the operator inputs operation information.
  • CTR Cathode Ray Tube
  • LCD Liquid Crystal Display
  • the communication unit 36 includes a serial interface or a parallel interface.
  • the communication unit 36 is connected to the camera 2 via a communication network and receives image data from the camera 2.
  • control unit 31 includes a control unit 31, a main storage unit 32, an external storage unit 33, an operation unit 34, a display unit 35, a communication unit 36, etc. as hardware resources. It demonstrates its function by being used as a.
  • the computer 3 having the hardware configuration shown in FIG. 6 has a storage unit 40, a data acquisition unit 41, an initial measurement unit 42, a fine measurement unit 43, as shown in FIG. And an output unit 44.
  • the storage unit 40 corresponds to the external storage unit 33 in the hardware configuration shown in FIG.
  • the storage unit 40 stores various data (image data 50A, 50B, histogram database 51, depth range data 52, scale parameter 53, depth data 54).
  • the data acquisition unit 41 corresponds to the control unit 31, the operation unit 34, and the communication unit 36 in the hardware configuration illustrated in FIG.
  • the data acquisition unit 41 stores the image data transmitted from the camera 2 in the storage unit 40 as image data 50A and 50B.
  • the image data transmitted from the camera 2 is stored in the storage unit 40 as one of the image data 50A and 50B by the operation input of the operation unit 34.
  • the data acquisition unit 41 uses image data captured by the camera 2 as image data 50A in response to an operation input from the operation unit 34.
  • the image data 50A is first image data of a plurality of isolated patterns (see FIG. 4B) formed on the measurement object 4 by projecting structured light through the encoded aperture 13A.
  • the data acquisition unit 41 converts the image data captured by the camera 2 into image data by the operation input of the operation unit 34.
  • 50B is stored in the storage unit 40. That is, the image data 50B is second image data of a projection pattern formed on the measurement object 4 by projecting structured light through the encoded aperture 13B.
  • the initial measurement unit 42 as the first measurement unit corresponds to the control unit 31, the main storage unit 32, and the operation unit 34 in the hardware configuration illustrated in FIG.
  • the initial measurement unit 42 performs initial measurement based on the image data 50 ⁇ / b> A stored in the storage unit 40.
  • the initial measurement unit 42 measures the search range of the depth of each isolated pattern related to the focus direction (direction of the coordinate axis d) of the projection optical system 12 based on the image data 50 ⁇ / b> A stored in the storage unit 40.
  • the measurement result is stored in the storage unit 40 as depth range data 52.
  • the initial measurement unit 42 extracts the image feature of each isolated pattern in the image data 50A.
  • a local binary pattern (LBP) or a local ternary pattern (LTP) is adopted.
  • the initial measurement unit 42 refers to the histogram database 51 to obtain the depth of each isolated pattern corresponding to the extracted image feature.
  • FIG. 8 there is a correlation between the depth (Depth1, Depth2, Depth3) of each isolated pattern and the histogram of LBP. If the depth is the same, the LBP histograms of the isolated patterns are almost the same.
  • LBP and LTP are, for example, an 8-bit data string in which image data is arranged as binary data of 0 or 1 for the center pixel and each of the 8 pixels adjacent to the center pixel.
  • Image data also referred to as LBP image or LTP image
  • LTP not binary data but ternary data.
  • the horizontal axis represents the LBP luminance value
  • the vertical axis represents the number of pixels having the luminance value.
  • histogram database 51 image characteristics of image data of each isolated pattern as shown in FIG. 8 and the depth of each isolated pattern with respect to the focus direction are registered in association with each other.
  • data obtained by calibration performed in advance is registered.
  • the initial measurement unit 42 converts the isolated pattern image data included in the image data 50 ⁇ / b> A into an LBP image, and generates an LBP histogram based on the converted LBP image.
  • the initial measurement unit 42 matches the generated histogram with the histograms of a plurality of LBP images (Depth1, Depth2, Depth3) registered in the histogram database 51, and sets the depth corresponding to the histogram with the highest similarity to 4 ⁇ . Obtained for every 4 isolated patterns.
  • the depth search range obtained for each isolated pattern is stored in the storage unit 40 as depth range data 52.
  • the high-precision (fine) measurement unit 43 as the second measurement unit corresponds to the control unit 31, the main storage unit 32, and the operation unit 34 in the hardware configuration illustrated in FIG.
  • the fine measurement unit 43 measures the accurate depth of the measurement object 4 based on the image data 50B stored in the storage unit 40. By the fine measurement, the depth of the projection pattern included in the image data 50B regarding the focus direction of the projection optical system 12 is measured. The measurement is performed using a deconvolution operation.
  • the projection pattern projected onto the measurement object 4 is formed by convolution of the projection pattern 11B and the point spread function (PSF).
  • the PSF varies depending on the depth. For this reason, as a result of performing the deconvolution operation on the projection pattern with the PSF corresponding to each depth, the depth when the obtained restoration pattern is closest to the projection pattern 11B is the depth corresponding to the restoration pattern. become.
  • the fine measurement unit 43 performs a deconvolution operation on the image data 50B at a plurality of sampling positions within the search range. Thereby, the image data (restoration pattern) after the deconvolution operation corresponding to a plurality of sampling positions within the measurement range is obtained.
  • the degree of blurring since the shape restoration is performed by positively using the degree of blurring of the image of the code pattern, the degree of blurring inevitably increases. Therefore, it is necessary to calibrate the degree of blurring in advance. is there. If the aberration can be ignored, the parameter to be calibrated can only be related to the blur size (scale) S.
  • d is the position of the flat screen on the coordinate axes d
  • y a is the opening diameter of the coded aperture 13
  • d p is an in-focus distance of the structured light projected from the projector 1
  • d a is the distance in the coordinate axis direction d from the camera 2 to the projection optical system 12.
  • the blur size (scale) S of the point image on the flat screen is expressed as follows.
  • c is a scale parameter.
  • the scale parameter c is as follows. That is, if the scale parameter c and the position d of the flat screen are determined, the scale Sd is determined. In this embodiment, using the blur images actually observed at a plurality of known depths, the scale Sd at each depth is obtained, and as shown in FIG. c is finally obtained, and finally a scale Sd which is a function of the depth d is obtained based on the scale parameter c.
  • this method requires a large number of captured images, a realistic scale parameter c can be obtained directly, and calibration of the baseline between the camera 2 and the projector 1 becomes unnecessary.
  • the scale parameter c is stored in the storage unit 40 as the scale parameter 53.
  • the fine measurement unit 43 projects the projection pattern 11B onto the measurement object 4 through the encoding aperture 13B, and uses the scale parameter c obtained by calibration to project the image data 50B.
  • the pattern P2 is deconvolved at a plurality of depths (the depth scale Sd) to obtain patterns P3 to P5 after the deconvolution operation.
  • the fine measurement unit 43 obtains the depth d of the restoration pattern (recovery patterns included in the patterns P3 to P5) most similar to the projection pattern 11B for each restoration pattern.
  • the fine measurement unit 43 performs a deconvolution operation on the partial image data extracted from the image data 50B by the sliding window method. As shown in FIG. 12, the sliding window W slides sequentially on the image data 50B from the upper left to the right. Then, the image data in the sliding window W is extracted at each position. Further, the above-described deconvolution operation is performed on the extracted image data, and the depth of the projection pattern in the image data is calculated.
  • the sliding interval of the sliding window W is such that an area before sliding and a part of the area after sliding overlap.
  • the fine measuring unit 43 performs a deconvolution operation on the image data in the sliding window W, and calculates the depth at that time.
  • the sliding window W is shifted downward and to the left end. Then, similar processing is executed.
  • the upper and lower intervals of the sliding window W are also partially overlapped before and after the slide. In this way, the sequential scanning of the sliding window W of the entire image data 50B and the estimation of the depth are performed.
  • a part of image data is extracted from the image data (Captured ⁇ image) by the sliding window W, and filtered by the Hamming window is deconvolved by a kernel based on the scale parameter c. Calculate. Then, the image data subjected to the deconvolution operation is obtained by integrating the image data subjected to the deconvolution operation with other image data using a Hamming window (Intergration (Weighed sum)).
  • the fine measurement unit 43 calculates the similarity between the restoration pattern obtained by the deconvolution operation by the sliding method and the projection pattern 11B, and measures the depth corresponding to each restoration pattern related to the focus direction of the projection optical system 12. For the similarity calculation, image matching or comparison of image feature amounts can be used. As the image feature amount, it is possible to use pointiness by fitting a Gaussian function, kurtosis, or the like.
  • the camera 2 and the projector 1 are not coaxial. Therefore, as shown in FIG. 14, due to the parallax between the projector 1 and the camera 2, a point image (red) on a plane (Near plane) close to the projector 1 and the camera 2 and a far plane (Far plane) Projection distortion with the point image (green) occurs.
  • This projective distortion adversely affects the deconvolution operation. Therefore, in this embodiment, if the sliding window method is adopted, the size of the image data to be calculated can be reduced, so that the influence of the projection distortion can be reduced.
  • the fine measurement unit 43 performs graph cut processing on the image data obtained by performing the deconvolution operation, and the restoration pattern and the projection pattern 11B (original pattern) included in the image data on which the graph cut processing has been performed. ) And similarity calculation.
  • the graph cut process is a process for minimizing the above-mentioned energy ED.
  • g (D v ) is a data cost, and the similarity between a plurality of restoration patterns obtained in the focus direction by performing a deconvolution operation and the projection pattern 11B can be used.
  • h (D u , D v ) is a function corresponding to a difference in luminance value between adjacent pixels.
  • FIG. 15 shows image data obtained when four flat sheets are installed at different depths. As shown in FIG. 15, the graph cut process reduces the noise component in the image data and smoothly adjusts the entire image data.
  • the image data 50A (Captured image image with Coarse pattern) is imaged using a projection pattern 11A having a sparse pattern.
  • the initial measurement unit 42 calculates the chi-square distance (Chi ⁇ ) between the LBP histogram of each of the plurality of projection patterns (isolated patterns) included in the image data 50A and the LBP histogram of the plurality of depth code patterns. square distance) is obtained and rough estimation ((a) Coarse estimation) is performed.
  • a graph as shown in FIG. 16 is obtained, and a depth search range (Estimated depth range in coarse estimation) is obtained.
  • the image data 50B (Captured image with Dense pattern (patterns are overlapped each other)) is captured using the dense projection pattern 11B, and the projected pattern in which the images of the code pattern 5 in the image data 50B overlap each other.
  • a deconvolution operation is performed using PSF (PSF for each depth) at each depth.
  • matching with the original projection pattern 11B (original pattern) with respect to the depth is performed, and dense estimation ((b) Dense estimation) is performed.
  • a graph is obtained as shown in FIG. 16, and the depth corresponding to each restoration pattern is obtained. That is, in this embodiment, rough estimation and fine estimation are performed in stages. This process is also called hierarchical restoration.
  • the deconvolution calculation is performed not on the entire measurable range F but only on the search range of the depth range data 52 (L1 and L2 in FIG. 16). As a result, the number of deconvolution operations can be significantly reduced.
  • the output unit 44 corresponds to the control unit 31, the main storage unit 32, the operation unit 34, and the display unit 35 in the hardware configuration shown in FIG.
  • the output unit 44 displays the depth data 54.
  • FIG. 17 shows a three-dimensional measurement process (main process) of the three-dimensional measurement system 100. As shown in FIG. 17, first, the computer 3 performs calibration (step S1).
  • a flat screen that projects the structured light emitted from the projector 1 is used.
  • the projector 1 mounts the encoding aperture 13A on the projection optical system 12, and projects a rough projection pattern 11A (step S11).
  • the position (depth) of the flat screen is updated (step S12).
  • the flat screen is placed in the initial position.
  • the initial position (the depth of the flat screen) is assumed to be known by other measuring means.
  • the camera 2 captures a projection image of the projector 1 projected on the flat screen (step S13).
  • the captured image is stored in the storage unit 40 as image data 50 ⁇ / b> A from the camera 2 via the data acquisition unit 41.
  • the initial measurement unit 42 converts the captured image (image data 50A) into an LBP (step S14). Thereby, for example, an LBP image of Depth1 shown in FIG. 8 is generated. Subsequently, the initial measurement unit 42 generates a histogram of the LBP image (step S15). Thereby, for example, a histogram of the LBP image at Depth1 is generated.
  • the initial measurement unit 42 stores the histogram generated in association with the depth in the histogram database 51 (step S16). Subsequently, the initial measurement unit 42 determines whether or not it is the last position (step S17). Here, since the position C is the last position and the screen position is still the position A, the determination is negative.
  • the initial measurement unit 42 updates the screen position (step S12).
  • the position is shifted in the + d direction by ⁇ d from the position A.
  • the projection image is captured (step S13)
  • the captured image is converted to LBP (step S14)
  • the histogram is generated (step S15), registered in the histogram database 51 (step S16), and the final position is determined (step S17). Is repeated. In this way, for each position from position A to position C, a histogram of the LBP image is generated at a constant sampling interval ⁇ d.
  • step S17 When it is determined that the position is the last position (step S17; Yes), the process proceeds to FIG. 19, and the projection optical system 12 of the projector 1 is provided with the encoding aperture 13B and is closely arranged in the projection pattern 11B (dense pattern). Is projected (step S21). Subsequently, the position of the flat screen is updated (step S22). Here, the flat screen is set at position A. Subsequently, the camera 2 captures a projected image (step S23).
  • the fine measurement unit 43 calculates the scale Sd at the depth based on the image data 50B, and stores it in the storage unit 40 in association with the depth (step S24). Subsequently, the fine measurement unit 43 determines whether or not the screen is at the last position (step S25). Here, it is assumed that the position C is the last position. Since the screen position is still position A, the determination is negative.
  • step S25; No If it is not the last position (step S25; No), the fine measurement unit 43 updates the screen position (step S22). Here, the position is shifted in the + d direction by ⁇ d from the position A. Thereafter, the imaging of the projected image (step S23), the calculation of the scale Sd, the storage (step S24), and the determination of the last position (step S25) are executed again. In this way, the scale Sd is calculated for each position from position A to position C at a constant sampling interval ⁇ d.
  • step S25; Yes the fine measurement unit 43 performs fitting to obtain the scale parameter c (step S26).
  • the scale parameter c is stored in the storage unit 40 as the scale parameter 53. Thereby, calibration is completed.
  • the measurement object 4 is set within the measurement range F (step S2). Thereby, measurement of the three-dimensional shape of the measurement object 4 is started.
  • the initial measurement unit 42 performs initial measurement (step S3).
  • the projector 1 attaches the encoding aperture 13A to the projection optical system 12 and projects a rough projection pattern 11A (step S31).
  • the camera 2 captures a projection image of the measurement object 4 (step S32).
  • the image data is transmitted from the camera 2, and the data acquisition unit 41 stores the image data in the storage unit 40 as the image data 50A.
  • the initial measurement unit 42 generates a local binary pattern (LBP) image with each isolated pattern included in the image data 50A (step S33).
  • the initial measurement unit 42 generates a histogram of the generated LBP image (step S34).
  • the initial measurement unit 42 calculates the similarity between the generated histogram and the histogram at each depth registered in the histogram database 51 (step S35), determines the search range of the closest LBP depth, and stores the depth range data. 52 is stored in the storage unit 40 (step S36).
  • the initial measurement unit 42 determines whether measurement has been completed for all patterns (step S37). If the measurement of all patterns has not been completed yet (step S37; No), the initial measurement unit 42 generates an LBP with an isolated pattern (step S33), generates a histogram (step S34), and matches (step S35). ), Determination of the search range of the closest LBP depth (step S36), and determination of completion of all patterns (step S37) are repeated. When the measurement is completed for all the patterns and the depth search range is determined (step S37; Yes), the initial measurement unit 42 ends the initial measurement.
  • the fine measurement unit 43 performs fine measurement (step S4).
  • the encoding aperture 13B is attached to the projection optical system 12 of the projector 1, and the projection pattern 11B (dense pattern) is projected onto the measurement object 4 (step S41).
  • the camera 2 captures a projected image (step S42).
  • the image data is transmitted from the camera 2, and the data acquisition unit 41 stores the image data in the storage unit 40 as the image data 50B.
  • the fine measurement unit 43 updates the depth setting (step S43).
  • the depth is set within the search range defined in the depth range data 52.
  • the fine measurement unit 43 performs a deconvolution operation in the range of the depth set on the captured image data 50B by the sliding window method (step S44).
  • processing as shown in FIG. 13 is performed, and image data (Deconvolved image) after the deconvolution operation is obtained.
  • the fine measurement unit 43 performs a graph cut process on the image data after the deconvolution operation (step S45). As a result, image data with less noise components as a whole can be obtained.
  • the fine measurement unit 43 calculates the similarity between each of the plurality of restoration patterns included in the image data obtained by the deconvolution operation and subjected to the graph cut process, and the original projection pattern 11B (step S46). ).
  • the fine measurement unit 43 determines whether or not it is the last position (step S47). If it is not the last position (step S47; No), the fine measurement unit 43 updates the depth setting (step S43). Thereafter, steps S43 to S47 are repeated until it is determined that the position is the last position.
  • step S47 If it is determined that the depth is the last depth (step S47; Yes), the fine measurement unit 43 searches the depth having the highest similarity so far, and the set of searched depths as the depth data 54 is stored in the storage unit 40. (Step S48). Thereafter, the fine measurement unit 43 ends the fine measurement.
  • the obtained depth data 54 indicates the three-dimensional shape of the measurement object 4. This three-dimensional shape is displayed and output by the output unit 44.
  • FIG. 22 shows an example of the measurement result of the three-dimensional shape of the measurement object 4 in the three-dimensional measurement system 100. As shown in FIG. 22, it can also be applied to three-dimensional measurement of moving objects, recognition of motion gestures, and the like.
  • each projection pattern related to the focus direction of the projection optical system 12 based on the image data of the plurality of sparse projection patterns 11A formed on the measurement object 4.
  • the depth of each projection pattern is measured by performing a deconvolution operation based on the image data of a plurality of dense projection patterns 11B.
  • the range in which the deconvolution calculation is performed is within the measurement range limited with the depth as a reference, so that the number of deconvolution calculations can be reduced.
  • the three-dimensional measurement of the measurement object 4 can be performed with high accuracy while further reducing the amount of calculation.
  • Embodiment 2 FIG. Next, a second embodiment of the present invention will be described.
  • the three-dimensional measurement system 100 further includes a half mirror 60.
  • the three-dimensional measurement system 100 is configured such that the optical axis of the camera 2 is coaxial with the optical axis AX of the projection optical system 12 of the projector 1.
  • the projection light emitted from the projector 1 passes through the half mirror 60 and is projected onto the measurement object 4.
  • the reflected light from the measurement object 4 is reflected by the half mirror 60 and reaches the camera 2, and a projection image of the measurement object 4 is captured by the camera 2.
  • the three-dimensional shape of the measurement object 4 can be obtained with high accuracy without employing the graph cut processing and the sliding window method.
  • Embodiment 3 FIG. Next, a third embodiment of the present invention will be described.
  • the three-dimensional measurement system 100 includes two projectors 1A and 1B.
  • the configuration of the projectors 1A and 1B is the same as that of the projector 1.
  • the encoding aperture 13 is attached to the projection optical system 12 of the projector 1A.
  • the encoding aperture 13 attached to the projection optical system 12 of the projector 1A is a red filter that transmits red light as the first color.
  • the encoding aperture 13 is also attached to the projection optical system 12 of the projector 1B.
  • the encoding aperture 13 attached to the projection optical system 12 of the projector 1B is a blue filter that transmits blue light as the second color.
  • the red light emitted from the projector 1A is projected through the half mirror 61.
  • the blue light emitted from the projector 1B is projected through the half mirror 61.
  • the camera 2 is an RGB camera capable of separately capturing an image with red light and an image with blue light.
  • the RGB camera captures the projected pattern projected onto the measurement object 4 with structured light for each color.
  • ⁇ Red light and blue light have different wavelengths, so the focus position is different. That is, in this three-dimensional measurement system 100, the projection units (projectors 1A and 1B) project structured light of a plurality of colors having different in-focus positions onto the measurement object 4. The projected pattern projected onto the measurement object 4 by the structured light is imaged for each color.
  • the computer 3 measures the three-dimensional shape of the measurement object 4 based on image data from which the image of the code pattern 5 can be read out of the image data of each color obtained by imaging with the camera 2.
  • measurement may be performed using image data of blue light emitted from the projector 1B.
  • the image of the code pattern 5 using red light is close to a point image, and the image using the image of the code pattern 5 using blue light is deeper. This is because it is required with high accuracy.
  • measurement may be performed using image data of red light.
  • the image of the code pattern 5 by blue light is close to a point image, and the depth is more accurately obtained by using the image of the code pattern 5 by red light. is there.
  • the projection pattern projected onto the projector 1A may be a sparse projection pattern 11A
  • the projection pattern projected onto the projector 11B may be a dense projection pattern 11B.
  • initial measurement and fine measurement can be performed by one imaging (one shot).
  • the encoding opening 13B may not be attached to the projector 1B.
  • this is called an opening pattern.
  • the projector 1B displays a periodic pattern having a specific spatial frequency component on the image plane 11 and projects structured light including an image of the periodic pattern. Then, initial measurement may be performed based on image data of red light emitted from the projector 1A, and fine measurement may be performed based on the degree of blurring of the pattern emitted from the projector 1B and transferred as an image. Since the high-frequency pattern can be measured with high accuracy even with a slight blur, the degree of blur is reduced near the in-focus position. For this reason, the point that the depth estimation accuracy by deconvolution is lowered can be effectively compensated.
  • the projection distortion of the projection pattern due to the change in depth is solved using the sliding window system.
  • the baseline between the projector and the camera is known, the amount of positional deviation of the projected pattern due to the change in depth can be calculated, so that the projected pattern included in the image data captured by the camera can be calculated.
  • the depth may be estimated after correcting the position based on the baseline.
  • the initial measurement is performed using the local binary pattern (LBP) as an image feature.
  • LBP local binary pattern
  • LTP local ternary pattern
  • the encoding aperture 13 is mounted on the exit side of the projection optical system 12, but the encoding aperture 13 may be mounted on the incident side of the projection optical system 12. Further, the encoding aperture 13 may be incorporated in the projection optical system 12. If the projection optical system 12 is composed of a plurality of lenses, the encoding aperture 13 may be mounted between the lenses.
  • the code pattern 5 is not limited to that shown in FIG. 3A. Any device that can form an asymmetric pattern on the measurement object 4 may be used.
  • Embodiment 4 (Method using line pattern and line opening). Next, a fourth embodiment of the present invention will be described.
  • the computer 3 is connected to the projector 1 and the camera 2 as shown in FIG. 25A.
  • the computer 3 outputs image data displayed on the video screen 11 of the projector 1.
  • a two-dimensional pattern having a spatial frequency component in one direction is displayed on the video screen 11.
  • This two-dimensional pattern is a line pattern group consisting of line patterns extending in the vertical direction (Y-axis direction) and arranged in the X-axis direction.
  • This line pattern has the effect of increasing the depth estimation accuracy and stability when the arrangement interval and the line width are irregular and random.
  • a regular pattern can be combined with an opening pattern so that the same pattern does not occur within the measurement range. Therefore, a regular pattern can be used to reduce the amount of calculation and simplify the device creation. It is also possible to use.
  • the projection light of this two-dimensional pattern is projected onto the measurement object 4 via the projection optical system 12.
  • the camera 2 images the measurement object 4 on which the projection light is projected.
  • the optical axis AX of the projection optical system 12 of the projector 1 and the optical axis of the camera 2 are set non-coaxial.
  • the camera 2 and the projector 1 are shifted in the arrangement direction of the line patterns constituting the two-dimensional pattern. Thereby, a parallax arises about a projection image between the projector 1 and the camera 2.
  • an encoding opening 13C is used as shown in FIG. 26A.
  • the code pattern of the encoding aperture 13C is composed of a linear aperture pattern arranged in the same direction as the two-dimensional pattern displayed on the video screen 11 (optically the same direction; the X-axis direction in FIG. 26A).
  • the projection light is projected onto the measurement object 4 through the encoded aperture 13C.
  • the measurement object 4 is defocused with respect to the image plane 11, as shown in FIG. 26B, a projected image of the code pattern appears between the position A and the position C according to the position. It is like that.
  • the projection optical system 12 forms an image of a two-dimensional pattern displayed on the image plane 11 at the image formation position on the image plane 11 (position B in FIG. 26B). This image is formed by convolution of the two-dimensional pattern displayed on the video screen 11 and the code pattern of the encoding aperture 13C. As shown in FIG. 27, the projected image of the two-dimensional pattern changes with defocusing about the imaging position (position B).
  • the three-dimensional measurement system 100 processes the image data of the projection image, and the direction of the optical axis AX of the measurement object 4 with reference to the imaging position of the two-dimensional pattern by the projection optical system 12 (the direction of the coordinate axis d). The three-dimensional shape of the measurement object 4 is measured by estimating the depth.
  • the computer 3 includes a projection pattern setting unit 46, a storage unit 40, a data acquisition unit 41, a depth estimation unit 45, and an output unit 44, as shown in FIG.
  • the projection pattern setting unit 46 outputs image data of a two-dimensional pattern displayed on the video screen 11 of the projector 1. As a result, the two-dimensional pattern shown in FIG. 25B is displayed on the image plane 11 (transmission type liquid crystal opening) of the projector 1.
  • the data acquisition unit 41 stores the image data transmitted from the camera 2 in the storage unit 40 as either the image data of the reference image data group 70 or the measurement target image data 71. Whether the image data is the reference image data group 70 or the measurement target image data 71 may be determined by an operation input of the operation unit 34 or may be automatically controlled by a program.
  • the reference image data group 70 when a two-dimensional plane (plane screen) orthogonal to the optical axis AX of the projection optical system 12 is placed at a plurality of different positions in the d direction with respect to the optical axis AX, as shown in FIG. 29A. 2 is a reference image data group of a two-dimensional plane imaged by the camera 2.
  • the storage unit 40 stores the reference image data group 70.
  • the measurement target image data 71 is image data of the measurement target 4 captured by the camera 2.
  • a projection image of a two-dimensional pattern is projected onto the two balls.
  • image data as shown in FIG. A projection image of a two-dimensional pattern (a two-dimensional pattern image composed of line patterns arranged in the X-axis direction) displayed on the video screen 11 is projected onto the measurement object 4.
  • This image data is stored in the storage unit 40 as measurement target image data 71.
  • the depth estimation unit 45 uses a matching window MW between the image data (measurement target image data 71) of the measurement target 4 captured by the camera 2 and the reference image data group 70 stored in the storage unit 40. By performing image matching, the depth of the measurement object 4 is estimated based on the imaging position (position B) of the two-dimensional pattern by the projection optical system 12.
  • FIG. 29C shows a matching window MW set in the measurement target image data 71.
  • FIG. 29A shows a matching window MW corresponding to the matching window MW of FIG. 29C.
  • the matching window MW is a rectangular window whose longitudinal direction is the arrangement direction (X-axis direction) of the two-dimensional pattern included in the image data of the measurement object 4 captured by the camera 2.
  • the projected two-dimensional pattern is a line pattern arranged in the X-axis direction, it has information for obtaining the depth in the X-axis direction. Therefore, it is better to use the matching window MW that is long in the X-axis direction. This is because the accuracy can be improved.
  • step S51 the computer 3 performs calibration.
  • a flat screen that projects the projection light emitted from the projector 1 is used.
  • the encoding aperture 13C is attached to the projector 1
  • the image data of the two-dimensional pattern is output from the projection pattern setting unit 46 to the video screen 11
  • the computer 3 connects to the projector 1 as shown in FIG.
  • the position (depth) of the flat screen is updated (step S62).
  • the flat screen is placed in the initial position.
  • the initial position (the depth of the flat screen) is assumed to be known by other measuring means.
  • the first position is position A.
  • the camera 2 captures a projection image of the projector 1 projected on the flat screen (step S63).
  • Image data obtained by this imaging is sent from the camera 2 to the data acquisition unit 41, and the data acquisition unit 41 stores this image data in the storage unit 40 as one piece of image data in the reference image data group 70.
  • Store step S64. At this time, the image data is stored in association with the depth of the flat screen at that time.
  • the computer 3 determines whether or not the position of the flat screen is the last position (step S65).
  • the determination is negative.
  • step S65 If it is not the last position (step S65; No), the position of the flat screen is updated (step S62). Here, the position is shifted in the + d direction by ⁇ d from the position A. Thereafter, until the final position is reached (step S65; Yes), the screen position is updated (step S62), the projection image is captured (step S63), the image data is stored (step S64), and the final position is determined ( Step S65) is repeated. In this way, for each position from position A to position C, reference image data is generated at a constant sampling interval ⁇ d, and is associated with the depth as one piece of image data in the reference image data group 70. And stored in the storage unit 40.
  • step S65 If it is determined that it is the last position (step S65; Yes), the calibration is completed.
  • the measurement object 4 is installed in the measurement range F (step S52).
  • the computer 3 measures the depth of the measurement object 4 (step S53).
  • step S52 first, as shown in FIG. 32, a projection image of a two-dimensional pattern is projected onto the projector 1 (step S71). Subsequently, the computer 3 causes the camera 2 to capture a projection image projected on the measurement object 4 (step S72). Image data of the measurement object 4 captured by the camera 2 is sent to the computer 3. The data acquisition unit 41 of the computer 3 stores the image data of this projection image as measurement target image data 71 (step S73).
  • the depth estimation unit 45 reads the measurement target image data 71 (step S74).
  • the depth estimation unit 45 sets the matching window MW in the measurement target image data 71 (step S75).
  • a matching window MW is set at the upper left corner of the measurement target image data 71.
  • the depth estimation unit 45 reads one piece of reference image data from the reference image data group 70 (step S76). Subsequently, the depth estimation unit 45 calculates a correlation value in the matching window MW between the image data of the measurement object 4 and the read reference image data (step S77). Here, image matching between the region of the matching window MW in the measurement target image data 71 and the region of the matching window MW at the same position in the reference image data is performed, and the degree of coincidence between both images is calculated as a correlation value. .
  • the depth estimation unit 45 determines whether or not the read reference image data is the last reference image data (step S78). When it is not the last reference image data (step S78; No), the depth estimation unit 45 reads the next reference image data (step S76), calculates the correlation value (step S77), and determines the last reference image data (step). S78) is repeated.
  • the depth estimation unit 45 estimates the depth dt (step S79). For example, as illustrated in FIG. 34, the depth estimation unit 45 generates a graph indicating the change in the correlation value with respect to the depth corresponding to each reference image data. Further, the depth estimation unit 45 estimates the depth dt in the matching window MW by interpolation by fitting.
  • the depth estimation unit 45 determines whether or not the depth estimation by the matching window MW has been completed at all positions in the image data (step S80). If the estimation is not completed (step S80; No), the depth estimation unit 45 sets the matching window MW at another location in the image data (step S75), and reads the reference image data from the reference image data group 70. (Step S76), the process of calculating the correlation value between the measurement target image data 71 and the reference image data in the matching window MW (Step S77) is repeated until the last reference image data is obtained (Step S78; Yes). .
  • the depth estimation unit 45 estimates the depth of the measurement object 4 in the same manner as the previous time (step S79). Subsequently, the depth estimation unit 45 determines whether or not the depth estimation using the matching window MW has been completed at all positions in the measurement target image data 71 (step S80). If the estimation is not completed (step S80; No), the depth estimation unit 45 executes steps S75 ⁇ S76 ⁇ S77 ⁇ S78 again, and performs image matching with the reference image data of each depth in the matching window MW. Go to find the correlation value. When reading up to the last reference image data (step S78; Yes), the depth estimation unit 45 estimates the depth of the matching window MW (step S79).
  • the matching window MW moves in the image data, and the depth of the matching window MW is estimated.
  • the depth estimation unit 45 completes the depth measurement.
  • the estimated depth is stored in the storage unit 40 as depth data 74 and is displayed and output from the output unit 44.
  • a coded opening of an opening pattern in which a two-dimensional pattern in which line patterns are irregularly arranged in the X-axis direction is lined up in the same direction as the pattern is arranged. It is projected onto the measurement object 4 via 13C. Thereby, the projection image projected on the measurement object 4 becomes an image formed by convolution of the two-dimensional pattern and the opening pattern of the encoding opening 13C, and the pattern changes with respect to the change in the depth of the measurement object 4. The image changes greatly. For this reason, the depth resolution of the measurement object 4 can be improved.
  • the pattern after convolution also becomes an impulse train and there is no blur. For this reason, even if the depth direction changes greatly, the pattern is not blurred, and the merit that the measurement range is dramatically improved is born.
  • the depth of the measurement object 4 is estimated by image matching with the reference image data group 70 that has already been captured. Therefore, in order to estimate the depth of the measurement object 4, it is not necessary to perform a complicated operation such as a deconvolution operation using the opening pattern of the encoded aperture 13 ⁇ / b> C, and high-precision measurement that combines the DfD method and the stereo method. Is possible. That is, according to this embodiment, the three-dimensional measurement of the measurement object 4 can be performed with high accuracy while further reducing the amount of calculation.
  • the image data obtained by the camera 2 picking up the projection image of the two-dimensional pattern previously projected onto the two-dimensional plane via the projection optical system 12 and the two-dimensional plane The depth of the measurement object 4 is estimated by image matching with the reference image data group. For this reason, measurement is performed not only in the defocus of the projected image to be projected, but also in consideration of all the effects of parallax between the projector 1 and the camera 2, the aberration of the projection optical system 12, and the aberration of the optical system of the camera 2.
  • the depth of the object 4 can be estimated with high accuracy.
  • Embodiment 5 (estimation of an oblique shape). Next, a fifth embodiment of the present invention will be described.
  • the computer 3 includes the virtual slope image creation unit 48.
  • the virtual slope image creation unit 48 is a reference image of a two-dimensional plane captured by the camera 2 when a two-dimensional plane perpendicular to the optical axis AX of the projection optical system 12 is placed at a plurality of different positions with respect to the optical axis AX.
  • Each part of data (reference image data of the reference image data group 70) is synthesized.
  • a reference slope image data group 72 obtained when placed at a plurality of different angles with respect to the optical axis AX is generated.
  • the storage unit 40 sets a two-dimensional plane oblique to the optical axis AX of the projection optical system 12 with respect to the optical axis AX so that the depth varies along the arrangement direction of the line patterns constituting the projected two-dimensional pattern. Then, a reference image data group of a two-dimensional plane obtained when placed at a plurality of different angles is stored as a reference slope image data group 72.
  • the depth estimation unit 45 also performs image matching using the matching window MW between the image data of the measurement object 4 captured by the camera 2 and the reference slope image data group 72 stored in the storage unit 40. Thereby, the depth of the measuring object 4 is estimated with reference to the imaging position of the two-dimensional pattern on the image plane 11 by the projection optical system 12.
  • FIG. 36A schematically shows a method for generating a virtual slope.
  • the virtual slope is generated according to the following formula.
  • D is the depth
  • X is a coordinate in a direction having a spatial frequency component in a plane orthogonal to the optical axis AX of the projection optical system 12.
  • is the rotation angle of the plane
  • f is the focal length of the camera 2
  • D pivot is the depth in the rotation direction, that is, the position in the direction having the spatial frequency component of the virtual slope.
  • the partial data of the X position of the image data of the depth D is arranged at the position of the depth D pivot of the virtual slope.
  • the three-dimensional measurement process is executed according to the flowcharts shown in FIGS. 30 and 32 as in the fourth embodiment.
  • the calibration in step S51 is executed according to the flowchart of FIG.
  • This calibration is almost the same as the calibration shown in FIG. 31, but the virtual slope image creation unit 48 finally generates a reference slope image data group 72 based on the reference image data group 70 (step S66).
  • step S53 in the depth measurement in step S53 (FIG. 30), in the repetition of steps S76 ⁇ S77 ⁇ S78 in FIG. 32, the depth estimation unit 45 performs not only the reference image data group 70 but also the reference slope of the reference slope image data group 72. Image matching between the image data and the measurement target image data 71 is also performed to calculate a correlation value between them.
  • step S79 when the image data of the matching window MW has the highest correlation value with the reference slope image data, the depth estimation unit 45 estimates the depth using the virtual slope.
  • Embodiment 5 (creation of database by simulation calculation). Next, a fifth embodiment of the present invention will be described.
  • the computer 3 instead of actually capturing the reference image data group, the computer 3 (calculation unit) performs two-dimensional pattern information and aperture pattern information, as well as internal parameters of the projector (focal length and pixel aspect ratio). Depth estimation is performed by generating reference image data by calculation using information on internal parameters of the camera and the like. This eliminates the need to capture a large amount of reference image data, and eliminates the need to store the data.
  • the parameter information is estimated by performing calibration of the projector and the camera in advance.
  • Embodiment 6 (Coarse-to-fine by color). Next, a sixth embodiment of the present invention will be described.
  • the depth of the measurement object 4 is roughly measured, and the depth measurement range is narrowed based on the roughly obtained depth, and then the depth is precisely measured, so-called coarse-to-fine. Measurement is performed.
  • a color image composed of R (red), G (green), and B (blue) is displayed on the image plane 11 (transmission type liquid crystal) of the projector 1, and the camera 2
  • color image data composed of red), G (green), and B (blue) is captured.
  • color image data can be separated and extracted into red, green, and blue image data.
  • the projector 1 uses the encoding aperture 13C.
  • the computer 3 includes a projection pattern setting unit 46, a color image division unit 47, a storage unit 40, a depth estimation unit 45, and an output unit 44, as shown in FIG.
  • the projection pattern setting unit 46 outputs image data of a two-dimensional pattern displayed on the video screen 11 of the projector 1.
  • an image obtained by combining the blue two-dimensional pattern shown in FIG. 39A and the red two-dimensional pattern shown in FIG. 39B is displayed.
  • the blue two-dimensional pattern is a line pattern group having a long arrangement period in which line patterns are arranged in one direction (X-axis direction).
  • the red two-dimensional pattern is a line pattern group having a shorter cycle (higher spatial frequency component) than the blue two-dimensional pattern in the same direction as the blue two-dimensional pattern.
  • the color image division unit 47 inputs color image data captured by the camera 2.
  • the color image dividing unit 47 stores the red (R) image data obtained from the color image in the storage unit 40 as the reference R image data group 70A or the measurement target R image data 71A. Further, the color image dividing unit 47 stores the blue image data obtained from the color image in the storage unit 40 as the reference B image data group 70C or the measurement target B image data 71C.
  • the estimated depth is stored in the storage unit 40 as rough depth data 75. As described above, since the spatial frequency of the blue two-dimensional pattern is lower than that of the red two-dimensional pattern, the interval ⁇ d1 at which the blue reference image data is captured is larger than the interval ⁇ d2 in the red pattern.
  • the storage unit 40 has ⁇ d1, a blue reference image data group (reference B image data group 70C) captured by the camera 2 when placed at a plurality of different positions with respect to the optical axis AX of the projection optical system 12, and ⁇ d1. And a red reference image data group (reference R image data group 70A) picked up by the camera 2 when placed at a plurality of different positions with respect to the optical axis AX with a shorter ⁇ d2.
  • the depth estimation unit 45 performs image matching using the matching window MW between the measurement target B image data 71 ⁇ / b> C and the reference B image data group 70 ⁇ / b> C, thereby forming the image formation position of the two-dimensional pattern by the projection optical system 12.
  • the depth of the measurement object 4 with reference to is estimated.
  • the estimated depth is stored in the storage unit 40 as rough depth data 75.
  • the depth estimation unit 45 includes a measurement target R image data 71A obtained from the image data of the measurement target 4 captured by the camera 2 within a limited range centered on the depth stored in the coarse depth data 75, and a storage unit. By performing image matching using the matching window MW with the red reference R image data group 70A stored in 40, the measurement object 4 based on the imaging position of the two-dimensional pattern by the projection optical system 12 is used. Estimate the depth of.
  • the 3D measurement process of the 3D measurement system 100 is the same as the process shown in the flowchart of FIG.
  • the processing is basically performed according to the flow shown in FIG. 31, but in step S64, the color image dividing unit 47 detects red color from the color image data sent from the camera 2. Are extracted and stored in the storage unit 40 as one image data of the reference R image data group 70A. Further, the color image dividing unit 47 extracts blue image data from the color image data sent from the camera 2 and stores it in the storage unit 40 as one image data of the reference B image data group 70C.
  • step S53 The processing performed in the depth measurement (step S53) is shown in FIGS.
  • step S52 first, as shown in FIG. 40, a projection image of a two-dimensional pattern is projected onto the projector 1 (step S71). Subsequently, the computer 3 causes the camera 2 to capture a projection image projected on the measurement object 4 (step S72). The color image data of the measurement object 4 captured by the camera 2 is sent to the computer 3.
  • the color image dividing unit 47 of the computer 3 stores the red image data extracted from the color image data of the projection image as the measurement target R image data 71A, and the blue image data extracted from the color image data, The measurement target B image data 71C is stored (step S73).
  • the depth estimation unit 45 reads the measurement target B image data 71C (step S74).
  • the depth estimation unit 45 sets the matching window MW in the measurement target B image data 71C (step S75).
  • the depth estimation unit 45 reads one piece of reference image data from the reference B image data group 70C (step S76). Subsequently, the depth estimation unit 45 calculates a correlation value in the matching window MW between the measurement target B image data 71C of the measurement target 4 and the read reference image data (step S77). Here, image matching between the region of the matching window MW in the measurement target B image data 71C and the region of the matching window MW at the same position in the reference image data is performed, and the degree of coincidence of both images is calculated as a correlation value.
  • the depth estimation unit 45 determines whether or not the read reference image data is the last reference image data (step S78). When it is not the last reference image data (step S78; No), the depth estimation unit 45 reads the next reference image data from the reference B image data group 70C (step S76), calculates the correlation value (step S77), and last. The reference image data determination (step S78) is repeated.
  • the depth estimation unit 45 estimates the depth (step S79).
  • FIG. 42 shows a graph showing the change of the correlation value with respect to the depth obtained by the depth estimation unit 45.
  • the relationship between the depth and the correlation value in the blue image data is indicated by a point (Coarse).
  • the depth estimation unit 45 extracts several depth candidates of the measurement object 4 based on the change of the correlation value with respect to the depth. In the example of FIG. 42, three points with a correlation value of 1.0 are extracted.
  • the depth estimation unit 45 determines whether or not the depth estimation by the matching window MW has been completed at all positions in the image data (step S80). If the estimation is not completed (step S80; No), the depth estimation unit 45 sets the matching window MW at another location in the image data (step S75), and the reference image data from the reference B image data group 70C. The process of reading (step S76) and calculating the correlation value within the matching window MW between the measurement target B image data 71C and the reference image data (step S77) is the last reference image data (step S78; Yes). Repeat until.
  • the depth estimation unit 45 estimates the depth of the measurement object 4 in the same manner as the previous time (step S79). Subsequently, the depth estimation unit 45 determines whether or not the depth estimation by the matching window MW has been completed at all positions in the measurement target B image data 71C (step S80). If the estimation is not completed (step S80; No), the depth estimation unit 45 executes steps S75 ⁇ S76 ⁇ S77 ⁇ S78 again, and performs image matching with the reference image data of each depth in the matching window MW. Go to find the correlation value. When reading up to the last reference image data (step S78; Yes), the depth estimation unit 45 estimates the depth of the matching window MW (step S79).
  • the depth estimation unit 45 stores the estimation result as rough depth data 75 in the storage unit 40 (step S81).
  • the depth estimation unit 45 determines a depth search range (step S82). For example, as shown in FIG. 42, ranges A and B in which the correlation value is 0.5 or more centering on the depth at which the correlation value is 1.0 when image matching is performed on the measurement target B image data 71C. , C to limit the search range.
  • the depth estimation unit 45 reads the measurement target R image data 71A (step S83).
  • the depth estimation unit 45 sets the matching window MW in the measurement target R image data 71A (step S84).
  • the depth estimation unit 45 reads one piece of reference image data from the reference R image data group 70A (step S85). Subsequently, the depth estimation unit 45 calculates a correlation value in the matching window MW between the measurement target R image data 71A of the measurement target 4 and the read reference image data (step S86). Here, image matching between the region of the matching window MW in the measurement target R image data 71A and the region of the matching window MW at the same position in the reference image data is performed, and the degree of coincidence of both images is calculated as a correlation value.
  • the depth estimation unit 45 determines whether or not the read reference image data is the last reference image data (step S87). When it is not the last reference image data (step S87; No), the depth estimation unit 45 reads the next reference image data from the reference R image data group 70A (step S85), calculates a correlation value (step S86), and last. The reference image data determination (step S87) is repeated.
  • the depth estimation unit 45 estimates the depth (step S88). For example, as illustrated in FIG. 42, the depth estimation unit 45 generates a graph indicating a change in correlation value with respect to the depth corresponding to each reference image data. In FIG. 42, the estimation result based on red image data is indicated by a curve (fine).
  • the depth estimation unit 45 determines whether or not the depth estimation by the matching window MW has been completed at all positions in the image data (step S89). If the estimation is not completed (step S89; No), the depth estimation unit 45 sets the matching window MW at another location in the image data (step S84), and the reference image data from the reference R image data group 70A. The process of reading (step S85) and calculating the correlation value in the matching window MW between the measurement target R image data 71A and the reference image data (step S86) is the last reference image data (step S87; Yes). Repeat until.
  • the depth estimation unit 45 estimates the depth of the measurement object 4 in the same manner as the previous time (step S88). Subsequently, the depth estimation unit 45 determines whether or not the depth estimation using the matching window MW has been completed at all positions in the measurement target R image data 71A (step S89). If the estimation is not completed (step S89; No), the depth estimation unit 45 executes steps S84 ⁇ S85 ⁇ S86 ⁇ S87 again, and performs image matching with the reference image data of each depth in the matching window MW. Go to find the correlation value. When reading up to the last reference image data (step S87; Yes), the depth estimating unit 45 estimates the depth in the matching window MW (step S88). For example, in the graph of FIG. 42, the depth of the peak in the range B is estimated as the final depth.
  • the depth estimation unit 45 stores the estimation result as fine depth data 76 in the storage unit 40 (step S90).
  • the depth estimation unit 45 completes the depth measurement.
  • the fine depth data 76 is stored in the storage unit 40 and output from the output unit 44.
  • the depth of the measurement object 4 is roughly detected by the line pattern group (blue two-dimensional pattern), and then the search range is narrowed down to The depth of the measurement object 4 is precisely estimated by a line pattern group (red two-dimensional pattern) having a high frequency and a short sampling interval.
  • Embodiment 7 (Accuracy improvement by ambiguity reduction by three colors). Next, a seventh embodiment of the present invention will be described.
  • a color image is displayed on the video screen 11 of the projector 1, and the projection image is also a color projection image.
  • the camera 2 captures color image data of the projected image. This color image data can be separated into red, green and blue image data.
  • the computer 3 estimates the depth of the measurement object 4 by performing image matching based on red, green, and blue image data divided from the color image.
  • the computer 3 includes a projection pattern setting unit 46, a color image dividing unit 47, a storage unit 40, a depth estimating unit 45, and an output unit 44 as functional configurations.
  • the projection pattern setting unit 46 outputs a two-dimensional pattern displayed on the video screen 11 of the projector 1.
  • a two-dimensional pattern displayed on the video screen 11 of the projector 1.
  • the red two-dimensional pattern is a line pattern group composed of line pattern groups arranged in one direction (X-axis direction).
  • the green two-dimensional pattern has a height similar to that of the red two-dimensional pattern and is different from the red two-dimensional pattern.
  • the blue two-dimensional pattern has the same height as the red and green two-dimensional patterns and is different from the red and green two-dimensional patterns.
  • the depth estimation unit 45 performs image matching using the matching window MW between the measurement target R image data 71 ⁇ / b> A and the reference R image data group 70 ⁇ / b> A, thereby forming an imaging position of a two-dimensional pattern by the projection optical system 12.
  • the depth of the measurement object 4 with reference to is estimated.
  • the depth estimation unit 45 performs image matching using the matching window MW between the measurement target B image data 71C and the measurement target B image data 70C, thereby forming a two-dimensional pattern by the projection optical system 12.
  • the depth of the measurement object 4 is estimated based on the image position.
  • a three-dimensional measurement process is executed on the image data of each color according to the flowcharts of FIGS. 30, 31, and 32, respectively.
  • the computer 3 obtains the depth of the measurement object 4 individually for red, green, and blue image data.
  • step S64 storage of image data in FIG. 31
  • the color image dividing unit 47 separates red, green, and blue image data separated from the color image data, and references the red image data.
  • the R image data group 70A is stored in the storage unit 40
  • the green image data is stored in the storage unit 40 as the reference G image data group 70B
  • the blue image data is stored in the storage unit 40 as the reference B image data group 70C.
  • step S53 depth measurement in FIG. 32
  • the depth estimation unit 45 executes steps S74 to S79 in FIG. 32 for each of the measurement target R image data 71A, the measurement target G image data 71B, and the measurement target B image data 71C. Is done.
  • the depth estimation unit 45 calculates the average values of the depths obtained in red, green, and blue as final depth estimation values.
  • the calculated estimated depth value is stored in the storage unit 40 as depth data 55 and displayed and output by the output unit 44.
  • FIG. 45 shows the variation of the correlation value with respect to the depth in the image data of red, green, blue, and all colors. Although the two-dimensional patterns of red, green, blue, and all colors are different from each other, as shown in FIG. 45, the depths having the largest correlation values are in good agreement. Thereby, the depth calculated
  • Embodiment 8 (vertical / horizontal orthogonal pattern). Next, an eighth embodiment of the present invention will be described.
  • the computer 3 includes a projection pattern setting unit 46, a color image dividing unit 47, a storage unit 40, a depth estimating unit 45, and an output unit 44 as functional configurations.
  • the projection pattern setting unit 46 outputs a two-dimensional pattern displayed on the video screen 11 of the projector 1.
  • a two-dimensional pattern displayed on the video screen 11 of the projector 1.
  • the red pattern is a line pattern group composed of line patterns arranged in the X-axis direction.
  • the blue pattern is a line pattern group that has the same height as the red pattern and is composed of line patterns arranged in the Y-axis direction.
  • the color image division unit 47 inputs color image data captured by the camera 2.
  • the color image dividing unit 47 stores the red image data divided from the color image data in the storage unit 40 as the reference R image data group 70A or the measurement target R image data 71A.
  • the color image dividing unit 47 stores the blue image data divided from the color image data in the storage unit 40 as the reference B image data group 70C or the measurement target B image data 71C.
  • the depth estimation unit 45 performs image matching using the matching window MW between the measurement target R image data 71 ⁇ / b> A and the reference R image data group 70 ⁇ / b> A, thereby forming an imaging position of a two-dimensional pattern by the projection optical system 12.
  • the rough depth of the measurement object 4 with reference to is estimated.
  • the depth estimation unit 45 calculates the average value of the depth obtained in red and blue as the final depth estimation value (depth data 55).
  • a matching window MW used for image matching of a two-dimensional pattern as shown in FIG. 47A is used for image matching of a two-dimensional pattern as shown in FIG.
  • the matching window MW has a longitudinal direction in the Y-axis direction.
  • the aperture pattern is also in the Y-axis direction in accordance with the Y-axis projection pattern, the X-axis and Y-axis become impulse trains, improving accuracy due to redundancy and making the matching window less susceptible to occlusion. Benefits are born.
  • the depth of the upper contour portion and the left contour portion of the spherical measurement object 4 can be accurately estimated.
  • Embodiment 8 ' (opening by color filter). Next, an embodiment 8 'of the present invention will be described.
  • the aperture pattern includes a first aperture pattern having a color filter that blocks only light of the first color (for example, red) and only light of the second color (for example, blue). And a second opening pattern having a color filter to be included.
  • Embodiment 9 system using two projectors. Next, a ninth embodiment of the present invention will be described.
  • the three-dimensional measurement system 100 includes two projectors 1A and 1B.
  • the projectors 1A and 1B project a two-dimensional pattern onto the measurement object 4 from different directions.
  • the optical axis of the camera 2 is not coaxial with the optical axes of the projectors 1A and 1B.
  • the color of the projection light projected from the projectors 1A and 1B may be different, and a band pass filter may be provided on the camera 2 side to separate the image data of the two projection images.
  • the projection light projected from the projectors 1A and 1B may be polarized in different directions, and a polarizing filter or a polarizing beam splitter may be provided on the camera 2 side so that the two projected images can be captured separately.
  • a base line indicating a deviation between the optical axis AX of the projector 1A and the optical axis of the optical system of the camera 2 is a base line B1, and the optical axis AX of the projector 1B and the light of the optical system of the camera 2 are used.
  • a base line indicating a deviation from the axis is defined as a baseline B2.
  • the projectors 1A and 1B may be arranged so that the base lines B1 and B2 are orthogonal to each other.
  • the direction of the spatial frequency component of the encoding apertures 13D and 13E in the projectors 1A and 1B is set to the direction in which the base lines B1 and B2 extend.
  • the depth of the measurement object 4 is estimated by obtaining a correlation value between two pieces of image data by image matching and performing image matching.
  • the method for obtaining the depth of the measurement object 4 is not limited to this.
  • a feature amount is obtained for each region having the same size as the matching window MW in the image data, a Kd tree having an index as a depth is generated, image matching is performed by searching using the Kd tree, and the depth of the measurement object 4 is determined. May be estimated.
  • the sum of the luminance for each X coordinate in the image data in the matching window MW in the image data B, C, and D for each color may be used as the feature vector. .
  • red, green, and blue colors can be appropriately changed to other colors (including red, green, and blue).
  • a coded opening corresponding to each color may be provided in the projector as a coded opening.
  • Embodiment 10 Mounting by DOE (Diffractive Optical Element)). Next, an embodiment 10 of the invention will be described.
  • a laser light source 80 is used as the light source of the three-dimensional measurement system.
  • the laser emitted from the laser light source 80 enters a DOE 81 as a first DOE that outputs a dot row (for example, a random dot pattern irregularly arranged two-dimensionally).
  • the output is incident on a DOE 82 as a second DOE that forms a line pattern row.
  • the DOEs 81 and 82 attenuate the light quantity by only a few percent, this system has an advantage that the pattern (planar laser group 83) can be formed with almost no attenuation of the light quantity.
  • the dot row and the line pattern may be reversed. Alternatively, both may be a line pattern or a dot pattern.
  • the optical axis AX of the projection optical system 12 of the projector 1 and the optical axis of the camera 2 are set to be non-coaxial, but the light of the projection optical system 12 of the projector 1 is set.
  • the axis AX and the optical axis of the camera 2 may be set coaxially.
  • the central part that performs processing of the computer 3 composed of the control unit 31, the main storage unit 32, the external storage unit 33, the operation unit 34, the display unit 35, the communication unit 36, the internal bus 30, and the like is a dedicated system. Regardless, it can be realized using a normal computer system.
  • a computer program for executing the above operation is stored and distributed in a computer-readable recording medium (flexible disk, CD-ROM, DVD-ROM, etc.), and the computer program is installed in the computer.
  • the computer 3 that executes the above-described processing may be configured.
  • the computer 3 may be configured by storing the computer program in a storage device included in a server device on a communication network such as the Internet and downloading it by a normal computer system.
  • the functions of the computer 3 are realized by sharing an OS (operating system) and an application program or by cooperation between the OS and the application program, only the application program portion may be stored in a recording medium or a storage device. .
  • the computer program may be posted on a bulletin board (BBS, “Bulletin” Board System) on the communication network, and the computer program may be distributed via the network.
  • BBS bulletin board
  • the computer program may be started and executed in the same manner as other application programs under the control of the OS, so that the above-described processing may be executed.

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Theoretical Computer Science (AREA)
  • Length Measuring Devices By Optical Means (AREA)
  • Image Analysis (AREA)

Abstract

投影光により投影光学系を介して2次元パターンが投影された計測対象物(4)を、カメラ(2)により撮像して得られた画像データと、計測対象物(4)の奥行きに対応付けられて予め取得された参照画像データ群とを、比較することにより計測対象物(4)の奥行きを推定する3次元計測システム(100)である。2次元パターンは投影光学系に設けられた符号化開口パターンを介して計測対象物(4)に投影される。計測対象物(4)の奥行きは、投影光学系と撮像手段の計測対象物(4)に対する視差に基づく画像マッチングを行うステレオ法と、計測対象物(4)の画像データにおける符号化開口パターンの光軸方向のボケに基づくDfD法の双方を適用した画像処理により推定される。

Description

3次元計測システム、3次元計測方法及び3次元計測プログラム
 この発明は、3次元計測システム、3次元計測方法及び3次元計測プログラムに関する。
 近年、様々な分野で物体の3次元形状を計測する研究が盛んに行われている。中でも、装置の単純さとコストの観点から構造化光(パターン光)とカメラを用いたアクティブ3次元計測手法が主流となっている。アクティブ3次元計測手法では、計測対象となる物体へパターン光が投影され、その物体の表面で反射された光がカメラで観測される。さらに、パターン光により投影される元のパターンと物体上で観測されるパターンとの対応関係による三角測量で物体の3次元形状(フォーカス方向の奥行き)がカメラの撮像画像から復元される。対応関係の計算時間の効率化のために、2次元パターン光をビデオプロジェクタで投影する手法が多く提案されている(例えば、非特許文献1参照)。
 しかし、ビデオプロジェクタは被写界深度が浅く、フォーカス方向の奥行きの計測レンジに制約が存在する。この計測レンジの制約を解決するために、被写界深度の深いレーザ光源を用いる手法が提案されている。しかし、レーザ光源を用いた場合には、特殊な光学系が必要になるため、用途に合わせた光学系を構築することが困難になる。
 計測レンジの狭さを解消する他の手法として、観測パターンのボケから奥行きを推定するDfD(Depth from Defocus)法が提案されている(例えば、非特許文献2参照)。DfD法は、観測パターンのボケを前提としているため、被写界深度による制約が少ない。しかし、この手法の計測装置では光源にアレイLEDを用いるため、密なパターンを物体に投影することができず、得られる奥行きマップが疎であるという不都合があった。すなわち、DfD手法は、奥行きの変化に対するパターンの変化がレンズの口径によって制限されるため、奥行き分解能が低いという不都合がある。また、奥行きの推定において逆畳込み処理を大量に行う必要があるため、計算量が膨大になるという不都合もあった。
 DfD法は、一般的にはカメラのボケに基づく手法として知られており、条件さえ揃えば1枚の画像から奥行きを推定することが可能である。しかし、DfD法を良好に行うためには、計測対象に高周波なテクスチャが存在することが前提となるため、現実に適用できる範囲は限定的である。そこで、パターン投影光のボケと撮影カメラのボケの両方を数理的にモデル化し、リアルタイムに距離計測を実現するDfD法が提案されている(例えば、非特許文献3参照)。これは、市松模様状のパターンを物体に投影し、その撮影結果のボケからDfDを行う方法であり、この方法によれば、計測対象にテクスチャが無くとも計測が可能になる。しかし、非特許文献3に記載の手法では、合焦距離の異なる2枚の画像を必要とし、レンズの撮像素子との間にプリズムを設置するなど、撮影側の光学系を工夫する必要があった。
 また、プロジェクタの投影像のボケを解析し、投影面の奥行きを推定する手法が提案されている(例えば、非特許文献4参照)。この手法によれば、ライン状の投影パターンの位相をシフトさせながら画像を取得することで、撮影画像のピクセルごとの奥行きを推定することができる。しかし、この手法では、投影パターンを変更した複数枚の画像を必要とするため、動いている物体の奥行き計測が困難であるという不都合があった。
 また、プロジェクタの投影光学系に符号化開口を装着することで生成される構造化光を利用した3次元計測方法が開示されている(例えば、非特許文献5参照)。この方法では、格子状に符号パターンが設けられた符号化開口をつけた光源でパターン投影し、計測対象物体上で観測された投影パターンのボケ具合を利用して、DfDにより各点の距離を求める。
 下記非特許文献5に開示された方法では、投影パターンのボケの大きさ、すなわち点広がり関数(Point Spread Function、以下、PSFともいう)のスケールを規定するパラメータをスケールパラメータとして用いる。まず、複数の既知の奥行きにおいて実際に観測したボケ画像を用いて、それぞれの奥行きにおけるPSFのスケールを獲得し、フィッティングにより正確なスケールパラメータを求めるキャリブレーションを行う。さらに、実際に物体に投影された構造化光による投影パターンを撮像し、撮像により得られた投影パターンの画像データを、キャリブレーションで得られたスケールパラメータに従って、奥行きによって異なるPSFを用いた逆畳込み演算を行い、格子状に配置された各復元パターンがボケのない符号化開口の符号パターンに最も類似する奥行きを、推定結果として求める。
 しかしながら、上記非特許文献5に開示された方法では、逆畳込み演算と類似度の計算をすべての奥行きについて行うため、計算量の多い逆畳込み演算の演算回数が膨大となって、計算時間が長くなってしまう。また、計算結果が不安定となることも起こる。
 また、武田らは、単なるステレオ法においても、符号化開口の導入によりボケによる精度低下を抑制できることを示し、さらにDfD法とステレオ法とを融合した手法を提案した(例えば、非特許文献6、7)。
Ryusuke Sagawa, Nozomu Kasuya, Kazuhiro Sakashita, Ryo Furukawa, Hiroshi Kawasaki, Yasushi Yagi, "Grid-based Active Stereo with Single-colored Wave Pattern for Dense One-shot 3D Scan," Proc. 2012 Second Joint 3DIM/3DPVT Conference, pp. 363-370 (2012) H. Kawasaki, Y. Horita, H. Masuyama, S. Ono, M. Kimura, Y. Takane, "Optimized Aperture for Estimating Depth from Projector's Defocus", International Conference on 3D Vision (3DV), Jun. 2013 (Seattle, USA) Nayar, S., Watanabe, M., and Noguchi, M., "Real-Time Focus Range Sensor", IEEE Transactions on Pattern Analysis and Machine Intelligence, Vol. 18, No. 12, pp. 1186-1198 (1996) Zhang, L. and Nayar, S.K., "Projection Defocus Analysis for Scene Capture and Image Display", ACM Trans. on Graphics (also Proc. of ACM SIGGRAPH) (2006). 堀田祐樹、小野智司、川崎洋、木村誠、高根靖雄、"符号化開口を用いたプロジェクタカメラシステムによるボケを利用した三次元計測手法"、電子情報通信学会論文誌 D Vol.196-D No.8 pp.1828-1833、一般社団法人電子情報通信学会2013 Y. Takeda, S. Hiura, and K. Sato, Coded aperture stereo-for extension of depth of field and refocusing.," VISAPP (1), pp.103-111, 2012. Y. Takeda, S. Hiura, and K. Sato, :Fusing depth from defocus and stereo with coded apertures," Computer Vision and Pattern Recognition (CVPR), IEEE Conference on IEEE, pp.209-216 (2013)
 上述のように、従来の3次元計測方法にはそれぞれ一長一短があり、より計算量を低減しつつ、精度良く計測を行うことが求められている。
 この発明は、上記のような問題点を解決するためになされたものであり、より計算量を低減しつつ、精度良く計測対象物の3次元計測を行うことができる3次元計測システム、3次元計測方法及び3次元計測プログラムを提供することを目的とする。
 上記目的を達成するため、この発明の第1の観点に係る3次元計測システムは、
 投影光により投影光学系を介して2次元パターンが投影された計測対象物を、撮像手段により撮像して得られた画像データと、前記計測対象物の奥行きに対応付けられて予め取得された参照画像データ群とを、比較することにより前記計測対象物の奥行きを推定する3次元計測システムであって、
 前記2次元パターンは前記投影光学系に設けられた符号化開口パターンを介して前記計測対象物に投影されるとともに、
 前記計測対象物の奥行きは、前記投影光学系と前記撮像手段の前記計測対象物に対する視差に基づく画像マッチングを行うステレオ法と、前記計測対象物の画像データにおける前記符号化開口パターンの光軸方向のボケに基づくDfD法の双方を適用した画像処理により推定されることを特徴とする。
 前記参照画像データ群は、前記撮像手段により撮像して得られた画像データまたはシミュレーションにより算出された画像データである、
 こととしてもよい。
 前記参照画像データ群は、前記投影光の光軸上の複数の位置に2次元平面を置いたときにそれぞれ前記撮像手段で撮像して得られた前記2次元平面の画像データを含む
 こととしてもよい。
 前記2次元平面は、前記投影光学系の光軸に直交している、
 こととしてもよい。
 前記参照画像データ群は、
 前記投影光学系の光軸に斜交する2次元平面を、前記光軸に対して複数の異なる角度でそれぞれ置いたときに得られる2次元斜面の画像データを含む、
 こととしてもよい。
 前記2次元斜面の画像データは、
 撮像部により撮像される前記2次元平面の参照画像データを部分的に合成することにより、作成される、
 こととしてもよい。
 前記画像マッチングは、マッチング窓を用いて行われる、
 こととしてもよい。
 前記2次元パターンは複数の異なる投影パターンを有し、
 前記2次元パターンを構成する第1の投影パターンにより逆畳み込み演算を行わずに奥行き方向の探索範囲を決定するとともに、
 前記2次元パターンを構成し、前記第1の投影パターンとは異なる第2の投影パターンにより、前記探索範囲において逆畳み込み演算を行うことによる画像の階層的復元法を用いて前記計測対象物の奥行きを推定する、
 こととしてもよい。
 前記2次元パターン及び前記符号化開口パターンの組み合わせは、光学的に同じ方向に並ぶラインパターン列同士、2次元状に配列されたドットパターン同士、前記ラインパターン列と前記ドットパターンとの組み合わせのいずれかであり、前記2次元パターン及び前記符号化開口パターンの少なくとも一方は不規則なランダムパターンである、
 こととしてもよい。
 前記2次元パターンには、
 第1の色により形成された第1の2次元パターン群と、
 第2の色により形成され、前記第1の2次元パターン群より空間周波数成分の高い第2の2次元パターン群と、
 が含まれている、
 こととしてもよい。
 前記2次元パターンには、
 第1の色により形成された第1のラインパターン群と、
 第2の色により形成され前記第1のラインパターン群と直交する第2のラインパターン群と、
 が含まれている、
 こととしてもよい。
 前記符号化開口パターンには、
 前記第1の色の光のみを遮断するカラーフィルタを備えた第1の符号化開口パターンと、
 前記第2の色の光のみを遮断するカラーフィルタを備えた第2の符号化開口パターンと、
 が含まれている、
 こととしてもよい。
 前記撮像手段で撮像された前記計測対象物の画像データから得られる各色の画像データと、同じ色の前記参照画像データ群との間で前記マッチング窓を用いた画像マッチングを行うことにより、2次元パターンの結像位置を基準とする前記計測対象物の奥行きを求め、各色で求められた奥行きに基づいて、前記計測対象物の奥行きを推定する、
 こととしてもよい。
 前記2次元パターンを構成するパターンの配列方向にずれるように、前記撮像手段の光学系の光軸が、前記投影光の光軸と非同軸に設定されている、
 こととしてもよい。
 前記2次元パターンは、
 第1の方向から前記計測対象物に前記2次元パターンを投影する第1の投影手段と、
 第2の方向から前記計測対象物に前記2次元パターンを投影する第2の投影手段と、により投影される、
 こととしてもよい。
 前記第1の投影手段と前記撮像手段との光軸のずれの方向が、前記第2の投影手段と前記撮像手段との光軸のずれの方向と直交する、
 こととしてもよい。
 前記撮像手段の光軸と前記投影光の光軸とが一致するように設定されている、
 こととしてもよい。
 この発明の第2の観点に係る3次元計測方法は、
 投影光により投影光学系を介して2次元パターンが投影された計測対象物を、撮像手段により撮像して得られた画像データと、前記計測対象物の奥行きに対応付けられて予め取得された参照画像データ群とを、比較することにより前記計測対象物の奥行きを推定する3次元計測方法であって、
 前記2次元パターンは前記投影光学系に設けられた符号化開口パターンを介して前記計測対象物に投影されるとともに、
 前記計測対象物の奥行きは、前記投影光学系と前記撮像手段の前記計測対象物に対する視差に基づく画像マッチングを行うステレオ法と、前記計測対象物の画像データにおける前記符号化開口パターンの光軸方向のボケに基づくDfD法の双方を適用した画像処理により推定されることを特徴とする。
 この発明の第3の観点に係る3次元計測プログラムは、
 投影光により符号化開口パターンが設けられた投影光学系を介して2次元パターンが投影された計測対象物を、撮像手段により撮像して得られた画像データと、前記計測対象物の奥行きに対応付けられて予め取得された参照画像データ群とを、比較することにより前記計測対象物の奥行きを推定するコンピュータを、
 前記計測対象物の奥行きを、前記投影光学系と前記撮像手段の前記計測対象物に対する視差に基づく画像マッチングを行うステレオ法と、前記計測対象物の画像データにおける前記符号化開口パターンの光軸方向のボケに基づくDfD法の双方を適用した画像処理により推定する推定部として機能させることを特徴とする。
 この発明によれば、2次元パターンが、符号化開口パターンを介して計測対象物に投影される。これにより、計測対象物に投影される投影像は、2次元パターンと符号化開口パターンとの畳込みにより形成される像となり、計測対象物の奥行きの変化に対してパターンの変化が大きい画像となる。このため、計測対象物の奥行き分解能を向上することができる。また、計測対象物の奥行きは、前記計測対象物の奥行きに対応付けられて予め取得された参照画像データ群との画像マッチングにより推定される。したがって、計測対象物の奥行きを推定するのに符号化開口の開口パターンによる逆畳込み演算などの複雑な演算を行う必要がなくなるうえ、DfD法とステレオ法とを融合した高精度な計測が可能となり、光学系の収差による推定誤差を低減することも可能となる。すなわち、この発明によれば、より計算量を低減しつつ、精度良く計測対象物の3次元計測を行うことができる。
この発明の実施の形態1に係る3次元計測システムの概略的な構成を示す斜視図である。 図1の3次元計測システムの光学系の構成を示す図である。 符号化開口の符号パターンの一例を示す図である。 フォーカス方向に関する符号パターンの被投影パターンの変化を示す図である。 投影パターンの一例(その1)を示す図である。 符号化開口のフォーカス方向に関する被投影パターンの変化(その1)を示す図である。 投影パターンの一例(その2)を示す図である。 符号化開口のフォーカス方向に関する被投影パターンの変化(その2)を示す図である。 図1のコンピュータのハードウエア構成を示すブロック図である。 図1のコンピュータの機能構成を示すブロック図である。 孤立パターンのローカル・バイナリ・パターンのヒストグラムと、奥行きとの相関関係を示す図である。 孤立パターンの画像データのローカル・バイナリ・パターンのヒストグラムと、ヒストグラムデータベースに登録された複数のヒストグラムとのマッチングを示す図である。 スケールパラメータのフィッティングの一例を示す図である。 逆畳込み演算及びマッチングの流れの一例を示す図である。 スライディングウインドウの一例を示す図である。 スライディングウインドウ方式での処理の流れの一例を示す図である。 奥行きと視差との関係を示す図である。 グラフカット処理の一例を示す図である。 階層復元の一例を示す図である。 3次元計測処理のフローチャートである。 キャリブレーションのフローチャート(その1)である。 キャリブレーションのフローチャート(その2)である。 初期計測のフローチャートである。 ファイン計測のフローチャートである。 3次元計測システムの適用例を示す図である。 この発明の実施の形態2に係る3次元計測システムの光学系の構成を示す図である。 この発明の実施の形態3に係る3次元計測システムの概略的な構成を示すブロック図である。 この発明の実施の形態4に係る3次元計測システムの概略的な構成を示す斜視図である。 映像面に表示される2次元パターンの一例を示す図である。 符号化開口の一例を示す図である。 フォーカス方向に関する符号パターンの被投影パターンの変化を示す図である。 フォーカス方向に関する2次元パターンの投影像の変化を示す図である。 図25Aのコンピュータの機能構成を示すブロック図である。 フォーカス方向に得られる参照画像データ群の一例である。 計測対象物の一例である。 計測対象物に投影される投影像の画像データの一例である。 図25Aの3次元計測システムにおける3次元計測処理のフローチャートである。 図30のキャリブレーションのフローチャートである。 図30の奥行き計測のフローチャートである。 マッチング窓を設定する様子を示す図である。 フィッティングにより、奥行きを推定する様子を示す図である。 この発明の実施の形態5に係る3次元計測システムの機能構成を示すブロック図である。 仮想斜面の参照画像データが生成される様子を示す図である。 計測対象物に投影される投影像の画像データの一例である。 計測対象物の奥行きの推定結果の一例である。 仮想斜面の参照画像データでの画像マッチングにより推定された計測対象物上の法線マップである。 仮想斜面で画像マッチングにより推定された計測対象物の奥行きの推定結果の一例である。 図35のコンピュータにおけるキャリブレーションのフローチャートである。 この発明の実施の形態6に係る3次元計測システムの機能構成を示すブロック図である。 青色の2次元パターンの一例である。 赤色の2次元パターンの一例である。 奥行き計測のフローチャート(その1)である。 奥行き計測のフローチャート(その2)である。 Coarse-to-fineの奥行き計測の一例である。 この発明の実施の形態7に係る3次元計測システムの機能構成を示すブロック図である。 赤色の2次元パターンの一例である。 緑色の2次元パターンの一例である。 青色の2次元パターンの一例である。 赤色、緑色、青色の画像データにおける奥行きと相関値との関係を示すグラフである。 この発明の実施の形態8に係る3次元計測システムの機能構成を示すブロック図である。 赤色の2次元パターンの一例である。 青色の2次元パターンの一例である。 奥行きの推定結果の一例を示す図である。 この発明の実施の形態9に係る3次元計測システムの構成を示す模式図である。 ベースラインと符号化開口との関係を示す図である。 Kd木の探索による画像マッチングを示す図である。 この発明の実施の形態10に係る3次元計測システムにおけるDOE(Diffractive Optical Element)を用いたレーザ光源の実装例を示す図である。
 以下、この発明の実施の形態について図面を参照して詳細に説明する。
実施の形態1.
 まず、この発明の実施の形態1について説明する。
 図1には、3次元計測システム100の概略的な構成が示されている。図1に示すように、3次元計測システム100は、プロジェクタ1とカメラ2とコンピュータ3とを備える。プロジェクタ1は、投影光(構造化光)を計測対象物4に投影する投影部である。カメラ2は、その投影光(構造化光)により計測対象物4に投影された被投影パターン(投影像)を撮像する撮像部である。カメラ2とコンピュータ3との間は、通信ネットワークで接続されている。この通信ネットワークにより、カメラ2とコンピュータ3との間で画像データの送受信が可能となる。コンピュータ3は、カメラ2での撮像により得られた画像データに基づいて、計測対象物4の3次元形状(プロジェクタ1から見た計測対象物4の奥行き)を計測する計測部である。
 図2には図1の3次元計測システム100の光学系の構成が示されている。図2に示すように、プロジェクタ1は、映像面11と投影光学系12と符号化開口13とを備える。光源から発せられた投影光は、映像面11を透過する。映像面11は、例えば透過型の液晶素子であり、映像面11には映像(2次元パターン)が表示されている。したがって、映像面11を透過した光は、映像面11に表示された映像の情報を含んだ光となる。この光は、投影光学系12に入射する。
 投影光学系12は、入射した光を外部に投影する。投影光学系12は、屈折光学系であり、映像面11に表示された映像を結像面に結像させる。
 投影光学系12の出射面には符号化開口13が装着されている。図3Aに示すように、符号化開口13には、符号パターン(符号化開口パターン)5が設けられている。符号パターン5は左右非対称なパターンである。投影光学系12を出射した光は、符号パターン5の開口部分を介してプロジェクタ1から出射される。符号パターン5では、図3Aに示す白の部分が光を透過させる。これにより、プロジェクタ1の出射光は、符号パターン5の形状の情報を含んだ光(構造化光)となる。
 図2に戻り、投影光学系12の光軸AXに沿った座標軸dの原点を投影光学系12の中心とする。プロジェクタ1の出射光は、投影光学系12の光軸AXを中心としながら座標軸dの+d方向に進み、点dpで合焦する。プロジェクタ1の映像面11は、点dpとは結像関係にある。したがって、点dpにスクリーンを置くと、そのスクリーンには、映像面11に表示された映像が結像する。この結像位置が位置Bである。
 一方、符号化開口13は、結像映像と畳み込みの関係にあり、フーリエ変換などでその性質を解析可能である。したがって、映像面11において点状の投影パターンを投影した場合、符号化開口13の符号パターン5は、点dp、すなわち合焦状態では点状のパターンとなり、デフォーカスするにつれて、符号パターン5の像が現れてくるようになる。この実施の形態に係る3次元計測システム100は、デフォーカス状態にある符号パターン5の画像データを処理することにより、投影光学系12により結像する投影パターン(2次元パターン)の結像位置dpを基準とする計測対象物4の光軸AXの方向(座標軸dの方向)の奥行きを計測する。符号パターン5の像を読み取りできる範囲は、位置Aと位置Cとの間であるため、計測対象物4の奥行きの探索範囲は、位置Aから位置Cまでの範囲Fとなる。図3Bに示すように、計測対象物4に投影される符号パターンの投影像(被投影パターン)は、座標軸dの方向(すなわち投影光学系12のフォーカス方向)の奥行きに応じて変化する。
 この実施の形態では、映像面11に2種類の映像が表示される。図4Aに示す投影パターン11Aと図5Aに示す投影パターン11Bである。
 図4Aに示すように、投影パターン11Aでは、複数の点状の第1投影パターンが4行4列の格子状に設けられている。この複数の第1投影パターンからなる符号パターン5を介した構造化光の投影により、計測対象物4には符号パターン5の像(第1被投影パターン)が形成される。図4Bには、符号化開口13Aにおけるフォーカス方向に関するパターン像の変化が示されている。図4Bに示すように、合焦位置Bにおいて、投影パターン11Aのパターン像は、4×4のほぼ点状のパターンとなるが、デフォーカス状態にある位置A、Cでは、符号パターン5の像が4行4列に並ぶ配列パターンとなる。
 符号パターン5は非対称となっているため、-d方向にデフォーカスした位置Aと、+d方向にデフォーカスした位置Cとでは、符号パターン5の像が異なっている。このため、各符号パターン5の形状(ボケ状態)を解析すれば、被投影パターンがどちらの方向にどの程度デフォーカスしているのかを求めることができる。
 前述のように、位置Aから位置Cまでが、投影光学系12のフォーカス方向に関する奥行きの探索範囲Fであるが、探索範囲Fにおいて、符号化開口13Aの符号パターン5を介した投影像では、符号パターン5の像が他の符号パターン5の像と干渉が少ないように、映像面11における投影パターン11Aは、疎な配置となっている。特に、全く干渉しないように配置すると、投影パターン11Aの配列密度は疎となるが、処理は安定する。コンピュータ3は、符号化開口13Aを介した構造化光の投影により計測対象物4に形成された複数の被投影パターン(孤立パターン)の画像データ(第1の画像データ)に基づいて、投影光学系12のフォーカス方向に関する各被投影パターンの奥行きの探索範囲を計測する。
 図5Bに示すように、映像面11に表示された投影パターン11Bでは、複数の第2の点状パターンが7行7列の格子状に設けられている。すなわち、投影パターン11Bでは、点状パターンの配列密度が投影パターン11Aよりも密となっている。図5Bに示すように、合焦位置Bにおいて、投影パターン11Bの像は、7×7のドット状のパターンとなるが、デフォーカス状態にある位置A、Cでは、符号パターン5の像が7行7列に並ぶ配列パターンとなる。
 符号パターン5は非対称となっているため、-d方向にデフォーカスした位置Aと、+d方向にデフォーカスした位置Cとでは、符号パターン5の像が異なっている。このため、各符号パターン5の形状(ボケ状態)を解析すれば、その被投影パターンがどちらの方向にどの程度デフォーカスしているのかを求めることができる点は、投影パターン11Aと同じである。
 投影パターン11Bは、投影パターン11Aの符号パターンよりも、密に配列されているので、投影光学系12のフォーカス方向に関する奥行きの探索範囲F(位置A~位置C)において、符号化開口13Bの符号パターン同士が大きく重なる区間が出てくる。
 コンピュータ3では、投影パターン11Bを用いた構造化光の投影により計測対象物4に形成された被投影パターンの画像データ(第2の画像データ)に対し、投影光学系12のフォーカス方向に関して投影パターン11Aを用いて計測された奥行きの探索範囲に絞り込んで逆畳込み演算を行う。この逆畳込み演算により、複数の投影パターン11Bにそれぞれ対応する複数の復元パターンが形成される。コンピュータ3は、その演算により得られた復元パターンと投影パターン11Bとの類似度計算により、投影光学系12のフォーカス方向に関する各復元パターンの奥行きを計測する。
 符号化開口13Aと符号化開口13Bとは、投影光学系12に選択的に装着される。その選択は手動によって行われてもよいし、自動的に、例えばコンピュータ3の制御により行われるようにしても良い。あるいは、カラーフィルタを用いて、別々の透過色として配置してもよい。また、その場合、投影パターンの色もそれに合わせて配色すると良い。選択的に装着した符号化開口13A、13Bを介した光は、前述のように、各符号パターン5の構造情報を含む構造化光となる。この構造光は投影光として計測対象物4(キャリブレーションの際には平面スクリーン)に投影される。
 カメラ2は、構造化光により計測対象物4に投影された被投影パターンを撮像する。カメラ2は、光軸AX上に設置されていても、されていなくても良い。プロジェクタ1とカメラ2が同軸ではない場合、ハーフミラーなどを使用する必要がなく、より明るいパターンを計測することが出来る他、視差を利用した計測の高精度化がなされるというメリットがある。
 コンピュータ3は、カメラ2での撮像により得られた画像データに基づいて、計測対象物4の3次元形状を計測する。上述のように、計測対象物4の各符号パターン5の像の形成状態は、座標軸dの位置に依存するため、計測対象物4の各符号パターン5の像の形成状態を画像解析することにより、計測対象物4のフォーカス方向の奥行きを求めることができる。
 図1のコンピュータ3のハードウエア構成を示す図6に示すように、コンピュータ3は、制御部31、主記憶部32、外部記憶部33、操作部34、表示部35及び通信部36を備える。主記憶部32、外部記憶部33、操作部34、表示部35及び通信部36はいずれも内部バス30を介して制御部31に接続されている。
 制御部31は、CPU(Central Processing Unit)等から構成されている。このCPUが、外部記憶部33に記憶されているプログラム39を実行することにより、図1に示すコンピュータ3の各構成要素が実現される。
 主記憶部32は、RAM(Random-Access Memory)等から構成されている。主記憶部32には、外部記憶部33に記憶されているプログラム39がロードされる。この他、主記憶部32は、制御部31の作業領域(データの一時記憶領域)として用いられる。
 外部記憶部33は、フラッシュメモリ、ハードディスク、DVD-RAM(Digital Versatile Disc Random-Access Memory)、DVD-RW(Digital Versatile Disc ReWritable)等の不揮発性メモリから構成される。外部記憶部33には、制御部31に実行させるためのプログラム39があらかじめ記憶されている。また、外部記憶部33は、制御部31の指示に従って、このプログラム39の実行の際に用いられるデータを制御部31に供給し、制御部31から供給されたデータを記憶する。
 操作部34は、キーボード及びマウスなどのポインティングデバイス等と、キーボードおよびポインティングデバイス等を内部バス30に接続するインターフェイス装置から構成されている。操作部34を介して、操作者が操作した内容に関する情報が制御部31に入力される。
 表示部35は、CRT(Cathode Ray Tube)またはLCD(Liquid Crystal Display)などから構成され、操作者が操作情報を入力する場合は、操作用の画面が表示される。
 通信部36は、シリアルインターフェイスまたはパラレルインターフェイスから構成されている。通信部36は、通信ネットワークを介してカメラ2と接続されており、カメラ2から画像データを受信する。
 図1に示すコンピュータ3の各種構成要素は、図6に示すプログラム39が、制御部31、主記憶部32、外部記憶部33、操作部34、表示部35及び通信部36などをハードウエア資源として用いて実行されることによってその機能を発揮する。
 図6に示すようなハードウエア構成を有するコンピュータ3は、その機能構成として、図7に示すように、記憶部40と、データ取得部41と、初期計測部42と、ファイン計測部43と、出力部44とを備える。
 記憶部40は、図6に示すハードウエア構成のうち、外部記憶部33に対応する。記憶部40は、各種データ(画像データ50A、50B、ヒストグラムデータベース51、奥行き範囲データ52、スケールパラメータ53、奥行きデータ54)を記憶する。
 データ取得部41は、図6に示すハードウエア構成のうち、制御部31、操作部34、通信部36に対応する。データ取得部41は、カメラ2から送信された画像データを、画像データ50A、50Bとして、記憶部40に記憶する。操作部34の操作入力により、カメラ2から送信された画像データを、画像データ50A、50Bのいずれかとして記憶部40に記憶する。
 投影パターン11Aが投影され符号化開口13Aが投影光学系12に装着されている場合に、データ取得部41は、操作部34の操作入力により、カメラ2で撮像された画像データを画像データ50Aとして記憶部40に記憶する。すなわち、画像データ50Aは、符号化開口13Aを介した構造化光の投影により計測対象物4に形成された複数の孤立パターン(図4B参照)の第1の画像データである。
 一方、投影パターン11Bが投影され符号化開口13Bが投影光学系12に装着されている場合に、データ取得部41は、操作部34の操作入力により、カメラ2で撮像された画像データを画像データ50Bとして記憶部40に記憶する。すなわち、画像データ50Bは、符号化開口13Bを介した構造化光の投影により計測対象物4上に形成された被投影パターンの第2の画像データである。
 第1の計測部としての初期計測部42は、図6に示すハードウエア構成のうち、制御部31、主記憶部32及び操作部34に対応する。初期計測部42は、記憶部40に記憶された画像データ50Aに基づいて、初期計測を行う。初期計測部42は、記憶部40に記憶された画像データ50Aに基づいて、投影光学系12のフォーカス方向(座標軸dの方向)に関する各孤立パターンの奥行きの探索範囲を計測する。計測結果は、奥行き範囲データ52として記憶部40に記憶される。
 より具体的には、初期計測部42は、画像データ50Aにおける各孤立パターンの画像特徴を抽出する。画像特徴としては、ローカル・バイナリ・パターン(LBP)又はローカル・ターナリ・パターン(LTP)が採用される。さらに、初期計測部42は、ヒストグラムデータベース51を参照して、抽出された画像特徴に対応する各孤立パターンの奥行きを求める。図8に示すように、各孤立パターンの奥行き(Depth1、Depth2、Depth3)とLBPのヒストグラムとの間には相関関係がある。奥行きが同じであれば、各孤立パターンのLBPのヒストグラムはほぼ同じとなる。
 ここで、LBP及びLTPとは、画像データを、中心画素とその中心画素に隣接する8画素各々について、その大小関係を0又は1のバイナリデータとして並べた例えば8ビットのデータ列を各画素の画素値とした画像データ(LBP画像、LTP画像ともいう)である。LTPでは、バイナリデータではなく3値データになる。LBPのヒストグラムは、横軸をLBPの輝度値とし、縦軸をその輝度値を有する画素数としたものである。
 ヒストグラムデータベース51には、図8に示すような各孤立パターンの画像データの画像特徴と、フォーカス方向に関する各孤立パターンの奥行きとが関連づけて登録されている。ヒストグラムデータベース51には、予め行われるキャリブレーションにより得られたデータが登録される。
 初期計測部42は、図9に示すように、画像データ50Aに含まれる孤立パターンの画像データをLBP画像に変換し、変換されたLBP画像に基づいてLBPのヒストグラムを生成する。初期計測部42は、生成したヒストグラムと、ヒストグラムデータベース51に登録された複数のLBP画像(Depth1、Depth2、Depth3)のヒストグラムとをマッチングし、最も類似度の高いヒストグラムに対応する奥行きを、4×4の孤立パターン毎に求める。孤立パターン毎に求められた奥行きの探索範囲は、奥行き範囲データ52として記憶部40に記憶される。
 第2の計測部としての高精度(ファイン)計測部43は、図6に示すハードウエア構成のうち、制御部31、主記憶部32及び操作部34に対応する。ファイン計測部43は、記憶部40に記憶された画像データ50Bに基づいて、計測対象物4の正確な奥行きの計測を行う。ファイン計測により、投影光学系12のフォーカス方向に関する画像データ50Bに含まれる被投影パターンの奥行きが計測される。計測は、逆畳込み演算を用いて行われる。
 計測対象物4に投影される被投影パターンは、投影パターン11Bと点広がり関数(PSF)との畳込みにより形成される。PSFは、奥行きに応じて異なったものとなる。このため、被投影パターンに対して各奥行きに対応するPSFで逆畳込み演算を行った結果、得られる復元パターンが投影パターン11Bに最も近いときの奥行きが、その復元パターンに対応する奥行きということになる。
 ファイン計測部43は、画像データ50Bに対して探索範囲内の複数のサンプリング位置で逆畳込み演算を行う。これにより、計測範囲内の複数のサンプリング位置に対応する逆畳込み演算後の画像データ(復元パターン)が得られる。
 ただし、この実施の形態では、ファイン計測部43は、奥行き範囲データ52に含まれる奥行きの探索範囲(Fより小さい微小範囲)に絞りこんで、探索範囲内の複数のサンプリング位置で逆畳込み演算を行う。これにより、逆畳込み演算という計算量の多い複雑な演算の演算回数を著しく少なくすることができる。
 この実施の形態では、符号パターンの像のボケ具合を積極的に利用して形状復元を行うため、そのボケ具合が必然的に大きくなることから、そのボケ具合を予めキャリブレーションしておく必要がある。収差を無視できる場合には、キャリブレーションするパラメータを、ボケの大きさ(スケール)Sに関するもののみとすることができる。
 投影光学系12の光軸AX上に平面スクリーンを置いた場合、その平面スクリーン上に投影される点状パターンのボケの物理的な大きさyDは、次式で表される。
Figure JPOXMLDOC01-appb-M000001
 ここで、dは、座標軸d上の平面スクリーンの位置であり、yaは、符号化開口13の開口径であり、dpは、プロジェクタ1から投影される構造化光の合焦距離であり、daは、カメラ2から投影光学系12までの座標軸d方向に関する距離である。
 ここで、投影像をカメラ2で撮影したとき、平面スクリーン上の点像のボケの大きさ(スケール)Sは、以下のように表される。
Figure JPOXMLDOC01-appb-M000002
 ここで、cがスケールパラメータである。スケールパラメータcは以下のようになる。
Figure JPOXMLDOC01-appb-M000003
 すなわち、スケールパラメータcと、平面スクリーンの位置dが決まれば、スケールSdが決まる。この実施の形態では、複数の既知の奥行きにおいて実際に観測したボケ画像を用いて、それぞれの奥行きにおけるスケールSdを獲得し、図10に示すように、スケールSdのフィッティングを行って正確なスケールパラメータcを求め、最終的に、スケールパラメータcに基づいて、奥行きdの関数であるスケールSdを求める。この方法は、必要な撮像画像が多くなるものの、現実に即したスケールパラメータcが直接得られ、カメラ2とプロジェクタ1との間のベースライン等のキャリブレーションも不要となる。スケールパラメータcは、スケールパラメータ53として記憶部40に記憶される。
 ファイン計測部43は、図11に示すように、計測対象物4に符号化開口13Bを介して投影パターン11Bを投影し、キャリブレーションで得られたスケールパラメータcを用いて画像データ50Bの被投影パターンP2を複数の奥行きで(その奥行きのスケールSd)で逆畳込み演算して逆畳込み演算後のパターンP3~P5を求める。ファイン計測部43は、投影パターン11Bに最も類似する復元パターン(パターンP3~P5に含まれる各復元パターン)の奥行きdを、復元パターン毎に求める。逆畳込み演算を行うため、隣接する符号パターン5同士のボケが重なったような場合であっても、正しいスケールパラメータcで逆畳込み演算された場合には、それらは明確に分離され、各復元パターンの奥行きを安定して推定し、計測対象物4の3次元形状を正確に復元することが可能である。
 ファイン計測部43は、スライディングウインドウ方式で画像データ50Bから抽出された部分画像データに対して逆畳込み演算を行う。図12に示すように、スライディングウインドウWは、画像データ50B上を左上から右に向かって順次スライドする。そして、それぞれの位置で、スライディングウインドウW内の画像データが抽出される。さらに、抽出された画像データに対して、上述の逆畳込み演算が行われ、画像データ内の被投影パターンの奥行きが算出される。スライディングウインドウWのスライド間隔は、スライド前の領域とスライド後の領域の一部が重なるようになっている。
 ファイン計測部43では、スライディングウインドウW内の画像データに対して、逆畳込み演算が行われ、そのときの奥行きが算出される。スライディングウインドウWの横方向の走査が完了すると、スライディングウインドウWは、下方向及び左端にシフトする。そして、同様の処理が実行される。スライディングウインドウWの上下の間隔も、スライド前とスライド後とで一部が重なるようになっている。このようにして、画像データ50B全体のスライディングウインドウWの順次走査及び奥行きの推定が行われる。
 図13に示すように、画像データ(Captured image)に対してスラインディングウインドウWで一部の画像データを抽出し、ハミング窓でフィルタリングしたものをスケールパラメータcに基づくカーネル(kernel)で逆畳込み演算する。そして、それぞれ逆畳込み演算された画像データを、ハミング窓を用いて他の画像データと統合(Intergration(Weighed sum))することにより、逆畳込み演算後の画像データ(Deconvolved image)を得る。
 ファイン計測部43は、スライディング方式による逆畳込み演算により得られた復元パターンと投影パターン11Bとの類似度を計算し、投影光学系12のフォーカス方向に関する各復元パターンに対応する奥行きを計測する。類似度計算には、画像マッチングや、画像特徴量の比較を用いることができる。画像特徴量としては、ガウス関数のあてはめによる点らしさや、尖度などを用いることができる。
 この実施の形態に係る3次元計測システム100では、カメラ2とプロジェクタ1とが同軸上にはない。したがって、図14に示すように、プロジェクタ1とカメラ2との間の視差により、プロジェクタ1及びカメラ2に近い平面(Near plane)上の点像(赤)と、遠い平面(Far plane)上の点像(緑)との射影ひずみが生じる。この射影ひずみは、逆畳込み演算に悪影響を及ぼす。そこで、この実施の形態では、スライディングウインドウ方式を採用すれば、演算を行う画像データの大きさを小さくすることができるので、この射影ひずみの影響を低減することができる。
 ファイン計測部43は、逆畳込み演算を行うことにより得られた画像データに対して、グラフカット処理を行い、グラフカット処理が行われた画像データに含まれる復元パターンと投影パターン11B(オリジナルパターン)との類似度計算を行う。
Figure JPOXMLDOC01-appb-M000004
 グラフカット処理は、上述のエネルギEDを最小にする処理である。上述の式において、g(Dv)は、データコストであり、逆畳込み演算を行うことによりフォーカス方向に得られた複数の復元パターンと投影パターン11Bとの類似度を用いることができる。h(Du,Dv)は、隣接する画素同士の輝度値の差分に相当する関数である。すなわち、グラフカット処理では、他の隣接画素と極端に輝度値が異なる画素について、エネルギEDが最小となるように、輝度値の修正が施される。図15には、4つの平面シートをそれぞれ異なる奥行きに設置した場合に得られる画像データが示されている。図15に示すように、このグラフカット処理により、画像データにおけるノイズ成分が低減され、画像データ全体が滑らかに調整される。
 上述のように、この実施の形態では、図16に示すように、パターンが疎な投影パターン11Aを用いて、画像データ50A(Captured image with Coarse pattern)が撮像される。そして、初期計測部42により、画像データ50Aに含まれる複数の被投影パターン(孤立パターン)各々のLBPのヒストグラムと複数の奥行きの符号パターンのLBPのヒストグラムとの間のカイ二乗の距離(Chi-square distance)が求められて粗推定((a)Coarse estimation)が行われる。その結果、図16に示すようなグラフが求められ、奥行きの探索範囲(Estimated depth range in coarse estimation)が求められる。
 そして、密な投影パターン11Bを用いて画像データ50B(Captured image with Dense pattern(patterns are overlapped each other))を撮像し、画像データ50Bにおける符号パターン5の像が互いに重なった被投影パターンに対して、求められた奥行きの探索範囲(Search depth range in dense estimation)で、各奥行きにおけるPSF(PSF for each depth)を用いて逆畳込み演算が行われる。そして、奥行きに対する元の投影パターン11B(オリジナルパターン)とのマッチングが行われて密推定((b)Dense estimation)が行われる。その結果、図16に示すようにグラフが求められ、各復元パターンに対応する奥行きが求められる。すなわち、この実施の形態では、粗推定と密推定とが段階的に行われる。この処理は、階層復元とも呼ばれる。
 ファイン計測部43において、逆畳込み演算は、計測可能範囲F全体ではなく、奥行き範囲データ52の探索範囲(図16ではL1とL2)だけで行われる。これにより、逆畳込み演算の演算回数を著しく少なくすることができる。
 出力部44は、図6に示すハードウエア構成のうち、制御部31、主記憶部32、操作部34及び表示部35に対応する。出力部44は、奥行きデータ54を表示する。
 次に、3次元計測システム100の動作について説明する。
 図17には、3次元計測システム100の3次元計測処理(メイン処理)が示されている。図17に示すように、まず、コンピュータ3は、キャリブレーションを行う(ステップS1)。
 キャリブレーションでは、プロジェクタ1から出射された構造化光を投影する平面スクリーンが用いられる。図18に示すように、プロジェクタ1は、符号化開口13Aを投影光学系12に装着し、粗い投影パターン11Aを投影する(ステップS11)。続いて、平面スクリーンの位置(奥行き)が更新される(ステップS12)。ここでは、平面スクリーンが最初の位置に置かれる。最初の位置(平面スクリーンの奥行き)は、他の計測手段によって既知であるものとする。最初の位置は位置Aであるとする。続いて、カメラ2が、平面スクリーンに投影されたプロジェクタ1の投影像を撮像する(ステップS13)。これにより、撮像画像が、カメラ2からデータ取得部41を介して画像データ50Aとして記憶部40に記憶される。
 続いて、初期計測部42は、撮像画像(画像データ50A)をLBP化する(ステップS14)。これにより、例えば図8に示すDepth1のLBP画像が生成される。続いて、初期計測部42は、LBP画像のヒストグラムを生成する(ステップS15)。これにより、例えば、Depth1でのLBP画像のヒストグラムが生成される。
 初期計測部42は、奥行きと対応づけて生成されたヒストグラムをヒストグラムデータベース51に記憶する(ステップS16)。続いて、初期計測部42は、最後の位置であるか否かを判定する(ステップS17)。ここでは、位置Cが最後の位置であり、スクリーンの位置は、まだ位置Aであるので、判定は否定される。
 最後の位置でなければ(ステップS17;No)、初期計測部42は、スクリーンの位置を更新する(ステップS12)。ここでは、位置AからΔdほど、+d方向にシフトされる。この後、投影像の撮像(ステップS13)、撮像画像のLBP化(ステップS14)、ヒストグラムの生成(ステップS15)、ヒストグラムデータベース51への登録(ステップS16)、最後の位置の判定(ステップS17)が繰り返される。このようにして、位置Aから位置Cまでの各位置について、一定のサンプリング間隔Δdで、LBP画像のヒストグラムが生成される。
 最後の位置であると判定された場合(ステップS17;Yes)、図19に進み、プロジェクタ1の投影光学系12に符号化開口13Bを装着し、密に配列された投影パターン11B(密パターン)を投影する(ステップS21)。続いて、平面スクリーンの位置が更新される(ステップS22)。ここでは、平面スクリーンが位置Aに設定される。続いて、カメラ2は、投影像を撮像する(ステップS23)。
 続いて、ファイン計測部43は、画像データ50Bに基づいて、その奥行きでのスケールSdを算出し、奥行きと対応づけて記憶部40に記憶する(ステップS24)。続いて、ファイン計測部43は、スクリーンが最後の位置であるか否かを判定する(ステップS25)。ここでは、位置Cが最後の位置であるとする。スクリーンの位置は、まだ位置Aであるので、判定は否定される。
 最後の位置でなければ(ステップS25;No)、ファイン計測部43は、スクリーンの位置を更新する(ステップS22)。ここでは、位置AからΔdほど、+d方向にシフトされる。以降、投影像の撮像(ステップS23)、スケールSdの算出、記憶(ステップS24)、最後の位置の判定(ステップS25)が再び実行される。このようにして、位置Aから位置Cまでの各位置について、一定のサンプリング間隔Δdで、スケールSdが算出される。最後の位置であると判定された場合(ステップS25;Yes)、ファイン計測部43は、フィッティングを行って、スケールパラメータcを求める(ステップS26)。スケールパラメータcはスケールパラメータ53として記憶部40に記憶される。これにより、キャリブレーションが完了する。
 図17に戻り、続いて、計測対象物4を、計測範囲F内に設置する(ステップS2)。これより、計測対象物4の3次元形状の計測が開始される。
 続いて、初期計測部42は、初期計測を行う(ステップS3)。図20に示すように、プロジェクタ1は、投影光学系12に符号化開口13Aを装着して粗い投影パターン11Aを投影する(ステップS31)。続いて、カメラ2は、計測対象物4の投影像を撮像する(ステップS32)。これにより、カメラ2から画像データが送信され、データ取得部41は、この画像データを画像データ50Aとして記憶部40に記憶する。
 続いて、初期計測部42は、画像データ50Aに含まれる各孤立パターンでのローカル・バイナリ・パターン(LBP)画像を生成する(ステップS33)。初期計測部42は、生成されたLBP画像のヒストグラムを生成する(ステップS34)。初期計測部42は、生成されたヒストグラムとヒストグラムデータベース51に登録された各奥行きでのヒストグラムとの類似度計算を行い(ステップS35)、最も近いLBPの奥行きの探索範囲を決定し、奥行き範囲データ52として、記憶部40に記憶する(ステップS36)。
 続いて、初期計測部42は、すべてのパターンについて計測が完了したか否かを判定する(ステップS37)。まだ、すべてのパターンの計測が完了していなければ(ステップS37;No)、初期計測部42は、孤立パターンでのLBPの生成(ステップS33)、ヒストグラムの生成(ステップS34)、マッチング(ステップS35)、最も近いLBPの奥行きの探索範囲の決定(ステップS36)、すべてのパターン完了の判定(ステップS37)が繰り返される。すべてのパターンで、計測が完了し、奥行きの探索範囲が決定されると(ステップS37;Yes)、初期計測部42は初期計測を終了する。
 図17に戻り、ファイン計測部43は、ファイン計測を行う(ステップS4)。図21に示すように、プロジェクタ1の投影光学系12に符号化開口13Bを装着し、計測対象物4に投影パターン11B(密パターン)を投影する(ステップS41)。続いて、カメラ2は投影像を撮像する(ステップS42)。これにより、カメラ2から画像データが送信され、データ取得部41は、この画像データを画像データ50Bとして記憶部40に記憶する。
 続いて、ファイン計測部43は、奥行き設定を更新する(ステップS43)。ここで、奥行きは、奥行き範囲データ52に定められた探索範囲内で設定される。
 ファイン計測部43は、スライディングウインドウ方式で、撮像された画像データ50Bに対して設定された奥行きの範囲で逆畳込み演算を行う(ステップS44)。ここでは、図13に示すような処理が行われ、逆畳込み演算後の画像データ(Deconvolved image)が求められる。
 続いて、ファイン計測部43は、逆畳込み演算後の画像データに対してグラフカット処理を行う(ステップS45)。これにより、全体的にノイズ成分の少ない画像データが得られる。
 続いて、ファイン計測部43は、逆畳込み演算により得られグラフカット処理が施された画像データに含まれる複数の復元パターン各々と、オリジナルの投影パターン11Bとの類似度を算出する(ステップS46)。
 ファイン計測部43は、最後の位置であるか否かを判定する(ステップS47)。最後の位置でなければ(ステップS47;No)、ファイン計測部43は、奥行きの設定を更新する(ステップS43)。以降、最後の位置であると判定されるまで、ステップS43~S47が繰り返される。
 最後の奥行きであると判定されれば(ステップS47;Yes)、ファイン計測部43は、これまでに最も類似度が高い奥行きを探索し、探索された奥行きの集合を奥行きデータ54として記憶部40に記憶する(ステップS48)。この後、ファイン計測部43は、ファイン計測を終了する。
 図17に戻り、ファイン計測が終了すると、3次元計測処理が終了する。求められた奥行きデータ54が、計測対象物4の3次元形状を示している。この3次元形状は、出力部44により表示出力される。
 この3次元計測システム100の利用方法としては様々なものがある。計測時間が短縮されているため、図22には、この3次元計測システム100での計測対象物4の3次元形状の計測結果の一例が示されている。図22に示すように、動体の3次元計測、モーションジェスチャの認識などにも適用することができる。
 以上詳細に説明したように、この実施の形態によれば、計測対象物4に形成された複数の疎な投影パターン11Aの画像データに基づいて、投影光学系12のフォーカス方向に関する各被投影パターンの奥行きの探索範囲を絞り込んでから、複数の密な投影パターン11Bの画像データに基づいて逆畳込み演算を行うことにより、各被投影パターンの奥行きを計測している。これにより、逆畳込み演算を行う範囲を、その奥行きを基準として限定された計測範囲内とするので、逆畳込み演算の演算回数を少なくすることができる。この結果、より計算量を低減しつつ、精度良く計測対象物4の3次元計測を行うことができる。
実施の形態2.
 次に、この発明の実施の形態2について説明する。
 図23に示すように、この実施の形態2に係る3次元計測システム100は、ハーフミラー60をさらに有する。3次元計測システム100は、カメラ2の光軸が、プロジェクタ1の投影光学系12の光軸AXと同軸に構成されている。プロジェクタ1から出射された投影光は、ハーフミラー60を透過して計測対象物4に投影される。計測対象物4での反射光は、ハーフミラー60で反射してカメラ2に至り、カメラ2にて計測対象物4の投影像が、撮像される。
 このようにすれば、奥行きの変化による射影ひずみの発生を防止することができる。したがって、グラフカット処理及びスライディングウインドウ方式を採用しなくても精度良く計測対象物4の3次元形状を求めることができる。
実施の形態3.
 次に、この発明の実施の形態3について説明する。
 図24に示すように、この実施の形態2に係る3次元計測システム100は、2つのプロジェクタ1A、1Bを備える。プロジェクタ1A、1Bの構成は、プロジェクタ1と同じである。
 プロジェクタ1Aの投影光学系12には、符号化開口13が装着されている。ただし、プロジェクタ1Aの投影光学系12に装着された符号化開口13は、第1の色としての赤色光を透過させる赤色フィルタである。プロジェクタ1Bの投影光学系12にも、符号化開口13が装着されている。ただし、プロジェクタ1Bの投影光学系12に装着された符号化開口13は、第2の色としての青色光を透過させる青色フィルタである。
 プロジェクタ1Aから出射される赤色光は、ハーフミラー61を介して投影される。プロジェクタ1Bから出射される青色光は、ハーフミラー61を介して投影される。
 カメラ2は、赤色光による画像と、青色光による画像とを別々に撮像可能なRGBカメラとなっている。RGBカメラは、構造化光により計測対象物4に投影された被投影パターンを色毎に撮像する。
 赤色光と青色光とは波長が異なるため、合焦位置が異なる。すなわち、この3次元計測システム100では、投影部(プロジェクタ1A、1B)は、合焦位置がそれぞれ異なる複数色の構造化光を、計測対象物4に投影する。構造化光により計測対象物4に投影された被投影パターンを色毎に撮像する。コンピュータ3は、カメラ2での撮像により得られた各色の画像データのうち、符号パターン5の像を読み取り可能な画像データに基づいて、計測対象物4の3次元形状を計測する。
 赤色光の合焦位置BF1近傍に被投影パターンが形成されている場合には、プロジェクタ1Bから出射される青色光による画像データを用いて、計測を行うようにすればよい。図24に示すように、赤色光の合焦位置BF1近傍では、赤色光による符号パターン5の像は、点像に近くなっており、青色光による符号パターン5の像を用いた方が、奥行きを精度良く求められるからである。また、青色光の合焦位置BF2近傍に被投影パターンが形成されている場合には、赤色光による画像データを用いて、計測を行うようにすればよい。青色光の合焦位置BF2近傍では、青色光による符号パターン5の像は、点像に近くなっており、赤色光による符号パターン5の像を用いた方が、奥行きを精度良く求められるからである。
 なお、プロジェクタ1Aに投影される投影パターンを疎な投影パターン11Aとし、プロジェクタ11Bに投影される投影パターンを密な投影パターン11Bとしてもよい。この場合には、初期計測及びファイン計測を1回の撮像(1ショット)により行うことができる。
 また、プロジェクタ1Bには、符号化開口13Bを装着しなくてもよい。本特許ではこれを開口パターンと呼ぶ。この場合、プロジェクタ1Bには、映像面11に、特定の空間周波数成分を有する周期パターンを表示させ、その周期パターンの映像を含む構造化光を投影させるようにする。そして、プロジェクタ1Aから出射される赤色光の画像データに基づいて初期計測を行い、プロジェクタ1Bから出射され映像として移し出されるパターンのボケ具合に基づいて、ファイン計測を行うようにしてもよい。高周波パターンは僅かなボケでもこれを高精度に計測することが出来るため、合焦位置付近ではボケ具合が少なくなる。このため、逆畳み込みによる奥行き推定精度が低くなる点を、効果的に補うことができる。
 上記実施の形態1のような同軸落射方式でない3次元計測システムでは、スライディングウインドウ方式を用いて、奥行きの変化による被投影パターンの射影ひずみを解決した。しかし、プロジェクタとカメラとのベースラインが既知である場合には、奥行きの変化による被投影パターンの位置ずれ量を算出することができるので、カメラで撮像された画像データに含まれる被投影パターンの位置をベースラインに基づいて補正した上で、奥行きの推定を行うようにしてもよい。
 また、上記各実施の形態では、ローカル・バイナリ・パターン(LBP)を画像特徴として、初期計測を行ったが、前述のように、ローカル・ターナリ・パターン(LTP)を画像特徴として、初期計測を行うようにしてもよい。
 また、上記各実施の形態では、投影光学系12の出射側に符号化開口13を装着したが、投影光学系12の入射側に符号化開口13を装着するようにしてもよい。また、投影光学系12の内部に符号化開口13を組み込んでもよい。投影光学系12が複数のレンズより構成されている場合には、そのレンズ間に符号化開口13を装着するようにしてもよい。
 符号パターン5も、図3Aに示すものには限られない。計測対象物4に非対称なパターンを形成できるものであればよい。
実施の形態4(ラインパターンとライン開口による手法).
 次に、この発明の実施の形態4について説明する。
 この実施の形態では、図25Aに示すように、コンピュータ3は、プロジェクタ1及びカメラ2に接続されている。コンピュータ3は、プロジェクタ1の映像面11に表示される画像データを出力する。図25Bに示すように、映像面11には、一方向(X軸方向)に空間周波数成分を有する2次元パターンが表示される。この2次元パターンは、縦(Y軸方向)に延びX軸方向に並ぶラインパターンから成るラインパターン群である。このラインパターンは、配列間隔及び線幅が不規則・ランダムであると、奥行き推定精度や安定さが増す効果がある。一方で、規則パターンであっても、開口パターンとの組合せにより、計測範囲内において同一パターンが生じない組合せも可能であることから、計算量の削減や装置作成の簡略化のために、規則パターンを用いることも可能である。計測対象物4には、この2次元パターンの投影光が、投影光学系12を介して投影される。
 本実施の形態においても、カメラ2は、投影光が投影された計測対象物4を撮像する。プロジェクタ1の投影光学系12の光軸AXと、カメラ2の光軸とは非同軸に設定されている。カメラ2とプロジェクタ1とは、2次元パターンを構成するラインパターンの配列方向にずれている。これにより、プロジェクタ1とカメラ2との間には、投影像について視差が生じる。
 この実施の形態では、図26Aに示すように、符号化開口13Cが用いられる。この符号化開口13Cの符号パターンは、映像面11に表示される2次元パターンと同じ方向(光学的に同じ方向;図26AのX軸方向)に配列されたライン状の開口パターンから成る。投影光は、この符号化開口13Cを介して計測対象物4に投影される。計測対象物4が、映像面11に対してデフォーカスしている場合には、図26Bに示すように、位置Aから位置Cまでの間に、その位置に応じて符号パターンの投影像が現れるようになっている。
 投影光学系12により、映像面11の結像位置(図26Bの位置B)には、映像面11に表示された2次元パターンの像が結像する。この像は、映像面11に表示された2次元パターンと、符号化開口13Cの符号パターンとの畳込みにより形成される。図27に示すように、2次元パターンの投影像は、その結像位置(位置B)を中心に、デフォーカスするにつれて、変化する。3次元計測システム100は、この投影像の画像データを処理して、投影光学系12による2次元パターンの結像位置を基準とする計測対象物4の光軸AXの方向(座標軸dの方向)の奥行きを推定することにより、計測対象物4の3次元形状を計測する。
 コンピュータ3は、その機能構成として、図28に示すように、投影パターン設定部46と、記憶部40と、データ取得部41と、奥行き推定部45と、出力部44と、を備える。
 投影パターン設定部46は、プロジェクタ1の映像面11に表示される2次元パターンの画像データを出力する。これにより、プロジェクタ1の映像面11(透過型液晶開口)には、図25Bに示す2次元パターンが表示される。
 データ取得部41は、カメラ2から送信された画像データを、リファレンス画像データ群70の画像データ又は計測対象画像データ71のいずれかとして、記憶部40に記憶する。リファレンス画像データ群70の画像データであるか、計測対象画像データ71であるかは、操作部34の操作入力により決定されてもよいし、プログラムで自動的に制御さるようにしてもよい。
 リファレンス画像データ群70は、図29Aに示すように、投影光学系12の光軸AXに直交する2次元平面(平面スクリーン)を、光軸AXに関するd方向の複数の異なる位置にそれぞれ置いたときにカメラ2により撮像された2次元平面の参照画像データ群である。記憶部40は、このリファレンス画像データ群70を記憶する。
 計測対象画像データ71は、カメラ2で撮像された計測対象物4の画像データである。例えば、図29Bに示すように、計測対象物4が2つのボールである場合、この2つのボールに2次元パターンの投影像が投影される。この場合、図29Cに示すような画像データがカメラ2で撮像される。計測対象物4には、映像面11に表示された2次元パターンの投影像(X軸方向に並ぶラインパターンから成る2次元パターンの像)が投影される。この画像データが、計測対象画像データ71として記憶部40に記憶される。
 奥行き推定部45は、カメラ2で撮像された計測対象物4の画像データ(計測対象画像データ71)と、記憶部40に記憶されたリファレンス画像データ群70との間でマッチング窓MWを用いた画像マッチングを行うことにより、投影光学系12による2次元パターンの結像位置(位置B)を基準とする計測対象物4の奥行きを推定する。図29Cには、計測対象画像データ71内に設定されるマッチング窓MWが示されている。また、図29Aには、図29Cのマッチング窓MWに対応するマッチング窓MWが示されている。マッチング窓MWは、カメラ2で撮像された計測対象物4の画像データに含まれる2次元パターンの配列方向(X軸方向)を長手方向とする矩形状の窓である。投影される2次元パターンは、X軸方向に並ぶラインパターンであるため、X軸方向に奥行きを求めるための情報を有しているので、X軸方向に長いマッチング窓MWを用いた方がマッチング精度を向上することができるためである。
 次に、3次元計測システム100の動作について説明する。
 図30に示すように、まず、コンピュータ3は、キャリブレーションを行う(ステップS51)。
 キャリブレーションでは、プロジェクタ1から出射された投影光を投影する平面スクリーンが用いられる。図31に示すように、プロジェクタ1に、符号化開口13Cを装着し、投影パターン設定部46から2次元パターンの画像データを映像面11に出力して、コンピュータ3が、プロジェクタ1に、図25Bに示す2次元パターンの投影像を投影させる(ステップS61)。続いて、平面スクリーンの位置(奥行き)が更新される(ステップS62)。ここでは、平面スクリーンが最初の位置に置かれる。最初の位置(平面スクリーンの奥行き)は、他の計測手段によって既知であるものとする。最初の位置は位置Aである。
 続いて、カメラ2が、平面スクリーンに投影されたプロジェクタ1の投影像を撮像する(ステップS63)。この撮像により得られた画像データは、カメラ2からデータ取得部41に送られ、データ取得部41は、この画像データを、リファレンス画像データ群70の中の1枚の画像データとして記憶部40に記憶する(ステップS64)。このとき、この画像データは、そのときの平面スクリーンの奥行きと対応づけて記憶される。
 続いて、コンピュータ3は、平面スクリーンの位置が、最後の位置であるか否かを判定する(ステップS65)。ここでは、位置Cが最後の位置であり、平面スクリーンの位置は、まだ位置Aであるので、判定は否定される。
 最後の位置でなければ(ステップS65;No)、平面スクリーンの位置が更新される(ステップS62)。ここでは、位置AからΔdほど、+d方向にシフトされる。この後、最後の位置となるまで(ステップS65;Yes)、スクリーンの位置の更新(ステップS62)、投影像の撮像(ステップS63)、画像データの記憶(ステップS64)、最後の位置の判定(ステップS65)が繰り返される。このようにして、位置Aから位置Cまでの各位置について、一定のサンプリング間隔Δdで、参照用の画像データが生成され、リファレンス画像データ群70の1枚の画像データとして奥行きに対応づけられて、記憶部40に記憶される。
 最後の位置であると判定された場合(ステップS65;Yes)、キャリブレーションが完了する。
 図30に戻り、続いて、計測対象物4が、計測範囲F内に設置される(ステップS52)。続いて、コンピュータ3は、計測対象物4の奥行き計測を行う(ステップS53)。
 ステップS52では、まず、図32に示すように、プロジェクタ1に2次元パターンの投影像を投影する(ステップS71)。続いて、コンピュータ3は、カメラ2に計測対象物4に投影された投影像を撮像させる(ステップS72)。カメラ2の撮像による計測対象物4の画像データは、コンピュータ3に送られる。コンピュータ3のデータ取得部41は、この投影像の画像データを計測対象画像データ71として記憶する(ステップS73)。
 続いて、奥行き推定部45は、計測対象画像データ71を読み込む(ステップS74)。奥行き推定部45は、計測対象画像データ71にマッチング窓MWを設定する(ステップS75)。ここで、例えば図33に示すように、計測対象画像データ71の左上端に、マッチング窓MWが設定される。
 続いて、奥行き推定部45は、リファレンス画像データ群70の中から1枚の参照画像データを読み込む(ステップS76)。続いて、奥行き推定部45は、計測対象物4の画像データと読み込まれた参照画像データとの間のマッチング窓MWにおける相関値を算出する(ステップS77)。ここでは、計測対象画像データ71におけるマッチング窓MWの領域と、参照画像データにおける同一の位置にあるマッチング窓MWの領域との画像マッチングが行われ、両画像の一致度が相関値として算出される。
 続いて、奥行き推定部45は、読み込んだ参照画像データが、最後の参照画像データであるか否かを判定する(ステップS78)。最後の参照画像データでない場合(ステップS78;No)、奥行き推定部45は、次の参照画像データの読み込み(ステップS76)、相関値の算出(ステップS77)、最後の参照画像データの判定(ステップS78)、を繰り返し行う。
 最後の参照画像データである場合(ステップS78;Yes)、奥行き推定部45は、奥行きdを推定する(ステップS79)。例えば、図34に示すように、奥行き推定部45は、各参照画像データに対応する奥行きに対する相関値の変化を示すグラフを生成する。さらに、奥行き推定部45は、フィッティングによる補間で、マッチング窓MW内の奥行きdtを推定する。
 続いて、奥行き推定部45は、マッチング窓MWによる奥行きの推定が、画像データ内のすべての位置で完了したか否かを判定する(ステップS80)。推定が完了していなければ(ステップS80;No)、奥行き推定部45は、マッチング窓MWを画像データ内の他の場所に設定し(ステップS75)、参照画像データ群70から参照画像データを読み込んで(ステップS76)、計測対象画像データ71と参照画像データとのマッチング窓MW内での相関値を算出する(ステップS77)処理を、最後の参照画像データとなる(ステップS78;Yes)まで繰り返す。
 最後の参照画像データまで達すると(ステップS78;Yes)、奥行き推定部45は、前回と同様にして、計測対象物4の奥行きを推定する(ステップS79)。続いて、奥行き推定部45は、マッチング窓MWによる奥行きの推定が、計測対象画像データ71内のすべての位置で完了したか否かを判定する(ステップS80)。推定が完了していなければ(ステップS80;No)、奥行き推定部45は、再びステップS75→S76→S77→S78を実行し、そのマッチング窓MWでの各奥行きの参照画像データとの画像マッチングを行って、その相関値を求める。最後の参照画像データまで読み込むと(ステップS78;Yes)、奥行き推定部45は、そのマッチング窓MWの部分における奥行きを推定する(ステップS79)。
 このようにして、マッチング窓MWが画像データ内を移動しつつ、そのマッチング窓MWの部分における奥行きが推定される。推定が完了すると(ステップS80;Yes)、奥行き推定部45は、奥行き計測を完了する。推定された奥行きは、奥行きデータ74として記憶部40に記憶され、出力部44から表示出力される。
 以上詳細に説明したように、この実施の形態によれば、X軸方向にラインパターンが不規則に配列された2次元パターンが、そのパターンと同じ方向にライン状に並ぶ開口パターンの符号化開口13Cを介して計測対象物4に投影される。これにより、計測対象物4に投影される投影像は、2次元パターンと符号化開口13Cの開口パターンとの畳込みにより形成される像となり、計測対象物4の奥行きの変化に対してパターンの変化が大きい画像となる。このため、計測対象物4の奥行き分解能を向上することができる。この時、それぞれのパターンはインパルス列であるため、畳み込み後のパターンもインパルス列となり、ボケることがない。このため、奥行き方向が大きく変化してもパターンがボケず、計測レンジが飛躍的に向上するというメリットが生まれる。
 また、計測対象物4の奥行きは、すでに撮像されたリファレンス画像データ群70との画像マッチングにより推定される。したがって、計測対象物4の奥行きを推定するのに符号化開口13Cの開口パターンによる逆畳込み演算などの複雑な演算を行う必要がなくなる上、DfD法とステレオ法とを融合した高精度な計測が可能となる。すなわち、この実施の形態によれば、より計算量を低減しつつ、精度良く計測対象物4の3次元計測を行うことができる。
 また、本実施の形態によれば、予め2次元平面に対して投影光学系12を介して投影された2次元パターンの投影像がカメラ2で撮像されて得られる画像データと、2次元平面の参照画像データ群との画像マッチングにより、計測対象物4の奥行きが推定される。このため、投影される投影像のデフォーカスのみならず、プロジェクタ1とカメラ2との間の視差、投影光学系12の収差、カメラ2の光学系の収差の影響をすべて加味した状態で、計測対象物4の奥行きを高精度に推定することができる。
実施の形態5(斜め形状の推定).
 次に、この発明の実施の形態5について説明する。
 図35に示すように、上記実施の形態では、コンピュータ3が、仮想斜面画像作成部48を備える。仮想斜面画像作成部48は、投影光学系12の光軸AXに直交する2次元平面を、光軸AXに関する複数の異なる位置にそれぞれ置いたときにカメラ2により撮像される2次元平面の参照画像データ(リファレンス画像データ群70の参照画像データ)の各部分を合成する。この合成により、光軸AXに対して複数の異なる角度でそれぞれ置いたときに得られるリファレンス斜面画像データ群72が生成される。
 記憶部40は、投影される2次元パターンを構成するラインパターンの配列方向に沿って奥行きが変わるように、投影光学系12の光軸AXに斜交する2次元平面を、光軸AXに対して複数の異なる角度でそれぞれ置いたときに得られる2次元平面の参照画像データ群をリファレンス斜面画像データ群72として記憶する。奥行き推定部45は、カメラ2で撮像された計測対象物4の画像データと、記憶部40に記憶されたリファレンス斜面画像データ群72との間でマッチング窓MWを用いた画像マッチングも行う。これにより、投影光学系12による映像面11の2次元パターンの結像位置を基準とする計測対象物4の奥行きを推定する。
 図36Aには、仮想斜面の生成方法が模式的に示されている。仮想斜面は、以下の数式に従って生成される。
Figure JPOXMLDOC01-appb-M000005
 ここで、Dは奥行きであり、Xは、投影光学系12の光軸AXに直交する平面における空間周波数成分を有する方向の座標である。また、θは平面の回転角度であり、fはカメラ2の焦点距離であり、Dpivotは、回転方向の奥行き、すなわち仮想斜面の空間周波数成分を有する方向の位置である。この式によれば、仮想斜面の奥行きDpivotの位置には、奥行きDの画像データのX位置の部分データが配置される。
 この実施の形態では、上記実施の形態4と同様に、図30、図32に示すフローチャートに従って、3次元計測処理が実行される。ステップS51のキャブレーションについては、図37のフローチャートに従って実行される。このキャリブレーションは、図31に示すキャリブレーションとほぼ同じであるが、仮想斜面画像作成部48が、最後に、リファレンス画像データ群70に基づいて、リファレンス斜面画像データ群72を生成する(ステップS66)点が異なる。ここで、例えば、回転角度θ=30度、45度、60度等の仮想斜面の画像データが生成され、リファレンス斜面画像データ群72として記憶部40に記憶される。
 また、ステップS53(図30)の奥行き計測では、図32のステップS76→S77→S78の繰り返しにおいて、奥行き推定部45は、リファレンス画像データ群70だけでなく、リファレンス斜面画像データ群72の参照斜面画像データと、計測対象画像データ71との画像マッチングも行って両者の相関値を算出する。ステップS79において、マッチング窓MWの画像データが、参照斜面画像データと最も相関値が高かった場合には、奥行き推定部45は、その仮想斜面を用いて奥行きを推定する。
 図36Bに示すような計測対象物4の画像データに対して、投影光学系12の光軸AXに直交する2次元平面の参照画像データの画像マッチングのみ行う場合、図36Cの矢印で示すように、計測対象物4と背景との境界については推定される奥行きが不安定になる場合がある。
 これに対して、投影光学系12の光軸AXに直交する2次元平面の参照画像データの画像マッチングに加え、リファレンス斜面画像データ群72との画像マッチングも行った場合には、図36Dの計測対象物4の斜面の法線を表す法線マップに示すように、計測対象物4の斜面との画像マッチングが可能となるので、球状の物体の輪郭周辺の斜面をより正確に表現することができるようになる。このため、図36Eに示すように、計測対象物4の奥行きを高精度に推定することができるようになる。
実施の形態5’(シミュレーション演算によるデータベースの作成).
 次に、この発明の実施の形態5’について説明する。
 この実施の形態では、参照画像データ群を実際に撮影する代わりに、コンピュータ3(演算部)が、2次元パターンの情報及び開口パターンの情報、さらにプロジェクタの内部パラメータ(焦点距離やピクセルの縦横比、歪みなど)や、カメラの内部パラメータの情報を用いて、計算により参照画像データを生成することで、奥行き推定を行う。これにより、膨大な参照画像データを撮影する必要がなくなり、そのデータを蓄えておく必要も無くなるというメリットが得られる。上記のパラメータ情報は、プロジェクタとカメラのキャリブレーションを事前に行うことで推定しておく。
実施の形態6(色によるCoarse-to-fine).
 次に、この発明の実施の形態6について説明する。
 この実施の形態では、計測対象物4の奥行きを粗く計測し、粗く求められた奥行きに基づいて、奥行きの計測範囲を狭くしてから、その奥行きを精細に計測する、いわゆるCoarse-to-fine計測が行われる。この実施の形態では、プロジェクタ1の映像面11(透過型液晶)にはR(赤色)、G(緑色)、B(青色)から成るカラー映像が表示されるものとし、カメラ2は、R(赤色)、G(緑色)、B(青色)から成るカラー画像データを撮像するものとする。一般的に、カラー画像データは、赤色、緑色、青色の画像データに分離抽出することが可能である。ここでも、プロジェクタ1には、符号化開口13Cが用いられる。
 コンピュータ3は、その機能構成として、図38に示すように、投影パターン設定部46と、色画像分割部47と、記憶部40と、奥行き推定部45と、出力部44と、を備える。
 投影パターン設定部46は、プロジェクタ1の映像面11に表示される2次元パターンの画像データを出力する。ここでは、図39Aに示す青色の2次元パターンと、図39Bに示す赤色の2次元パターンとが合成された画像が表示される。図39Aに示すように、青色の2次元パターンは、一方向(X軸方向)にラインパターンが並ぶ、配列周期の長いラインパターン群である。また、図39Bに示すように、赤色の2次元パターンは、青色の2次元パターンと同じ方向に、青色の2次元パターンよりも周期の短い(空間周波数成分が高い)ラインパターン群である。
 色画像分割部47は、カメラ2で撮像されたカラー画像データを入力する。色画像分割部47は、カラー画像から得られた赤色(R)の画像データを、リファレンスR画像データ群70A又は計測対象R画像データ71Aとして記憶部40に格納する。さらに、色画像分割部47は、カラー画像から得られた青色の画像データを、リファレンスB画像データ群70C又は計測対象B画像データ71Cとして記憶部40に格納する。推定された奥行きは、粗奥行きデータ75として記憶部40に記憶される。上述のように、青色の2次元パターンの空間周波数は、赤色の2次元パターンよりも低いため、青色の参照画像データが撮像される間隔Δd1は、赤色のパターンでの間隔Δd2よりも大きくなる。
 記憶部40は、Δd1で、投影光学系12の光軸AXに関する複数の異なる位置にそれぞれ置いたときにカメラ2により撮像された青色の参照画像データ群(リファレンスB画像データ群70C)と、Δd1よりも短いΔd2で、光軸AXに関する複数の異なる位置にそれぞれ置いたときにカメラ2により撮像された赤色の参照画像データ群(リファレンスR画像データ群70A)と、を記憶する。
 奥行き推定部45は、計測対象B画像データ71Cと、リファレンスB画像データ群70Cとの間で、マッチング窓MWを用いた画像マッチングを行うことにより、投影光学系12による2次元パターンの結像位置を基準とする計測対象物4の奥行きを推定する。推定された奥行きは、粗奥行きデータ75として記憶部40に記憶される。
 奥行き推定部45は、粗奥行きデータ75に記憶された奥行きを中心とする限定された範囲で、カメラ2で撮像された計測対象物4の画像データから得られる計測対象R画像データ71Aと記憶部40に記憶された赤色のリファレンスR画像データ群70Aとの間でマッチング窓MWを用いた画像マッチングを行うことにより、投影光学系12による2次元パターンの結像位置を基準とする計測対象物4の奥行きを推定する。
 この実施の形態に係る3次元計測システム100の3次元計測処理は、図30のフローチャートで示す処理と同じ処理が行われる。キャリブレーション(ステップS51)においては、基本的には、図31に示す流れで処理が行われるが、ステップS64においては、色画像分割部47が、カメラ2から送られたカラー画像データから、赤色の画像データを抽出して、リファレンスR画像データ群70Aの1つの画像データとして、記憶部40に記憶する。また、色画像分割部47は、カメラ2から送られたカラー画像データから、青色の画像データを抽出して、リファレンスB画像データ群70Cの1つの画像データとして、記憶部40に記憶する。
 奥行き計測(ステップS53)で行われる処理は、図40、図41に示されている。
 ステップS52では、まず、図40に示すように、プロジェクタ1に2次元パターンの投影像を投影する(ステップS71)。続いて、コンピュータ3は、カメラ2に計測対象物4に投影された投影像を撮像させる(ステップS72)。カメラ2の撮像による計測対象物4のカラー画像データは、コンピュータ3に送られる。コンピュータ3の色画像分割部47は、この投影像のカラー画像データから抽出された赤色の画像データを、計測対象R画像データ71Aとして記憶し、カラー画像データから抽出された青色の画像データを、計測対象B画像データ71Cとして記憶する(ステップS73)。
 続いて、奥行き推定部45は、計測対象B画像データ71Cを読み込む(ステップS74)。奥行き推定部45は、計測対象B画像データ71Cにマッチング窓MWを設定する(ステップS75)。
 続いて、奥行き推定部45は、リファレンスB画像データ群70Cの中から1枚の参照画像データを読み込む(ステップS76)。続いて、奥行き推定部45は、計測対象物4の計測対象B画像データ71Cと、読み込まれた参照画像データとの間のマッチング窓MWにおける相関値を算出する(ステップS77)。ここでは、計測対象B画像データ71Cにおけるマッチング窓MWの領域と、参照画像データにおける同一の位置にあるマッチング窓MWの領域との画像マッチングが行われ、両画像の一致度が相関値として算出される。
 続いて、奥行き推定部45は、読み込んだ参照画像データが、最後の参照画像データであるか否かを判定する(ステップS78)。最後の参照画像データでない場合(ステップS78;No)、奥行き推定部45は、リファレンスB画像データ群70Cから次の参照画像データの読み込み(ステップS76)、相関値の算出(ステップS77)、最後の参照画像データの判定(ステップS78)を繰り返し行う。
 最後の参照画像データである場合(ステップS78;Yes)、奥行き推定部45は、奥行きを推定する(ステップS79)。図42には、奥行き推定部45において求められた奥行きに対する相関値の変化を示すグラフが示されている。図42では、青色の画像データにおける奥行きと相関値との関係が、点(Coarse)で示されている。奥行き推定部45は、奥行きに対する相関値の変化に基づいて、計測対象物4の奥行きの候補を幾つか抽出する。図42の例では、相関値が1.0となる点が、3点抽出されるようになる。
 続いて、奥行き推定部45は、マッチング窓MWによる奥行きの推定が、画像データ内のすべての位置で完了したか否かを判定する(ステップS80)。推定が完了していなければ(ステップS80;No)、奥行き推定部45は、マッチング窓MWを画像データ内の他の場所に設定し(ステップS75)、リファレンスB画像データ群70Cから参照画像データを読み込んで(ステップS76)、計測対象B画像データ71Cと参照画像データとのマッチング窓MW内での相関値を算出する(ステップS77)処理を、最後の参照画像データとなる(ステップS78;Yes)まで繰り返す。
 最後の参照画像データまで達すると(ステップS78;Yes)、奥行き推定部45は、前回と同様にして、計測対象物4の奥行きを推定する(ステップS79)。続いて、奥行き推定部45は、マッチング窓MWによる奥行きの推定が、計測対象B画像データ71C内のすべての位置で完了したか否かを判定する(ステップS80)。推定が完了していなければ(ステップS80;No)、奥行き推定部45は、再びステップS75→S76→S77→S78を実行し、そのマッチング窓MWでの各奥行きの参照画像データとの画像マッチングを行って、その相関値を求める。最後の参照画像データまで読み込むと(ステップS78;Yes)、奥行き推定部45は、そのマッチング窓MWの部分における奥行きを推定する(ステップS79)。
 このようにして、マッチング窓MWが計測対象B画像データ71C内を移動しつつ、そのマッチング窓MWの部分における奥行きが推定される。推定が完了すると(ステップS80;Yes)、奥行き推定部45は、推定結果を、粗奥行きデータ75として、記憶部40に記憶する(ステップS81)。
 続いて、奥行き推定部45は、図41に示すように、奥行きの探索範囲を決定する(ステップS82)。例えば、図42に示すように、計測対象B画像データ71Cで画像マッチングを行ったときの相関値が1.0となった奥行きを中心に、相関値が0.5以上である範囲A、B、Cの範囲に探索範囲を限定する。
 続いて、奥行き推定部45は、計測対象R画像データ71Aを読み込む(ステップS83)。奥行き推定部45は、計測対象R画像データ71Aにマッチング窓MWを設定する(ステップS84)。
 続いて、奥行き推定部45は、リファレンスR画像データ群70Aの中から1枚の参照画像データを読み込む(ステップS85)。続いて、奥行き推定部45は、計測対象物4の計測対象R画像データ71Aと、読み込まれた参照画像データとの間のマッチング窓MWにおける相関値を算出する(ステップS86)。ここでは、計測対象R画像データ71Aにおけるマッチング窓MWの領域と、参照画像データにおける同一の位置にあるマッチング窓MWの領域との画像マッチングが行われ、両画像の一致度が相関値として算出される。
 続いて、奥行き推定部45は、読み込んだ参照画像データが、最後の参照画像データであるか否かを判定する(ステップS87)。最後の参照画像データでない場合(ステップS87;No)、奥行き推定部45は、リファレンスR画像データ群70Aから次の参照画像データの読み込み(ステップS85)、相関値の算出(ステップS86)、最後の参照画像データの判定(ステップS87)を繰り返し行う。
 最後の参照画像データである場合(ステップS87;Yes)、奥行き推定部45は、奥行きを推定する(ステップS88)。例えば、図42に示すように、奥行き推定部45は、各参照画像データに対応する奥行きに対する相関値の変化を示すグラフを生成する。図42では、赤色の画像データによる推定結果は、曲線(fine)で示されている。
 続いて、奥行き推定部45は、マッチング窓MWによる奥行きの推定が、画像データ内のすべての位置で完了したか否かを判定する(ステップS89)。推定が完了していなければ(ステップS89;No)、奥行き推定部45は、マッチング窓MWを画像データ内の他の場所に設定し(ステップS84)、リファレンスR画像データ群70Aから参照画像データを読み込んで(ステップS85)、計測対象R画像データ71Aと参照画像データとのマッチング窓MW内での相関値を算出する(ステップS86)処理を、最後の参照画像データとなる(ステップS87;Yes)まで繰り返す。
 最後の参照画像データまで達すると(ステップS87;Yes)、奥行き推定部45は、前回と同様にして、計測対象物4の奥行きを推定する(ステップS88)。続いて、奥行き推定部45は、マッチング窓MWによる奥行きの推定が、計測対象R画像データ71A内のすべての位置で完了したか否かを判定する(ステップS89)。推定が完了していなければ(ステップS89;No)、奥行き推定部45は、再びステップS84→S85→S86→S87を実行し、そのマッチング窓MWでの各奥行きの参照画像データとの画像マッチングを行って、その相関値を求める。最後の参照画像データまで読み込むと(ステップS87;Yes)、奥行き推定部45は、そのマッチング窓MWの部分における奥行きを推定する(ステップS88)。例えば、図42のグラフでは、範囲Bにあるピークの奥行きが、最終的な奥行きとして推定される。
 このようにして、マッチング窓MWが計測対象R画像データ71A内を移動しつつ、そのマッチング窓MWの部分における奥行きが推定される。推定が完了すると(ステップS89;Yes)、奥行き推定部45は、推定結果を、ファイン奥行きデータ76として、記憶部40に記憶する(ステップS90)。奥行き推定部45は、奥行き計測を完了する。ファイン奥行きデータ76は、記憶部40に記憶され、出力部44から表示出力される。
 この実施の形態によれば、空間周波数が低く、サンプリング間隔が長いがラインパターン群(青色の2次元パターン)で計測対象物4の奥行きをおおまかに検出してから、探索範囲を絞って、空間周波数が高くサンプリング間隔が短いラインパターン群(赤色の2次元パターン)で計測対象物4の奥行きを精細に推定する。これにより、より計算量を低減しつつ、精度良く計測対象物の3次元計測を行うことができる。
実施の形態7(3色による曖昧性減少による精度向上).
 次に、この発明の実施の形態7について説明する。
 この実施の形態では、プロジェクタ1の映像面11にはカラー画像が表示され、投影像もカラーの投影像となる。カメラ2は、投影像のカラー画像データを撮像する。このカラー画像データは、赤色、緑色、青色の画像データに分離可能である。このコンピュータ3は、カラー画像から分割される、赤色、緑色、青色の画像データに基づいて、それぞれ画像マッチングを行うことにより、計測対象物4の奥行きを推定する。
 コンピュータ3は、その機能構成として、図43に示すように、投影パターン設定部46と、色画像分割部47と、記憶部40と、奥行き推定部45と、出力部44と、を備える。
 投影パターン設定部46は、プロジェクタ1の映像面11に表示される2次元パターンを出力する。ここでは、図44Aに示す赤色の2次元パターンと、図44Bに示す緑色のパターンと、図44Cに示す青色のパターンと、が合成された画像が表示される。図44Aに示すように、赤色の2次元パターンは、一方向(X軸方向)に並ぶラインパターン群から成るラインパターン群である。また、図44Bに示すように、緑色の2次元パターンは、赤色の2次元パターンと同程度の高さを有し、かつ、赤色の2次元パターンとは異なるパターンである。さらに、図44Cに示すように、青色の2次元パターンは、赤色、緑色の2次元パターンと同程度の高さを有し、かつ、赤色、緑色の2次元パターンとは異なるパターンである。
 色画像分割部47は、カメラ2で撮像されたカラー画像データを入力する。色画像分割部47は、カラー画像データから抽出された赤色の画像データを、リファレンスR画像データ群70A又は計測対象R画像データ71Aとして記憶部40に格納する。また、色画像分割部47は、カラー画像データから抽出された緑色の画像データを、リファレンスG画像データ群70B又は計測対象G画像データ71Bとして記憶部40に格納する。さらに、色画像分割部47は、カラー画像データから抽出された青色の画像データを、リファレンスB画像データ群70C又は計測対象B画像データ71Cとして記憶部40に格納する。
 奥行き推定部45は、計測対象R画像データ71Aと、リファレンスR画像データ群70Aとの間で、マッチング窓MWを用いた画像マッチングを行うことにより、投影光学系12による2次元パターンの結像位置を基準とする計測対象物4の奥行きを推定する。
 また、奥行き推定部45は、計測対象G画像データ71Bと、計測対象G画像データ70Bとの間で、マッチング窓MWを用いた画像マッチングを行うことにより、投影光学系12による2次元パターンの結像位置を基準とする計測対象物4の奥行きを推定する。
 また、奥行き推定部45は、計測対象B画像データ71Cと、計測対象B画像データ70Cとの間で、マッチング窓MWを用いた画像マッチングを行うことにより、投影光学系12による2次元パターンの結像位置を基準とする計測対象物4の奥行きを推定する。
 この実施の形態では、各色の画像データに対して、それぞれ図30、図31、図32のフローチャートに従って、3次元計測処理が実行される。ただし、コンピュータ3は、赤色、緑色、青色の画像データに対して、それぞれ個別に計測対象物4の奥行きを求める。
 具体的には、図31のステップS64(画像データの記憶)では、色画像分割部47は、カラー画像データから分離された赤色、緑色、青色の画像データを分離し、赤色の画像データをリファレンスR画像データ群70Aとして記憶部40に記憶し、緑色の画像データをリファレンスG画像データ群70Bとして記憶部40に記憶し、青色の画像データのリファレンスB画像データ群70Cとして記憶部40に記憶する。
 また、図32のステップS53(奥行き計測)では、奥行き推定部45は、計測対象R画像データ71A、計測対象G画像データ71B、計測対象B画像データ71Cそれぞれについて図32のステップS74~S79が実行される。
 この実施の形態では、ステップS80終了後、奥行き推定部45は、赤色、緑色、青色でそれぞれ求められた奥行きの平均値を、最終的な奥行きの推定値として算出する。算出された奥行きの推定値は、奥行きデータ55として記憶部40に記憶され、出力部44により表示出力される。図45には、赤色、緑色、青色、全色の画像データにおける奥行きに対する相関値の変動が示されている。赤色、緑色、青色、全色の2次元パターンはそれぞれ異なるが、図45に示すように、相関値が最も大きい奥行きは、良く一致している。これにより、各色で求められた奥行きは、信頼性の高い推定値となる。
実施の形態8(縦・横直交パターン).
 次に、この発明の実施の形態8について説明する。
 この実施の形態では、プロジェクタ1の映像面11にはカラー映像が表示される。したがって、計測対象物4には、カラーの投影光が投影される。カメラ2は、カラー画像データを撮像する。このコンピュータ3は、カラー画像データから抽出される、赤色、青色の画像データに基づいて、それぞれ画像マッチングを行うことにより、計測対象物4の奥行きを推定する。
 コンピュータ3は、その機能構成として、図46に示すように、投影パターン設定部46と、色画像分割部47と、記憶部40と、奥行き推定部45と、出力部44と、を備える。
 投影パターン設定部46は、プロジェクタ1の映像面11に表示される2次元パターンを出力する。ここでは、図47Aに示す赤色により形成されたラインパターン群と、図47Bに示す青色により形成されたラインパターン群とが合成された画像が表示される。図47Aに示すように、赤色のパターンは、X軸方向に配列されたラインパターンより成るラインパターン群である。また、図47Bに示すように、青色のパターンは、赤色のパターンと同程度の高さを有し、かつ、Y軸方向に配列されたラインパターンより成るラインパターン群である。
 色画像分割部47は、カメラ2で撮像されたカラー画像データを入力する。色画像分割部47は、カラー画像データから分割された赤色の画像データを、リファレンスR画像データ群70A又は計測対象R画像データ71Aとして記憶部40に格納する。色画像分割部47は、カラー画像データから分割された青色の画像データを、リファレンスB画像データ群70C又は計測対象B画像データ71Cとして記憶部40に格納する。
 奥行き推定部45は、計測対象R画像データ71Aと、リファレンスR画像データ群70Aとの間で、マッチング窓MWを用いた画像マッチングを行うことにより、投影光学系12による2次元パターンの結像位置を基準とする計測対象物4のおおまかな奥行きを推定する。
 また、奥行き推定部45は、計測対象B画像データ71Cと、リファレンスB画像データ群70Cとの間で、マッチング窓MWを用いた画像マッチングを行うことにより、投影光学系12による2次元パターンの結像位置を基準とする計測対象物4の奥行きを推定する。
 奥行き推定部45は、赤色、青色でそれぞれ求められた奥行きの平均値を、最終的な奥行きの推定値(奥行きデータ55)として算出する。
 なお、この実施の形態では、図47Aに示すような2次元パターンの画像マッチングに用いられるマッチング窓MWは、X軸方向が長手方向となり、図47Bに示すような2次元パターンの画像マッチングに用いられるマッチング窓MWは、Y軸方向が長手方向となる。
 このように、色毎の画像データにおいてラインパターンが並ぶ方向(空間周波数成分を有する方向)を互いに直交するようにすれば、ラインパターンの空間周波数成分の方向に関わらず、奥行きを正確に推定することができる。この時、共通の開口パターンを使用した場合、Y軸は開口パターンに直交する方向となるため、投影パターンはただのボケた画像となる。これにより、Y軸方向ではDfDの効果を得ることができ、Coarse to fineがワンショットで実現される。あるいは、Y軸の投影パターンに合わせて、開口パターンもY軸方向にすれば、X軸およびY軸それぞれがインパルス列となり、冗長性による精度向上や、マッチング窓がオクルージョンの影響を受けにくくなるというメリットが生まれる。これにより、図48に示すように、球状の計測対象物4の上側の輪郭部分や、左側の輪郭部分の奥行きを精度良く推定することができる。
実施の形態8’(カラーフィルタによる開口).
 次に、この発明の実施の形態8’について説明する。
 この実施の形態では、開口パターンには、第1の色(例えば赤色)の光のみを遮断するカラーフィルタを備えた第1の開口パターンと、第2の色(例えば青色)の光のみを遮断するカラーフィルタを備えた第2の開口パターンとが含まれる。複数のパターンを異なる色で投影する際に、それぞれの色に適したカラーフィルタを用いて開口パターンを作成することで、投影されるパターンに異なる性質を与えることができる。これにより、前記のCoarse to fineや、複数色による曖昧性の減少、直交パターンによるオクルーディングバウンダリの精度向上などを、より効果的に実現できる。
実施の形態9(プロジェクタ2台によるシステム).
 次に、この発明の実施の形態9について説明する。
 図49に示すように、この実施の形態では、3次元計測システム100は、プロジェクタ1A、1Bを2台備えている。プロジェクタ1A、1Bは、異なる方向から計測対象物4に2次元パターンを投影する。カメラ2の光軸は、プロジェクタ1A、1Bの光軸とは同軸ではない。
 このように、複数の異なる方向から2次元パターンの投影像を計測対象物4に投影し、カメラ2でその投影像を撮像するようにすれば、例えばプロジェクタ1Aと計測対象物4との間に障害物6があったとしても、プロジェクタ1Bの投影光により、計測対象物4の上に投影像を投影することができるので、計測対象物4の奥行きを正確に推定することができる。
 なお、計測対象物4の奥行きを計測するには、プロジェクタ1Aから投影された投影像と、プロジェクタ1Bから投影された投影像とを分離して撮像するのが望ましい。このために、プロジェクタ1A、1Bから投影される投影光の色を異なるものとし、カメラ2側にバンドパスフィルタを設けて、2つの投影像の画像データを分離するようにしてもよい。また、プロジェクタ1A、1Bから投影される投影光を異なる方向の偏光とし、カメラ2側で偏光フィルタ又は偏光ビームスプリッタ等を設けて、2つの投影像を別々に撮像可能としてもよい。
 また、図50に示すように、プロジェクタ1Aの光軸AXとカメラ2の光学系の光軸とのずれを示す基線をベースラインB1とし、プロジェクタ1Bの光軸AXとカメラ2の光学系の光軸とのずれを示す基線をベースラインB2とする。この場合、ベースラインB1、B2が直交するようにプロジェクタ1A、1Bを配置するようにしてもよい。この場合、プロジェクタ1A、1Bにおける符号化開口13D、13Eの空間周波数成分の方向は、ベースラインB1、B2が延びる方向に設定される。映像面11に表示される2次元パターンも同様である。このようにすれば、計測対象物4のY軸方向の輪郭だけでなく、X軸方向の輪郭も精度良く推定することができる。
 なお、上記各実施の形態では、画像マッチングにより2つの画像データの相関値を求めて、画像マッチングを行うことにより、計測対象物4の奥行きを推定した。しかしながら、計測対象物4の奥行きを求める方法は、これには限られない。例えば、画像データ内のマッチング窓MWと同じ大きさの領域についてそれぞれ特徴量を求め、インデックスを奥行きとするKd木を生成し、Kd木による探索により、画像マッチングを行い、計測対象物4の奥行きを推定するようにしてもよい。例えば、図51に示すようなカラー画像データAを投影する場合、各色の画像データB、C、Dにおけるマッチング窓MW内の画像データにおけるX座標ごとの輝度の総和を特徴量ベクトルとして用いればよい。
 なお、上記実施の形態では、赤色、緑色、青色とされているものを、適宜他の色(赤色、緑色、青色を含む)に変更することができる。
 また、複数の色で奥行きの推定を行う場合には、符号化開口として、各色に対応する符号化開口をプロジェクタに設けるようにしてもよい。
実施の形態10(DOE(Diffractive Optical Element)による実装).
 次に、この発明の実施の形態10について説明する。
 図52に示すように、この実施の形態では、3次元計測システムの光源としてレーザ光源80を用いる。まずレーザ光源80から出射されたレーザを、ドット列(例えば、不規則に2次元状に配列されたランダムドットパターン)を出力とする第1のDOEとしてのDOE81に入射する。次に、その出力を、ラインパターン列を形成する第2のDOEとしてのDOE82に入射する。これにより、前記した投影パターンと開口パターンとの畳込みと同様の効果を実現することができる。DOE81、82は、光量を数%程度しか減衰させないため、本システムでは光量をほとんど減衰させずにパターン(平面レーザ群83)を形成することができるメリットがある。また、DOEの組合せとしては、ドット列とラインパターンを逆転させても良い。あるいは、双方をラインパターン、ドットパターンとしても良い。
 符号化開口13の開口パターンと、投影される2次元パターンは少なくとも一方が不規則なランダムパターンであればよい。また、上記実施の形態4等では、プロジェクタ1の投影光学系12の光軸AXと、カメラ2の光軸とが非同軸に設定されているとしたが、プロジェクタ1の投影光学系12の光軸AXと、カメラ2の光軸とを同軸に設定するようにしてもよい。
 その他、コンピュータ3のハードウエア構成やソフトウエア構成は一例であり、任意に変更および修正が可能である。
 制御部31、主記憶部32、外部記憶部33、操作部34、表示部35及び通信部36、内部バス30などから構成されるコンピュータ3の処理を行う中心となる部分は、専用のシステムによらず、通常のコンピュータシステムを用いて実現可能である。例えば、前記の動作を実行するためのコンピュータプログラムを、コンピュータが読み取り可能な記録媒体(フレキシブルディスク、CD-ROM、DVD-ROM等)に格納して配布し、当該コンピュータプログラムをコンピュータにインストールすることにより、前記の処理を実行するコンピュータ3を構成してもよい。また、インターネット等の通信ネットワーク上のサーバ装置が有する記憶装置に当該コンピュータプログラムを格納しておき、通常のコンピュータシステムがダウンロード等することでコンピュータ3を構成してもよい。
 コンピュータ3の機能を、OS(オペレーティングシステム)とアプリケーションプログラムの分担、またはOSとアプリケーションプログラムとの協働により実現する場合などには、アプリケーションプログラム部分のみを記録媒体や記憶装置に格納してもよい。
 搬送波にコンピュータプログラムを重畳し、通信ネットワークを介して配信することも可能である。たとえば、通信ネットワーク上の掲示板(BBS, Bulletin Board System)にコンピュータプログラムを掲示し、ネットワークを介してコンピュータプログラムを配信してもよい。そして、このコンピュータプログラムを起動し、OSの制御下で、他のアプリケーションプログラムと同様に実行することにより、前記の処理を実行できるように構成してもよい。
 この発明は、この発明の広義の精神と範囲を逸脱することなく、様々な実施の形態及び変形が可能とされるものである。また、上述した実施の形態は、この発明を説明するためのものであり、この発明の範囲を限定するものではない。すなわち、この発明の範囲は、実施の形態ではなく、特許請求の範囲によって示される。そして、特許請求の範囲内及びそれと同等の発明の意義の範囲内で施される様々な変形が、この発明の範囲内とみなされる。
 なお、本願については、2015年5月21日に出願された日本国特許出願2015-103366号を基礎とする優先権を主張し、本明細書中に日本国特許出願2015-103366号の明細書、特許請求の範囲、図面全体を参照として取り込むものとする。
 1、1A、1B プロジェクタ、2 カメラ、3 コンピュータ、4 計測対象物、5 符号パターン、6 障害物、11 映像面、11A、11B 投影パターン、12 投影光学系、13、13A、13B、13C、13D、13E 符号化開口、30 内部バス、31 制御部、32 主記憶部、33 外部記憶部、34 操作部、35 表示部、36 通信部、39 プログラム、40 記憶部、41 データ取得部、42 初期計測部、43 ファイン計測部、44 出力部、45 奥行き推定部、46 投影パターン設定部、47 色画像分割部、48 仮想斜面画像作成部、50A、50B 画像データ、51 ヒストグラムデータベース、52 奥行き範囲データ、53 スケールパラメータ、54、55 奥行きデータ、60、61 ハーフミラー、70 リファレンス画像データ群、70A リファレンスR画像データ群、70B リファレンスG画像データ群、70C リファレンスB画像データ群、71 計測対象画像データ、71A 計測対象R画像データ、71B 計測対象G画像データ、71C 計測対象B画像データ、72 リファレンス斜面画像データ群、74 奥行きデータ、75 粗奥行きデータ、76 ファイン奥行きデータ、80 レーザ光源、81、82 DOE、83 平面レーザ群、100 3次元計測システム。

Claims (19)

  1.  投影光により投影光学系を介して2次元パターンが投影された計測対象物を、撮像手段により撮像して得られた画像データと、前記計測対象物の奥行きに対応付けられて予め取得された参照画像データ群とを、比較することにより前記計測対象物の奥行きを推定する3次元計測システムであって、
     前記2次元パターンは前記投影光学系に設けられた符号化開口パターンを介して前記計測対象物に投影されるとともに、
     前記計測対象物の奥行きは、前記投影光学系と前記撮像手段の前記計測対象物に対する視差に基づく画像マッチングを行うステレオ法と、前記計測対象物の画像データにおける前記符号化開口パターンの光軸方向のボケに基づくDfD法の双方を適用した画像処理により推定されることを特徴とする3次元計測システム。
  2.  前記参照画像データ群は、前記撮像手段により撮像して得られた画像データまたはシミュレーションにより算出された画像データである、
     ことを特徴とする請求項1に記載の3次元計測システム。
  3.  前記参照画像データ群は、前記投影光の光軸上の複数の位置に2次元平面を置いたときにそれぞれ前記撮像手段で撮像して得られた前記2次元平面の画像データを含む、
     ことを特徴とする請求項2に記載の3次元計測システム。
  4.  前記2次元平面は、前記投影光学系の光軸に直交している、
     ことを特徴とする請求項3に記載の3次元計測システム。
  5.  前記参照画像データ群は、
     前記投影光学系の光軸に斜交する2次元平面を、前記光軸に対して複数の異なる角度でそれぞれ置いたときに得られる2次元斜面の画像データを含む、
     ことを特徴とする請求項3に記載の3次元計測システム。
  6.  前記2次元斜面の画像データは、
     撮像部により撮像される前記2次元平面の参照画像データを部分的に合成することにより、作成される、
     ことを特徴とする請求項5に記載の3次元計測システム。
  7.  前記画像マッチングは、マッチング窓を用いて行われる、
     ことを特徴とする請求項1に記載の3次元計測システム。 
  8.  前記2次元パターンは複数の異なる投影パターンを有し、
     前記2次元パターンを構成する第1の投影パターンにより逆畳み込み演算を行わずに奥行き方向の探索範囲を決定するとともに、
     前記2次元パターンを構成し、前記第1の投影パターンとは異なる第2の投影パターンにより、前記探索範囲において逆畳み込み演算を行うことによる画像の階層的復元法を用いて前記計測対象物の奥行きを推定する、
     ことを特徴とする請求項1から請求項7のいずれか一項に記載の3次元計測システム。  
  9.  前記2次元パターン及び前記符号化開口パターンの組み合わせは、光学的に同じ方向に並ぶラインパターン列同士、2次元状に配列されたドットパターン同士、前記ラインパターン列と前記ドットパターンとの組み合わせのいずれかであり、前記2次元パターン及び前記符号化開口パターンの少なくとも一方は不規則なランダムパターンである、
     ことを特徴とする請求項1から請求項8のいずれか一項に記載の3次元計測システム。
  10.  前記2次元パターンには、
     第1の色により形成された第1の2次元パターン群と、
     第2の色により形成され、前記第1の2次元パターン群より空間周波数成分の高い第2の2次元パターン群と、
     が含まれている、
     ことを特徴とする請求項1から請求項9のいずれか一項に記載の3次元計測システム。 
  11.  前記2次元パターンには、
     第1の色により形成された第1のラインパターン群と、
     第2の色により形成され前記第1のラインパターン群と直交する第2のラインパターン群と、
     が含まれている、
     ことを特徴とする請求項1から請求項9のいずれか一項に記載の3次元計測システム。 
  12.  前記符号化開口パターンには、
     前記第1の色の光のみを遮断するカラーフィルタを備えた第1の符号化開口パターンと、
     前記第2の色の光のみを遮断するカラーフィルタを備えた第2の符号化開口パターンと、
     が含まれている、
     ことを特徴とする請求項10または請求項11に記載の3次元計測システム。
  13.  前記撮像手段で撮像された前記計測対象物の画像データから得られる各色の画像データと、同じ色の前記参照画像データ群との間で前記マッチング窓を用いた画像マッチングを行うことにより、2次元パターンの結像位置を基準とする前記計測対象物の奥行きを求め、各色で求められた奥行きに基づいて、前記計測対象物の奥行きを推定する、
     ことを特徴とする請求項10から請求項12のいずれか一項に記載の3次元計測システム。 
  14.  前記2次元パターンを構成するパターンの配列方向にずれるように、前記撮像手段の光学系の光軸が、前記投影光の光軸と非同軸に設定されている、
     ことを特徴とする請求項1から請求項13のいずれか一項に記載の3次元計測システム。
  15.  前記2次元パターンは、
     第1の方向から前記計測対象物に前記2次元パターンを投影する第1の投影手段と、
     第2の方向から前記計測対象物に前記2次元パターンを投影する第2の投影手段と、により投影される、
     ことを特徴とする請求項13または請求項14に記載の3次元計測システム。
  16.  前記第1の投影手段と前記撮像手段との光軸のずれの方向が、前記第2の投影手段と前記撮像手段との光軸のずれの方向と直交する、
     ことを特徴とする請求項15に記載の3次元計測システム。
  17.  前記撮像手段の光軸と前記投影光の光軸とが一致するように設定されている、
     ことを特徴とする請求項1から請求項13のいずれか一項に記載の3次元計測システム。
  18.  投影光により投影光学系を介して2次元パターンが投影された計測対象物を、撮像手段により撮像して得られた画像データと、前記計測対象物の奥行きに対応付けられて予め取得された参照画像データ群とを、比較することにより前記計測対象物の奥行きを推定する3次元計測方法であって、
     前記2次元パターンは前記投影光学系に設けられた符号化開口パターンを介して前記計測対象物に投影されるとともに、
     前記計測対象物の奥行きは、前記投影光学系と前記撮像手段の前記計測対象物に対する視差に基づく画像マッチングを行うステレオ法と、前記計測対象物の画像データにおける前記符号化開口パターンの光軸方向のボケに基づくDfD法の双方を適用した画像処理により推定されることを特徴とする3次元計測方法。
  19.  投影光により符号化開口パターンが設けられた投影光学系を介して2次元パターンが投影された計測対象物を、撮像手段により撮像して得られた画像データと、前記計測対象物の奥行きに対応付けられて予め取得された参照画像データ群とを、比較することにより前記計測対象物の奥行きを推定するコンピュータを、
     前記計測対象物の奥行きを、前記投影光学系と前記撮像手段の前記計測対象物に対する視差に基づく画像マッチングを行うステレオ法と、前記計測対象物の画像データにおける前記符号化開口パターンの光軸方向のボケに基づくDfD法の双方を適用した画像処理により推定する推定部として機能させることを特徴とする3次元計測プログラム。
PCT/JP2016/065084 2015-05-21 2016-05-20 3次元計測システム、3次元計測方法及び3次元計測プログラム WO2016186211A1 (ja)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017519422A JP6671589B2 (ja) 2015-05-21 2016-05-20 3次元計測システム、3次元計測方法及び3次元計測プログラム

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2015103366 2015-05-21
JP2015-103366 2015-05-21

Publications (1)

Publication Number Publication Date
WO2016186211A1 true WO2016186211A1 (ja) 2016-11-24

Family

ID=57320382

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2016/065084 WO2016186211A1 (ja) 2015-05-21 2016-05-20 3次元計測システム、3次元計測方法及び3次元計測プログラム

Country Status (2)

Country Link
JP (1) JP6671589B2 (ja)
WO (1) WO2016186211A1 (ja)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020165976A1 (ja) * 2019-02-13 2020-08-20 三菱電機株式会社 シミュレーション装置、シミュレーション方法およびシミュレーションプログラム
KR20200099048A (ko) * 2019-02-13 2020-08-21 주식회사 브이터치 객체 제어를 지원하는 방법, 시스템 및 비일시성의 컴퓨터 판독 가능 기록 매체

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
YUICHI TAKEDA ET AL.: "Fusing Depth from Defocus and Stereo with Coded Apertures", CVPR, 2013, XP032493183 *
YUICHI TAKEDA ET AL.: "Integration of Depth from Defocus and Stereo Using Coded Aperture", THE TRANSACTIONS OF THE INSTITUTE OF ELECTRONICS, INFORMATION AND COMMUNICATION ENGINEERS, 1 August 2013 (2013-08-01) *
YUKI HORITA ET AL.: "Robust Active 3D Measurement Method against Bokeh Using Projector-Camera System with Coded Aperture", THE TRANSACTIONS OF THE INSTITUTE OF ELECTRONICS, INFORMATION AND COMMUNICATION ENGINEERS, 1 August 2013 (2013-08-01) *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020165976A1 (ja) * 2019-02-13 2020-08-20 三菱電機株式会社 シミュレーション装置、シミュレーション方法およびシミュレーションプログラム
KR20200099048A (ko) * 2019-02-13 2020-08-21 주식회사 브이터치 객체 제어를 지원하는 방법, 시스템 및 비일시성의 컴퓨터 판독 가능 기록 매체
KR102225342B1 (ko) 2019-02-13 2021-03-09 주식회사 브이터치 객체 제어를 지원하는 방법, 시스템 및 비일시성의 컴퓨터 판독 가능 기록 매체
CN113412500A (zh) * 2019-02-13 2021-09-17 三菱电机株式会社 模拟装置、模拟方法及模拟程序
JPWO2020165976A1 (ja) * 2019-02-13 2021-09-30 三菱電機株式会社 シミュレーション装置およびシミュレーション方法
JP7094400B2 (ja) 2019-02-13 2022-07-01 三菱電機株式会社 シミュレーション装置およびシミュレーション方法
CN113412500B (zh) * 2019-02-13 2023-12-29 三菱电机株式会社 模拟装置及模拟方法

Also Published As

Publication number Publication date
JP6671589B2 (ja) 2020-03-25
JPWO2016186211A1 (ja) 2018-03-08

Similar Documents

Publication Publication Date Title
US10832429B2 (en) Device and method for obtaining distance information from views
JP2016024052A (ja) 3次元計測システム、3次元計測方法及びプログラム
EP2568253B1 (en) Structured-light measuring method and system
US8447099B2 (en) Forming 3D models using two images
US8452081B2 (en) Forming 3D models using multiple images
JP4095491B2 (ja) 距離測定装置、距離測定方法、及び距離測定プログラム
WO2011145285A1 (ja) 画像処理装置、画像処理方法およびプログラム
JP2019120591A (ja) 視差値算出装置、視差値算出方法及びプログラム
CN107808398B (zh) 摄像头参数算出装置以及算出方法、程序、记录介质
JP6071257B2 (ja) 画像処理装置及びその制御方法、並びにプログラム
US11803982B2 (en) Image processing device and three-dimensional measuring system
EP3951314A1 (en) Three-dimensional measurement system and three-dimensional measurement method
CN108981608B (zh) 一种新型线结构光视觉系统及标定方法
JP2014216813A (ja) カメラ姿勢推定装置及びそのプログラム
US8817246B2 (en) Lens test device and method
US11348271B2 (en) Image processing device and three-dimensional measuring system
CN117495975A (zh) 一种变焦镜头的标定方法、装置及电子设备
CN112085793A (zh) 一种基于组合透镜组的三维成像扫描系统及点云配准方法
Kruger et al. In-factory calibration of multiocular camera systems
JP6285686B2 (ja) 視差画像生成装置
JP6671589B2 (ja) 3次元計測システム、3次元計測方法及び3次元計測プログラム
JP2009186287A (ja) 平面パラメータ推定装置、平面パラメータ推定方法及び平面パラメータ推定プログラム
JP2019120590A (ja) 視差値算出装置、視差値算出方法及びプログラム
CN113240746A (zh) 基于理想成像平面的散斑结构光标定方法和设备
WO2015159791A1 (ja) 測距装置および測距方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16796604

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2017519422

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16796604

Country of ref document: EP

Kind code of ref document: A1