Docsity

A Differential Optical Range Camera, Lecture notes of Optics

Toggle sidebar
bg1
A Dierential Optical Range Camera
HanyFarid and Eero P. Simoncelli
y
GRASP Laboratory
Department of Computer and Information Science
UniversityofPennsylvania, Philadelphia, PA 19104, USA
Presented at: Optical Society of America, Rochester, NY, October, 1996.
Abstract
We describe a novel formulation of the range
recovery problem, based on computation of the
dierential variation in image intensities with
respect to changes in camera position. The
method uses a single stationary camera and a
pair of calibrated optical attenuation masks to
directly measure this dierential quantity. The
subsequent computation of the range image is
simple and should be suitable for real-time im-
plementation. Wehave constructed and tested
a prototype range camera based on these prin-
ciples.
Introduction
Visual images are formed via the projection
of light from the three-dimensional world onto
atwo-dimensional sensor. In an idealized pin-
hole camera, all p oints lying on a ray passing
through the pinhole will be imaged onto the
same image position. Thus, information about
the distance to objects in the scene (i.e.,
range
)
is lost. Range information can be recovered
by measuring the change in appearance of the
world resulting from a change in viewing po-
This work was supported by NSF Grant STC SBR-89-
20230; ARPA Grant N00014-92-J-1647; ARMY Grant
DAAH04-96-1-0007; University ResearchFoundation
Equipment Grant.
y
Currently at Center for Neural Science and Courant In-
stitute for Mathematical Sciences, New York University,
New York, NY 10003.
Portions of this work have appeared in [10].
sition. Traditionally, this is accomplished via
simultaneous measurements with two cameras
(binocular stereo), or via a sequence of measure-
ments collected over time from a moving camera
(structure from motion).
The recovery of range in these approaches fre-
quently relies on an assumption of brightness
constancy, which states that the brightness of
the image of a point in the world is constant
when viewed from dierent positions [4]. Con-
sider the formulation of this assumption in one
dimension (the extension to two dimensions is
straightforward). Let
f
(
x
;
v
) describe the inten-
sity function measured through a pinhole cam-
era system. The variable
v
corresponds to the
pinhole position (along the direction perpendic-
ular to the optical axis). The variable
x
param-
eterizes the position on the sensor. This cong-
uration is illustrated in Figure 1. According to
the assumption, the intensity function
f
(
x
;
v
)is
of the form:
f
(
x
;
v
) =
I
x
,
vd
Z
;
(1)
where
I
(
x
)=
f
(
x
;
v
)
j
v
=0
,
d
is the distance
between the pinhole and the sensor and
Z
is
the range (distance from the pinhole to a point
in the world). Note that this assumption will
typically b e violated near o cclusion boundaries,
where points visible from one viewp oint are in-
visible from another.
Several complications arise in these ap-
proaches. The degree to which the brightness
constancy assumption holds will, in general,
decrease with increasing camera displacement.
1
pf3
pf4
pf5
pf8
pf9

Partial preview of the text

Download A Differential Optical Range Camera and more Lecture notes Optics in PDF only on Docsity!

A Di erential Optical Range Camera

Hany Farid and Eero P. Simoncelli y GRASP Lab oratory Department of Computer and Information Science University of Pennsylvania, Philadelphia, PA 19104, USA

Presented at: Optical Society of America, Rochester, NY, October, 1996.

Abstract

We describ e a novel formulation of the range recovery problem, based on computation of the di erential variation in image intensities with resp ect to changes in camera p osition. The metho d uses a single stationary camera and a pair of calibrated optical attenuation masks to directly measure this di erential quantity. The subsequent computation of the range image is simple and should b e suitable for real-time im- plementation. We have constructed and tested a prototyp e range camera based on these prin- ciples.

Intro duction

Visual images are formed via the pro jection of light from the three-dimensional world onto a two-dimensional sensor. In an idealized pin- hole camera, all p oints lying on a ray passing through the pinhole will b e imaged onto the same image p osition. Thus, information ab out the distance to ob jects in the scene (i.e., range) is lost. Range information can b e recovered by measuring the change in app earance of the world resulting from a change in viewing p o-

This work was supp orted by NSF Grant STC SBR-89- 20230; ARPA Grant N00014-92-J-1647; ARMY Grant DAAH04-96-1-0007; University Research Foundation Equipment Grant. y Currently at Center for Neural Science and Courant In- stitute for Mathematical Sciences, New York University, New York, NY 10003. Portions of this work have app eared in [10].

sition. Traditionally, this is accomplished via simultaneous measurements with two cameras (bino cular stereo), or via a sequence of measure- ments collected over time from a moving camera (structure from motion). The recovery of range in these approaches fre- quently relies on an assumption of brightness constancy, which states that the brightness of the image of a p oint in the world is constant when viewed from di erent p ositions [4]. Con- sider the formulation of this assumption in one dimension (the extension to two dimensions is straightforward). Let f (x; v ) describ e the inten- sity function measured through a pinhole cam- era system. The variable v corresp onds to the pinhole p osition (along the direction p erp endic- ular to the optical axis). The variable x param- eterizes the p osition on the sensor. This con g- uration is illustrated in Figure 1. According to the assumption, the intensity function f (x; v ) is of the form:

f (x; v ) = I

x vZ^ d

where I (x) = f (x; v ) jv =0 , d is the distance b etween the pinhole and the sensor and Z is the range (distance from the pinhole to a p oint in the world). Note that this assumption will typically b e violated near o cclusion b oundaries, where p oints visible from one viewp oint are in- visible from another. Several complications arise in these ap- proaches. The degree to which the brightness constancy assumption holds will, in general, decrease with increasing camera displacement.

d Z

f(x;v)

f(x;0)

x=vd/Z

x=

V

V=

V=v

Figure 1: Geometry for a bino cular stereo system with pinhole cameras. The variable V parameterizes the p osition of the camera pinholes. According to the brightness con- stancy constraint, the intensity of a p oint in the world, as recorded by the two pinhole cameras, should b e the same (i.e. f (x; 0) = f (x vZ^ d ; v )).

This is due to larger o ccluded image regions, and increased e ects of the non-Lamb ertianity of surface re ectances. Violations of the bright- ness constancy assumption lead to diculties in matching corresp onding p oints in the images (the so-called \corresp ondence problem"). Fur- thermore, a two-camera stereo system (or a sin- gle moving camera) requires careful calibration of relative p ositions, orientations, and intrinsic parameters of the camera(s). These problems are partially alleviated in techniques utilizing a single stationary camera. A numb er of these techniques are based on es- timation of blur or relative blur from two or more images (e.g., [6, 9, 11, 12, 8 ]). Adelson and Wang [1] describ es an unusual metho d in which a lenticular array is placed over the sen- sor, e ectively allowing the camera to capture visual images from several viewp oints in a single exp osure. Dowski and Cathey[2] and Jones and Lamb [5] each describ e range imaging systems that use an optical attenuation mask in front of the lens. By observing lo cal sp ectral informa- tion in a single image, they are able to estimate range. Both techniques rely on p ower sp ectral assumptions ab out the scene.

In this pap er, we prop ose a single-camera metho d which avoids some of the computational and technical diculties of the single-camera approaches discussed ab ove. In particular, we prop ose a \direct" di erential metho d for range estimation which computes the image derivative with resp ect to viewing p osition using a single stationary camera and an optical attenuation mask. This approach avoids the corresp ondence problem, makes no sp ectral assumptions ab out the scene, is relatively straightforward to cali- brate, and is computationally ecient. Based on these principles we have constructed and tested a prototyp e range camera. The construc- tion of this camera, as well as some results are presented here.

Direct Viewp oint Derivatives

For the purp ose of recovering range, we are interested in computing the change in the ap- p earance of the world with resp ect to change in viewing p osition. It is thus natural to con- sider di erential measurement techniques. Tak- ing partial derivatives of the intensity function f (x; v ) (Equation (1)) with resp ect to the image and viewing p ositions, and evaluating at v = 0 gives:

Ix (x)  @^ f^ ( @x x; v^ )jv = = I 0 (x); (2)

and

Iv (x)  @^ f^ ( @x v; v^ )jv = = (^) Zd I 0 (x); (3)

where I 0 () indicates the derivative of I () with resp ect to its argument. Combining these two expressions gives:

Iv (x) = (^) Zd Ix (x): (4)

Clearly, an estimate of the range, Z , can b e computed using this equation. Note that in the case of di erential bino cular stereo (e.g., [7]),

d/dx

Z

Z

I

Ix

Iv

M M’

Figure 2: Direct di erential range esti- mation for a single uniform intensity p oint source. Images of a p oint light source are formed using two di erent optical attenua- tion masks, M (u) and its derivative, M 0 (u). In each case, the image formed is a scaled and dilated copy of the mask function (by an amount , monotonically related to the depth, Z ). Computing the spatial (image) derivative of the image formed under mask M (u) pro duces an image that is identical to the image formed under the derivative mask, M 0 (u), except for a scale factor. Thus, may b e estimated as the ratio of the two im- ages. Range is computed from using the relationship given in Equation (6).

particular, we can write an expression for the image by summing the images of the visible p oints, p, in the world:

f (x; v ) =

Z

dxp (^1) p M

 xx

p p ^ v

L(xp ); (10)

where the integral is p erformed over the vari- able xp , the p osition in the sensor of a p oint p pro jected through the center of the lens. The in- tensity of the world p oint p is denoted as L(xp ), and (^) p is monotonically related to the distance to p (as in Equation (6)). Note again that we must assume that each p oint pro duces a uni- form light intensity across the mask.

Again, consider the derivatives of f (x; v ) with resp ect to viewing p osition, v , and image p osi- tion, x: @ @ v f^ (x;^ v^ )^ =^ @ @ v

Z

dxp (^1) p M

 xx

p p^ ^ v

L(xp )

=

Z

dxp (^1) p M 0

 xx

p p^ ^ v

L(xp )(11)

and @ @ x f^ (x;^ v^ )^ =^ @ @ x

Z

dxp (^1) p M

 xx

p p^ ^ v

L(xp )

=

Z

dxp (^12) p M 0

 xx

p p^ ^ v

L(xp ); (12)

As in the previous section, the following two partial derivative images are de ned: Iv (x)  (^) @@ v f (x; v ) jv = =

Z

dxp (^1) p M 0

 xx

p p

L(xp ); (13)

and

Ix (x)  (^) @@ x f (x; v ) jv =

Z

dxp (^12) p M 0

 xx

p p

L(xp ): (14)

Equations (13) and (14) di er only in a mul- tiplicative term of (^1) p. Unfortunately, solving for (^) p is nontrivial, since it is emb edded in the integrand and dep ends on the integration vari- able. Consider, however, the sp ecial case where all p oints in the world lie on a frontal-parallel plane relative to the sensor. 3 Under this con- dition, the scaling parameter (^) p is the same for all p oints xp and Equations (13) and (14) can b e written as:

Iv (x) = 1

Z

dxp M 0

 xx

p

L(xp ) (15)

Ix (x) = (^12)

Z

dxp M 0

 xxp 

L(xp ): (16)

The scaling parameter, , a function of the dis- tance to the p oints in the world (Equation (6)) can then b e computed as the ratio:

Iv (x) = Ix (x): (17) (^3) In actuality, this assumption need only b e made lo cally.

In order to deal with singularities (i.e., Ix = 0), a least-squares estimator can b e used for (as in [7]). Sp eci call y, we minimize the follow- ing error function:

E ( ) =

X

P

(Iv (x) + Ix (x))^2 ; (18)

where the summation is p erformed over a small patch in the image, P. Taking the derivative with resp ect to , setting equal to zero and solv- ing for yields the minimal solution:

=

P

PP^ Iv^ (x)Ix^ (x)

P Ix^ (x)^2

The algorithm easily extends to a three- dimensional world: we need only consider two- dimensional masks M (u; w ), and the horizon- tal partial derivative Mu (u; w ) = @ M (u; w )=@ u. For a more robust implementation, the vertical partial derivative mask @ M (u; w )=@ w may also b e included. The least-squares error function b ecomes:

E ( ) =

X

P

(Iu + Ix )^2 + (Iw + Iy )^2 : (20)

Solving for the minimizing gives:

P

P P (Iu^ Ix^ +^ Iw^ Iy^ )

P (I^ x^2 +^ I^ y^2 )^

Optical Mask Design

Thus far, the only restriction placed on the optical masks, M (u; w ) and Mu (u; w ), is that the second b e the derivative of the rst. Il- lustrated in Figure 3 is an example of such a matched pair of masks based on a two- dimensional Gaussian. Typically, the function Mu (u; w ) will have negative values (as in the case of the Gaussian) and thus is not feasible for use as an optical attenuation mask. Fur- thermore, a p ositive constant cannot simply b e added to Mu (u; w ), since this will destroy the re- quired derivative relationship b etween the two masks.

Figure 3: Gaussian optical masks. Illus- trated along the top row is a two-dimensional Gaussian mask, M (u; w ) (left), and its par- tial spatial derivative, Mu (u; w ) (right). Il- lustrated along the b ottom row are a pair of non-negative masks, M 1 (u; w ) and M 2 (u; w ), computed from the Gaussian and its deriva- tive masks using Equations (22) and (23).

Due to the linearity of the imaging pro cess, however, we can use masks that are linear com- binations of the masks Mu (u; w ) and M (u; w ). In particular, a scalar multiple of M (u; w ) can b e added to Mu (u; w ) in order to form a mask function that is entirely p ositive. The new mask, M 1 (u; w ), shown in Figure 3, is given by:

M 1 (u; w ) = M (u; w ) + Mu (u; w ); (22)

where , are scaling constants chosen to force the function M 1 (u; w ) to ll the range [0; 1]. A second symmetrical mask can b e formed by sub- tracting Mu (u; w ) from M (u; w ):

M 2 (u; w ) = M (u; w ) Mu (u; w ): (23)

Note that M 2 (u; w ) is equal to M 1 (u; w ) rotated 180 degrees ab out its center, and that

M (u; w ) = M^1 (u;w^ )+ 2 M^2 (u;w^ ) (24) Mu (u; w ) = M^1 (u;w^ ) 2 M^2 (u;w^ ): (25)

Again, by linearity of the imaging pro cess, the images that would have b een obtained with the

0

10

20

0

10

20

Figure 5: Range images. Illustrated are the recovered range images for a frontal-parallel planar target at a distance of 11 and 17 cm from the camera. The computed range maps have a mean of 11.3 and 17.16 cm, with a standard deviation of 0.47 and 0.59 cm, re- sp ectively.

low spatial derivative (this amounted to approx- imately 50% of the data), the resulting \holes" were lled with a simple bilinear interp olation scheme.

Discussion

An optical attenuation mask placed in front of a lens-based imaging system pro duces an im- age which is a sup erp osition of scaled and di- lated copies of the mask function. The deriva- tive of this image is related by a scale factor to a second image created with the derivative of the rst mask. The scale factor is monotoni- cally related to range. This simple observation has lead us to a direct di erential metho d for estimating range from a single stationary cam- era. In particular, the derivative with resp ect to viewing p osition is computed directly: it is simply the image formed under the derivative mask. Based on these principles, we have con- structed and tested a prototyp e range camera.

We are able to acquire the necessary pair of im- ages at 15 Hz through the use of a fast-switching LC SLM as an optical attenuation mask. Since the subsequent pro cessing of the images is sim- ple and fast, this technique should b e amenable to a real-time implementation. Two assumptions have b een made in our so- lution to this problem. Both of these assump- tions are made (although often not explicitly) in nearly every structure from stereo or motion al- gorithm. The rst assumption is that the light emanating from each p oint in the scene is con- stant across the lens (i.e., the brightness con- stancy assumption). Note that this assumption will typically b e violated at o cclusion b ound- aries, b ecause the light emanating from a par- tially o ccluded p oint will hit only a p ortion of the lens. One p otential solution to this prob- lem is to expand the function describing the light emanating from a p oint in a Taylor series. The co ecients of these terms may b e estimated by collecting additional measurements (i.e., im- ages) with higher-order derivative masks. The second assumption is that of lo cally frontal-parallel surface orientation. This as- sumption was necessary in order to solve for (^) p given the two image measurements describ ed by Equations (13) and (14). Solving without this assumption is a nonlinear optimization problem (since the (^) p app ears inside the argument of M ()), which should b e amenable to an itera- tive solution. There are still several mask design issues that need to b e resolved. First, our example of Gaussian-based masks was somewhat arbitrary. A pair of masks should b e designed from a set of optimality constraints based on derivative accu- racy, e ective baseline, light transmittance, etc. Once an optimal function is determined, the construction of the actual optical masks must b e calibrated to include nonlinearities in the printing pro cess (e.g., halftoning), and the ef- fects of the intrinsic p oint spread function of the camera. In particular, the image of a p oint light source recorded by the camera with mask

Mu (u; v ) must b e equal to the spatial derivative of the image recorded with mask M (u; v ). Fi- nally, noise in the image measurements, I 1 (u; w ) and I 2 (u; w ), will b e ampli ed by the computa- tions in Equation (26) and Equation (27): small values of or are thus undesirable. As with most ranging techniques, accuracy b ehaves according to the rules of triangulation. In particular, errors will b e prop ortional to the square of the range, and inversely prop ortional to b oth the fo cal length and baseline. 4 We have veri ed these relationships via simple sim- ulations. As in many other range-imaging sys- tems, the accuracy may b e improved with the use of structured illumination. A counterintuitive asp ect of our technique is that it relies on the defo cus of the image. In par- ticular, a p erfectly fo cused image corresp onds to = 0, leading to a singularity in Equation (9). In practice, this may b e alleviated by fo cusing the camera at in nity (i.e., d = f ), thus ensur- ing that p oints at distances within the op erat- ing range of the algorithm will b e suciently blurred. And nally, an interesting variant of the tech- nique arises when considering a Gaussian mask, and its derivative with resp ect to  :

G(u; w ) = (^) ^1 2 e(u (^2) +w 2 )= 2  2 ; (28) G (u; w ) = (^) @@  G(u; w ) = (^) ^2 3 e(u (^2) +w 2 )= 2  2

  • (u

(^2) +w 2 )  5 e

(u^2 +w 2 )= 2  (^2) : (29)

Let I (x; y ) and I (x; y ) b e the images obtained through the masks G(u; w ) and G (u; w ), re- sp ectively. Using the same techniques as in the previous section, it can b e shown that these two images ob ey the following constraint:

I (x; y ) = 2  [Ixx (x; y ) + Iy y (x; y )] ; = 2  r^2 I (x; y ); (30) (^4) E ective baseline in our system dep ends on the mask function, and is prop ortional to the lens diameter.

where Ixx (x; y ) and Iy y (x; y ) corresp ond to the horizontal and vertical second partial deriva- tives of I (x; y ), and r^2 is the Laplace op erator. As b efore, is inversely prop ortional to range, and is given by Equation (6). This formulation provides a di erential algorithm for range-from- defo cus. Unlike previous formulations (e.g., [9]), this solution avoids the artifacts arising from the computation of lo cal Fourier transforms.

References

[1] E.H. Adelson and J.Y.A. Wang. Single lens stereo with a plenoptic camera. IEEE Transactions on Pattern Analysis and Ma- chine Intel ligence, 14(2):99{106, 1992.

[2] E.R. Dowski and W.T. Cathey. Single-lens single-image incoherent passive-ranging systems. Applied Optics, 33(29):6762{ 6773 ,

[3] R.W. Floyd and L. Steinb erg. An adaptive algorithm for spatial grey scale. Proceed- ings of the Society for Information Display, 17(2):75{77, 1976. [4] B.K.P. Horn. Robot Vision. MIT Press, Cambridge, MA, 1986. [5] D.G. Jones and D.G. Lamb. Analyzing the visual echo: Passive 3-d imaging with a multiple ap erture camera. Technical Re- p ort CIM-93-3, Department of Electrical Engineering, McGill University, 1993.

[6] E. Krotkov. Fo cusing. International Jour- nal of Computer Vision, 1:223{237, 1987.

[7] B.D. Lucas and T. Kanade. An iterative image registration technique with an ap- plication to stereo vision. In Proceedings of the 7th International Joint Conference on Arti cial Intel ligence, pages 674{679, Van- couver, 1981. [8] S.K. Nayar, M. Watanab e, and M. Noguchi. Real-time fo cus range sensor.