Technical Field
This application generally relates to measuring and reconstructing the shapes of physical objects, including objects that have specular surfaces.
Background
Objects that are composed of a highly-glossy material, such as specular objects, have reflection characteristics that differ significantly from objects that are composed of a diffuse material. For example, a diffuse material reflects light from a directional light source, such as a projector, in virtually all directions, but a highly-glossy material reflects light primarily in only one direction or a few directions. These reflections from a highly-glossy material are specular reflections and are caused by the shiny surface of the highly-glossy material, which often has a mirror-like surface finish.
Some embodiments of a method comprise the following: obtaining two sets of images of an object, each of which was captured from a respective viewpoint, wherein the viewpoints partially overlap; identifying pixel regions in the two sets of images that show reflections from a light-modulating device that were reflected by a surface of the object; calculating respective surface normals for points on the surface of the object in the pixel regions in the two sets of images, wherein at least some of the points on the surface of the object are shown in both of the two sets of images; calculating, for each viewpoint of the two viewpoints, respective unscaled surface coordinates of the points on the surface of the object based on the respective surface normals; calculating, for each viewpoint of the two viewpoints, a respective initial scale factor based on the respective surface normals and on decoded light-modulating-device-pixel indices; calculating, for each viewpoint of the two viewpoints, initial scaled surface coordinates of the points on the surface of the object based on the respective initial scale factor of the viewpoint and the respective unscaled surface coordinates of the viewpoint; and calculating, for each viewpoint of the two viewpoints, a respective refined scale factor by minimizing discrepancies among the initial scaled surface coordinates of the points on the surface of the object that are shown in both of the two sets of images.
Some embodiments of a system comprise one or more computer-readable media and one or more processors that are coupled to the one or more computer-readable media. The one or more processors are configured to cause the system to obtain a first set of images of an object that was captured from a first viewpoint, obtain a second set of images of the object that was captured from a second viewpoint, calculate first respective surface normals for points on a surface of the object that are shown in the first set of images, calculate second respective surface normals for points on the surface of the object that are shown in the second set of images, wherein at least some of the points on the surface of the object are shown in both the first set of images and the second set of images, calculate, for each viewpoint of the two viewpoints, respective unscaled surface coordinates of the points on the surface of the object based on the respective surface normals; calculate, for the first viewpoint, first initial scaled surface coordinates of the points on the surface of the object that are shown in the first set of images based on the first respective surface normals and on a first initial scale factor, calculate, for the second viewpoint, second initial scaled surface coordinates of the points on the surface of the object that are shown in the second set of images based on the second respective surface normals and on a second initial scale factor, and calculate a first refined scale factor and a second refined scale factor by minimizing differences between the first initial scaled surface coordinates and the second initial scaled surface coordinates of the points on the surface of the object that are shown in both the first set of images and the second set of images.
Some embodiments of one or more computer-readable storage media store computer-executable instructions that, when executed by one or more computing devices, cause the one or more computing devices to perform operations that comprise the following: obtaining a first set of images of an object that was captured from a first viewpoint; obtaining a second set of images of the object that was captured from a second viewpoint; calculating first respective surface normals for points on a surface of the object that are shown in the first set of images; calculating second respective surface normals for points on the surface of the object that are shown in the second set of images, wherein at least some of the points on the surface of the object are shown in both the first set of images and the second set of images; calculating, for the first viewpoint, first initial scaled surface coordinates of the points on the surface of the object that are shown in the first set of images based on the first respective surface normals and on a first initial scale factor; calculating, for the second viewpoint, second initial scaled surface coordinates of the points on the surface of the object that are shown in the second set of images based on the second respective surface normals and on a second initial scale factor; and calculating a first refined scale factor and a second refined scale factor by minimizing differences between the first initial scaled surface coordinates and the second initial scaled surface coordinates of the points on the surface of the object that are shown in both the first set of images and the second set of images.
The following paragraphs describe certain explanatory embodiments. Other embodiments may include alternatives, equivalents, and modifications. Additionally, the explanatory embodiments may include several novel features, and a particular feature may not be essential to some embodiments of the devices, systems, and methods that are described herein.
In this embodiment, the light-modulating devices 120 are electronically-controllable light-modulating panels. An example of an electronically-controllable light-modulating panel is a liquid-crystal-display (LCD) panel, which has programmable pixels that modulate a backlight. Another example of an electronically-controllable light-modulating panel is electrochromic glass. Electrochromic glass includes a layer that has light-transmission properties that are switchable between a transparent mode, in which the layer is completely transparent or nearly-completely transparent, and a diffuse mode, in which the layer assumes a frosted or opaque appearance. Images can be projected or formed on the frosted or opaque appearance of the diffuse mode.
The light source 125 may provide continuous area illumination, for example when the light source 125 is a panel that is composed of a high density of light-producing pixels. In some embodiments, the light source 125 is a backlight from a common display device. Also, in some embodiments, the light source 125 is an imaging projector that has programmable luminous pixels.
The light source 125 and the light-modulating devices 120 output light rays {right arrow over (r)}. As described herein, a light ray {right arrow over (r)} includes two components: an illumination light ray {right arrow over (r)}in that travels from the light source 125 through the light-modulating devices 120 to the surface of the object 130, and a reflected light ray {right arrow over (r)}re that is the reflection of the illumination light ray {right arrow over (r)}in from the surface of the object 130. Each light ray {right arrow over (r)}1 its illumination light ray {right arrow over (r)}in, and its reflected light ray {right arrow over (r)}re may be described or identified by the intersections of the illumination light ray {right arrow over (r)}in with the two light-modulating devices 120 (a light ray {right arrow over (r)} is described by [u, v] and [s, t] in
The image-capturing device 110 captures the reflected light rays {right arrow over (r)}re. In
Furthermore, because information about the shape of the object 130 is obtained by capturing reflections from it, and because the reflections are viewpoint dependent, in order to recover the full surface of an object 130, the measurement system can observe the object's reflections from multiple points of view (viewpoints), for example by using one or more additional cameras 110 or by observing the object 130 in different poses (e.g., by rotating the object). In the example embodiment of
The system may calibrate the positions of the light-modulating devices 120 and the image-capturing device 110, as well as the rotating stage 135 in embodiments that include the rotating stage 135. In some embodiments, the calibration procedure includes generating one or more transformation matrices. The transformation matrices define a rotation and a translation from an image-capturing device to a rotating stage or to an object, and may also define a rotation and a translation between different poses of the object.
Furthermore, although this operational flow and the other operational flows that are described herein are performed by a measurement device, other embodiments of these operational flows may be performed by two or more measurement devices or by one or more other specially-configured computing devices.
Moreover, while the embodiment in
In the first operational flow (“first flow”), in block B200 the measurement device obtains a first set of images 212A of an object, and the measurement device decodes the first set of images 212A, thereby producing the first LMD-pixel indices 231A. Some embodiments of the measurement device implement block B200 (and block B201) by performing the operational flow that is described in
The first LMD-pixel indices 231A describe, for a region of the images in the first set of images 212A, the two respective pixels of the light-modulating devices (one pixel per light-modulating device) that a respective light ray {right arrow over (r)} passed through before it was captured in the region. Furthermore, LMD-pixel indices that are generated by decoding an image may be referred to herein as “measured LMD-pixel indices.” Accordingly, the first LMD-pixel indices 231A are examples of measured LMD-pixel indices.
Next, in block B205, the measurement device performs ray triangulation based on the first LMD-pixel indices 231A to generate a first normal field 232A for the object as the object is shown in the viewpoint of the first set of images 212A (i.e., for the part of the object that is visible from the viewpoint of the first set of images 212A). The first normal field 232A is a collection of the surface normals that are generated by the ray triangulation in block B205. For example, for a particular light ray {right arrow over (r)}, the measurement device may triangulate its illumination light ray {right arrow over (r)}in and its reflected light ray {right arrow over (r)}re to determine the normal of the point on the surface that reflected the light ray {right arrow over (r)}.
Also for example, the measurement device may determine the surface normal of the object at each image pixel by performing the following: (1) Fitting a regression line through the LMD-pixel locations in the first LMD-pixel indices 231A. (2) Determining the direction of the light ray as it reached the pixel of the image-capturing device. (3) Determining the surface normal of the object as a half-way vector of the regression line and of the direction of the light ray as it reached the pixel of the image-capturing device.
Thus, the measurement device can calculate a respective surface normal {right arrow over (n)} for each point of a plurality of points on the surface of the object based on the direction of the illumination light ray {right arrow over (r)}in of the specular reflection at the point and on the direction of the reflected light ray {right arrow over (r)}re of the specular reflection at the point. For example, some embodiments calculate the surface normal {right arrow over (n)} at a point as described by the following:
The first flow then moves to block B210, where the measurement device performs normal-field integration on the first normal field 232A to generate first unscaled surface coordinates 233A, which are the three-dimensional (3D) coordinates of respective points on the surface of the object, and which collectively describe an integrated surface. Surface coordinates, such as the first unscaled surface coordinates 233A, may be represented by a point cloud. In some embodiments, the measurement device uses an orthographic camera model to generate the first unscaled surface coordinates 233A. And in some embodiments (e.g., embodiments where an image-capturing device has a large field of view, a small focal distance, and a small focal length), the measurement device uses a perspective camera model to generate the first unscaled surface coordinates 233A.
For example, some embodiments of the measurement device perform normal-field integration with a perspective camera model as described by the following, which refers to notation that is illustrated by
For each pixel (ξ, η) of a surface z=F(x,y), the normal {right arrow over (n)}=(n1, n2, n3) is described by the normal field (e.g., the first normal field 232A). Some embodiments of the measurement device first covert the normals to surface gradients (e.g., according to zx=−n1/n2 and zy=−n2/n3, where zx and zy are surface gradients) and then solve the optimal surface using a Poisson technique. However, due to the perspective projection, the world coordinates (x, y, z) of a point on the surface z may not have a linear relationship with the image coordinates (ξ, η) of the point on the surface z. Therefore, the traditional Poisson technique may not be directly applicable. Thus, to integrate the surface z, some embodiments of the measurement device first convert the surface gradients (zx and zy) into image coordinates by applying a perspective projection (e.g., x=ξ·z/f, y=η−z/f), for example as described by the following:
However (zξ, zη) is not directly integrable because zξ and zη are functions of the surface z itself. The surface z can be eliminated from the expression by substituting the surface z with a new variable t=ln z. For example, some embodiments of the measurement device apply the chain rule as described by the following expression:
Then (tξ, tη) can be integrated using a standard Poisson technique. The integration produces t=t0+c for some arbitrary constant c. Exponentiation produces z=α−et
In embodiments that use an orthographic-camera model, the additive integration constant manifests itself as an unknown translation in space along the camera axis. In embodiments that use a perspective-camera model, the constant α appears, through exponentiation, as an unknown multiplicative constant.
Accordingly, for each pixel in the images in the first set of images 212A that depicts a part of the surface of the object, the first unscaled surface coordinates 233A may represent that part of the surface with corresponding coordinates (ξ·z/f,η·z/f,z), where z=et
After block B210, the first flow proceeds to block B215, where scale-factor calculation is performed based on the first unscaled surface coordinates 233A and on the first LMD-pixel indices 231A. This scale-factor calculation produces the first scale factor 234A. In order to calculate the first scale factor 234A, some embodiments of the measurement device triangulate points to fit the integrated surface that is defined by the first unscaled surface coordinates 233A. However, these triangulation points may have large errors and may produce unpredictable results for the scale factor due to the size of the LMD pixels. Because the image-capturing device's pixel size may be much smaller than the LMD pixel sizes, some embodiments of the measurement device estimate the scale factor by back-tracing the rays from the image-capturing device to the LMDs and determining the scale factor using a maximum likelihood technique.
For example, some embodiments of the measurement device recompute the first normal field of the surface based on the first unscaled surface coordinates 233A. Then these embodiments may use backward ray tracing to determine the scale factor by testing several candidate scale factors (e.g., the scale factors in a particular range of scale factors). For each candidate scale factor, the measurement device traces rays from the image-capturing device's pixels in the reflection regions (i.e., the parts of the image that depict a specular reflection from the surface of the object), computes the back-reflected rays that intersect with the two light-modulating devices, and computes the LMD-pixel indices of the back-reflected rays. The measurement device then computes the differences between the first LMD-pixel indices 231A and the back-reflected LMD-pixel indices for the candidate scale factor. To determine the scale factor α (e.g., the first scale factor 234A), the measurement device may select the candidate scale factor that has the smallest differences.
Due to the noise in light transport, the back-reflected LMD-pixel indices may be subject to errors that are related to the object's geometry and the distance between the light-modulating devices (e.g., the back light-modulating device may have larger errors than the front light-modulating device). Therefore, the measurement device may use the inverse of the standard deviations of the LMD-pixel indices in a small neighborhood as weights for balancing the index errors.
In some embodiments, the calculation of a scale factor α can be described by the following objective function:
where i is the image-capturing-device-pixel index in the reflection region R; where (ûi, {circumflex over (v)}i) and (ŝi, {circumflex over (t)}i) are, respectively, the measured LMD-pixel indices (e.g., the first LMD-pixel indices 231A) for the front and back light-modulating devices; where (ui(α), vi(α)) and (si(α), ti(α)) are, respectively, the back-reflected LMD-pixel indices on the front and back light-modulating devices for the scale factor σ; and where σi,fx, σi,fy, σi,bx, and σi,by are, respectively, the standard deviations at pixel i for horizontal and vertical LMD-pixel index maps of the front and back light-modulating devices. The scale factor α can be calculated by minimizing the objective function.
For example,
Also, to avoid local minimums, some embodiments of the measurement device search through a large range of scale factors. Because the objective function may be flat over much of its range, some embodiments conduct a multi-resolution search: they search using larger steps in the flat region and search using finer steps around the peak.
Referring again to
The second flow begins in block B201, where the measurement device obtains a second set of images 212B of the object, and the measurement device decodes the second set of images 212B, thereby generating second LMD-pixel indices 231B.
Next, in block B206, the measurement device performs ray triangulation based on the second LMD-pixel indices 231B to generate a second normal field 232B for the object, as the object is shown in the viewpoint of the second set of images 212B. The second flow then moves to block B211, where the measurement device performs normal-field integration on the second normal field 232B to generate second unscaled surface coordinates 233B. Then the second flow proceeds to block B216, where scale-factor calculation is performed based on the second unscaled surface coordinates 233B and on the second LMD-pixel indices 231B. This scale-factor calculation produces the second scale factor 234B. The second flow then moves to block B221, where coordinate calculation is performed, thereby producing the second scaled surface coordinates 235B. The second flow then moves to block B225, where it merges with the first flow.
In block B225, multi-view scale-factor optimization is performed based on the first scaled surface coordinates 235A, on the second scaled surface coordinates 235B, on a first transformation matrix 209A, and on a second transformation matrix 209B. The first transformation matrix 209A and the second transformation matrix 209B may have been previously stored by the measurement device, for example during a calibration procedure. Each transformation matrix can describe the translation and the rotation from the image-capturing device to a respective pose of the object.
If the first set of images 212A and the second set of images 212B each has a different viewpoint of the object (e.g., the object was rotated between image captures), then respectively applying the first scale factor 234A and the second scale factor 234B to the first scaled surface coordinates 235A and the second scaled surface coordinates 235B produces a disjoint union of scaled object surfaces. A scaled object surface may be described in the image-capturing device's coordinate system according to {αΩ(0)WΩ}, where αΩ(0) is a scale factor and where WΩ is a window that has a respective viewpoint of the surface (for example as described in
To account for different viewpoints, some embodiments of the measurement device transform the scaled object surfaces into a common coordinate system, which may be referred to herein as a world coordinate system. For example, even if only one image-capturing device is used to capture the first set of images 212A and the second set of images 212B, the object may have been rotated between image captures. Thus, the relationship of the object's coordinate system to the image-capturing device's coordinate system will be different in the two images. By applying the rotation and the translation described by the first transformation matrix 209A to the first scaled surface coordinates 235A, and by applying the rotation and the translation described by the second transformation matrix 209B to the second scaled surface coordinates 235B, the measurement device can produce a disjoint union of scaled object surfaces in the world coordinate system. A scaled object surface in the world coordinate system may be described as follows: {R−1(αΩ(0)WΩT)}, where R is a rotation matrix, where T is a translation matrix, and where the combination of R and T is a transformation matrix.
Then, in multi-view fitting, the measurement device combines the different viewpoints of the scaled object surfaces by minimizing the differences between the scaled object surfaces where the scaled object surfaces overlap. The measurement device may measure the differences in both position and angle. Some embodiments of the measurement device combine the different viewpoints as described by the following objective function, which matches a surface co from view i and a surface ω′ from view j:
Σ(αω,αω′)=dC
where dC
If the initial scale factors (e.g., the first scale factor 234A and the second scale factor 234B) from the single views have large errors, then the multi-view fitting may converge very slowly. Some embodiments of the measurement device increase the speed of the multi-view fitting by considering additional surface constraints (e.g., curvature).
The multi-view scale-factor optimization in block B225 produces a first refined scale factor 236A and a second refined scale factor 236B. The first refined scale factor 236A and the second refined scale factor 236B may be different from each other. The flow then moves to block B230, where first refined surface coordinates 237A are calculated based on the first refined scale factor 236A and on the first unscaled surface coordinates 233A, and where second refined surface coordinates 237B are calculated based on the second refined scale factor 236B and on the second unscaled surface coordinates 233B.
Finally, the flow moves to block B235, where the first refined surface coordinates 237A and the second refined surface coordinates 237B are transformed to a common coordinate system (e.g., the world coordinate system) based on the first transformation matrix 209A and the second transformation matrix 209B, respectively, and then the transformed and refined surface coordinates are merged to generate merged surface coordinates 238, which are a representation of the shape of the surface (e.g., a point cloud that describes the shape of the surface), and which define an integrated surface. Because the merged surface coordinates 238 were generated from the first refined surface coordinates 237A and the second refined surface coordinates 237B, the merged surface coordinates 238 that are produced by block B235 may also be referred to herein as refined merged surface coordinates.
The flow then moves to block B820, where the measurement device generates a combined index map based on the horizontal index maps and the vertical index maps. However, if a pixel in the image of the object does not capture an LMD signal (i.e., capture light that was both transmitted by the LMDs and reflected by the object), then the index map will show noise at this pixel of the image. Consequently, the combined index map may include noise in addition to the horizontal and vertical LMD-pixel indices of the LMD pixels that transmitted the light that was reflected by the object and that was captured in the image. But an image pixel that does not have an LMD signal is typically surrounded by image pixels that have invalid LMD-pixel indices, even if the image pixel that does not have an LMD signal has a valid LMD-pixel index. An example of an invalid LMD-pixel index is an index that is larger than the physical pixel resolution of the LMD. For example, for an LMD that has a pixel resolution of 1920×1080, a valid horizontal index must lie between 1 and 1920, and a valid vertical index must lie between 1 and 1080. Also, when the LMD-pixel indices are encoded by 11 bit binary code, which has a nominal range of 1 to 2048, a pixel with no LMD signal may tend to take a random value between 1 and 2048, and would therefore appear as noise.
After generating the combined index map in block B820, the flow moves to block B825 where, to exclude image pixels that show noise, the measurement device generates one or more image masks. Some embodiments of the measurement device generate a mask M0 that defines image-pixel regions and that can be described according to the following:
M
0
=v(Ix,B)&v(Iy,B)&v(Ix,F)&v(Iy,F), (6)
where Ix,B, Iy,B, Ix,F, and Iy,F are index maps, where v(I) denotes the mask containing only the image pixels in index map 1 that have valid index values, and where & is the pixel-wise AND operator. However, this mask M0 may remove only nominally invalid image pixels, and the resulting image-pixel regions may still be noisy. Thus, to smooth out the image-pixel regions, some embodiments of the measurement device generate a mask M1 for defining image-pixel regions that can be described according to the following:
M
1
=M
0&(kw*M0>τ), (7)
where kw is a box convolution kernel of size w×w (e.g., w=51), such as a constant w×w matrix with the value 1/w2, and where τ is a threshold value (e.g., τ=0.8).
Additionally, some embodiments of the measurement device also require the image pixels to receive only a direct reflection from the surface, as opposed to a secondary reflection, or interreflection. In some of these embodiments, the image mask M2 can be described as follows:
M
2
=M
1& Mx,B& Mx,F& My,B& My,F, (8)
where
Finally, after generating the one or more image masks in block B825, in block B830 the measurement device generates LMD-pixel indices based on the one or more image masks and on the combined index maps. For example, the LMD-pixel indices may be the indices in the combined index map that are not removed by the one or more masks, and the LMD-pixel indices may be represented by an index map. The LMD-pixel indices may not include indices for most or all of the image pixels that did not capture an LMD signal. Accordingly, the LMD-pixel indices may include indices only for the image pixels that captured a direct LMD signal. Also, the LMD-pixel indices may include indices only for the image pixels that captured either an indirect LMD signal or a direct LMD signal. And some embodiments of the measurement device remove the LMD-pixel indices for small islands of image pixels that have a valid LMD signal, for example all contiguous areas that have less than 2,000 image pixels.
The image 1112 shows captured reflections from the object, and the captured reflections may be shown in a set of disjoint pixel regions that captured a valid LMD signal, as shown in
where Z2 is the binary space. Thus, in this example the generated mask MW is binary and is a two-dimensional matrix.
Note that normal-field integration gives a non-unique function xW=(xW, yW,zW): MW→R3, where R3 is the domain of real numbers, which is defined up to nW arbitrary multiplicative constants α1,w, . . . , αn
The window W has a viewpoint, which is the viewpoint of the image-capturing device that captured the image 1112. This is the basis for two mappings. The first mapping is a transformation TW: R3→R3 from a world coordinate system to the image-capturing device's coordinate system, which may be described by extrinsic parameters of the image-capturing device. In some embodiments, the transformation TW can be described as follows: TWp=RWp+tW, where pεR3, where RWεSO (3) is a rotation matrix, and where tWεR3 is a translation matrix. The world coordinate system may be considered to be oriented to the object and can be defined by fiducial markers (e.g., a checkerboard) that are attached to the object.
The second mapping is a projection from the world coordinate system to the pixel space of the image-capturing device. In some embodiments, the second mapping can be described by PW: R3→Z2. In addition to the extrinsic parameters of the image-capturing device, this projection also depends on the intrinsic parameters of the image-capturing device.
Using the aforementioned notation, the multi-view optimization operation (e.g., the operation in block B225 in
and where N is the total number of summands. For a given set of scale factors {αW}WΣΩ, the function εW,W′ (q; αW, αW′) measures a discrepancy between the integrated surfaces (e.g., point clouds of surface coordinates) for windows W and W′ along the viewpoint of W′ for pixel q in W. The discrepancy can be computed in the overlap of the surfaces in the positions of the surfaces.
For example,
When solving the objective function as described in equation (5) and equation (10), the measurement device may perform computations for every combination of W≠W′. Some embodiments of the measurement device use the scale factors α that were obtained by fitting the integrated surfaces to triangulated points (e.g., as performed in blocks B215 and B216) as the initial values of {αW}WεΩ. Also, some embodiments of the measurement device start with one or more randomly-chosen scale factors α. These embodiments may restart with other randomly-chosen scale factors α if the solving of the objective function gets stuck at a bad local minimum.
Some embodiments of the measurement device solve the objective function using an optimization algorithm that does not require derivatives of the objective function, and some embodiments of the measurement device use an optimization algorithm that implements a simplex method or a Nelder-Mead algorithm.
The image-capturing device was a DSLR camera, and the image-capturing device was positioned at the right side of the LMDs to capture the reflections of the LMDs from the object. The image-capturing device was calibrated using the Matlab calibration toolbox.
However, the LMDs were not directly visible to the image-capturing device. To calibrate the LMDs, an auxiliary image-capturing device that viewed the LMDs was used. First, the LMD positions relative to the auxiliary image-capturing device were calibrated. Then the viewing image-capturing device and the auxiliary image-capturing device were calibrated using a common checkerboard that was visible to both. The LMD positions were finally transformed into the viewing image-capturing device's coordinate system.
The objects were specular objects, and the objects were placed approximately 20 mm in front of the closest LMD. The measurement system pre-determined a bounding volume and generated an optimal code, and the measurement system rotated the objects with 20° steps to view their full surfaces. By decoding the images captured by the viewing image-capturing device, the measurement system obtained the LMD-pixel indices and established correspondences between illumination light rays from the LMDs and reflection light rays that were captured by the image-capturing device. Using ray intersection, the measurement system determined the surface normal and the coordinates of each intersection point. The measurement system estimated the single-view scale factors using the single viewpoints (e.g., as performed in blocks B215 and B216 in
The LCDs 1821 use the polarization-modulation properties of liquid crystal to form images: a display image appears white where the light rays are twisted 90 degrees by the liquid crystal, otherwise the image appears black. Consider a light ray {right arrow over (r)}=[u, v, s, t] emitted from the unpolarized light source 1825. After passing through the first horizontal polarizer 1822, the light ray {right arrow over (r)} is horizontally polarized. In order to pass through the second vertical polarizer 1822 and become visible, the horizontally-polarized light ray {right arrow over (r)} needs to be twisted once by 90° by the two LCDs 1821. When the horizontally-polarized light ray {right arrow over (r)} is untwisted or twisted twice by 90° (e.g., polarization rotates the light ray {right arrow over (r)} by 180°), the light ray {right arrow over (r)} is blocked and not visible. This resembles the logical exclusive or (XOR) operator that outputs “true” only when both inputs differ. Thus the observed binary code Br({right arrow over (r)}) for the light ray {right arrow over (r)} can be described by Br({right arrow over (r)})=Bf (u, v)⊕Bb(s, t), where ⊕ is the XOR operator, and where Bf and Bb are the binary code patterns on the front and back LMDs, respectively. Because XOR is linear in the binary space (addition modulo 2), it enables code multiplexing onto the two LMDs using a projection matrix.
Some embodiments of a measurement system implement a minimum binary-code book for the light rays such that every light ray has a unique binary-code sequence. To encode the light rays, some embodiments use standard Gray code for each LMD. Assuming that each LMD has N pixels, the total number of light rays in the illumination light field is Mfulllightfield=0(N2). However, sometimes only a small subset of light rays can be reflected by the object and captured by an image-capturing device, as shown in
Therefore, some embodiments of a measurement system encode only the light rays in the effective light field 1939, which may reduce acquisition time. If, for each pixel on the back LMD 1920A, only a cone of ˜k light rays will intersect the object 1930 or the bounding volume 1941, where k<<N, then the number of effective light rays is Meffective=k×N<<N2.
Some embodiments of the measurement system first determine the effective light field (e.g., the bounding volume 1941) for the object 1930 and encode only the light rays in the effective light field. Also, some embodiments of the measurement system use an iterative adaptive approach to generate the binary-code pattern for the two LMDs.
To simplify the description of the encoding, assume that each LMD has the same pixel resolution N. Let the number of light rays be l, and let A denote an l×2N matrix. If the i-th light ray is uniquely identified by LMD-pixel coordinates on the two LMDs, denoted respectively by ui and si, then in the i-th row of A,
A(i,ui)=1 and
A(i,N+si)=1, (13)
and everywhere else is zero.
Given the composite binary-code sequence matrix X for the two LMDs, the resulting binary-code matrix R for the light rays in the effective light field can be described by the following:
R=AX, (14)
where the binary code sequence matrix X is a 2N×K binary matrix for the LMDs that indicates the K sets of binary-code patterns that are displayed on the LMDs, and where the binary-code matrix R is an l×K binary matrix of the ray codes. The linearity of the XOR operation enables this representation. Also, this formulation can be extended to the general case of m LMDs for any m≧2 and to LMDs that have different pixel resolutions.
Some embodiments of a measurement system determine the binary-code-sequence matrix X such that the resulting binary-code matrix R has unique row vectors (each light ray will receive a unique code vector). These embodiments may start from a known solution X0 that has dimensions 2N×K0 such that the resulting binary-code book R has unique rows. One example of a known solution is the Gray code X0:
However, the Gray code may be redundant for a reduced set of light rays.
To reduce the number of code sets, some embodiments apply a code-projection matrix P that has K0×Kp dimensions, where Kp<K0, to equation (14):
R
0
P=A(X0P). (16)
If the rows of R=R0P are unique, then X=X0P is a binary-code-sequence matrix X that satisfies the criteria.
Note that right multiplying corresponds to mixing columns of the binary-code-sequence matrix X, so that this can be roughly described as a form of multiplexing binary patterns on two LMDs that correspond to different bit planes. However, this multiplexing uses binary addition (e.g., XOR) or a linear combination over the binary field F2.
A brute-force search of the code-projection matrix P may still be computationally expensive. Thus, some embodiments of the measurement system break down the projection into elementary projections along vectors. The projection vectors can be chosen to ensure that, after each projection, each light ray will continue to receive a unique code. This can be repeated until the code-projection space is null.
D(R)={R(i,:)⊕R(j, :)|1≦i<j≦l}, (17)
where R(i, :) denotes the i-th row of the binary-code matrix R. Assuming that the binary-code matrix R has unique rows, then 0ΣD(R). Note that over 2, the difference is the same as the sum ⊕. Also, the complement set can be defined according to
{tilde over (D)}(R)=2M\({0}∪D(R)). (18)
Thus, any choice of vε{tilde over (D)}(R) will give a projection matrix P, that preserves the unique rows of the binary-code matrix R. If {acute over (D)}(R)=Ø, then no such projection is possible. On the other hand, if {tilde over (D)}(R)≠Ø, then {tilde over (D)}(R) will usually contain many vectors.
To find an optimal projection vector, some embodiments of the measurement system use a projection vector that will maximize the chance of another projection. Accordingly, some embodiments use a vector v such that {tilde over (D)}(RPV)≠Ø, or such that {tilde over (D)}(RPV) is a large set. This is formalized by introducing the code sparsity ψ(X; A) of X:
A locally-optimal projection is a projection matrix Pv* given by a projection vector v* that satisfies
v*=arg maxvε{tilde over (D)}(AX)ψ(xPv;A). (20)
When {tilde over (D)}(AX) is a large set, searching through its vectors can be very time consuming. Some embodiments of a measurement system implement an approximation to the locally-optimal projection by applying a heuristic filter on {tilde over (D)}(AX) to reduce the size of the search set, as described by the following:
{circumflex over (v)}=arg
ψ(XPv;A). (21)
Let ∥v∥H denote the Hamming weight of a binary vector (i.e., the number of 1's in the vector). Then the minimum-weight filter minWt can be described according to
One result of using the minimum-weight filter may be the resulting projection minimally mixes the bit planes and therefore preserves some desirable error-deterrent properties of the Gray code.
The following is a high-level description for obtaining a code for the LMDs: Start with a binary-code sequence matrix X0=22N×M
The measurement device 2100 includes one or more processors 2101, one or more I/O interfaces 2102, and storage 2103. Also, the hardware components of the measurement device 2100 communicate by means of one or more buses or other electrical connections. Examples of buses include a universal serial bus (USB), an IEEE 1394 bus, a PCI bus, an Accelerated Graphics Port (AGP) bus, a Serial AT Attachment (SATA) bus, and a Small Computer System Interface (SCSI) bus.
The one or more processors 2101 include one or more central processing units (CPUs), which include microprocessors (e.g., a single core microprocessor, a multi-core microprocessor), graphics processing units (GPUs), or other electronic circuitry. The one or more processors 2101 are configured to read and perform computer-executable instructions, such as instructions that are stored in the storage 2103. The I/O interfaces 2102 include communication interfaces for input and output devices, which may include a keyboard, a display device, a mouse, a printing device, a touch screen, a light pen, an optical-storage device, a scanner, a microphone, a drive, a controller (e.g., a joystick, a control pad), and a network interface controller. In some embodiments, the I/O interfaces 2102 also include communication interfaces for the image-capturing device 2110, the two or more light-modulating devices 2120, and the light source 2125.
The storage 2103 includes one or more computer-readable storage media. As used herein, a computer-readable storage medium, in contrast to a mere transitory, propagating signal per se, refers to a computer-readable media that includes a tangible article of manufacture, for example a magnetic disk (e.g., a floppy disk, a hard disk), an optical disc (e.g., a CD, a DVD, a Blu-ray), a magneto-optical disk, magnetic tape, and semiconductor memory (e.g., a non-volatile memory card, flash memory, a solid-state drive, SRAM, DRAM, EPROM, EEPROM). Also, as used herein, a transitory computer-readable medium refers to a mere transitory, propagating signal per se, and a non-transitory computer-readable medium refers to any computer-readable medium that is not merely a transitory, propagating signal per se. The storage 2103, which may include both ROM and RAM, can store computer-readable data or computer-executable instructions.
The measurement device 2100 also includes a decoding module 2103A, a coordinate-calculation module 2103B, a scale-factor-calculation module 2103C, a multi-view-optimization module 2103D, a reconstruction module 2103E, and a communication module 2103F. A module includes logic, computer-readable data, or computer-executable instructions, and may be implemented in software (e.g., Assembly, C, C++, C#, Java, BASIC, Perl, Visual Basic), hardware (e.g., customized circuitry), or a combination of software and hardware. In some embodiments, the devices in the system include additional or fewer modules, the modules are combined into fewer modules, or the modules are divided into more modules. When the modules are implemented in software, the software can be stored in the storage 2103.
The decoding module 2103A includes instructions that, when executed, or circuits that, when activated, cause the measurement device 2100 to decode images and determine LMD-pixel indices, for example as performed in blocks B200 and B201 in
The coordinate-calculation module 2103B includes instructions that, when executed, or circuits that, when activated, cause the measurement device 2100 to calculate surface normals (e.g., normal fields) or three-dimensional coordinates (e.g., unscaled surface coordinates, scaled surface coordinates, refined surface coordinates) of points on the surface of an object, for example as performed in blocks B205, B206, B210, B211, B220, B221, and B230 in
The scale-factor-calculation module 2103C includes instructions that, when executed, or circuits that, when activated, cause the measurement device 2100 to calculate scale factors for single viewpoints, for example as performed in blocks B215 and B216 in
The multi-view-optimization module 2103D includes instructions that, when executed, or circuits that, when activated, cause the measurement device 2100 to calculate refined scale factors, for example as performed in block B225 in
The reconstruction module 2103E includes instructions that, when executed, or circuits that, when activated, cause the measurement device 2100 to generate merged surface coordinates, for example as performed in block B235 in
The communication module 2103F includes instructions that, when executed, or circuits that, when activated, cause the measurement device 2100 to communicate with one or more other devices, for example the image-capturing device 2110, the two or more light-modulating devices 2120, and the light source 2115.
The image-capturing device 2110 includes one or more processors 2111, one or more I/O interfaces 2112, storage 2113, a communication module 2113A, and an image-capturing assembly 2114. The image-capturing assembly 2114 includes one or more image sensors, one or more lenses, and an aperture. The communication module 2113A includes instructions that, when executed, or circuits that, when activated, cause the image-capturing device 2110 to communicate with the measurement device 2100. The communication may include receiving a request to capture an image, receiving a request to send a captured image, and retrieving a requested image from the storage 2113 and sending the retrieved image to the measurement device 2100.
At least some of the above-described devices, systems, and methods can be implemented, at least in part, by providing one or more computer-readable media that contain computer-executable instructions for realizing the above-described operations to one or more computing devices that are configured to read and execute the computer-executable instructions. The systems or devices perform the operations of the above-described embodiments when executing the computer-executable instructions. Also, an operating system on the one or more systems or devices may implement at least some of the operations of the above-described embodiments.
Furthermore, some embodiments use one or more functional units to implement the above-described devices, systems, and methods. The functional units may be implemented in only hardware (e.g., customized circuitry) or in a combination of software and hardware (e.g., a microprocessor that executes software).
The scope of the claims is not limited to the above-described embodiments and includes various modifications and equivalent arrangements. Also, as used herein, the conjunction “or” generally refers to an inclusive “or,” though “or” may refer to an exclusive “or” if expressly indicated or if the context indicates that the “or” must be an exclusive “or.”
This application claims the benefit of U.S. Provisional Application No. 62/269,855, which was filed on Dec. 18, 2015, and U.S. Provisional Application No. 62/335,513, which was filed on May 12, 2016.
Number | Date | Country | |
---|---|---|---|
62269855 | Dec 2015 | US | |
62335513 | May 2016 | US |