Method, apparatus and program for compositing images, and method, apparatus and program for rendering three-dimensional model
AssigneeHonda Motor Co., Ltd.
InventorChiaki Aoyama
Life of this patent
Estimating the term…
Abstract
A three-dimensional (3D) model OB, a plane of projection PL, a light source L and a reference viewpoint O are defined in a virtual space on a computer. When a line of sight LC for tracing from the reference viewpoint O to the 3D model OB and to the light source L is determined, the view point is corrected to be shifted from the reference viewpoint O by a displacement VD for each projection pixel PP, to obtain a proper line of sight LC. Accordingly, a computer-graphics image as thus rendered can be provided to be composited with a picture taken from life by a camera, thereby generating a composite image having a natural impression.
Claims11
A method for compositing a computer-graphics image and a picture taken by a camera comprising:
- defining, in accordance with conditions in which the picture is taken, a three-dimensional model, a viewpoint, and a plane of projection, in a space established on a computer, the conditions comprising at least one of the tilt angle of the camera relative to a ground surface and the position of a light source relative to the camera;
- defining lines of sight extending from the viewpoint to projection pixels on the plane of projection so that each of the lines of sight conforms with a ray of light incident on a pixel corresponding thereto of the picture taken by the camera;
- tracing the lines of sight extending from the viewpoint through the plane of projection and the three-dimensional model to obtain attributes of portions of the three-dimensional model corresponding to the projection pixels, thereby forming a two-dimensional image of the three-dimensional model on the plane of projection;
- and
- superposing the two-dimensional image on the picture to generate a composite image;
- wherein said step of defining lines of sight involves providing a calibration table having first data and second data correlated with each other, the first data comprising positions of pixels of the picture taken by the camera and the second data comprising calibration data corresponding to directions and positions of rays of light incident on the pixels of the picture, wherein the lines of sight are obtained by looking up the second data by the first data in the calibration table.
An apparatus for compositing a computer-graphics image created by rendering a three-dimensional model and a picture taken by a camera, comprising:
- a calibration table storage unit for storing a calibration table having first data and second data correlated with each other, the first data comprising positions of pixels of the picture taken by the camera and the second data comprising directions and positions of rays of light incident on the pixels of the picture corresponding to optical properties of the camera;
- a line-of-sight calculation unit for obtaining lines of sight extending from a viewpoint to the three-dimensional model, based upon the directions and positions of the rays of light incident on the pixels of the picture, obtained by looking up the second data with the first data in the calibration table, so that each of lines of sight passing through projection pixels on a plane of projection conforms with a ray of light incident on a pixel corresponding thereto of the picture taken by the camera;
- a two-dimensional image generation unit for generating a two-dimensional image on the plane of projection from the three-dimensional model by tracing the lines of sight so as to obtain attributes of portions of the three-dimensional model corresponding to the projection pixels on the plane of projection;
- and
- a composite image generation unit for superposing the two-dimensional image on the picture, to generate a composite image.
A program embodied on a computer readable medium for compositing a computer-graphics image and a picture taken by a camera, the program causing a computer to perform the steps of:
- defining, in accordance with conditions in which the picture is taken, a three-dimensional model, a viewpoint, and a plane of projection, in a space established on a computer, the conditions comprising at least one of the tilt angle of the camera relative to a ground surface and the position of a light source relative to the camera;
- defining lines of sight extending from the viewpoint to projection pixels on the plane of projection so that each of the lines of sight conforms with a ray of light incident on a pixel corresponding thereto of the picture taken by the camera;
- tracing the lines of sight extending from the viewpoint through the plane of projection and the three-dimensional model to obtain attributes of portions of the three-dimensional model corresponding to the projection pixels, thereby forming a two-dimensional image of the three-dimensional model on the plane of projection;
- and
- superposing the two-dimensional image on the picture to generate a composite image;
- wherein the step of defining lines of sight involves providing a calibration table having first data and second data correlated with each other, the first data comprising positions of pixels of the picture taken by the camera and the second data comprising calibration data corresponding to directions and positions of rays of light incident on the pixels of the picture, wherein the lines of sight are obtained by looking up the second data by the first data in the calibration table.
A method for rendering a three-dimensional model created by computer graphics into a two-dimensional image to be superposed on a picture taken by a camera to form a composite image, the method comprising:
- defining a viewpoint, and a plane of projection, in a space established on a computer where the three-dimensional model is located in accordance with the conditions in which the picture is taken, the conditions comprising at least one of the tilt angle of the camera relative to a ground surface and the position of a light source relative to the camera;
- defining lines of sight extending from the viewpoint to projection pixels on the plane of projection so that each of the lines of sight conforms with a ray of light incident on a pixel corresponding thereto of the picture taken by the camera;
- tracing the lines of sight extending from the viewpoint through the plane of projection and the three-dimensional model to obtain attributes of portions of the three-dimensional model corresponding to the projection pixels;
- and
- setting the obtained attributes of the portions of the three-dimensional model to the projection pixels corresponding thereto, to form a two-dimensional image of the three-dimensional model on the plane of projection;
- wherein said step of defining lines of sight involves providing a calibration table having first data and second data correlated with each other, the first data comprising positions of pixels of the picture taken by the camera and the second data comprising calibration data corresponding to directions and positions of rays of light incident on the pixels of the picture, wherein the lines of sight are obtained by looking up the second data by the first data in the calibration table.
An apparatus for rendering a three-dimensional model created by computer graphics into a two-dimensional image to be superposed on a picture taken by a camera to form a composite image, the apparatus comprising:
- a calibration table storage unit for storing a calibration table having first data and second data correlated with each other, the first data comprising positions of pixels of the picture taken by the camera and the second data comprising directions and positions of rays of light incident on the pixels of the picture corresponding to optical properties of the camera;
- a line-of-sight calculation unit for obtaining lines of sight extending from a viewpoint to the three-dimensional model, based upon the directions and positions of the rays of light incident on the pixels of the picture, obtained by looking up the second data with the first data in the calibration table, so that each of lines of sight passing through projection pixels on a plane of projection conforms with a ray of light incident on a pixel corresponding thereto of the picture taken by the camera;
- and
- a two-dimensional image generation unit for generating the two-dimensional image on the plane of projection from the three-dimensional model by tracing the lines of sight so as to obtain attributes of portions of the three-dimensional model corresponding to the projection pixels on the plane of projection.
A program embodied on a computer readable medium for rendering a three-dimensional model created by computer graphics into a two-dimensional image to be superposed on a picture taken by a camera to form a composite image, the program causing a computer to perform the steps of:
- defining a viewpoint, and a plane of projection, in a space established on a computer where the three-dimensional model is located in accordance with the conditions in which the picture is taken, the conditions comprising at least one of the tilt angle of the camera relative to a ground surface and the position of a light source relative to the camera;
- defining lines of sight extending from the viewpoint to projection pixels on the plane of projection so that each of the lines of sight conforms with a ray of light incident on a pixel corresponding thereto of the picture taken by the camera;
- tracing the lines of sight extending from the viewpoint through the plane of projection and the three-dimensional model to obtain attributes of portions of the three-dimensional model corresponding to the projection pixels;
- and
- setting the obtained attributes of the portions of the three-dimensional model to the projection pixels corresponding thereto, to form a two-dimensional image of the three-dimensional model on the plane of projection;
- wherein said step of defining lines of sight involves providing a calibration table having first data and second data correlated with each other, the first data comprising positions of pixels of the picture taken by the camera and the second data comprising calibration data corresponding to directions and positions of rays of light incident on the pixels of the picture, wherein the lines of sight are obtained by looking up the second data by the first data in the calibration table.
Dependencies are inferred from the claim text.