Background of the Invention
1. Field of the Invention
The present invention relates to a method and an apparatus for displaying real space and virtual space images.
2. Description of Prior Art
Virtual reality (VR) technique is developed to present information prepared by a computer to a man and makes him or her recognize as if he or she is in a real world. By using the virtual reality technique, a man comes into a virtual environment and has the same experience as in a real world. Virtual reality is also called as artificial reality.
Virtual reality technology includes a field called as augmented reality (AR). In the augmented reality, a real space mixed with a virtual space prepared by a computer is presented to a man. That is, augmented reality augments the real space by the virtual space.
In the virtual reality technology, a man is surrounded completely in the virtual environment. On the other hand, the augmented reality technology has an object to increase the quality of the real environment by arranging virtual environment appropriately to the real environment. Visual augmented reality presents an image as virtual environment. Visual augmented reality is referred hereinafter to as augmented reality.
Augmented reality technique will be used for systems, for example, for operation by superposing a computerized tomography scan image of a brain of a patient with the real brain, for supporting construction, repair or the like of a machine by adding comments with computer graphics to each components of the real machine, for evaluating how a furniture looks when it is added to an actual room, and for evaluating how a new building affects the environment in full-scale when it is built in the redevelopment of a city.
See-through head mounted display (STHMD) is used usually for presenting real and virtual spaces at the same time in augmented reality technique. STHMD systems includes a system using an optical system and a system using video signals.
FIG. 1 shows a principle of an augmented reality system with a see-through head mounted display using an optical system. An observer 80 can see a real space image through a half-mirror 81 placed in a line of sight before his or her eyes EY. On the other hand, the observer 80 also sees a virtual space image projected by a projector 82 reflected by the half-mirror 81. Thus, the virtual space image overlaps the real space image. A position detector (PD) 83 is set on the head of the observer 80 to detect a viewing point, and a work station (WS) 84 sends signals of the virtual space image to the projector 82 according to the output of the position detector 83.
FIG. 2 shows another augmented reality system with a see-through head mounted display using video signals. Two cameras 93 are arranged at positions conjugate to the left and right eyes EY of an observer 90 and pick up a real space image reflected by a double sided mirror 91. A work station 95 synthesizes the real space image with a virtual space image, and a projector 92 projects the synthesized image to the mirror 91 and present it to the observer 90. A position detector (PD) 83 is also set on the head of the observer 90 to detect a viewing point in this system.
In order to realize augmented reality, it is necessary to present correctly cover relation so that a farther space or object is covered by a space or object nearer to the observer, besides the position adjustment which is a problem already known. However, the above-mentioned prior art augmented reality systems cannot represent cover relation correctly. In the augmented reality system using an optical system, it is determined that real space is transparent behind an object in virtual space. Thus, an observer sees overlapped images of virtual space and real space, and the cover relation cannot be represented at all. In the augmented reality system using video signals, an object in virtual space always covers another object in real world irrespective of the distance. Then, the cover relation cannot be represented correctly as explained below. When an object in virtual space is nearer than another object in real world, cover relation is represented correctly. On the contrary, when an object in real space is nearer than another object in virtual world, the object in real space is covered by the object in virtual space which is farther than the object in real space, or the cover relation is reversed.
Vision psychology reports that if cover relation is not represented correctly, stereoscopic vision is inhibited, or unexpected stereoscopic vision happens because of the overlapping or the inconsistency of the observed image and the cover relation. Therefore, it is very important for augmented reality technology to represent cover relation correctly.
Summary of the Invention
An object of the present invention is to provide an apparatus and method for augmented reality using video signals which represent cover relation correctly.
In one aspect of the invention of a method for displaying a real space image and a virtual space image, a pickup device is provided at a conjugate position of eyes of an observer, and it detects a real space image in real space. On the other hand, a virtual space image is obtained based on virtual space information. A distance from the observer to each of first pixels in the real space image is determined by using the detected image in correspondence to each of second pixels in the virtual space image. Then, the distance of each of the first pixels in the real space image is compared with that of a counterpart of the virtual space image, and one of the first pixel and the counterpart second pixel which is nearer to the observer is selected to present a synthesized image of the virtual space image and the real space image to the observer.
In a second aspect of the invention, a display apparatus for augmented reality comprises a pickup device provided at a position conjugated with eyes of the observer, and a position detector detecting a viewing point of the observer. A real space distance image generator generates a real space distance image which has distance data for each pixel in real space on the basis of a real space image picked up by the pickup device, while a virtual space distance image generator generating a virtual space image, which has distance data for each pixel in virtual space, on the basis of the position of the viewing point detected by the position detector and virtual space information stored beforehand. A comparator compares a distance of the real space image with that of the virtual space image for each pixel. Then, a selector selects for each pixel one of two corresponding pixels in the real space image and in the virtual space image which is nearer to the observer, and a display apparatus represents a synthesized image consisting of the pixels nearer to the observer selected by the selector.
In a third aspect of the invention, a display apparatus for augmented display comprises a pickup device which picks up a first two dimensional image (real space image), and a distance measurement device which measures first distance information (real space distance image), and a position detector detecting a viewing point of the observer. An output device outputs a second two dimensional image (virtual space image) and second distance information (virtual space distance image) for each pixel in the second two dimensional image on the basis of output data of the position detector and information stored beforehand. A comparator compares the first distance information with the second distance information for each pixel, and a selector selects for each pixel one of two corresponding pixels in the first distance information and in the second distance information which is nearer to the observer according to the comparison result of the comparator. Then, a display device can display the image information selected by the selector as a synthesized image consisting of the first and second two-dimensional images. The pickup device, the distance measurement device and the display device are arranged in the substantially same viewing direction as a viewing direction of the observer. In a different way, the distance measurement device measures the first distance information on the basis of a plurality of first two dimensional images picked up at different positions and outputs of the position detectors at the positions.
An advantage of the present invention is that cover relation is represented correctly to an observer in augmented reality.
Brief Description of the Drawings
These and other objects and features of the present invention will become clear from the following description taken in conjunction with the preferred embodiments thereof with reference to the accompanying drawings, and in which:
FIG. 1 is a diagram for explaining the principle of a prior art augmented reality system using prior art optical see-through head mounted display; and
FIG. 2 is a diagram for explaining the principle of another prior art augmented reality system using prior art video see-through head mounted display.
FIG. 3 is a general block diagram of a display apparatus of an embodiment the invention;
FIG. 4 is a block diagram of a cover pixel selector of the display apparatus;
FIG. 5A and FIG. 5B are diagrams for illustrating cancellation of the rotation movement of a head of an observer;
FIG. 6 is a diagram for explaining calculation of depth accompanied by movement of the head;
FIG. 7 is a diagram for explaining distance measurement using a difference caused by movement.
FIG. 8 is another diagram for explaining distance measurement using a difference caused by movement.
Detailed Description of the Preferred Embodiments
Referring now to the drawings, wherein like reference characters designate like or corresponding parts throughout the several views, FIG. 3 shows a general block diagram of a display apparatus for augmented reality using video signals. A mirror 11 has a reflection plane on both sides, and it is positioned before an eye 10E of an observer 10 so as to have an angle of 45.degree. relative to a line of sight. A camera 12 is set at a position conjugate optically to the eye 10E to pick up a real space image (two dimensional image) FR reflected by the mirror 11. The camera 12 has a structure which converts an incident light through a lens to electrical signals, similar to a so-called digital camera, and it is used to measure distance by calculating the depth to an object based on the picked up image as will be explained below with reference to FIGS. 5 and 6. A display device 13 displays a synthesized image FM output from a cover pixel selector 14. The mirror 11, the camera 12 and the display device 13 are provided for each of the left and right eyes 10E. The observer 10 observes through the mirror 11 the synthesized image FM display by the displays device 13. The camera 12 and the display device 13 are arranged substantially on the same line of sight as the observer 10. The display device 13 comprises a known display device such as a liquid crystal panel or a cathode ray tube. Lenses and mirrors are added if necessary to the optical system.
The cover pixel selector 14 selects for each pixel one of a real space image FR obtained by the cameras 12 and a virtual space image FV in correspondence to a distance or depth from the viewing point of the observer 10 to the pixel, as will be explained later in detail. A position detector 15 attached to the observer 10 detects the viewing point of the observer 10. The position detector 15 and the detection of the viewing point are known in the art. A virtual space image output section 16 outputs the virtual space image FV based on a signal S1 from the position detector 15 and virtual space information DV stored beforehand. The virtual space information DV includes, for example, image data picked up in various ways, image data prepared by computer graphics, or a program for generating such image data.
The cover pixel selector 14 and the virtual space image output section 16 are fabricated as a hardware circuit, a computer program installed in an appropriate processor such as a personal computer or a work station, or an appropriate combination thereof. Such a program is stored in a random access memory, a read only memory, a hard disk or the like, or is read from a CD-ROM, a magneto-optical disk or a flexible disk, or is downloaded through a communication line from a host. The program can be supplied so as to be operated in various operation systems, and system environments or platforms.
In the display apparatus 1 shown in FIG. 3, distance coordinates from a viewing point are calculated on the basis of the real space image FR obtained by the cameras 12 in the position optically conjugate to the eyes 10E of the observer 10. A feature of the display apparatus 1 is that the real space image FR and the virtual space image FV are selected for each pixel according to the calculated distance from the viewing point, to generate a synthesized image FM to be represented to the observer 10.
In computer graphics generally, a Z buffer method is used to show cover relation correctly. In order to represent cover relation correctly for the real space and the virtual space similarly, a concept of Z-key was introduced. This represents an image by switching real space and virtual space according to z coordinate in the camera coordinate system. The cover pixel selector 14 of the embodiment uses and improves further the concept of Z-key.
FIG. 4 is a block diagram of the cover pixel selector 14 and the virtual space image output section 16 of the display apparatus 1. The cover pixel selector 14 comprises a real space image output section 21, a comparator 22 and a selector 23. The real space image output section 21 has a color information generator 211 and a depth information generator 212. The color information generator 211 generates color information FRc based on the real space image FR obtained by the cameras 12, and the depth information generator 212 generates depth information (or distance information) FRd for each pixel in the real space image FR. The signal S1 from the position detector 15 is also used for the depth information. Because the depth information corresponds to the real space distance image, the depth information FRd is also referred to as real space distance image. The color information FRc may be the same as the real space image FR.
FIG. 4 also shows the virtual space image output section 16 having a virtual space information memory 160, a color information generator 161 and a depth information generator 162. The virtual space information memory 160 stores the virtual space information DV. The color information generator 161 generates color information FVc on the basis of the signal S1 and the virtual space information DV. The depth information generator 162 generates depth information (or distance information) FVd for each pixel in the color information FVc. Because the depth information FVd corresponds to the virtual space distance image, the depth information FVd is also referred to as virtual space distance image FVd. The color information FVc may be the same as the virtual space image FV.
The comparator 22 compares the real space distance image FRd with the virtual space distance image FVd and outputs a signal S2 as a result of the comparison.
The selector 23 or a multiplexer selects the image data of the pixel which is nearer to the viewing point among the real space image FR and the virtual space image FV according to the signal S2 from the comparator 22. Thus, the selector 23 outputs a synthesized image FM which is a set of pixel data of the pixels nearer to the viewing point.
By providing the above-mentioned selector 14 in the display apparatus 1, it is not needed to deduce a stereoscopic structure in the real space when the real space and the virtual space are integrated in one space. That is, by representing the real space image FR and the virtual space image FV with the color information FRc, FVc and the depth information FRd, FVd, the above-mentioned simple circuit can integrate the real space and the virtual space in the level of electrical signals. Such a feature is very useful for an application such as augmented reality which requires real time processing.
In order to apply the concept of Z-key to augmented reality, it is needed to measure distance image in the viewing point coordinate system in real time. For such high speed measurement of distance image, systems such as video-rate stereo machine and a silicon range finder are proposed. However, these systems are not suitable for measuring the distance image because of low resolution or large-scaled size.
Then, in the display apparatus 1, a distance image from the left and right eyes 10E is obtained from the images picked up by the cameras 12 at the positions conjugate to the eyes. That is, the real space distance image FRd is obtained by using two real space images FR picked up by the camera 12 for the left and right eyes.
Four factors of the movements of the image picked up by the cameras 12 are translations and rotations of the head and the object. Generally, in order to construct a head mounted display, it is needed to measure the position of the head in real time. In the display apparatus 1, information on the movement of the head is obtained by a known method. Thus, when the object is stationary, the distance to the object can be calculated uniquely from the movement of the image picked up by the cameras 12.
Next, a method is explained for calculating distance image from the translation of the head by subtracting the rotation of the head from the movement of the image. FIGS. 5A and 5B are diagrams for illustrating cancellation of the rotation of a head. In the coordinate system shown in FIG. 5A having a viewing point (position of the eye) O.sub.1, X and Z1 axes lie on the surface of the paper, while Y axis is normal to the surface. Reference sign R represents a distance between the viewing point and a pixel in a picture II (X1-Y1 plane). The viewing direction is shifted by an angle .theta. from the object P to the left side. It is assumed here that the viewing direction of the observer is changed around Y axis by an angle .alpha. or the observer moves from the coordinate system of the viewing point O.sub.1 to another coordinate system of the viewing point O.sub.2 shown in FIG. 5B, as shown with Z2 axis represented with a dashed line. If the observer observes in a direction opposite to Z1 direction before the movement, the object P will be observed in the picture II (X2-Y2 plane) to be shifted by an angle of (.theta.-.alpha.) to the right side. The length L.sub.h of the shift in the picture II is expressed as follows:
Therefore, the rotation of the head (or the viewing point) can be canceled by translating the pixels by a length L.sub.h determined by Eq. (1). Similarly, rotation around X axis can also be canceled.
This calculation is performed by the depth information generator 212. Thus, the direction of the line of sight does not change irrespectively of the movement of the observer. Then, the distance or depth of the object P from the viewing point can be calculated on the basis of the amount of the movement of the observer and the movement of the pixels accompanied by the movement.
FIG. 6 is a diagram for explaining calculation of the depth accompanied by movement of the head. It is assumed that when the observer is moved by (.DELTA.X, .DELTA.Y, .DELTA.Z), the pixel at (X3, Y3) is moved to (X4, Y4). Then, the depth Z of the object P from the viewing point is calculated in the coordinate system O.sub.4 as follows:
and
Then,
Eqs. (2) assume implicitly that the object P and its image exist in an epipolar plane before and after the movement. Therefore, if the values of Eqs. (3) and (4) are different from each other, it is found that the object P is not fixed.
A case where the observer 10 moves is explained above. However, the viewing point is moved only if the observer 10 rotates the head. Then, the depth can also be calculated in such a case since the eye 10E or the viewing point performs both rotation and translation according to the rotation of the head.
A change in the position or the direction of the head, the viewing point and the line of sight direction can be determined according to the signal S1 received from the position detector 15. The position relation of the head to the eye is known, and it is set beforehand.
In the above-mentioned algorithm, a distance image can be calculated with simple calculations of addition, subtraction, multiplication and division if an optical flow can be calculated. Further, results on the other pixels are not needed in the calculation of the depth. Then, calculation can be omitted for pixels for which the depth calculation is not necessary. Thus, the depth calculation can be performed at high speed, and this feature contributes largely to integrate the real space image FR and the virtual space image FV in an image at high speed.
As explained above, the coordinates of the object P in the viewing point coordinate system has always a predetermined relation to the position of its image. In the display apparatus, the position of the head is detected constantly and the position relation between the head and the eyes 10E is also known. Then, the relation of the viewing point coordinate system before and after the movement can be calculated easily. Therefore, if the correspondence relation of the positions in the images before and after the movement is found, the depths of a pixel from the viewing point before and after the movement can be determined uniquely by using the two conditions.
This is explained for the ease of understanding the invention in a case where the above-mentioned equations are generalized.
First, distance measurement due to a viewing difference in movement is explained. As shown in FIG. 7, when the viewing point is moved from O.sub.1 to O.sub.2, the depth of the object from the viewing point O.sub.2 is calculated by using the images at the viewing points O.sub.1 and O.sub.2 and a transformation matrix T.sup.2.sub.1 between viewing point coordinate systems. In FIG. 7, "R" represents a part of rotation matrix and "t" represents a translation vector of a translation matrix "T". The superscripts "1" and "2" represent before movement and after movement. For example, I.sup.1 represents a pixel before transformation. The subscript "z" represents a component in z direction. For example, X.sub.z represents z component or depth of the coordinate of the object, and t.sub.z represents z component of a translation vector t.
FIG. 8 shows a calculation of the image I of the object by using coordinate value x in the viewing point coordinate system where f denotes focal depth of the camera. Next, the cancellation of the rotation is explained. An image I' is calculated in the viewing angle coordinate system O.sub.1 ' having the same directions of the coordinate axes and the viewing point coordinate system O.sub.2 and having the same origin as the viewing point coordinate system O.sub.1.
and
Then,
By converting the pixel I.sup.1 as shown above, a change in image due to rotation is canceled.
Next, calculation of depth in translation is explained.
and
Then,
Thus, if the pixel I.sub.1, is in correspondence to I.sub.2 is determined, the depth can be calculated by using the above relation.
As explained above, the real space image FR and the virtual space image FV can be integrated in an image at the level of electrical signals by the display apparatus 1. Because the real space distance image FRd is calculated on the basis of the real space image FR, a calculation cost becomes lower than the estimation of three dimensional structure of the real world or the model fitting. Thus, the processing time is shortened and the processing can be performed at high speed. This is advantageous for real time processing.
Further, because the depth information FRd of each pixel is determined by using the pixel data of the real space image FR, position adjustment is not needed between the real space distance image FRd and the virtual space distance image FVd.
Because the real space distance image FRd is determined on the basis of the two real space images FR picked up by one camera 12, it is not needed to search the correspondence between the two images in contrast to a case where two real space images picked up by two cameras are used, and this is advantageous for the search speed.
Further, since the period for picking up the real space image FR by the camera 12 is about a thirtieth second, the amount of the movement of the observer is usually small. Then, the distance between the two images is small, and the vector of the movement in the image is small.
Because the depth measurement is performed with point tracking, the search results on the correspondence around the space can be used easily, Further, the results of previous measurements can also be used easily.
Further, the cameras 12 for picking up the real space image FR and the virtual space image FV and the display section 13 are arranged in the same line as the line of sight of the observer. In other words, three means, that is, the cameras 12 as a pickup means, the cameras 12 as a means for distance measurement, and the display section 13 as a display means are arranged in the same line of sight. Then, the observer 10 can observe the image without feeling unusual.
Because the position detector 15 is used both for the calculating the real space distance image FRd and for supplying the virtual space image FV and the virtual space distance image FVd, the apparatus can be fabricated to have a light weight at a lower cost.
Although the present invention has been fully described in connection with the preferred embodiments thereof with reference to the accompanying drawings, it is to be noted that various changes and modifications are apparent to those skilled in the art. Such changes and modifications are to be understood as included within the scope of the present invention as defined by the appended claims unless they depart therefrom.