A METHOD AND SYSTEM FOR CREATING AN IMAGE-BASED VIRTUAL REALITY ENVIRONMENT UTILIZING A FISHEYE LENS

Abstract: The present invention provides a method and system for providing a virtual reality environment utilizing image from a lens on a display of a data processing system. The method and system comprises providing a plurality of images (102) each image including a plurality of parameters (106), and optimizing the plurality parameters in accordance with a radial distortion model (108). The method and system also including generating the virtual reality environment based upon the optimization of the plurality of parameters (110).

Description: A METHOD AND SYSTEM FOR CREATING AN IMAGE-BASED VIRTUAL REALITY ENVIRONMENT UTILIZING A FISHEYE LENS FIELD OF THE INVENTION The present invention relates generally to creating a virtual reality environment, and more particularly the present invention relates to creating a virtual reality environment utilizing a fisheye lens. BACKGROUND OF THE INVENTION Image-based virtual reality is emerging as a major alternative to the more traditional 3D-based virtual reality (VR) environment. Unlike the virtual environment generated by 3D graphics, in which the information to represent the environment is kept internally as geometry and texture maps, an image-based VR environment represents the environment by one or more images, which can be either captured by camera or synthesized from 3D computer graphics. There are two phases in creating VR environments, the authoring phase and the run time phase. The authoring phase is the process of providing an accurate representation of the VR environment. The runtime phase is directed to providing that representation on the computer display. The present invention is directed toward the authoring phase of creating a VR environment. There are two types of image-based VR representations: the single-node 2D representation, which represents the world around one nodal point by a panorama, and the light- field 4D representation, which represents the world contained in a pre-defmed 3D volume. The main advantages of the image-based VR are its simplicity for rendering (i.e., no complicated 3D real-time rendering), its photographic quality realism, and the 3D illusion experienced by users even though no geometric information is available. The present invention is related to the problem in creating contents for single- node 2D panoramas. The conventional way to create a surrounding panorama is by rotating a camera around its nodal point. Utilizing a 15mm rectilinear lens with 35mm film, it takes as many as 12 pictures to capture a panorama with 90-degree vertical field of view. Capturing a full spherical panorama requires at even more pictures and involves rotating the camera along two different axes. In addition, the image registration process becomes complicated. Fortunately, commercial fisheye lenses exist, which produce very high quality pictures with a near 180-degree field of view, i.e., a hemisphere or an even larger field of view. Accordingly, utilizing a fisheye lens 2 to 4 pictures can be taken to provide a full 360 degree field of view. It is desirable to use such a fisheye lens to capture the spherical panorama to minimize the number of pictures that have to be taken. The problem with utilizing a fisheye lens is that they are not easily "stitched" together utilizing conventional techniques. That is, accurately registering the fisheye images is complicated utilizing traditional techniques. In addition, heretofore elaborate calibration equipment for the fisheye lens is required to calibrate traditional fisheye lens. Elaborate calibration techniques prohibitively increase the overall costs and are available to only the most sophisticated VR environments. Accordingly, what is needed is a method and system for creating a VR environment which overcomes the problems associated creating a 3D VR environment. The present invention addresses such a need. SUMMARY OF THE INVENTION The present invention provides a method and system for providing a virtual reality environment on a display of a data processing system is disclosed. The method and system comprises providing a plurality of images, each of the plurality of images including a plurality of parameters and optimizing the plurality of parameters for each of the plurality of images in accordance with a radial distortion model. The method and system also includes generating the virtual reality environment of the plurality of images based upon the optimization of the plurality of parameters. Accordingly, through the optimization of the images and the self-calibration in accordance with equi-distance model in conjunction with a radial distortion model a fisheye lens can be advantageously utilized to provide a VR environment. The system has wide application and due to its simplicity is adaptable to a variety of environments, whether amateur or professional in nature. BRIEF DESCRIPTION OF THE DRAWINGS Figure 1 illustrates an image taken utilizing a fisheye lens. Figure la is a flow chart which illustrates a general embodiment of the optimization and self calibration of a lens in accordance with the present invention. Figure 2 illustrates an equi-distance projection model for a fisheye lens. Figure 3 shows the setup for capturing the spherical panorama and self- calibrating. Figure 4 shows a result of fitting an ellipse to an image. Figure 5 illustrates four fisheye images utilized for providing a VR environment. Figures 6a and 6b illustrate iteratively registering fisheye images. Figure 7a illustrates final results from registration with an ideal equi-distance projection model. Figure 7b illustrates final results from registration with a cubic projection model. Figure 8 shows the calibrated projection model and the ideal equi-distance projection model. Figure 9 shows the texture maps as projected on the six faces of the cube of a panorama. DESCRIPTION OF THE INVENTION The present invention relates to creating a virtual reality environment in a data processing system utilizing a fisheye lens. The following description is presented to enable one of ordinary skill in the art to make and use the invention and is provided in the context of a patent application and its requirements. Various modifications to the preferred embodiment will be readily apparent to those skilled in the art and the generic principles herein may be applied to other embodiments. Thus, the present invention is not intended to be limited to the embodiment shown but is to be accorded the widest scope consistent with the principles and features described herein. The present invention provides for a method and system for registering or stitching images provided by a fisheye lens together to create 3D virtual reality environments that is simpler and faster than conventional registering techniques whether utilizing rectilinear or a fisheye lens. The system and method in accordance with the present invention utilizes a radial distortion model in conjunction with the conventional use of the equidistance model to model the images from the fisheye lens such that the images can be registered seamlessly. In addition in a system and method in accordance with the present invention, the lens is self calibrated. Since the image center can be easily determined due to the projection model utilized the calibration can be accomplished during the time that the images are being registered. To describe the present invention in more detail refer to the following discussion in conjunction with the accompanying figures. It is known that the fundamental difference between a fisheye lens and an ordinary rectilinear lens is that the projection from a 3D ray to a 2D image position in the fisheye lens is intrinsically non-perspective. There are many proposed projection models for fisheye lenses. It has been determined by the applicants that an equi-distance projection model, is a reasonable first-order approximation. However in addition to the equi-distance model, a radial projection model is utilized as the distortion model typically through the use of a third order polynomial to accurately model the fisheye lens. Through the use of the radial projection model, applicants have determined that such distortion-corrected fisheye images can be registered seamlessly. Conventional registration techniques that utilize fisheye lens assume either an ideal projection model or use the distortion model of rectilinear lenses by adding more nonlinear terms. Conventional registration techniques are not accurate enough for the purpose of registering multiple fisheye images into panoramas. Furthermore, it is also important to minimize the requirements for elaborate calibration equipment since the market of this technique is ordinary customers with no access to sophisticated laboratories. Therefore, self calibration of the fisheye lens is also desirable. The idea of self-calibrating lenses is very appealing to anyone who has to calibrate lenses on regular basis. By establishing the correspondence between two or more images, it has been shown that many camera parameters can be recovered without a priori knowledge of the camera motion or scene geometry. Unfortunately, heretofore self calibration in general is unstable as the image center and the field of view are unknown. The system and method in accordance with the present invention overcomes this instability. To further clarify this point refer now to Figure 1. Figure 1 illustrates an image 10 taken by a fisheye lens. The image center for a fisheye lens which utilizes the radial distortion projection model in accordance with the present invention can be determined trivially as the center of the ellipse which envelopes the image. When the camera is rotated around its nodal point to capture the spherical panorama, the wrap-around effect, i.e., the overlap between the first and last images, provides enough constraints for its field of view. Once these intrinsic parameters are known, the self calibration becomes very stable. Another feature in accordance with the present invention is that the images are registered while self-calibrating the camera. The benefit is that the quality of the calibration is iteratively improved because of the improved image registration, and the quality of the image registration is iteratively improved because of the improved calibration. In a preferred embodiment, a multi-level gradient based registration to register the fisheye images while self-calibrating its distortion parameters and field of view is utilized. The Levenberg-Marquardt minimization can be utilized to provide the registration process with the radial distortion modelled as a cubic polynomial results in excellent spherical panoramas. A system and method in accordance with the present invention can be utilized for a variety of tasks such as navigation, teleoperation, etc., where large field of view is desired. Typically, the method and system can be implemented in a computer system via the hard drive or could implemented via any computer readable medium, such as floppy disks or the like. To describe the features of the present invention in accordance with general and specific embodiment, refer to the following discussion. Figure la is a flow chart which illustrates a general embodiment of the operation of a system in accordance with the present invention. Firstly a plurality of images (typically two to four) are captured, via step 102. Next, the images are scanned in to a computer (not shown) by conventional means, and the images are preferably cropped to properly center the images, via step 104. Next a plurality of parameters are computed for each of the images, via step 106. Typical parameters to be computed are, for example, the grey scale, gradient, focal length of the plurality of images. Next the parameters are optimized and the lens is self calibrated to provide exact values for each of the parameters, via step 108. As has been before mentioned, optimization of the parameters is accomplished through the use of a radial distortion model in conjunction with the equi- distance projection model. Next, the images are utilized in conjunction with the optimized parameters to generate a virtual reality environment, via step 110. To more describe the present invention in the context of a more specific example, refer now to the following discussion in conjunction with the associated figures. Fisheye Projection Model and Distortion Figure 2 illustrates an equi-distance projection model 12 for a fisheye lens. The projection from 3D rays to 2D image positions in a fisheye lens can be approximated by the so-called "equi-distance" model shown in Figure 2. Suppose a 3D ray from the nodal point 14 of the lens is specified by two angles θ and φ as shown in Figure 1. Then the equi-distance projection model projects the 3D ray into an image position (x,y), in which x = cθ cos (φ), (Equation 1) y = cθ sin (φ), (Equation 2) where c is a scale factor determined by the focal length and the scale of the film scanning. In other words, the equi-distance model maps the latitude angle θ to the polar distance r in the image, i.e., (Equation 3) The advantage of the equi-distance projection model over the traditional planar projection model is that it allows an arbitrarily large field of view, at least mathematically. Current commercial fisheye lenses include Nikon 8mm (180-degree FOV) and 6mm (220-degree FOV) in which the equi-distant model is a good first order approximation. The radial distortion model can then be utilized to model the higher order effects in the mapping between the latitude angle θ and the polar distance r: r = dθ + c 2 θ 2 + c 3 θ 3 + • • • (Equation 4) where the order of the polynomial can be determined experimentally. Image Registration and Self Calibration Camera Setup Figure 3 shows the setup for capturing the spherical panorama and for self- calibrating a fisheye lens. The camera 50, for example a Nikon N900 camera, is mounted on a platform 52, which can slide in two orthogonal directions. The pointing direction of the camera is slightly tilted upward for reasons which will be explained later. The nodal point of the fisheye lens within the camera 50 needs to be adjusted so that it lies on the rotation axis of the tripod. There are many practical ways to achieve it. A simple way is to locate an occluding edge of a far away object by a near object, and track it when panning the camera. If the edge stays static on the far away object, then the nodal point is already on the rotation axis. Otherwise, adjust the platform 50 until the occluding edge stays static. Once the camera 50 is set up properly, in a first embodiment either four pictures can be taken by rotating the camera 90 degrees after every shot, or in a second embodiment three pictures can be taken by rotating it 120 degrees. The four-picture method is typically preferred simply because it provides larger overlap regions. Objective Function and Minimization Given four images I 0 , I„ I 2 , and I 3 , the registration and self-calibration problems are formulated as a single nonlinear minimization problem. The 3D reference frame is a camera coordinate of image I 0 . The following parameters are adjusted in the minimization process: 1. Camera rotations: The rotations of the camera coordinate of I,, I 2 , and I 3 with respect to the reference frame I 0 are parameterized by different axes and rotation angles because it is desired to extend the algorithm to accommodate arbitrary rotations. The rotations are parameterized by roll/pitch/yaw angles q i (i=l,2,3). The total number of rotation parameters is nine. 2. Image Centers and Radii: As shown in Figure 1, the envelope of the image is an ellipse with two slightly different radii. The parameters are image center positions o, and radii R, (i=0,l,2,3). The total number of parameters is sixteen. 3. Radial Lens Distortion: A cubic polynomial is used to represent the mapping between the latitude angle and the polar distance for all images. The parameters are c„ c 2 , and c 3 . The reason to choose a cubic polynomial is purely experimental, and specific to the Nikon 8mm fisheye lens which is used in this embodiment. For other fisheye lenses, the order of the polynomial may need to be higher or lower. 4. Image Brightness Difference: The brightness scaling factor s (contrast) and offset a (brightness). The parameters are s, and a,, (i=l,2,3). First consider the registration of two fisheye images I, and I . The objective function is: (Equation 5) e k = S-L_( k ) + a, - S j l/Tfep)) - a,. Where A. j is the overlap region, T(-) is a transformation function which transform the image position x k in I, to its corresponding position in I,, and p is the vector of all parameters listed above except the brightness compensation parameters. The overlap region A^ is determined by the current estimate of the camera parameters and rotations. The transformation function can be decomposed into three concatenated functions: T(x k ) = T 3 (T 2 (T I (x k ))). (Equation 6) The first function T,(x k ) transforms the image position x k into a 3D ray direction (θ,φ). In the following discussion, the subscript k is dropped to simplify notation. Let x = [ x y f (Equation 7) i i Oi [o o y X V (Equation 8) (Equation 9) the image position x can be represented in the polar coordinate of image I ; as (Equation 10) (Equation 11) Therefore, the 3D ray direction (note: Note that the same notation is used for the 2D polar direction and the 3D longitude angle because they are the same as long as the tangential distortion is zero, which is assumed in this paper) of x represented in the camera coordinate of is: (Equation 12) φ, = φ„ (Equation 13) where Θ( ) is the inverse function of the distortion polynomial in Equation 4. In practice, the inverse can be solved using the Newton-Raphson root- finding method. The second function T 2 ( ) converts the 3D ray direction into the camera coordinate of I . Let M, and M j be 3 x 3 rotation matrices computed from the roll/pitch/yaw angles q, and q,, then: (Equation 14) in which (Equation 15) sin θ, cos φ t sin θ, sin φ t cos#, (Equation 16) Therefore, the 3D ray direction in the camera coordinate of I, can be represented as (Equation 17) θ j = atanl f u J ,u J y X (Equation 18) The third function T 3 ( ) maps the 3D ray (θ., φ j ) onto the image position in I.(x',y'). The image position in polar coordinate is (Equation 19) Φ^ Φr (Equation 20) And in Cartesian image coordinate, the position is x' = o +R j CO θ j X X (Equation 21) y' = o +R .smθ j y y (Equation 22) The minimization of the objective function S y in Equation 5 is reached when its derivative is zero, i.e., dS v _ 1 " a A 7y ^ 2-t βk S dx' dp dy' dp dS g = 0 When four images are considered together, the overall objective function is the sum of the all image pairs with overlap: fij,Aij = φ (Equation 23) The Levenberg-Marquardt method is then used to minimize the objective function with proper initial estimates of parameters. Initial Estimates and Damping The initial estimate problem is important for any nonlinear optimization in order to avoid local minima and divergences. Among the parameters that need to be optimized, the initial radial distortion model can be set to the ideal equi-distance projection and brightness difference parameters to either s=1.0 and a=0.0 or values computed from camera exposure/aperture settings. The initial estimates the rotation angles, image centers and radii are especially important because they are the main sources of the nonlinearity in the objective function. Between two arbitrary fisheye images taken by rotating the camera around its nodal point, an initial estimate of the rotation represented by either the roll/pitch/yaw angles q or a rotation matrix M is needed. If there are, for example, three points in two images matched manually, the following function can be minimized to get an initial estimate of the rotation matrix: (Equation 24) where u'j and U; are the two 3D rays computed as in Equation 15 and Equation 16 from the image positions using the current camera parameters, and the term C(M) constrains the matrix M to be a rotation matrix, e.g., 2 C(M) = j (Mk *M k - 1.0) 2 + (Mo *M,) 2 + (Mo *M2 ) 2 + (M,*M2 ) 2 k=0 (Equation 25) where M 0 , M, and M 2 are the three column vectors of the matrix. The easiest way to locate the ellipse is to have the user specify four points in the image, and then fit an ellipse to the four points. Figure 4 shows a result 100 of fitting an ellipse to the four points of the image. Even though the result from fitting an ellipse to the image is a good initial estimate, they usually contain an error of up to two pixels because there are blurrings and corruption in colors around the edge of the ellipse in fisheye images. It is well known that the self calibration is difficult when the image center position is unknown. Fortunately there is an independent way to compute a good initial estimate of the image center due to the unique projection model in the fisheye lens. According to the equi-distance and the radial distortion model, the image center position coincides with the center position of the ellipse. In order for the nonlinear optimization to be stable and more likely to converge to the global minimum, experiments have shown that image center position and radii need to be dampened, i.e., the new objective function should be S' = S X μ∑(_oro?_ 2 x_R i - R? ) _ 2 ) ;=0 (Equation 26) where o i(0) and R^ are image center positions and radii computed from the original ellipse fittings, and μ is a constant. The above-identified algorithm has been utilized in four fisheye images, 10, 10', 10" and 10'" (Figure 5) taken by rotating the camera roughly 90 degrees for every shot. Kodak ASA 400 film was used, and the images 10, 10', 10" and 10'" were scanned in resolution of 768x512 with 24-bit color. In the bottom portion of each image a tripod 56, which holds the camera 50 (Figure 3), is visible. Since the field of view of the fisheye lens is near 180 degrees, and its nodal point has to be on the rotation axis, there appears to be no easy way to get around the problem. In this minimization, the bottom portion of the fisheye images is not taken into account. The reason the camera is usually tilted upward is that since the bottom portion is the tripod anyway, we are better off tilting it upward so that the top portion (near north pole) is covered redundantly. In the mimmization, the image gradients are computed. In a preferred embodiment the derivative of Gaussian function as the gradient filter is utilized, the Gaussian function being utilized as the smoothing filter. The size of the smoothing and gradient filters are adjustable to achieve registration at different scales. Figures 6a and 6b show the feedback information after one iteration and after 10 iterations of adjustments, respectively, during the minimization. The lens distortion model is the cubic polynomial as described in Equation 4. The seams in the feedback images are intentionally left so that the users know where each fisheye image is mapped. It can be seen that the optimization converges quickly to the global minimum. Figures 7a and 7b show the final results of a minimization of an image ID when the ideal equi-distance projection model and our cubic or radial distortion model respectively are used. The result of the self calibration of the fisheye lens is the cubic polynomial of the projection model specified in Equation 4. Figure 8 is a chart that illustrates the characteristics of a calibrated projection model and the ideal equi-distance model. Once the four fisheye images are registered and the fisheye lens is calibrated, we can represent the spherical panorama using any projection. The projection we used in the minimization feedback is one choice. For example, the spherical panorama can be projected onto a cube. Figure 9 shows the texture maps 200-210 as projected on the six faces of a cube. Accordingly, through the optimization of the images and the self-calibration in accordance with equi-distance model in conjunction with a radial distortion model a fisheye lens can be advantageously utilized to provide a VR environment. The system has wide application and due to its simplicity is adaptable to a variety of environments, whether amateur or professional in nature. Although the present invention has been described in accordance with the embodiments shown, one of ordinary skill in the art will readily recognize that there could be variations to the embodiments and those variations would be within the spirit and scope of the present invention. Accordingly, many modifications may be made by one of ordinary skill in the art without departing from the spirit and scope of the appended claims.

Claims: CLAIMS What is claimed is: 1. A method for providing a virtual reality environment utilizing images from a lens to a display of a data processing system comprising the steps of: (a) providing a plurality of images by the lens, each of the plurality of images including a plurality of parameters; (b) optimizing the plurality of parameters and self calibrating the lens for each of the plurality of images in accordance with a radial distortion model; and (c) generating the virtual reality environment of the plurality of images based upon the optimization of the plurality of parameters. The method of claim 1 in which the lens comprises a fisheye lens. 3. The method of claim 1 in which the radial distortion model comprises a cubic distortion model. 4. The method of claim 1 in which the plurality of images is between two and four images. 5. The method of claim 1 in which the parameters comprise image center and its radii, radial lens distortion, and image brightness difference. 6. The method of claim 1 in which the optimizing step comprises the steps of: providing a proper initial estimate of the parameters; creating an objective function based upon the initial estimates; and minimizing the objective function to optimize the parameters. 7. A system for providing a virtual reality environment utilizing images from a lens to a display of a data processing system comprising: means for providing a plurality of images by the lens, each of the plurality of images including a plurality of parameters; means for optimizing the plurality of parameters and self calibrating the lens for each of the plurality of images in accordance with a radial distortion model; and means for generating the virtual reality environment of the plurality of images based upon the optimization of the plurality of parameters. 8. The system of claim 7 in which the lens comprises a fisheye lens. 9. The system of claim 7 in which the radial distortion model comprises a cubic distortion model. 10. The system of claim 7 in which the plurality of images is between two and four images. 11. The system of claim 7 in which the parameters comprise image center and its radii, radial lens distortion, and image brightness difference. 12. The system of claim 7 in which the optimizing means comprises: means for providing a proper initial estimate of the parameters; means for creating an objective function based upon the initial estimates; and means for minimizing the objective function to optimize the parameters. 13. A computer readable medium for providing a virtual reality environment utilizing images from a lens to a display of a data processing system containing program instructions for: (a) providing a plurality of images by the lens, each of the plurality of images including a plurality of parameters; (b) optimizing the plurality of parameters and self calibrating the lens for each of the plurality of images in accordance with a radial distortion model; and (c) generating the virtual reality environment of the plurality of images based upon the optimization of the plurality of parameters. 14. The computer readable medium of claim 13 in which the lens comprises a fisheye lens. 15. The computer readable medium of claim 13 in which the radial distortion model comprises a cubic distortion model. 16. The computer readable medium of claim 13 in which the plurality of images is between two and four images. 17. The computer readable medium of claim 13 in which the parameters comprise image center and its radii, radial lens distortion, and image brightness difference. 18. The computer readable medium of claim 13 in which the optimizing instruction comprises the instructions for: providing a proper initial estimate of the parameters; creating an objective function based upon the initial estimates; and minimizing the objective function to optimize the parameters.

Inventors: XIONG YALIN, XIONG, YALIN
Applicants: APPLE COMPUTER, APPLE COMPUTER, INC.
Application year: 1998
Main classification: G06K9
IPC codes: G06T3, G06T17