This application is the U.S. National Phase under 35 U.S.C. §371 of International Application No. PCT/KR2008/001078 entitled RECONSTRUCTING THREE DIMENSIONAL OIL PAINTINGS, filed Feb. 25, 2008, designating the U.S. and published in English on Sep. 4, 2008 as WO 2008/105606, which claims priority under 35 U.S.C. §119(a)-(d) to Korean Patent Application No. KR1020070019095, filed Feb. 26, 2007. The content of these applications are incorporated herein by reference in their entireties.
The present disclosure relates to image processing and, more particularly, reconstructing three-dimensional image data from two-dimensional images.
Oil paintings are usually considered to be two dimensional (2D) images. On closer inspection, however, oil paintings typically contain many brushstrokes, each of which is unique from the other brushstrokes. For example, each brushstroke is characterized by a unique height and color, and creates a unique texture effect according to the oil color thickness of the individual brushstroke. Therefore, oil paintings can be considered three dimensional (3D) structures having various texture effects.
The difference between the brushstrokes is in the height of the brushstrokes, which is caused from the thickness difference of the oil colors. This difference can be very small. Typically, laser scanners are used to obtain high resolution 3D data of a 3D structure having texture effects. However, even high resolution laser scanners may not provide sufficient resolution to adequately represent 3D structures of oil paintings that have very minute texture effects.
With regard to image processing, 3D oil painting reconstruction is related to artistic filters, in which various painting styles, including oil, watercolor, and line art renderings are synthesized based on either digitally filtered or scanned real-world examples. Work has been done in creating artistic styles by computer, often referred to as non-photorealistic rendering. Most of these works have been related to a specific rendering style. In various conventional image analogy techniques, a user presents two source images with the same content which are aligned, but with two different styles. Given a new input image in one of the above styles, the mapping from an input image to an aligned image of the same scene in a different style is estimated. The aligned image pair with the same scene but in a different image style, however, is often unavailable.
In another conventional technique, for a given input image, only one source image of an unrelated scene that contains the appropriate style is required. In this case, the unknown mapping between the images is inferred by Bayesian technique based on belief propagation and expectation maximization. These conventional techniques, however, have been typically limited to 2-dimensional image construction in which only limited types of texture effects were reconstructed.
The present disclosure provides techniques for generating three dimensional image data with brushstroke effects from a two dimensional image. Brushstroke pattern data is obtained from sample brushstrokes and the pattern data is used to form three dimensional mesh data. The brushstroke pattern data is then applied to the three dimensional mesh data. Accordingly, any two dimensional image can be effectively and efficiently transformed into a three dimensional image having brushstroke effects.
In one embodiment, a method for generating three dimensional image data with brushstroke effects from a two dimensional image includes generating one or more three dimensional brushstroke patterns from at least one brushstroke. A two dimensional image is partitioned into one or more color regions. For each color region, each three dimensional brushstroke pattern is transformed to obtain a brushstroke effect. Each transformed, three dimensional brushstroke pattern is then applied to each color region to generate a three dimensional image data having the brushstroke effect.
In another embodiment, a method for reconstructing three dimensional image data with brushstroke effects from a two dimensional image includes: (i) segmenting a two dimensional image into one or more color regions; (ii) generating three dimensional brushstroke pattern data of at least one sample brushstroke; (iii) for each color region, transforming the three dimensional brushstroke pattern data to generate a deformed 3-dimensional brushstroke pattern data; and (iv) applying the transformed three dimensional brushstroke pattern data to each color region to generate a three dimensional image data.
In still another embodiment, a method for generating three dimensional image data with brushstroke effects from a two dimensional image is provided. In this method, one or more three dimensional brushstroke patterns are generated from at least one brushstrokes. A two dimensional image is partitioned into one or more color regions. Then for each color region, each three dimensional brushstroke pattern is transformed to obtain a brushstroke effect and a mesh data is obtained to generate a brushstroke image to be mapped to the mesh data. The brushstroke image is then to the mesh data to generate a three dimensional image data having the brushstroke effect.
In yet another embodiment, a computer readable medium storing instructions causing a computer program to execute the method for generating three dimensional image data with brushstroke effects from a two dimensional image is provided.
In the following description, numerous specific details are set forth. It will be apparent, however, that the described embodiments may be practiced without some or all of these specific details. In other instances, well known process operations have not been described in detail in order not to unnecessarily obscure the present disclosure.
In this configuration, controller 112 controls the operation of camera 104 and the position of light source 106. Light source 106 provides light in different directions under the control of controller 112 to form reflected images 102 of real 3D brushstrokes in accordance with a photometric stereo method using a hybrid reflection model. Camera 104 captures images 102 such as 3D brushstrokes and 2D paintings under the control of controller 112. In an alternative embodiment, any apparatus such as a scanner that is capable of obtaining 2D or 3D data from real objects or images may be used instead of camera 104. Storage device 116 is a mass storage device such as an optical disk, a hard disk drive, etc., and stores computer instructions implementing one or more methods for reconstructing 3D data with brushstroke effects. The instructions may be loaded into memory 120 (e.g., RAM) and provided to CPU 118, which may execute the computer instructions for reconstructing 3D data with brushstroke effects.
According to one embodiment, N images for each brushstroke among several sample brushstrokes are obtained by using light source 106 and camera 104 under the control of controller 112. The N images are used to obtain brushstroke pattern data for the sample brushstrokes by using a photometric stereo method using a hybrid reflection model as described in
Brushstrokes are real 3D objects having distinct shape, height and texture effects. Considering that real oil paintings include a large number of different brushstrokes, obtaining as much brushstroke pattern data as possible is helpful to reconstruct 3-D data with texture effects. However, for the sake of efficiency in the image processing, the perspective transformation is iteratively performed to generate various brushstroke pattern data from the pattern data of a few sample brushstrokes. The number of sample brushstrokes may be determined by various factors including, for example, the size of the input image, the sample brushstroke and the segment formed by the color segmentation. For example, even one or two sample brushstrokes may provide sufficient oil painting texture effects through proper perspective transformation. The number of sample brushstrokes may also be selected to represent a painter's brushstroke style. For a more realistic 3-D reconstruction, real brushstrokes of known painters may be selected as sample brushstrokes.
Before explaining the photometric stereo method illustrated in
In general, reflected light includes both diffuse reflection components and specular reflection components. In the hybrid reflection model in accordance with one embodiment, the diffuse reflection components may be approximated by using the Lambertian model, and the specular reflection components may be approximated by using the Torrance-sparrow model.
Under the image construction model of
where ρD is a diffuse reflection albedo, ρS is a specular reflection albedo, k is a texture parameter of the surface, and θ=cos−1({right arrow over (h)}·{right arrow over (h)}) is an angle (rad) between vectors n and h. In the hybrid model, variables n, ρD, ρS and k are estimated to determine the diffuse reflection surface value and the specular reflection surface value by using error indexes from N different images of one sample brushstroke.
For error estimation, an error index is defined in terms of radiance of N images, the hybrid reflection model, and mathematical stability of the estimated values, as follows:
where Ik is a k-th input image, IkD, IkS are diffuse reflection image and specular reflection image of the k-th input image, respectively, Îk, ÎkD, ÎkS are reconstructed images, and ED and ES are diffuse reflection error and specular reflection error, respectively. The weighting values wD and wS in the error index equation are defined as follows:
wD(x,y)=(1−a(x,y))·wMD(x,y)·wSD(x,y),
wS(x,y)=wMS(x,y), [Equation 4]
where wMD and wMS are weighting factors reflecting estimation error and quantization errors, and are constant values if it is assumed that quantization effect is uniformly applied to whole regions, and wSD is a weighting factor defined based on the stability of the estimation of image construction variables and is obtained from the phase of the estimated image construction variables on a PQ map.
There are two methods for obtaining the PQ map for the Lambertian surface from three input images: one method obtains the PQ map on the assumption that albedo of the surface is known, and the other method obtains PQ map and albedo without knowing the albedo of the surface. In the techniques described herein, the latter method is applied. However, the described techniques may also be implemented using the former method. Generally, radiance Li (i=1, 2, 3) on the assumption of the Lambertian surface is given by:
Li=Eiρ(si·n), i=1,2,3,
si=[stx,sty,stz]T,
n=[nx,ny,nz]T. [Equation 5]
where Ei is a radiance of the i-th light source, si is a unit positional vector of the light source and n is a unit normal vector. Equation 5 can be expressed in vector form:
If E1=E2=E3, Equation 6 may be expressed as follows:
L=EρSn. [Equation 7]
From Equation 7, the normal vector n is given as follows:
From Equation 8, surface gradients p and q may be obtained as follows:
Assuming that errors ε1, ε2, ε3 are given, from Equation 7, the following equation may be obtained:
From Equation 10, error vector e is given by:
where the magnitude of the error vector e is given as follows:
If the condition value (Δcond) is defined as the determinant of the directional vector S, the condition value is given as follows:
Δcond=|S|=det(S). [Equation 13]
If the condition value (Δcond) is small, this means that the positions of the three light sources are linearly dependent and that a correct solution cannot be obtained because the magnitude of the error vector becomes large in Equation 12. Thus, any three images with different light sources whose condition value (Δcond) is smaller than a predetermined value are referred to as “ill-conditioned light source pair,” and is excluded from the estimation of the image construction variables. If all of the light source pairs that play a role in determining the diffuse reflection components at pixel (x, y) are represented as Sp(x,y), the weighting factor wSD is given by:
The error index E can be obtained from Equations 3, 4 and 14. By estimating the image construction variables that make the error index E to be minimum, the reflection characteristic of the brushstroke and image construction can be determined. However, due to the difficulty in obtaining an optimal solution from Equation 3 that is non-linear, the error index E is minimized step-by-step in Equation 3 and the estimated image construction variables are repeatedly updated. In this process, the diffuse reflection image is obtained from the input image and the specular reflection image is separated by using the diffuse reflection image subtracted from the original image. In addition, the normal vector of the surface and diffuse reflection albedo are estimated. In this manner, the image construction variables related to the diffuse reflection image obtained by separating the specular reflection image and the diffuse error (ED) in Equation 3 is minimized. The remaining image construction variables are estimated so that the specular reflection error (ES) is minimized.
In block 208, the normal vectors (n) for the respective pixels are estimated and the shadowed regions are separated from the distribution of the normal vectors (n). Given a pixel (x, y), an average vector nm (x, y) of the normal vectors are obtained from the image pairs for the pixel (x, y) and a variance nσ(x, y). If the variance nσ(x, y) is smaller than a specific threshold, the average vector nm(x, y) is estimated to be the normal vector of the pixel surface. If the variance nσ(x, y) is larger than a specific threshold, the average vector is repeatedly calculated by excluding the vectors that are far apart from the average, until the variance converges. The threshold may be determined by sensor noise. Using the estimated normal vectors (n), the weighting factor (wSD) in Equation 14 is obtained. If the weighting factor is too large, the normal vector n is calculated again for a specific pixel by excluding the component generating a large value in the weighting, factor. In addition, diffuse reflection albedo ρD and the normal vector n related to the diffuse reflection are estimated in block 208.
In decision block 210, if a minimum error in diffuse reflection is not obtained, method 200 loops to block 206 to obtain a minimum error in diffuse reflection, for example by using Equation 4. If, in decision block 210, a minimum error in diffuse reflection is obtained, method 200 continues at block 212. In block 212 the diffuse reflection image (IkD) is obtained by using the diffuse reflection albedo ρD and the normal vector n related to the diffuse reflection components obtained in block 208.
In block 214, the specular reflection image (IkS) is obtained as follows:
IkS=Ik−IkD, [Equation 15]
As shown above in Equation 2, the radiance of the specular reflection image LS is given by:
Applying logarithm to Equation 16, the following equation is obtained:
ln LS+ln v·n=ln ρS−kθ2,
A=ρS′−kB, [Equation 17]
where A=ln LS+ln v·n, ρS′=ln ρS, B=θ2.
In Equation 17, A and B are known values. Accordingly, in block 216, ρS′ and k can be obtained by using the least square algorithm for each pixel if more than two values of A and B are given. In block 218, 3D data on the sample brushstroke is generated by synthesizing the diffuse reflection image and the specular reflection image.
Through the above-explained operations, the 3D data of sample brushstroke patterns are obtained.
In block 1004, a 2D image to be 3-dimensionally reconstructed is captured and received from camera 104. In block 1006, a color segmentation is performed to partition the 2D image into different color regions. Because a typical brushstroke in an oil painting contains one color, a region covered by a brushstroke can be drawn by a single color. Accordingly, in one embodiment, it is assumed that brushstrokes exist inside the boundaries of color regions and there are no brushstrokes crossing the boundary of two different color regions. However, it is noted that the boundaries of color segments may be suitably determined by selecting the appropriate color segmentation parameters. Thus, different 3D reconstruction results for the same input image may be obtained by selecting the color segmentation parameters. For example, the color segmentation parameters may be selected to represent characteristic styles of the artists. The color segmentation (block 1006) is applied to the 2-D input image to extract the homogeneous color regions. In this operation, any conventional color segmentation technique in the image processing field may be used for dividing the input image into a plurality of regions according the colors of the regions. An example of a suitable and commercially available product is the Edge Detection and Image Segmentation (EDISON) System, which uses mean shift based image segmentation.
In one embodiment, for each color region obtained in block 1006, each 3D sample brushstroke obtained in block 1002 is transformed or deformed using, for example, random linear and/or non-linear perspective transformation. An example transformation is given by the following perspective transformation equation:
where x is a 3×3 matrix indicating the position (i.e., x, y and z position) of a point to be processed, A is a 2×2 non-singular matrix, t is a translation 2-vector, v (v1, v2)T is a variable vector adjusting the extent of the transformation, and v is a scaling factor. In order to avoid excessive transformation or deformation of brushstroke patterns, linear enlargement of the brushstroke patterns may be limited to α or 1/α times, where α may range between, but not limited to, 1.5-2.
Matrix A is an affine matrix which applies two fundamental transformations, namely rotations and non-isotropic scaling such as non-linear distortion. Affine matrix A can be decomposed as follows:
A=R(θ)R(−φ)DR(φ) [Equation 19]
where R(θ) and R(φ) are rotations by angles θ and φ, respectively, and defined as follows:
and where D is a diagonal matrix defined as follows:
where λ1 and λ2 are scaling factors in the rotated x and y directions, respectively.
Referring again to
In one embodiment, 3-D structures with brushstroke effects are reconstructed (block 1052) by using gradient mapping. The gradient map for each brushstroke pattern is obtained in photometric stereo method 200, as explained above with reference to
In one embodiment, the luminance mapping operation (block 1054) is performed based on the HSI (hue, saturation, intensity) color model. The HSI color model decouples the intensity component from the color-carrying information (hue and saturation) in a color image. For example, human eyes are typically more sensitive to changes in the luminance channel than to changes in color difference channels. Thus, luminance remapping is used to apply the brushstroke effect. In luminance mapping, after processing in luminance space, the color of the output image can be recovered by copying the H and S channels of the input image into the output image. In one embodiment, the albedo value of the diffuse reflection component in the brushstroke patterns acquired by photometric stereo is used to transform the intensity value of the area where each brushstroke pattern is applied. For example, if yi is the intensity value on a pixel in the area where each brushstroke pattern is applied, and yp is the intensity value on the corresponding pixel in the brushstroke pattern to be applied, then yi may be remapped as follows:
yi←yi+α(yp−μp) [Equation 22]
where μp is the mean intensity values of the brushstroke pattern image, and α is a scaling factor. When the gradient mapping and luminance mapping-operations are completed, 3D image with brushstroke effect may be generated by applying the luminance map to mesh data (block 1056).
Referring again to
After sufficient iterations, 3-D reconstructed data with texture effects as well as 2-D image of the 3-D structure in one direction is obtained.
Specifically,
From the foregoing, it will be appreciated that specific embodiments of the invention have been described herein for purposes of illustration, but that various modifications may be made without deviating from the spirit and scope of the invention. Accordingly, the invention is not limited except as by the appended claims.
Number | Date | Country | Kind |
---|---|---|---|
10-2007-0019095 | Feb 2007 | KR | national |
Filing Document | Filing Date | Country | Kind | 371c Date |
---|---|---|---|---|
PCT/KR2008/001078 | 2/25/2008 | WO | 00 | 10/29/2009 |
Publishing Document | Publishing Date | Country | Kind |
---|---|---|---|
WO2008/105606 | 9/4/2008 | WO | A |
Number | Name | Date | Kind |
---|---|---|---|
4888713 | Falk | Dec 1989 | A |
5687304 | Kiss | Nov 1997 | A |
5710878 | McCoy et al. | Jan 1998 | A |
5809179 | Marimont et al. | Sep 1998 | A |
6639595 | Drebin et al. | Oct 2003 | B1 |
6765589 | Georgiev et al. | Jul 2004 | B1 |
7158138 | Bronskill et al. | Jan 2007 | B1 |
20030206178 | Hoppe et al. | Nov 2003 | A1 |
20040150642 | Borshukov et al. | Aug 2004 | A1 |
20040233196 | Hertzmann | Nov 2004 | A1 |
20050001854 | Schuster et al. | Jan 2005 | A1 |
20060082579 | Yao | Apr 2006 | A1 |
20060087519 | Berger et al. | Apr 2006 | A1 |
20090021521 | Sorgard et al. | Jan 2009 | A1 |
20100033492 | Stewart | Feb 2010 | A1 |
Number | Date | Country |
---|---|---|
100151918 | Jun 1998 | KR |
1020020056594 | Jul 2002 | KR |
WO 02082378 | Oct 2002 | WO |
Entry |
---|
Doug DeCarlo, Anthony Santella, Stylization and Abstraction of Photographs, 2002, Proceedings of SIGGRAPH 2002, p. 769-776. |
Aaron Hertzmann, Fast Paint Texture, 2002, Proc. 2nd Annual Symposium on Non-Photorealistic Animation and Rendering (NPAR 2002), p. 91-96,161. |
Aaron Hertzmann, Painterly Rendering with Curved Brush Strokes of Multiple Sizes, 1998, Proceedings of SIGGRAPH 1998, p. 453-460. |
James Hays, Irfan Essa, Image and Video Based Painterly Animation, 2004, Proceedings of the 3rd International Symposium on Non-Photorealistic Animation and Rendering (NPAR 2004), p. 113-120, 154. |
Kyong Joon Lee, Dong Hwan Kim, Il Dong Yun, Sang Uk Lee, Three-dimensional oil painting reconstruction with stroke based rendering, 2007, Visual Computer, 23:873-880. |
Hamish Carr, Perspective Projection, 2005, Introductory Computer Graphics—Course Notes, University College Dublin, Dublin Ireland. |
The Geometry Center, 3.3 Projective Transformations, 1995, http://www.geom.uiuc.edu/docs/reference/CRC-formulas/node16.html. |
G. McGunnigle, M.J. Chantler, Photometric Stereo and Painterly Rendering, 2002, Research Memorandum, Heriot-Watt University. |
Ronen Basri, David Jacobs, Ira Kemelmacher, Photometric Stereo with General, Unknown Lighting, 2006, International Journal of Computer Vision, DOI: 10.1007/s11263-006-8815-7. |
Aaron Hertzmann, Algorithms for Rendering in Artistic Styles, 2001, DissertationDissertation, New York University, New York, NY. |
Michio Shiraishi, Yasushi Yamaguchi, An Algorithm for Automatic Painterly Rendering Based on Local Source Image Approximation, 2000, Proceedings of the 1st international symposium on Non-photorealistic animation and rendering NPAR '00, p. 53-58. |
Bart Adams, Martin Wicke, Philip Dutré, Markus Gross, Mark Pauly, Matthias Teschner, Interactive 3D Painting on Point-Sampled Objects, 2004, Proceedings of the First Eurographics conference on Point-Based Graphics SPBG'04, p. 57-66. |
Wong, Artistic Rendering of Portrait Photographs, 1999, Thesis, Cornell University, Ithaca, NY. |
Per H. Christensen, Linda G. Shapiro, Three-Dimensional Shape from Color Photometric Stereo, 1994, International Journal of Computer Vision, 13(2):213-227. |
International Search Report for corresponding PCT Application No. PCT/KR2008/001078 mailed Jun. 13, 2008. |
International Written Opinion for corresponding PCT Application No. PCT/KR2008/001078 mailed Jun. 13, 2008. |
Number | Date | Country | |
---|---|---|---|
20100039427 A1 | Feb 2010 | US |