This application claims the benefit of Korean Application No. 2001-78255 filed Dec. 11, 2001, in the Korean Intellectual Property Office, the disclosure of which is incorporated herein by reference.
1. Field of the Invention
The present invention generally relates to an apparatus generating a 3-dimensional image from a 2-dimensional image and a method thereof, and more particularly, the invention relates to an apparatus generating a 3-dimensional image by adding a shade in an outlining area of an input 2-dimensional image and a method thereof.
2. Description of the Related Art
The Photoshop, which is marketed by Adobe Systems and widely used around the world, adopts a method of filtering an image in RGB or CIE-Lab format to convert a 2-dimensional image into a 3-dimensional image. According to this method, a user has to manually make adjustments to the direction of illumination and the gains during conversion to a 3-dimensional image, and as a result, there has been a problem that characteristics of the true 2-dimensional image are not represented in the converted 3-dimensional image. Also, although the image can be represented in a 3-dimensional image after the filtering, it is only possible in a black and white image. Meanwhile, the GNU Image Manipulation Program, the graphic tool for LINUX that also employs the same method as that of the Photoshop, is only able to convert a 2-dimensional image in RGB format into the 3-dimensional image.
Rather than converting an original 2-dimensional image into the 3-dimensional image based on the illuminative effect of the original image, the above-mentioned graphic tools create new images from the original image as the user manually selects the illumination direction and gains. Therefore, in case of moving images (moving pictures) the illumination direction and gains have to be adjusted manually for each image, and further, the above-mentioned graphic tools are also not provided with functions like blurring and noise prevention. Accordingly, representation of moving pictures in 3-dimension can be very difficult and not practical using such typical methods.
The present invention has been made to overcome the above-mentioned problems of the related art. Accordingly, an object of the present invention is to provide an apparatus generating a 3-dimensional image from an original 2-dimensional still picture and a moving picture based on illuminative characteristics of the original picture, and a method thereof.
Additional objects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
The present invention may be accomplished by an apparatus generating a 3-dimensional image from a 2-dimensional image comprising a generating unit generating a shading image of an input image by estimating a direction of illumination of the input image; and a combining unit combining the input image with the shading image and outputting the combined image in 3-dimensions.
According to an aspect of the invention, the generating unit includes a filtering unit filtering the input image with a plurality of filters of different orientations, and outputting resultant base shading images respectively corresponding to the filters; a positive value extracting unit extracting a positive pixel value for each of the base shading images; a subtracting unit calculating a difference between the pixel value of the input image and the positive pixel value extracted with respect to each of the base shading images; a median calculating unit calculating a median value of the difference that is calculated with respect to each of the base shading images; and filter selecting unit selecting the filter which outputs the base shading image of a smallest one of the median values, the filtering unit outputting/generating the shading image by filtering the input image with the filter that is selected by the filter selecting unit.
According to an aspect of the invention, the filtering unit includes a filter storing unit storing a plurality of filtering coefficients of different orientations; and a filter unit consecutively filtering the input images with respect to the plurality of the filtering coefficients and outputting the base shading images corresponding to the filtering coefficients, respectively.
According to an aspect of the invention, the generating unit further includes a filter adjusting unit maintaining a previously selected filter if the filter selected by the filter selecting unit with respect to a current input image is different from the previously selected filter and if a difference between a minimum median of the current input image and a minimum median of one or more preceding images is below a predetermined reference value, thereby allowing the apparatus to convert moving 2-dimensional images into moving 3-dimensional images by generating appropriate shading images corresponding to input 2-dimensional images.
According to an aspect of the invention, the filter adjusting unit includes a minimum median storing unit being input with the minimum medians of the current image and the preceding image and storing the input minimum medians; and a comparing unit outputting a control signal to maintain the previously selected filter if the filter selected by the filter selecting unit with respect to the current input image is different from the previously selected filter and if the difference between the minimum median of the current input image and the minimum median of one or more preceding images is below a predetermined reference value.
According to an aspect of the invention, an image quality improving unit is provided improving an image quality of the shading image. The image quality improving unit includes a noise eliminating unit eliminating a noise signal from the shading image; a blurring unit diffusing the shading image output from the eliminating unit; and a gain adjusting unit adjusting a shading correlation value of the shading image.
According to an aspect of the invention, the noise eliminating unit is a filter that eliminates the noise signal generated in a high frequency range of the shading images. The blurring unit is a 5-tap low-pass filter that diffuses the shading images in a horizontal and/or a vertical direction.
According to an aspect of the invention, a mapping unit is provided converting the 3-dimensional image that is not in a range of a displayable color gamut, so that the 3-dimensional image can be placed within the range of the displayable color gamut. The mapping unit converts a brightness and a chroma of the 3-dimensional image into a brightness and a chroma that are closest to an extreme color of the color gamut.
According to another embodiment, the invention may be accomplished by a method of generating a 3-dimensional image from a 2-dimensional image by generating a shading image with respect to an input 2-dimensional image by estimating a direction of illumination of the input image; and combining the input image with the shading image and outputting a resultant 3-dimensional image.
According to an aspect of the invention, generation of the shading image comprises filtering the input image with a plurality of filters of different orientations, and outputting resultant base shading images respectively corresponding to the filters; extracting a positive pixel value of each base shading image; calculating a difference between the pixel value of the input image and the positive pixel value extracted with respect to each base shading image; calculating a median value of the difference that is calculated with respect to each base shading image; selecting a filter which outputs the base shading image of a smallest one of the median values; and outputting/generating the shading image by filtering the input image with the selected filter.
According to an aspect of the invention, the shading image is output by consecutively filtering the input image with respect to the plurality of the filtering coefficients and outputting the base shading images corresponding to the filtering coefficients, respectively.
According to an aspect of the invention, generation of the shading image further comprises maintaining a previously selected filter if the selected filter with respect to a current input image is different from the previously selected filter and if a difference between a minimum median value of the current input image and a minimum median of one or more preceding images is below a predetermined reference value, thereby providing conversion of moving 2-dimensional images into moving 3-dimensional images by generating appropriate shading images corresponding to input 2-dimensional images.
According to an aspect of the invention, generation of the 3-dimensional image further comprises improving an image quality of the shading image, prior to the combining, by eliminating a noise signal from the shading image; diffusing the shading image output from the noise elimination; and adjusting a shading correlation value of the shading image. The noise elimination eliminates the noise signal generated in a high frequency range of the shading image.
According to an aspect of the invention, generation of the 3-dimensional image further comprises converting the 3-dimensional image that is not in a range of a displayable color gamut to a 3-dimensional image than can be within the range of displayable color gamut by converting a brightness and a chroma of the 3-dimensional image into a brightness and a chroma that are closest to an extreme color of the color gamut.
With the apparatus and method of generating a 3-dimensional image from a 2-dimensional image according to the present invention, based on illumination direction of an input 2-dimensional image, a shading image, which is generated by using different filters, is combined with the input image, and as a result, the 3-dimensional image is generated easily. Also, while selecting the filter corresponding to the illumination direction of the input image, since the previously selected filter is put into consideration, the conversion into 3-dimensional images of the moving picture becomes possible.
The above-mentioned objects and other advantages of the present invention will be more apparent by describing the preferred embodiments of the present invention by referring to the appended drawings, in which:
Reference will now be made in detail to the present preferred embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like reference numerals refer to the like elements throughout. The embodiments are described below in order to explain the present invention by referring to the figures.
Referring to
The generating unit 110 estimates direction of illumination from an input 2-dimensional image l(x,y) and generates a shading image Fsel(x,y) with respect to the input image l(x,y).
An example structure of the generating unit 110 is shown in
The filtering unit 200 filters the input image l(x,y) with respect to a plurality of filtering coefficients, and outputs base shading images respectively corresponding to the filtering coefficients (operation 400 in
To maximize realism of a converted 3-dimensional image from a 2-dimensional input image, a filter, which has same orientation as that of illumination direction contained in the input image, has to be selected. The filter unit 204 consecutively selects the filtering coefficients that are stored in the filter storing unit 202, and applies the selected filtering coefficient to the input image, thereby outputting a filtered signal Fi(x,y) (i.e., the base shading images). In a case that the filtering unit 200 is comprised of a plurality of filters 200-1˜200-n, the incoming images can be input to the respective filters 200-1˜200-n consecutively or simultaneously.
The relationship of a base shading image Fi(x,y) with respect to an input image l(x,y) filtered by a 3×3 convolution filter matrix Ei satisfies the following equation 1:
where, (x,y) is the position of a pixel in a vertical and horizontal axes.
The positive value extracting unit 210 outputs positive pixel values for the respective base shading images (operation 405 in
The subtracting unit 220 calculates a difference between pixel values of the input image and positive pixel values that are extracted with respect to the base shading images (operation 410 in
The median calculating unit 230 calculates by the following equation 3 a median Ml of the differences that are calculated with respect to the base shading images:
where, P and Q respectively refer to number of pixels in the horizontal and vertical direction, and Fi,pos refers to a signal output from the positive value extracting unit 210.
The filter selecting unit 240 selects a filtering coefficient or a filter that will output a base shading image with a smallest median Ml (operation 420 in
In case of moving images, the generating unit 110 further includes a filter adjusting unit 250. Often times, during estimation of the illumination direction of the input image, a filter of orientation different from a previous frame is selected due to insertion of text or noise, even when the previous and the following frames are very similar to each other, and this can cause a more serious problem in moving pictures. Also, according to a type of the images, some observers even perceive jittering in the output images. The filter adjusting unit 250 is provided to adaptively deal with such a problem.
Therefore, the filter adjusting unit 250 determines whether to change the filtering coefficient or the filter when the filtering coefficient or the filter that is selected by the filter selecting unit 240 with respect to the current input image is different from the previously selected filtering coefficient or the filter. The filter adjusting unit 250 has a minimum median storing unit 252 and a comparing unit 254. The minimum median storing unit 252 stores a minimum median value Ml with respect to the previous image that is input prior to the current image input from the filter selecting unit 240.
The comparing unit 254 compares the index of the filtering coefficient or the identifying information of the filter that is previously selected for the previous images with the index of the filtering coefficient or the identifying information of the filter that is selected for the current input image (operation 425 in
At operation 445, the filtering unit 200 generates a shading image by filtering the input image with the filtering coefficient of the filter that is determined by the filter adjusting unit 250.
In
In
A shading image Fp(x,y) having an improved image quality through the noise eliminating unit 122 and the blurring unit 124 would satisfy the following equation 4:
Fp(x,y)=Blurring[NPmap[Fsel(x,y)]] Equation 4
In
where, g is a gain ratio.
In
The apparatus and method of generating 3-dimensional images from 2-dimensional images according to the present invention can be applied to all types of images like RGB, YCbCr, YIQ, YUV, CIE-Lab, CIE-LUV images, with an exception that the RGB image is applied with three (3) channels altogether. As for the other images, like the YCbCr image that is represented with the brightness and two colors Cb and Cr, however, the incoming image to the mapping unit 140 can be simply generated with a brightness signal of Y-component or L-component, with an additional requirement for the color components, for example, requirement for colors Cb and Cr for the YCbCr image during the mapping.
With the apparatus and method of generating 3-dimensional images from 2-dimensional images based on illuminative characteristics of input images, a shading image, which closely matches an illuminative characteristic, typically for example the illumination direction, of the input images is generated by using different filters, and the generated shading images are combined with the input images and as a result, 3-dimensional images with appropriate illumination direction are automatically generated easily. Also, while selecting the filter corresponding to the illumination direction of the input images, since the previously selected filter is put into consideration, conversion of moving pictures into 3-dimensional images becomes possible (i.e., the apparatus of the invention can automatically update the shading images based upon a difference in illumination direction of an input image and previous input images).
Although the preferred embodiments of the present invention have been described, it will be understood by those skilled in the art that the present invention is not limited to the described preferred embodiments, but various changes and modifications can be made within the spirit and scope of the present invention as defined by the appended claims and their equivalents.
Number | Date | Country | Kind |
---|---|---|---|
2001-78255 | Dec 2001 | KR | national |
Number | Name | Date | Kind |
---|---|---|---|
4695130 | Medina et al. | Sep 1987 | A |
5072215 | Brotz | Dec 1991 | A |
5136390 | Inova et al. | Aug 1992 | A |
5408537 | Major | Apr 1995 | A |
5500684 | Uya | Mar 1996 | A |
5737031 | Tzidon et al. | Apr 1998 | A |
5831623 | Negishi et al. | Nov 1998 | A |
5993001 | Bursell et al. | Nov 1999 | A |
6016150 | Lengyel et al. | Jan 2000 | A |
6115022 | Mayer et al. | Sep 2000 | A |
6252608 | Snyder et al. | Jun 2001 | B1 |
6342885 | Knittel et al. | Jan 2002 | B1 |
6346967 | Gullichsen et al. | Feb 2002 | B1 |
6441817 | Gossweiler et al. | Aug 2002 | B1 |
6487432 | Slack | Nov 2002 | B2 |
6729546 | Roustaei | May 2004 | B2 |
6757888 | Knutson et al. | Jun 2004 | B1 |
6771264 | Duluk et al. | Aug 2004 | B1 |
7013040 | Shiratani | Mar 2006 | B2 |
Number | Date | Country |
---|---|---|
08-249498 | Sep 1996 | JP |
Number | Date | Country | |
---|---|---|---|
20030108251 A1 | Jun 2003 | US |