Information
-
Patent Application
-
20030185461
-
Publication Number
20030185461
-
Date Filed
March 27, 200321 years ago
-
Date Published
October 02, 200321 years ago
-
Inventors
-
Original Assignees
-
CPC
-
US Classifications
-
International Classifications
Abstract
In the present invention, when a CG object is overlapped onto a photographed real scenery image as a background and an image of a photographed real photographic subject is synthesized in front of the overlapped image, an image in which the photographed real background and the photographic subject are photo-taken simultaneously without photo-taking the photographed real background and the photographic subject independently is synthesized with CG. In the present invention, the photographed real image including a specific image is acquired, and area information representing an area of the specific image from the photographed real image, and an area other than the area of the specific image of the photographed real image is synthesized with a computer graphics image by using the area information detected.
Description
BACKGROUND OF THE INVENTION
[0001] 1. Field of the Invention
[0002] The present invention relates to a technique in which a photographed real image and computer graphics are synthesized so that a specific image of the photographed real image is made as a foreground image.
[0003] 2. Related Background Art
[0004] In the past, in the field of image production such as a television program, a method in which a specific area is cut down out of a live image from a video camera by using a chromakey method and such an area is synthesized with an image obtained by computer graphic has been used.
[0005] Now, such a method will be explained with reference to FIG. 1.
[0006] In the conventional chromakey synthesis, a photographic subject 103 is arranged in front of a screen 102 (hereinafter, referred as “blue back” regardless of color) having a specific color which is almost not included in the photographic subject 103 (generally, sharp blue or green color) and a photographed real image is acquired by a camera as a foreground image 101.
[0007] Then, from the foreground image 101, a key image 106 is generated by using the color of the blue back 102 as a reference. The key image is information for cutting down the area of the photographic subject 103 included in the foreground image 101, and, as can be seen from FIG. 1, a value for distinguishing the background from the photographic subject is set for each pixel unit.
[0008] On the other hand, a background image 104 is an image such as a still image, a video moving image or computer graphic and, different from the photo-taking of the foreground image 101, the usage of the blue back is not required in the background image.
[0009] Image synthesis processing 107 is represented by the following equation. That is to say, in the key image, for example, a value of the area of the photographic subject is shown as 1 and a value of the area of the background is shown as 0. It is assumed that a symbol for representing a pixel value of the key image is K, a pixel value for representing the foreground image is F, a pixel value for representing the background image is B and a pixel value for representing an output image is C. In this case,
If K=0, then, C=B, and
If K=1, then, C=F (equation 1).
[0010] By such image synthesis processing 107, an image 108 in which the photographic image 103 of the foreground image 101 is overlapped onto the background image 104 is generated.
[0011] As shown in FIG. 2, it is assumed that virtual interior of a car such as a CG steering wheel 204 is overlapped onto a photographed real scenery image 203 as the background and a photographed real hand image 202 is synthesized as the foreground thereof.
[0012] In the above-mentioned conventional example, as shown in FIG. 1, only the foreground image 101 and background image 104 were considered and synthesis of three images as shown in FIG. 2 was not considered.
[0013] If the image shown in FIG. 2 is generated by using the conventional technique, as shown in FIG. 3, the background image 203, CG steering wheel 204, CG inside car and photographed real hand image 202 must be prepared independently. In the conventional chromakey processing, the blue back 102 is required in order to photo-take the photographic subject 103 as the foreground, and, thus, the photographic subject cannot be photo-taken simultaneously with the background image.
[0014] A problem in FIG. 3 is that, since the photographed real background image 203 and the photographed real hand image 202 are photo-taken by different cameras, if orientations and positions of the respective cameras are changed, a positional relationship is deviated, and, thus, a natural synthesized image cannot be obtained.
SUMMARY OF THE INVENTION
[0015] The present invention is made in consideration of the above problem, and an object of the present invention is to provide a synthesized image which is obtained from a photographed real image including a specific image and a computer graphics image and in which a photographed real image other than the specific image is used as a background and the computer graphics image and the specific image are used as a foreground and in which the respective images have proper positional relationships and are seemed to be natural.
[0016] For example, in the example shown in FIG. 2, the photographed real background 203 and the photographed real hand image 202 are made to have the proper positional relationship, and the photographed real background 203, the photographed real hand image 202 and the CG steering wheel can be synthesized with a correct front-and-rear relationship.
[0017] To achieve the above object, the present invention has the following construction.
[0018] The present invention provides an information processing method for synthesizing a photographed real image including a specific image and a computer graphics image so that a photographed real image other than the specific image is used as a background and the computer graphics image and the specific image are used as a foreground and comprising the steps of acquiring the photographed real image including the specific image, detecting area information representing an area of the specific image from the photographed real image, and generating a synthesized image in which an image of an area other than an area of the specific image is used as a background and the computer graphics image and the specific image are used as a foreground, by synthesizing the computer graphics image by using the area information with respect to the area other than the area of the specific image of the photographed real image.
[0019] The other objects and features of the present invention will be apparent from the following detailed explanation of the invention.
BRIEF DESCRIPTION OF THE DRAWINGS
[0020]
FIG. 1 is a view for explaining an example of conventional chromakey synthesis;
[0021]
FIG. 2 is a view for showing an example of a synthesized image of interest;
[0022]
FIG. 3 is a view for explaining the conventional chromakey synthesis;
[0023]
FIG. 4 is a view for explaining synthesis processing according to an embodiment of the present invention;
[0024]
FIG. 5 is a view for showing a construction to explain data flow according to the present invention.
[0025]
FIG. 6 is a view for showing a utilizing fashion;
[0026]
FIG. 7 is a view for explaining extraction of a photographic subject area;
[0027]
FIG. 8 is a view for explaining a description of color information in a YCbCr color indicating system;
[0028]
FIG. 9 is a view for showing a distribution example of color information of a photographic subject in the YCbCr color indicating system;
[0029]
FIG. 10 is a flow chart for explaining photographic subject area extraction processing; and
[0030]
FIG. 11 is a flow chart for explaining a flow if image synthesis processing.
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0031] Now, an embodiment of the present invention will be explained with reference to the accompanying drawings.
[0032] This embodiment has an object for generating a synthesized image 201 from a photographed real image 401 including both a background and a photographic subject, and a CG image 204, as shown in FIG. 4.
[0033]
FIG. 5 is a view for showing a construction of an image synthesizing apparatus according to this embodiment. FIG. 6 is a view for explaining a utilizing fashion of the image synthesizing apparatus according to this embodiment.
[0034] A user 601 wears an image display apparatus 509 of head mounting type (referred to as “HMD” hereinafter) which is a display apparatus for synthesizing a photographed image and CG and for display a synthesized image on his head 603 and is sitting on a chair 602. Further, the user may take any posture other than the sitting posture.
[0035] In the illustrated embodiment, the photographic subject to be used as the foreground is a hand 604 of the user 601 and a real object to be used as the background is walls, a potted plant and the like 605.
[0036] A small video camera 501 is secured to the HMD 509 in the vicinity of eyes so that a shooting direction of the camera coincides with a viewing direction of the user. Further, a signal of an image photo-taken by the video camera 501 is processed by an image input unit 502 and is then supplied to a photographic subject area extraction unit 503 (described later) and an image composition unit 508 (described later) as digital image data and is then synthesized with the CG to be displayed on the HMD 509 worn on the user.
[0037] A camera position posture sensor 504, for example, comprised of a magnetic sensor is mounted to the HMD 509. An output signal from the camera position posture sensor 504 is inputted to a camera position posture measurement unit 505, thereby guessing a position and a posture of the camera. Any preferred means such as an optical sensor, an ultrasonic sensor, a mechanical sensor and the like may be selected voluntarily as the camera position posture sensor 504 in consideration of application.
[0038] The photographic subject area extraction unit 503 serves to compare color information of each pixel of the image data supplied from the image input unit 502 with color information of the photographic subject registered in a photographic subject color information registration unit 510 and to judge that the pixel is in an area of the photographic subject if the former information coincides with the latter information. Regarding a result of judgment whether each pixel is included in the photographic subject or not, for example, values are assigned so that the value becomes 1 if the pixel is included in the photographic subject and the value becomes 0 if the pixel is not included in the photographic subject, and such a result is supplied to the image composition unit 508 in the form of image data.
[0039]
FIG. 7 is a view for explaining extraction of the photographic subject area. The photographed real image 401 is an example of an image observed from the video camera 501 in FIG. 6. In the photographed real image 401, the user 601 is trying to observe his hands through the video camera 501, and the hand as the photographic subject to be used as the foreground are being observed, together with the real scenery image to be used as the background.
[0040] The color information of the hand 604 as the photographic subject is previously registered in the photographic subject color information registration unit 510, and the color information for each pixel of the photographed real image 401 is compared with the color information of the photographic subject, thereby generating an image in which the value of the pixel becomes 1 if the pixel is included in the photographic subject area and the value of the pixel becomes 0 if the pixel is not included in the photographic subject area. A photographic subject area image 701 is an image generated by analyzing the photographed real image 401 in this way, and a white area indicates the area of the hands as the photographic subject.
[0041] The color information used in the photographic subject area extraction unit 503 and the photographic subject color information registration unit 510 can be described as coordinate values in a multi-dimensional color space. Various kinds of color systems are generally well known such as RGB, YIQ, YCbCr, YUV, HSV, Lu*v*, La*b* and the like (JIS Color Handbook published by Nippon Kikaku Kyokai (Japan Standard Association)).
[0042] Although any appropriate color system may be used in accordance with the color property of the photographic subject of interest, in the illustrated embodiment, it is desirable that a color system of the type which can be divided into luminance information and color phase information in order to cancel the change in the color property of the photographic subject due to difference in an illuminating condition is used and the color phase information alone is utilized. Such a color system is generally represented by YIQ or YCbCr. In the illustrated embodiment, a YCbCr color system is used.
[0043]
FIG. 8 schematically shows color distribution in a CbCr plane of the YCbCr color system. The abscissa 801 indicates Cb and the ordinate 802 indicates Cr. A central part 803 is a white area. Color saturation is increased from the central part toward a peripheral part. FIG. 9 shows an example in which the color information of the photographic subject is expressed as color space coordinate distribution 901 in the CbCr plane of the YCbCr color system.
[0044] Although it is desirable that the color information of the photographic subject is not included in the color information of the background, it can be considered that it is difficult to distinguish the photographic subject from the background by color in dependence upon conditions. In such a case, a reasonable or convenient color may be assigned to the photographic subject, for example, by wearing colored gloves on the hands.
[0045] As a method for registering the color information in the photographic subject color information registration unit 510, a method in which an image is acquired by observing the photographic subject by means of a camera and respective pixel values are described as distribution in the CbCr plane and then coordinate ranges of respective axes of the color space are designated or a method (so-called look-up table) in which respective axes of the color space are formed as a specimen and values indicating whether respective points on the axes are included in the photographic subject or not may be used.
[0046] Next, processing in the photographic subject area extraction unit 503 will be explained with reference to FIG. 10. Processing shown in FIG. 10 is performed with respect to each pixel of the image data supplied from the image input unit 502, thereby extracting the area of the photographic subject.
[0047] First of all, in a step 1001, an RGB value of the image coordinate (i, j) is converted into YCbCr style, thereby converting into a coordinate value (cb, cr) in the CbCr plane.
[0048] In a step 1002, the color distribution 901 of the photographic subject registered in the photographic subject color information registration unit 510 is referred to by using the coordinate value (cb, cr) in the CbCr plane as input, thereby judging whether inputted color is included in the area of the color distribution of the photographic subject or not. Regarding a judged result, for example, a binary code is used. Namely, if the color is included in the photographic subject color distribution 901, the value is indicated as 1, and, if not included, the value is indicated as 0. Alternately, the judged result may be expressed by probable distribution using continuous values from 0 to 1.
[0049] In the illustrated embodiment, while an example that the image data supplied from the image input unit 502 is described in the RGB style was explained, the image data may be described by YIQ or YUV. In this case, the step 1001 is omitted, and, the same effect can be obtained by inputting a coordinate value of an IQ or UV space to (Cb, Cr) in the step 1002.
[0050] In the image generation unit 506, by using information regarding three-dimensional position and posture of the camera supplied from the camera position posture measurement unit 505, a three-dimensional CG image is generated by using geometrical information of a CG model and attribution information of color and/or texture and illumination information, in correspondence to the image photo-taken by the video camera 501. Since the generation of the three-dimensional CG image is well known, explanation thereof will be omitted.
[0051] In the image composition unit 508, by using the photographic subject area image 701 supplied from the photographic subject area extraction unit 503, the target synthesized image 201 is generated from the photographed real image 401 supplied from the image input unit 502 and the Cg image 204 supplied from the image generation unit 506.
[0052] Now, the image synthesized processing in the image composition unit 508 will be explained with reference to FIG. 11. In a step 1101, the photographed real image 401 is transmitted to a frame buffer as an image memory for displaying the image. In a step 1102, the photographic subject area image 701 generated in the photographic subject area extraction unit 510 is transmitted to a stencil buffer as an image memory for mask processing.
[0053] In a step 1103, the CG image 204 is generated, and, regarding the pixel of each of coordinates (i, j) constituting the generated CG image, the following descriptions are expressed in the frame buffer by referring a value Stencil (i, j) in the stencil buffer. That is to say,
[0054] If Stencil (i, j)=1, i.e. if the pixel real (i, j) in the photographed real image is included in the photographic subject area, the corresponding pixel buffer (i, j) in the frame buffer is not updated.
[0055] On the other hand, if Stencil (i, j)=0, i.e. if the pixel real (i, j) in the photographed real image is not included in the photographic subject area, the value of buffer (i, j) is substituted for the pixel value cgi (i, j) of the CG image.
[0056] As a result, in the photographic subject area, the pixel value of the photographed real image is always written in the frame buffer, and, in the area other than the photographic subject area, only regarding the portion with which the CG is overlapped, the pixel value of the CG image is written in the frame buffer. Further, regarding the area which is not the photographic subject area and with which CG is not overlapped, the photographed real image is written in the frame buffer.
[0057] In this way, in the image synthesis processing according to the illustrated embodiment, the drawing of the CG image in the frame memory in which the photographed real image is written is controlled by using the photographic subject area image 701 held in the stencil buffer as mask data. According to the illustrated embodiment, the synthesis processing can be performed at a high speed.
[0058] Further, the user who wears the display apparatus of head mounting type can observe the CG virtual object in the real space as the background, as is in the synthesized image 201 shown in FIG. 2, and can see a condition that his hands are disposed in front of the virtual image.
[0059] Further, since the photographic subject (specific image) and the photographed real scenery image (photographed real image other than the specific image) can be photo-taken by the same video camera, the positional relationship between the photographic subject and the photographed real scenery image can be prevented from being deviated. Further, since the CG image is generated and synthesized in accordance with the output of the camera position posture sensor, the proper positional relationship between the CG image and the photographed real image can be maintained.
[0060] In this way, according to the illustrated embodiment, from the photographed real image including the specific image and the computer graphics image, the synthesized image in which the photographed real image other than the specific image is used as the background and the computer graphics image and the specific image are used as the foreground can be generated so that the respective images have proper positional relationships and are seemed to be natural.
[0061] (Other Embodiments)
[0062] It should be noted that the object of the above-mentioned embodiment can be achieved by supplying a storing medium (or a recording medium) storing a program code of software for realizing the function of the above-mentioned embodiment to a system or an apparatus and by reading out and executing the program code stored in the storing medium by means of a computer (or CPU or MPU) of the system or the apparatus.
[0063] In this case, the program code itself read out from the storing medium realizes the function of the above-mentioned embodiment, and the storing medium storing the program code constitutes the above-mentioned embodiment.
[0064] Further, it should be noted that the present invention includes a concept that, by executing the program code read out by the computer, not only the function of the above-mentioned embodiment is realized, but also the function of the above-mentioned embodiment is realized by executing actual processing partially or totally by means of an operating system (OS) working on the computer on the basis of instruction of the program code.
[0065] Further, it should be noted that the present invention includes a concept that actual processing is executed partially or totally by a CPU of a function expansion card inserted into the computer or of a function expansion unit connected to the computer on the basis of the program code read out from the storing medium, thereby realizing the function of the above-mentioned embodiment.
[0066] When the above-mentioned embodiments are applied to the storing medium, the storing medium stores a program code corresponding to a part or all of the block diagram and the flow charts (shown in FIG. 5 and FIGS. 10 and 11).
Claims
- 1. An information processing method for synthesizing a photographed real image including a specific image and a computer graphics image so that a photographed real image other than the specific image is used as a background and the computer graphics image and the specific image are used as a foreground, comprising the steps of:
acquiring the photographed real image including the specific image; detecting area information representing an area of the specific image from the photographed real image; and generating a synthesized image in which an image of an area other than an area of the specific image is used as a background and the computer graphics image and the specific image are used as a foreground, by synthesizing the computer graphics image by using the area information with respect to the area other than the area of the specific image of the photographed real image.
- 2. An information processing method according to claim 1, wherein the photographed real image is photo-taken by a photo-taking unit at an actual time.
- 3. An information processing method according to claim 1, further comprising:
acquiring positional information of said photo-taking unit; and generating the computer graphics in accordance with the positional information.
- 4. An information processing method according to claim 1, wherein the area information is sought by comparing color information of each pixel of the photographed real image with set color information of the specific image.
- 5. A program for realizing an information processing method according to claim 1.
- 6. An information processing apparatus for synthesizing and displaying so that a photographed real scenery image is used as a background and computer graphics and a photographed real photographic subject are used as a foreground, comprising:
a photo-taking unit for photo-taking a photographed real image at an actual time; a position posture measurement unit for measuring position and rotation information of said photo-taking unit; a computer graphics image generation unit for generating a computer graphics image; a detection unit for detecting a photographic subject area from the photographed real image; an image composition unit for overlapping the computer graphics image with only an area other than the photographic subject area of the photographed real image on the basis of the photographic subject area detected; and an image displaying unit for displaying a synthesized image outputted from said image composition unit.
- 7. An information processing apparatus according to claim 6, wherein said image display unit is a head mounting type display.
- 8. An information processing apparatus according to claim 6, wherein said photo-taking unit and said position posture measurement unit are secured.
Priority Claims (1)
Number |
Date |
Country |
Kind |
2002-095535 |
Mar 2002 |
JP |
|