This invention relates to a system and method for the three-dimensional surface reconstruction of an object, in particular at least partially based on structured illumination techniques. The invention also relates to the labeling of elements between two images of an object or scene.
The determination of a three-dimensional (3D) shape of an object is of important significance in many fields. For example, in the field of dimensional measurement of manufactured objects, accurate measurement of a number of predetermined dimensions and/or the surface coordinates of such objects can provide an important tool for determining the accuracy of the manufacturing process.
Systems and methods for such 3D shape determination, particularly for industrial applications, have followed two main paths: mechanical and optical. Mechanical systems, while providing accurate 3D data for an objects, rely on mechanical contact between a probe and the object, and only one surface point at a time is measured, which results in a very slow, and often impractical, data acquisition rate.
Optical systems may be based on any one of a number of different methodologies. In one category, a triangulation system is used for determining the 3D spatial location for points on the object on which projected beams of light are reflected. In another category, epipole techniques are used for the same purpose. In either case, scan-line systems project a single line of light on the object, and the reflection of the projected line is read by a camera that is at some angle with respect to the projector apparatus axis of projection. This provides a contour on the image from which the position of the object section (where the line was projected) can be triangulated. In such systems, the line of light is progressively scanned over the object, and in this manner the full 3D shape of the object is determined. However, this method also suffers from a long acquisition time, which can also introduce errors if there is any unknown movement between the camera and the object during this time.
Improved scan-line systems can project a plurality of scan lines simultaneously onto an object, and the reflections of all the lines are captured by a camera. While acquisition time is fast, it is difficult to provide matching between the lines in the image taken by the camera and the illumination grid, because there is an ambiguity as to which line in the illumination grid a particular reflected line corresponds to. This is particularly problematic when the object is itself complex and comprises sharp edges or steep surfaces, as is often the case for manufactured items.
Various methods are known for solving the ambiguity problem. “Pattern Codification Strategies in Structured Light Systems”, by J. Salvi et al (published April 2004) provides a general overview of such methods. In one time multiplexing strategy described therein, a temporal codification method, known as the Gray Code Method employs various spatial frequencies of binary patterns to illuminate an object. Typically, first two stripes are used, light and dark, to completely illuminate the area of interest on the object, and the reflection therefrom is recorded on an image. Then, the object is again illuminated, but with 4 stripes, two light and two dark. The process is repeated several times, each time doubling the number of stripes, illuminating the same area of the object, and recording the reflections therefrom in a separate set of images. Any line on the object can be related to a particular original stripe from the unique observed code at that location from the gray scale that was previously used to illuminate the object.
However, such a method requires multiple data acquisition steps, and also suffers from relatively large data acquisition time to obtain the 3D structure of an object.
Spatial based methods are also known for solving the ambiguity problem, and some are also discussed in the aforesaid “Pattern Codification Strategies in Structured Light Systems” publication. Typically, a codeword that labels a certain point of a pattern is obtained from a neighborhood of points around it. Since the spatial neighborhood cannot always be recovered in the image, the decoding stage of the method can become problematic, and errors can arise. Further typically, the color or intensity of pixels, or groups of adjacent pixels are the visual features that may be gathered in the spatial neighborhood. In one spatial based method, a three-dimensional imaging system, marketed by the present Assignee under the name Optigo 200, illuminates a desired object, i.e., an object regarding which it is desired to determine its 3D structure, with a random grid of black and white pixels. Two or more cameras set at different angles with respect to the object each take a picture simultaneously of the object with the random grid superposed on it, and the grid pattern images captured by each camera are correlated one with the other. In such spatial based methods, a single spatial coding pattern is used for solving the ambiguity problem, and the methods then use the pixel correspondence between images thus found to find the coordinates of the surface of the object being investigated.
Of general background interest, U.S. Pat. No. 6,510,244 relates to a method for imaging a 3D object, wherein a pattern of lines in the form of a grid is illuminated onto an object, and the shape thereof is acquired on the basis of relative distances between the lines and/or intersections of the lines of the pattern. Also of background interest, U.S. Pat. No. 6,252,623 relates to an imaging method and apparatus, in which the object is illuminated with a repetitive pattern of differently-colored bands to enhance the accuracy of the image obtained by reducing cross-talk between the colored bars of the captured image.
Herein, the term “correspondence” refers to point to point mapping between different images of an object, typically at the pixel level, for example based on neighborhood-type coding.
The term “labeling” is used herein to refer to the proper identification of patterns such as one-dimensional line patterns or quasi one dimensional stripe patterns between different images of an object.
The term “matching” refers to sub-pixel to sub-pixel mapping between different images of an object.
The term “image”, in addition to the regular usage, is also used herein to include an original pattern that is projected onto an object.
In the present invention, a methodology is provided for reconstructing 3D surface structure of an object. The term “object” includes any two or three dimensional object or a collection of objects including a scene.
The method is based on enabling unique matching of each reflected point on an object with an illuminating pattern using a two stage approach, such matching being possible at the sub-pixel level. In the first stage, a first set of images is obtained, and a spatial coding technique is used for correspondence mapping of coordinates from a first image to a second image of an object. Neighborhood coding techniques are typically used for determining this correspondence. In one embodiment, a random grid or other structured light is used to illuminate the object, and the images are obtained at different angles with respect to the object. In other embodiments, surface features of the object may be sufficient to enable the aforesaid mapping to be effected from images obtained using unstructured light.
In the second stage, a second structured illumination, typically comprising a striped grid, is used to obtain a second set of images, typically comprising two further images of the object, and the mapping provided by the first stage provides proper labeling of the grid between these two images of the second set. Triangulation or epipole methods, or any other suitable method, can then be used for obtaining the 3D coordinates of the surface being reconstructed.
Thus, the present invention relates to a method for the three-dimensional surface reconstruction of an object comprising the steps of:
(a) obtaining a first set of images of the object having a first structured pattern on the surface thereof, and determining correspondence of image points between images of said first set of images;
(b) obtaining a second set of images of the object having a second structured pattern thereon, and labeling said second structured pattern between images of said second set of images based on the correspondence determined in (a);
(c) matching elements between images of said second set of images based on the labeling determined in (b); and
(d) determining spatial coordinates of the object from matched elements of said images of said second set of images in (b).
Typically, step (a) comprises the steps of:
The first set of images typically comprises two images at different angles with respect to said object. In a first embodiment of the invention, the two images are captured as images, substantially simultaneously, either by using two cameras, or a single camera that is moved between two positions relative to the object. In a second embodiment, one image of said first set of images comprises said uniquely coded structured pattern and at least one other image of said first set of images is captured as an image, and thus only a single fixed camera is necessary.
Typically, the uniquely coded structured pattern comprises a two dimensional random or pseudo random gray code, i.e., a two dimensional array having a random or pseudo random distribution of black and white elements. A pattern matching technique may be used for finding correspondence of image points in step (a).
Typically, the second structured pattern comprises a periodic structured pattern illuminated on the object. The second set of images typically comprises two images at different angles with respect to said object. In a first embodiment of the invention, the two images are captured as images, either by using two cameras, typically simultaneously, or a single camera that is moved between two positions relative to the object. In a second embodiment, one image of said first set of images comprises said uniquely coded structured pattern and at least one other image of said first set of images is captured as an image, and thus only a single fixed camera is necessary.
Thus, the second embodiment generally requires pre-knowledge of the pattern that is projected onto the object, and this requires projector calibration in addition to camera calibration. In the first embodiment, only calibration of the cameras is required.
The relationship between the first set of images and the object is substantially similar to the relationship between the second set of images and the object, though small variations are generally acceptable.
The periodic pattern typically comprises a first plurality of stripes of a first intensity or color intercalated with respect to a second plurality of stripes of a second intensity or color. In one example, the first plurality of stripes comprise white pixels and said second plurality of stripes comprise black pixels.
In particular, the following steps may be implemented in the second stage of the method:—
a first element in a first image of said second set of images is associated according to a first association technique with a first image point of a first image of said first set of images;
a second image point of a second image of said first set of images having correspondence with said first image point is determined; and
said second image point is associated with at least one second element of a second image of said second set of images according to a second association technique, wherein said at least one second element matches said first element.
According to said first association technique, said first element is an image element in substantially the same spatial location as the said first image point relative to their respective images.
According to said second association technique, said at least one second element is an image element in a spatial location relative to its image that is at or in close proximity to the location of said second image point relative to its image.
The first element typically comprises the centre point of a row of pixels of a stripe of the first plurality of stripes comprised in the first image of the second set of images.
The second element typically comprises the centre point of a row of pixels of a stripe of the first plurality of stripes comprised in the second image of said second set of images.
Step (d) may be based on triangulation techniques, or on epipolar reconstruction techniques, or on any other suitable techniques.
The present invention also relates to a method for matching points between images of a first set of images of an object comprising the steps of:
The present invention also relates to a system for the three-dimensional surface reconstruction of an object comprising:—
(I) a projector adapted for selectively illuminating said object with a first structured pattern and a second structured pattern;
(II) at least one camera for obtaining images of said object when illuminated with said first structured pattern and a second structured pattern;
(III) microprocessor means for determining three-dimensional surface topology of said object based on said images
The microprocessor means, typically a computer, is adapted for determining said topology according to the method the invention.
The method of the invention can be incorporated in a computer readable medium for instructing a suitable computer to carry out the method.
The present invention also relates to a control unit for use in the three-dimensional surface reconstruction of an object, said control unit being preprogrammed to carry out
(i) processing data indicative of a first set of images of the object having a first structured pattern on the surface thereof, and determining correspondence of image points between images of said first set of images;
(ii) using said correspondence for processing a second set of images of the object having a second structured pattern thereon to map elements of said second structured pattern between images of said second set of images;
(iii) analyzing the matched elements to determine spatial coordinates of the object.
Thus, the present invention applies a correspondence method to provide correct line-to-line labeling, providing fast and correct labeling, and with only using two sets of images of the object, and this may provide fast and accurate 3D reconstruction of a surface. In particular, the first stage of the method provides an effective means of correspondence, in only a single data acquisition step, and this correspondence may then be used to perform the line-to-line labeling, allowing the 3D reconstruction to be performed with sub-pixel level of accuracy.
In order to understand the invention and to see how it may be carried out in practice, a preferred embodiment will now be described, by way of non-limiting example only, with reference to the accompanying drawings, in which:
a and
a and
An embodiment of the method of the invention, generally designated with the reference numeral 100, is illustrated in
In step 110, images of the object O are provided by simultaneously capturing two images of the object O, that is I1 and I2 respectively, with the pattern A superposed on the object, as illustrated schematically in
In step 120, these images can then be processed to identify each part of the image I2 as corresponding to a part of image I1, according to the unique distribution of white and black pixels, as described further herein. Any suitable decoding, pattern recognition or pattern matching methods may be used for this purpose. When viewed superposed on the object, the pattern A will appear distorted, according to the topography of the object O, and moreover the type and extent of this “distortion” will usually vary according to the viewing angle with respect to the object O. Each image I1, I2, will comprise a pattern, A1, A2 respectively, which appear distorted relative to the original pattern A, and generally different one from the other, since as is known the projection of a 3D entity such as a curve, for example, in two 2D planes results in two different curves in these planes.
The first image I1 may be regarded as a coded image of the object O, and consists of a plurality of black and white pixels in a global rectangular matrix, and this matrix is divided into all possible local [n×m] matrices, which may thus sometimes overlap one with another to some extent, so that each pixel of the first image I1 can be assigned an [n×m] matrix centered on it. Of course, pixels at the edges and corners of the image may only have a part of such a matrix associated therewith, and the following method can also be applied to such matrices, mutatis mutandis. For example, such [n×m] matrices are [5×5] matrices, though the size and aspect ratio of the matrices may vary depending on the size and other characteristics of the image I1.
An exemplary “decoding” procedure regarding the second image is executed as follows, and is based on neighborhood coding techniques. Taking for example matrix M1 in image I1, such as a [5×5] matrix centered on a particular pixel having coordinates (x1, y1) in image I1, a search is conducted in the other image, I2, to find the location of a similar [5×5] matrix in which the black/white pixel pattern thereof correlates the best with the pixel pattern of matrix M1. When this matrix, M2, is found, the coordinates of the center thereof, (x2, Y2) are noted. These center coordinates may refer to a pixel, or alternatively, suitable methods may be employed to provide a sub-pixel level of accuracy for these coordinates. This operation is repeated for every pixel (and thus for every possible [n×m] matrix of pixels) in image I1, thereby effectively mapping the coordinates of the centers of pixels in image I1 to those of image I2. In this manner, every part of the image I1 can be effectively mapped with respect to image I2.
Where the grid A only comprises local uniqueness, and thus there is some repetition of the pattern within the grid, it is possible to nevertheless find the correspondence between the two images and thus map each matrix from image I1 to image I2. This may be done, for example, by associating each matrix in I1, say for example M1, with a number of other matrices M1n that are situated in close proximity to, i.e., in the neighborhood of, M1. If there are a number of matrices M2′ in the second image I2 which correlate with M1, then the particular one of matrices M2′ that has in its vicinity the matrices M2n that are correlated with the aforesaid matrices M1n is chosen as being the matrix corresponding to M1.
Alternatively, rather than using a random grid based on a gray scale, it is possible to use a random grid based on a color scale instead, for example as described in the aforementioned “Pattern Codification Strategies in Structured Light Systems” reference, the contents of which are incorporated herein in their entirety.
In step 130 of stage II of the method, and referring to
In step 140, each part of each of the stripes or lines L1, L2 . . . Ln in one image or image K1 can be identified and labeled as corresponding to a particular line number L1′, L2′ . . . Ln′ in the other image or image K2, for example, as follows.
Referring to
Next, elements between images K1 and K2 are matched. First, the pixels or set of pixels Q1, Q3 along L3′ having centers q1 and q3 closest to (x2′, y2′) are identified. The coordinates in K2 corresponding the closest to coordinates of q0, (x1′, y1′), of K1, according to stage II, are considered to be somewhere between these centers q1, q3.
In step 150, the coordinates (X1, Y1) of the object O corresponding to (x1′, y1′) are then obtained as follows. A space ray P1 is defined by point q0 (x1′, y1′) and the center of projection CP1 of image K1. Then, a plane S is defined by points q1, q3 and the center of projection CP2 of image K2. The intersection point D of ray P1 with plane S provides the coordinates (X1, Y1) object O, or a close estimation thereof.
Alternatively, and as illustrated in
Alternatively, and as illustrated in
Optionally, the first stage of the method can be implemented without the need of a grid A if the object O comprises a suitable structured surface pattern, using unstructured light. In such a case, it is only necessary to obtain two images of the object and to map the coordinates of one image to the other image via suitable pattern matching techniques on the basis of local uniqueness of this surface pattern.
Referring to
There are many ways for illuminating the object. For example, a light emitter may be used having a mask, the mask selectively enabling either pattern A or pattern B to be illuminated onto the object. The mask can be a so-called “passive” mask, for example two masks defining fixed patterns A and B respectively, selectively locatable in the optical path of light generated by the light emitter. Such a passive mask may be in the form of a rotating disc, one half of which comprises pattern A, and the other half pattern B, and the disc is rotated by 180° to bring the required half in alignment with the light emitter.
Alternatively, the mask may be a so-called “active” mask, in the form of a spatial light modulator (SLM) operatively connected to a control module, and under the control of the latter, the SLM provides the required pattern A or pattern B.
Alternatively, the light emitter itself may be configured to generate structured light. This may be implemented by using a matrix of light-emitting elements. Such a matrix may be designed in accordance with a fixed pattern A or B, or may be configured as a suitable light emitting modulator, operatively connected to a control module, to selectively illuminate the object with pattern A or pattern B.
Alternatively, a laser speckle arrangement may be used to provide the random pattern.
In other embodiments, more than two cameras may be used, each of which captures an image of the object illuminated with the random pattern A, and each of the images is correlated with the other images in a similar manner to that described above, mutatis mutandis.
The spatial relationship between the cameras C1, C2, the projector P, and the object O is preferably substantially unchanged from the time the first and second set of images were acquired, and thus, typically, the sets of images I1, I2, and K1, K2 are taken in very quick succession. Nevertheless, it is possible for some relative movement to occur without affecting accuracy, typically where such movement is less than half the distance between the lines of the striped illumination pattern B.
A second embodiment of the invention is illustrated in
In the second embodiment, the first set of images comprises the uniquely coded structured pattern itself that is used to illuminate the object. Thus, the object O is illuminated with a structured illumination, in Stage I, comprising a random or quasi random pixel pattern, such as pattern A (
Thus, in a similar manner to that described for the first embodiment, mutatis mutandis, Image I3 is effectively decoded to provide correspondence between the coordinates of, say, nodal points in the grid A and the image I3.
In Stage II, a periodic structured illumination such as a striped illumination pattern B (
According to this embodiment, the method of the invention may be carried out using a system 200′, which provides the required illumination for stage I and stage II, using projector P, and comprises a camera C, aligned at different angle with respect to the object O from that of projector P. A microprocessor means (not shown) such as a suitable computer processes the images obtained by the camera C, typically via an image grabber, together with the patterns A and B, according to the method of the invention.
The spatial relationship between the camera C, the projector P, and the object O is preferably substantially unchanged from the time the images I3 and K3 were acquired, and thus, typically, images I3 and K3 are taken in very quick succession. Nevertheless, it is possible for some relative movement to occur without affecting accuracy, typically where such movement is less than half the distance between the lines of the striped illumination pattern B.
In the method claims that follow, alphabetic characters and Roman numerals used to designate claim steps are provided for convenience only and do not imply any particular order of performing the steps.
Finally, it should be noted that the word “comprising” as used throughout the appended claims is to be interpreted to mean “including but not limited to”.
While there has been shown and disclosed exemplary embodiments in accordance with the invention, it will be appreciated that many changes may be made therein without departing from the spirit of the invention.
Number | Date | Country | Kind |
---|---|---|---|
60490586 | Jul 2003 | US | national |
Filing Document | Filing Date | Country | Kind | 371c Date |
---|---|---|---|---|
PCT/IL04/00672 | 7/22/2004 | WO | 5/9/2006 |