摘要 |
<p>There is provided a 3D shape detection device, method, and program for projecting a plurality of types of pattern light in time series to an object, imaging the object in the state when each pattern light is projected, generating a plurality of luminance images from each of the captured image, generating a code image as a result of subjecting the generated luminance images to a threshold value processing, and calculating a 3D shape of the object by using the code image. Furthermore, at a detection position in the direction intersecting the pattern light in the code image, a first pixel adjacent to a pixel having an attention code and having a code different from the attention code is detected. At a position corresponding to the first pixel, a luminance image having a boundary between light and dark is extracted from a plurality of luminance images. A pixel area formed by pixels of a predetermined area adjacent to the first pixel is identified. In the identified pixel area, an approximation equation representing the change of luminance in the extracted luminance image is calculated. In the calculated approximation equation, a position having a predetermined threshold value concerning the luminance is calculated. According to the calculation result, the attention code boundary coordinate is detected. According to the detected boundary coordinate, the 3D shape of the object is calculated by using the code image.</p> |