Abstract:
An image processing apparatus includes recording unit which has recorded image information appended with quantized space information in units of pixels, setting unit for setting a resolution higher than that of the recorded image information, reconstruction unit for reconstructing an image by reading out image information from the recording unit at the recorded resolution irrespective of the resolution set by the setting unit, and interpolation unit for making pixel interpolation of the reconstructed image with the resolution of the reconstructed image matching the resolution set by the setting unit.

Description:
FIELD OF THE INVENTION 
     The present invention relates to an image processing apparatus and method for reconstructing an image, which records image information appended with quantized space information such as image information expressed by, e.g., a ray space theory, in a virtual space and, more particularly, to an improvement in resolution. 
     BACKGROUND OF THE INVENTION 
     Attempts to describe a virtual space on the basis of a ray space theory have been proposed. See, for example, “Implementation of Virtual Environment by Mixing CG model and Ray Space Data”, IEICE Journal D-11, Vol. J80-D-11 No. 11, pp. 3048-3057, November 1997, or “Mutual Conversion between Hologram and Ray Space Aiming at 3D Integrated Image Communication”, 3D Image Conference, and the like. 
     A recording method of ray space data will be explained below. 
     As shown in FIG. 1, a coordinate system  0 -X-Y-Z is defined in a real space. A light ray, perpendicular to the Z-axis that passes through a reference plane P (Z=z) is defined by a position (x, y) where the light ray crosses P, and variables θ and φ that indicate the direction of the light ray. More specifically, a single light ray is uniquely defined by five variables (x, y, z, θ, φ). If a function that represents the light intensity of this light ray is defined as f, light ray group data in this space can be expressed by f(x, y, z, θ, φ). This five-dimensional space is called a “ray space”. 
     If the reference plane P is set at z=0, and disparity information of a light ray in the vertical direction, i.e., the degree of freedom in the φ direction is omitted, the degree of freedom of the light ray can be regenerated in two dimensions (x, θ). This x-θ two-dimensional space is a partial space of the ray space. As shown in FIG. 3, if u=tanθ, a light ray (FIG. 2) which passes through a point (X, Z) in the real space is mapped onto a line in the x-u space, said line is given by: 
     
       
           X=x+uZ   (1) 
       
     
     Image sensing by a camera reduces to receiving light rays that pass through the focal point of the lens of the camera onto an image sensing surface, and converting their brightness levels and colors into image signal. In other words, a light ray group which passes through one point, i.e., the focal point, in the real space is captured as an image represented by a number of pixels. Since the degree of freedom in the φ direction is omitted, and the behavior of a light ray is examined in only the X-Z plane, only pixels on a line segment that intersects a plane orthogonal with respect to the Y-axis need to be considered. In this manner, by sensing an image, light rays that pass through one point can be collected, and data on a single line segment in the x-u space can be captured by a single image sensing. 
     When this image sensing is done a large number of times by changing the view point position, light ray groups which pass through a large number of points can be captured. When the real space is sensed using N cameras, as shown in FIG. 4, data on a line given by: 
     
       
           x+Z   n   u=X   n   (2) 
       
     
     can be input in correspondence with a focal point position (X n , Z n ) of the n-th camera (n=1, 2, . . . , N), as shown in FIG.  5 . In this way, when an image is sensed from a sufficiently large number of view points, the x-u space can be densely filled with data. 
     Conversely, an observed image from a new arbitrary view point position can be generated (FIG. 7) from the data of the x-u space (FIG.  6 ). As shown in FIG. 7, an observed image from a new view point position E(X, Z), indicated by an eye mark, can be generated by reading out data on a line given by equation (1) from the x-u space. 
     One major feature of ray space data is that ray space data is defined for each pixel. That is, frame data for one scene is expressed by only ray space data. Hence, the data size of ray space data does not depend on the complexity of a scene, but depends on only the size and resolution of the scene. For this reason, when a given scene is complicated, normal CG data cannot express that complexity unless the number of polygons is large (an increase in the number of polygons leads to an increase in computation volume). However, ray space data does not require an increase in data size. 
     In other words, image data such as ray space data in which image information includes space information requires an image process for pixels for one frame to reconstruct an image. 
     However, when an enlarged image is reconstructed from ray space data or when the field angle is decreased to be smaller than that of the original image sensing angle, since the data size of ray space data remains the same, a plurality of pixels must refer to the same ray space data. This is caused by the enlargement of an image from ray space data witch requires processes for new pixels to be added as a result of enlargement, as described above. However, reference to same ray space data, although necessary is wasteful process. 
     SUMMARY OF THE INVENTION 
     The present invention has been proposed to solve conventional problems, and has as its object to provide an image processing apparatus and method, which can reconstruct an enlarged image at high speed without producing any wasteful pixel reference when an enlarged image is reconstructed from image data such as ray space data in which image information includes space data or when the field angle is decreased to be smaller than that upon image sensing. 
     In order to achieve the above object, an image processing apparatus of the present invention comprises: 
     recording means which has recorded in units of pixels image information appended with space information that has been quantized at a predetermined first resolution; 
     setting means for setting a second resolution higher than the first resolution; and 
     sample/interpolation means for sampling the image information of the first resolution and assigning the sampled image information, and interpolating pixels at empty pixel positions which are produced due to a difference between the second and first resolutions, upon reading out image information from the recording means at the second resolution. 
     Further, a method of the present invention that achieves the above object is an image processing method for reconstructing an image based on image information read out from a recording step which has recorded in units of pixels image information appended with space information that has been quantized at a predetermined first resolution, comprising: 
     a setting step of setting a second resolution higher than the first resolution; and 
     a sample/interpolation step of sampling the image information at the first resolution and assigning the sampled image information, and interpolating pixels at empty pixel positions which are produced due to a difference between the second and first resolutions, upon reading out image information from the recording means at the second resolution. 
     As a preferred aspect of the present invention, the image information is expressed by a ray space theory. 
     As a preferred aspect of the present invention, when ray space data has different resolutions in different coordinate axis directions, recorded ray space data are sampled at a lower resolution. 
     As a preferred aspect of the present invention, the sample/interpolation means interpolates pixels by texture mapping. 
     As a preferred aspect of the present invention, the sample/interpolation means pastes texture data by enlarging the texture data by a magnification of the second resolution/first resolution. 
     The above object can also be achieved by a program for implementing the image processing method stored in a storage medium. 
    
    
     Other features and advantages of the present invention will be apparent from the following description taken in conjunction with the accompanying drawings, in which like reference characters designate the same or similar parts throughout the figures thereof. 
     BRIEF DESCRIPTION OF THE DRAWINGS 
     The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the invention and, together with the description, serve to explain the principles of the invention. 
     FIG. 1 is a view for explaining the principle for generating ray space data; 
     FIG. 2 is a view for explaining data in a real space; 
     FIG. 3 is a view showing the space shown in FIG. 2, which is expressed by ray space data; 
     FIG. 4 is a view for explaining the principle of generating real space data when there are a plurality of cameras; 
     FIG. 5 is a view for explaining the principle of generating ray space data when there are a plurality of cameras; 
     FIG. 6 is a view for explaining the principle of generating ray space data (x+Zu=X) at an arbitrary view point position from ray space data when there are a plurality of cameras; 
     FIG. 7 is a view for explaining the principle of reconstructing a real space from the arbitrary view point in FIG. 6; 
     FIG. 8 is a view for explaining quantization in an embodiment of the present invention; 
     FIG. 9 is a view for explaining storage of ray space data in the embodiment of the present invention; 
     FIG. 10 is a view for explaining a scheme for obtaining an intersection with the boundary of a line that expresses a light ray group from a given view point position, and a scheme for sampling a portion between two ends at the resolution of ray space data in the embodiment of the present invention; 
     FIG. 11 is a view for explaining the reason for sampling identical pixels in the prior art; 
     FIG. 12 shows a pixel distribution sampled by the scheme shown in FIG. 10; 
     FIG. 13 is a view for explaining the principle of texture mapping for further increasing resolution; 
     FIG. 14 is a view for explaining the principle of pixel interpolation implemented by texture mapping; 
     FIG. 15 is a block diagram showing the hardware arrangement of the embodiment of the present invention; and 
     FIG. 16 is a flow chart showing the control sequence in the embodiment of the present invention. 
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     Preferred embodiments of the present invention will now be described in detail in accordance with the accompanying drawings. 
     An image processing apparatus and method to which the present invention is applied will be described hereinafter with reference to the accompanying drawings. In this image processing apparatus and method, when resolution is increased from ray space data and an enlarged image is reconstructed, original ray space data are read out at the resolution upon recording, an image is reconstructed at the increased resolution, and image data is pasted at empty pixel positions of the enlarged image by texture mapping. 
     FIG. 8 is a view for explaining quantization of ray space data in this embodiment. More specifically, assume that ray space data to be processed by the image processing apparatus of this embodiment is image data obtained using a camera which has a CCD having N pixels in the main scanning direction, a field angle w, and an intersection angle α between the optical axis and Z-axis. If the pixels of the CCD are respectively ordered  0 , . . . , N-1, in sequence, and θ represents the angle a light ray which passes through the j-th pixel makes with the Z-axis, and x represents the position where a light ray which passes through the j-th pixel intersects with the X-axis, we have:                  N   2          tan        (     θ   -   α     )         =       (       N   2     -   j     )          tan        (     W   2     )                 (   3   )                                
     Note that mapping in FIG. 8 is done with respect to the Y-axis. If equation (3) holds for the j-th pixel on Y=m-th line (m=an arbitrary number), the angle θ corresponding to pixel j can be computed from equation (3). That is, if I″ (i) represents the i-th image data, and that image data is converted into image data I′ in an (x, θ) space, which is further converted into image data I in an (x, u) space by u=tanθ, this process is expressed by: 
     
       
           I ″( i )= I ′( x , θ)= I ( x, u )  (4) 
       
     
     u and x are appropriately quantized. For example, as for the x-axis, the spacing between two neighboring light rays on the x-axis is obtained, and quantization is done using this spacing as a quantization step. Also, as for the u-axis, quantization is done using the tangent of the angle make between two neighboring pixels with the camera view point position. 
     In this manner, ray space data exploits the fact that light rays focused to a given point in the real space are on a line in the ray space. That is, a line determined by a view point position, and the coordinates of the two ends of the boundary of this line are obtained. The coordinates of the two ends are equally divided between these two ends at the resolution of original ray space data, i.e., the resolution of that ray space data. The equally divided points are used as sampling points. 
     The principle of this embodiment will be explained below. 
     When the coordinates of the two ends of a line determined by the view point position are (x l , u l ) and (x n , u n ), the resolutions, R x   n  and R u   n , of the line in the x- and u-axis directions are defined by: 
       R   x   n   =|x   n   −x   l   |/Q   x   
     
       
         
           R 
           u 
           n 
           =|u 
           n 
           −u 
           l 
           |/Q 
           u 
         
       
     
     where Q x  and Q u  are the quantization steps of the original ray space. The resolution R m  of the image to be generated is that in the horizontal direction. When 
     
       
         
           R 
           m 
           &gt;R 
           u 
           n 
         
       
     
     or 
     
       
           R   m   &gt;R   x   n   (5) 
       
     
     i.e., when the resolution of the image to be generated is higher than that of an original image (an image to be referred to), in other words, when the image is to be enlarged with respect to the original image, a plurality of pixels must refer to identical ray space data in the ray space. This is because space information and pixel information of ray space data are present in units of pixels, as described above. Upon reconstructing an image, when pixels on a line corresponding to the view point are sampled at equal intervals at a resolution min(R u   n , R x   n ) of original ray space data, i.e., when ray space data is referred to at the lower of the resolutions, R u   n  and R x   n , of the u- and x-axes, since that ray space data is referred to at the original resolution, identical ray space data can be prevented from being referred to unlike the prior art. FIG. 10 shows an example of the sampling result at equal intervals from two ends (x l , u l ) and (x n , u n ) of a line segment at the resolution min(R u   n , R x   n ). 
     However, when the original ray space data are referred to at the original resolution, as described above, to prevent identical ray space data from being referred to upon enlarging an image, an image with the decreased resolution (FIG. 12) is reduced compared to a required image (FIG.  11 ). Hence, in this embodiment, empty pixel positions of the reduced image are interpolated by texture mapping (FIG.  13 ). FIG. 14 shows the principle of this interpolation. That is, when 
     
       
           R   u   n   &gt;R   x   n   (6) 
       
     
     ray space data are multiplied by: 
     
       
           R   m /min( R   n   u   ,R   n   x )= R   m   /R   n   x   (7) 
       
     
     when 
     
       
           R   u   n   &lt;R   x   n   (8) 
       
     
     ray space data are multiplied by: 
     
       
           R   m /min( R   n   u   ,R   n   x )= R   m   /R   n   u   (9) 
       
     
     to prevent identical ray space data from being referred to. 
     Furthermore, this embodiment is devised to attain faster sampling. That is, as shown in FIG. 10, by setting equally divided points of a line determined by the view point position to be sampling points, the u- and x-coordinates of the sampling points in the ray space can be computed at high speed by additions only. More specifically, when the resolution of the image to be generated in the horizontal direction is R, and the coordinates of the two ends of the line are (x l , u l ) and (x n , u n ), the coordinates of the next sampling point can be computed by adding only Δx and Δu                Δ                 x     =         x   n     -     x   1       R             (   10   )                 Δ                 u     =         u   n     -     u   1       R             (   11   )                                
     The equally divided points can also be computed by multiplication and division, but only additions are used to achieve high-speed coordinate computations and faster sampling. 
     In the example shown in FIG. 14, ray space data are doubled in the x- and u-directions to have eight sampling points on the line as centers to interpolate empty ray space data. 
     FIG. 15 shows the hardware arrangement of this embodiment. The hardware arrangement shown in FIG. 15 is that of a normal workstation. Referring to FIG. 15, especially, a disk  25  stores a large volume of ray space data, as shown in FIG.  9 . This system presents a virtual space to the user on a CRT  23 . At this time, the user can freely walk through that virtual space or can manipulate (move, rotate, or the like) an object in the virtual space by operating a mouse  28 . Especially, an enlargement factor or the like may be input by the mouse  28  or a keyboard (not shown). When the enlargement factor is set, a CPU  20  makes the aforementioned computations, and also makes computations using a texture mapper  24 , thus rendering an image on a buffer  22  via a CRTC  21 . 
     FIG. 16 shows the control sequence of the system shown in FIG.  15 . 
     In step S 1 , the resolution is designated by the user or an application program. This resolution depends on the magnification factor of, e.g., image enlargement designated by the user or application program, as described above. In step S 2 , the view point position (posture) of the user (viewer) is determined, and a line in the ray space is determined on the basis of the view point position/posture, as shown in, e.g., FIG.  6 . In step S 4 , the coordinates of the two ends of that line (line segment) are detected. 
     It is checked in step S 6  if the resolution of the image to be generated is higher than that of an original image, i.e., if inequality (5) is satisfied, in other words, if R m &gt;R u   n  or R m &gt;R x   n . If NO in step S 6 , since an image is not enlarged, i.e., no wasteful operation for sampling identical ray space data a plurality of times takes place, ray space data is sampled in step S 20  at the resolution designated in step S 1 . 
     On the other hand, if YES in step S 6 , pixels on the line corresponding to the view point are sampled at equal intervals at the resolution min(R u   n , R x   n ) of original ray space data. In this sampling, since ray space data are referred to at the original resolution, identical ray space data can be prevented from being referred to unlike the prior art. In step S 10  and subsequent steps, texture mapping is done for pixel positions which are not sampled in step S 8 . That is, if R u   n &gt;R x   n  (inequality (6)), mapping of R m /R x   n  (equation (7)) times is done in step S 12 ; if R u   n &lt;R x   n  (inequality (8)), mapping of R m /R u   n  (equation (7)) times is done in step S 14 . 
     Note that equations (10) and (11) are used in divisions at equal intervals in step S 8  or S 20 . 
     When the resolution is externally set (e.g., when the texture size is limited upon using texture mapping hardware ( 24  in FIG.  15 ), a smaller of the resolutions obtained previously and the texture resolution can be used as a new resolution. 
     Various modifications of the present invention may be made. 
     In the above embodiment, ray space data are obtained by computations, but may be pre-stored as a table in a RAM or ROM. 
     The display device is not limited to the CRT. The present invention can also be applied to a lenticular or HMD display device. 
     To restate, according to the present invention, when an image is enlarged or the field angle is decreased, image enlargement can be done at high speed without referring to extra pixels. 
     The present invention is not limited to the above embodiments and various changes and modifications can be made within the spirit and scope of the present invention. Therefore, to apprise the public of the scope of the present invention, the following claims are made.