This application claims the priority of Korean Patent Application No. 10-2005-0011411, filed on Feb. 7, 2005, in the Korean Intellectual Property Office, the disclosure of which is incorporated herein by reference.
1. Field of the Invention
The present invention relates to an apparatus and method of creating a three-dimensional (3D) shape by determining a combination of 3D models that can minimize the difference between a 3D shape estimated using a perspective projection model and a 3D shape created by combining stored 3D models and that can minimize the extent to which the created 3D shape deviates from a predetermined model.
2. Description of Related Art
A technology for estimating a three-dimensional (3D) shape of a given two-dimensional (2D) image is crucial to processing and interpreting the 2D image. The 2D image can be an image of a human face, and the 3D shape can be a shape of the human face.
Such a 3D shape estimating technology is used for 3D face shape modeling, face recognition, and image processing. Generally, an algorithm for estimating a 3D shape of a given 2D face image includes image capturing, face region detecting, face shape modeling, and face texture mapping.
Briefly, the algorithm proceeds as follows. After an image is captured, a face region is detected from the captured image. Then, the detected face image is mapped into a modeled face shape and a texture is formed on the modeled face shape.
U.S. Pat. No. 6,556,196 entitled “Method and Apparatus for the Processing of Images” discloses a conventional apparatus for estimating 3D shapes more precisely from a larger number of 2D images. Therefore, the apparatus cannot estimate a 3D shape precisely when only one 2D image is given and the estimation process is time-consuming.
To solve this problem, another conventional apparatus for estimating 3D shapes is disclosed in U.S. Pat. No. 6,492,986 entitled “Method for Human Face Shape and Motion Estimation Based on Integrating Optical Flow and Deformable Models.” This apparatus can estimate a 3D shape precisely even when only one 2D image is given but the estimation time is still long.
Another conventional apparatus for estimating 3D shapes is disclosed in the paper “Statistical Approach to Shape from Shading: Reconstruction of 3D Face Surfaces from Single 2D Images” published in 1996 by Joseph J. Atick of Rockefeller University, U.S. However, this apparatus too cannot solve the problems of the apparatus disclosed in U.S. Pat. No. 6,492,986.
In addition, the conventional apparatuses for estimating 3D shapes described above cannot estimate precisely a 3D shape of a given 2D image when active shape model (ASM) feature points of the 2D image are not accurately detected.
An aspect of the present invention provides an apparatus for creating a three-dimensional (3D) shape by determining a combination of 3D models that can minimize the difference between a 3D shape estimated using a perspective projection model and a 3D shape created by combining stored 3D models and that can minimize the extent to which the created 3D shape deviates from a predetermined model.
An aspect of the present invention also provides a method of creating a 3D shape by determining a combination of 3D models that can minimize the difference between a 3D shape estimated using a perspective projection model and a 3D shape created by combining stored 3D models and that can minimize the extent to which the created 3D shape deviates from a predetermined model.
An aspect of the present invention also provides a computer-readable recording medium storing a computer program for executing a method of creating a 3D shape by determining a combination of 3D models that can minimize the difference between a 3D shape estimated using a perspective projection model and a 3D shape created by combining stored 3D models and that can minimize the extent to which the created 3D shape deviates from a predetermined model.
According to an aspect of the present invention, there is provided an apparatus for creating a three-dimensional shape, including: a factor value setting unit setting factor values including a weight, a mapping factor, and a focal distance, for each of a plurality of three-dimensional models stored in advance; an error value calculating unit calculating an error value as a function of the factor value wherein the error value comprises a value of an extent of a difference between a first estimated shape and a second estimated shape; a control unit comparing the calculated error value with a preset reference value and outputting the result of comparison as a control signal; and a mapping unit weighing target weights to the stored three-dimensional models in response to the control signal, adding the stored three-dimensional models having the weighed target weights, and creating a three-dimensional shape of a given two-dimensional image, wherein the mapping factor maps a two-dimensional variable to a three-dimensional variable, the first estimated shape is created by adding the stored three-dimensional models having set weights, the second estimated shape is created by mapping the two-dimensional image using the mapping factor, and the target weight is a weight having the calculated error value smaller than the preset reference value, among the set weights.
The error value may further include a value of an extent to which the first estimated shape deviates from a predetermined three-dimensional model.
The error value may further include a value of an extent to which the first estimated shape deviates from an average shape of the stored three-dimensional models.
The first estimated shape may be created by adding a shape created by adding the stored three-dimensional models having the set weights and the average shape of the stored three-dimensional models, the error value may further include a value proportional to a total sum of the set weights, and the mapping unit may weigh the target weights to the stored three-dimensional models in response to the control signal, add the stored three-dimensional models having the weighed target weights and the average shape of the stored three-dimensional models, and create the three-dimensional shape of the given two-dimensional image.
The control unit may instruct the factor value setting unit to reoperate if the calculated error value is greater than the preset reference value.
The factor value setting unit may set the factor value greater than a previous factor value by a first predetermined value, set the factor value greater than the previous factor value by a second predetermined value when receiving an instruction from the control unit to reoperate, and the first predetermined value may be greater than the second predetermined value.
The apparatus may further include a basic model storage unit storing the three-dimensional models.
The apparatus may further include a user interface unit providing an interface by which the factor value can be inputted and transmitting the input factor value to the factor value setting unit.
The given two-dimensional image may be generated by photographing, and the second estimated shape may be calculated by
Xoit=−(xi-Δxt-1)(Zoit-1−Tzt-1)/ft-1+Txt-1 (1)
Yoit=−(yi-Δyt-1)(Zoit-1−Tzt-1)/ft-1+Tyt-1 (2)
Zoit=Zoit-1 (3),
where o denotes the second estimated shape, x and y denote two-dimensional position information of each portion of the given two-dimensional image, i denotes a unique number of the each portion having the two-dimensional position information or a unique number of each of mapped portions of the second estimate shape, X, Y and Z denote three-dimensional position information of each portion of the second estimated shape, Tx, Ty or Tz is one of mapping factors and variable constant, Δx and Δy are factors that change position information of the given two-dimensional image, f, which is one of mapping factors, denotes a focal distance of a photographing device that obtains the given two-dimensional image, t denotes a factor t-th set by the factor value setting unit if t is used as a subscript of the factor, and t denotes the second estimated shape created using the t-th set factor if t is used as a subscript of the three-dimensional position information.
A number of the stored three-dimensional models may be n, and the first estimated shape may be calculated by
where e denotes the first estimated shape, X, Y and Z denote three-dimensional position information of each portion of the first estimated shape, Xavg, Yavg and Zavg denote position information of each portion of the average shape of the n stored three-dimensional models, t denotes the first estimated shape created using a weight t-th set by the factor value setting unit, j denotes a unique number of each of the n stored three-dimensional models, α denotes the weight, Xj, Yj and Zj denote three-dimensional position information of each portion of each of the n stored three-dimensional models, and σ is a variable constant and set for each of the n stored three-dimensional models.
The error value may be calculated by
where F denotes the error value calculated by the error value calculating unit, Eo denotes a value of an extent of a difference between the first estimated shape and the second estimated shape, Ec denotes the value of the extent to which the first estimated shape deviates from the average shape of the n stored three-dimensional models, e denotes the first estimated shape, o denotes the second estimated shape, oi denotes the unique number of each of the mapped portions of the second estimated shape, ei denotes a unique number of a portion of the first estimated shape having relative position information in the first estimated shape, which is identical to the relative position information, in the second estimated shape, of a portion of the second estimated shape having oi, m denotes a number of i, j denotes the unique number of each of the n stored three-dimensional models, Xo, Yo and Zo denote the three-dimensional position information of each portion of the second estimated shape, Xe, Ye and Ze denote the three-dimensional position information of each portion of the first estimated shape, which corresponds to the position information of each of Xo, Yo and Zo, s denotes a scale factor, Po denotes a size of an image of the second estimated shape projected onto a predetermined surface, Pavg denotes a size of an image of the average shape of the n stored three-dimensional models projected onto the predetermined surface, α denotes the weight, and λ is a proportional factor set in advance.
According to another aspect of the present invention, there is provided a method of creating a three-dimensional shape, including: setting a factor value, which comprises a weight, a mapping factor, and a focal distance, for each of a plurality of three-dimensional models stored in advance; calculating an error value as a function of the factor value wherein the error value includes a value of an extent of a difference between a first estimated shape and a second estimated shape, according to the factor value; comparing the calculated error value with a preset reference value; and weighing the set weight to the stored three-dimensional model if the calculated error value is smaller than the preset reference value, adding the weighted three-dimensional models, and creating a three-dimensional shape of a given two-dimensional image, wherein the mapping factor maps a two-dimensional variable to a three-dimensional variable, the first estimated shape is created by adding the weighted three-dimensional models, and the second estimated shape is created by mapping the two-dimensional image using the mapping factor.
The error value may further include a value of an extent to which the first estimated shape deviates from a predetermined three-dimensional model.
The method may further include changing the factor value to an initial set value set in advance and initializing the factor value.
The calculating of the error value may include: calculating the error value, which is the function of the factor value and comprises the value of the extent to which the first estimated shape deviates from the second estimated shape, according to the set factor value; determining whether the error value was calculated for the first time; and performing the setting of the factor value if it is determined that the error value was calculated for the first time.
The comparing of the calculated error value with the preset reference value may include comparing the calculated error value with a previously calculated error value and comparing the calculated error value with a preset reference value if the calculated error value is smaller than the previously calculated error value, and in the creating of the three-dimensional shape of the given two-dimensional image, target weights may be weighted to the stored three-dimensional models if the calculated error value is smaller than the preset reference value, the weighted three-dimensional models may be added, and the three-dimensional shape of the given two-dimensional image may be created, and the target weights may be weight having the calculated error value smaller than the preset reference value, among the set weights.
The comparing of the calculated error value with the preset reference value may include comparing the calculated error value with the previously calculated error value if the error value was not calculated for the first time and comparing the calculated error value with the preset reference value if the calculated error value is smaller than the previously calculated error value, and in the creating of the three-dimensional shape of the given two-dimensional image, the target weights may be weighted to the stored three-dimensional models if the calculated error value is smaller than the preset reference value, the weighted three-dimensional models may be added, and the three-dimensional shape of the given two-dimensional image may be created, and the target weight may be a weight having the calculated error value smaller than the preset reference value, among the set weights.
The comparing of the calculated error value with the preset reference value may include comparing the calculated error value with the previously calculated error value and performing the setting of the factor value if the calculated error value is greater than the previously calculated error value.
The method may further include performing the setting of the factor value if the calculated error value is greater than the preset reference value.
According to another aspect of the present invention, there is provided a computer-readable recording medium storing a computer program for executing a method of creating a three-dimensional shape, the method including: setting a factor value, which comprises a weight, a mapping factor, and a focal distance, for each of a plurality of three-dimensional models stored in advance; calculating an error value as a function of the factor value wherein the error value includes a value of an extent of a difference between a first estimated shape and a second estimated shape, according to the factor value; comparing the calculated error value with a preset reference value; and weighing the set weight to the stored three-dimensional model if the calculated error value is smaller than the preset reference value, adding the weighted three-dimensional models, and creating a three-dimensional shape of a given two-dimensional image, wherein the mapping factor maps a two-dimensional variable to a three-dimensional variable, the first estimated shape is created by adding the weighted three-dimensional models, and the second estimated shape is created by mapping the two-dimensional image using the mapping factor.
Additional and/or other aspects and advantages of the present 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 above and/or other aspects and advantages of the present invention will become apparent and more readily appreciated from the following detailed description, taken in conjunction with the accompanying drawings of which:
Reference will now be made in detail to 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.
The image pick-up device (not shown) photographs the 3D object 110 and acquires the 2D image 130. An apparatus and method of creating a given 3D shape, and a computer-readable recording medium storing a computer program for executing the method according to embodiments of the present invention provides a technology that creates a 3D shape of the 2D image 130 when the 2D image 130 is given. In
The factor value setting unit 212 sets factor values, which include a weight, a mapping factor value, and a focal distance, for each of a plurality of 3D models stored in advance stored in the basic model storage unit 220, for example.
The factor value setting unit 212 may operate under the control of the control unit 214 connected thereto. Factors set by the factor value setting unit 212 include a weight, a mapping factor, and focal distance. The apparatus 210 weights a weight to each of the 3D models stored in advance, adds the weighted 3D models, and creates a 3D shape. Weighting of a weight may denote a multiplication operation. The 3D models that are weighed larger weights have greater importance in the 3D shape to be created.
To create an accurate 3D shape, a weight set by the factor value setting unit 212 must satisfy a predetermined condition. Hereinafter, a weight that satisfies the predetermined condition will be called a target weight. The predetermined condition will be described later, together with operations of the error value calculating unit 218 and the control unit 214.
The factor value setting unit 212 may also set a weight and a mapping factor when setting a factor value.
A mapping factor set by the factor value setting unit 212 maps a 2D variable such as (x, y) to a 3D variable such as (X, Y, Z). For example, it may be assumed that a mapping factor is (Tx, Ty, Tz). In this case, 2D position information (x, y) is mapped to 3D position information (X, Y, Z) using the mapping factor (Tx, Ty, Tz). Tx, Ty, and Tz are constants set by a user and may be variable.
The mapping factor may also include a focal length f in addition to Tx, Ty, and Tz described above. “f,” which is one of factors set by the factor value setting unit 212 denotes a focal length set in the image pick-up device (not shown) when a 2D image is picked up and created by the image pick-up device.
The factor value setting unit 212 may set a factor value randomly or according to a predetermined rule. The factor value setting unit 212 may set a value received from the user interface unit 216 as a factor value. IN2 indicates a value received from the user interface unit 216.
The control unit 214 may instruct the factor value setting unit 212 to operate when a 2D image is given.
The user interface unit 216 provides a predetermined interface (not shown). More specifically, if the factor value setting unit 212 sets a factor value by bypassing a value received from the user interface unit 216, the factor value setting unit 212 instructs the user interface unit 216 to provide a predetermined interface. The predetermined interface denotes an interface through which a user can input the value. OUT 1 indicates an interface that the user interface unit 216 provides.
The error value calculating unit receives a factor value from the factor value setting unit 212 and calculates an error value according to the received factor value. Hereinafter, an error value calculated by the error value calculating unit 218 will be called F. F is function of factor value and can be expressed as
F=Eo+Ec (1),
where Eo denotes observation energy and Ec denotes shape constraint energy. The observation energy is a difference value between a first estimated shape and a second estimated shape.
The first estimated shape is created by adding models to which a weight set by the factor value setting unit 212 is assigned. The second estimated shape is a mapped shape of a 2D image given to the present apparatus 210 using a mapping factor. In other words, both of the first and second estimated shapes are 3D shapes. In the meantime, Eo can be given by
EO=Ed/s2 (2),
where Ed indicates the difference between 3D position information of each portion of the first estimated shape corresponding to each portion of a given 2D image IN1 and 3D position information of each portion of the second estimated shape. In other words, the difference between the first estimated shape and the second estimated shape may be obtained by comparing position information of their portions having the same phase in three dimensions.
If a phase of a portion of the first estimated shape is the same as that of a portion of the second estimated shape, the two portions correspond to the same portion of the given 2D image IN1.
For example, a portion of the first estimated shape corresponding to the pupil of the eye in a given 2D image is a pupil portion of the first estimated shape. Likewise, a portion of the second estimated shape is a pupil portion of the second estimated shape.
Each portion of the given 2D image IN1 may be a characteristic portion. If the given 2D image IN1 is an image of a human face, each portion of the given 2D image may be an eye, nose, eyebrow, or lip portion.
The points 320 may be called feature points. Such feature points may accurately express each portion of a face, such as eyes, a nose and lips. To this end, the feature points may be detected using an active shape model (ASM) algorithm, which is a widely known technology in the field of face recognition. That is, each portion of a given 2D image may be a feature point detected using the ASM algorithm.
When an elaborate ASM algorithm is used, detected feature points express eye, nose, and lip portions accurately. However, when a less elaborate ASM algorithm is used, the detected feature points may not accurately express each portion of the face. However, the present invention suggests a technology that accurately creates a 3D shape regardless of positions of feature points detected from a given 2D image using the ASM algorithm.
As described above, Ed indicates the difference between 3D position information of each portion of the first estimated shape corresponding to each portion of the given 2D image IN1 and 3D position information of each portion of the second estimated shape. Hereinafter, it is assumed that each portion of a given 2D image refers to each of m portions of the 2D image. The m portions of the 2D image may or may not be the points 320, i.e., feature points, described above.
3D position information of each portion (hereinafter, called selected portion) of the second estimated shape corresponding to each portion of a given 2D image (hereinafter, called a second comparison portion) denotes position information of a selected portion mapped by a mapping factor. In this case, the mapping factor is set by the factor value setting unit 212.
For example, position information (Xo, Yo, Zox) of the second comparison portion denotes position information of the selected portion having position information (x, y) and mapped by (Tx, Ty, Tz) and f. Here, o denotes the second estimated shape. More specifically, the position information of the second comparison portion can be calculated using the following equations. Theses equations are called an equation of a perspective projection model.
Xoit=−(xi-Δxt-1(Zoit-1−Tzt-1)/ƒt-1+Txt-1 (3)
Yoit=−(yi-Δyt-1)Zoit-1−Tzt−1)/ƒt-1+Tyt-1 (4)
Zoit=Zoit-1 (5),
where o denotes the second estimated shape, x and y denote position information of the selected portion, and i has two meanings. When i is used as a subscript of x or y, i may denote a unique number of the selected portion. When i is used as a subscript of Xo, Yo or Zo, i may denote a portion (xi, yi) of the second estimated shape mapped by a mapping factor.
Xo, Yo, and Zo denote 3D position information of each portion of the second estimated shape. More specifically, Xo, Yo, and Zo may indicate the position information of the second comparison portion.
Tx, Ty and Tz are mapping factors and variable numerals. Δx and Δy are factors that change position information of a given 2D image. Also, f, one of mapping factors, denotes a focal distance of a pick-up device that picks up a given 2D image. In other words, factors set by the factor value setting unit 212 are Tx, Ty, Tz, f, Δx and Δy.
If t is used as a subscript of a factor, it denotes a tth set factor by the factor value setting unit 212. If t is used as a subscript of 3D position information (X, Y, Z), it denotes the second estimated shape created using the tth factor.
Equations 3 through 5 may be simplified into
Xoit=k1(xi+Txt-1) (6)
Yoit=k2(yiTyt−1) (7),
Zoit=k3 (8),
where k1, k2, and k3 are variable numerals. Equations 6 through 8 can be called as equations of a weak perspective projection model.
3D position information of each portion of the first estimated shape (hereinafter, called a first comparison portion) corresponding to the selected portion is created such that relative position information of the first comparison portion in the first estimated shape is identical to that of the second comparison portion in the second estimated shape.
For example, it is assumed that the second estimated shape is a face shape and the second comparison portion is a philtrum portion of the second estimated shape. It is also assumed that the second comparison portion is a groove between second and third protruded portions from the lowest end of the second estimated shape and is a deepest portion. In this case, the lowest end of the second estimated shape denotes a jaw, and the second protruded portion denotes an upper lip, and the third protruded portion denotes the tip of the nose. Ultimately, it is assumed that the second comparison portion is a part of the philtrum portion that meets the upper lip. The first comparison portion is a groove between second and third protruded portions from the lowest end of the first estimated shape and is a deepest portion.
The first estimated shape may be estimated using a principal component analysis (PCA) method. The PCA method assigns a predetermined weight to each of n basic 3D models, adds the n weighted models, and creates a 3D shape. The n basic 3D models may be stored in advance. The equations for creating the first estimated shape may be expressed as
where e denotes the first estimated shape and Xe, Ye and Ze denote 3D position information of each portion of the first estimated shape. Each portion of the first estimated portion may be the first comparison portion.
Xavg, Yavg, and Zavg denote position information of each portion of an average shape of the n stored basic 3D models. More specifically, Xavg, Yavg, and Zavg may denote position information of the first comparison portion when the same weight is assign to each of the n stored basic 3D models.
t denotes the first estimated shape created using a tth weight set by the factor value setting unit 212. j denotes a unique number of each of the n stored basic 3D models, and α| denotes a weight.
Xj, Yj and Zj denote position information of a portion corresponding to the first comparison portion of the first estimated shape in a jth stored basic 3D model. σ is a variable constant and is set for each of the n stored basic 3D models.
As described above, Eo=Ed/(sˆ2). Ed is the difference between the position information of the first comparison portion and the position information of the second comparison and is given by
where oi denotes a unique number of each second comparison portion. Since it is assumed that the number of i is m, the number of oi may also be m. Likewise, ei denotes a unique number of each first comparison portion, and since the number of i is m, the number of ei may also be m.
Since Eo is a value of the first estimated shape and the second estimated shape, Eo may not be affected by the size of the first estimated shape or the second estimated shape. In other words, Eo is calculated by comparing the “shape” of the first estimated shape and the second estimated shape without considering the “sizes” of the first estimated shape and the second estimated shape.
Eo may include a scale factor s, which may be given by
s=Po/Pavg (13),
where Po denotes the size of an image of the second estimated shape projected onto a predetermined surface. Pavg denotes the size of an image of an average shape of the n stored basic 3D models projected onto the predetermined surface. The predetermined surface is not variable.
As described above, an error value F calculated by the error value calculating unit 218 may include Ec as well as Eo. In this case, Ec may be a value of the extent to which the first estimated shape deviates from a predetermined model. The predetermined model may be or may not be an average shape of the n stored basic 3D models. Ec can be calculated using Equation 14, which may relate to a case where the predetermined model is the average shape of the n stored basic 3D models.
where λ is a proportional constant set in advance. More specifically, λ is a constant set by a user to determine the importance of each of Eo and Ec in F. If a user regards Ec as being more important than Eo, the user may set λ to a higher value.
If all λ values are zero (j=1˜n), the position information (Xe, Ye, Ze) of the first estimated shape becomes (Xavg, Yavg, Zavg) by Equations 9 through 11. Since all of the n stored basic 3D models have shapes of general human faces, a model having position information (Xavg, Yavg, Zavg) has a shape of a human face. Thus, if all values are zero, the first estimated shape may match an average shape of the n stored basic 3D models.
A smaller Ec value leads to a smaller F value, and the first estimated shape, which is estimated using such a λ value, is certainly closer to a shape of a human face.
The basic model storage unit 220 stores the n basic 3D models, preferably in advance. When the error value calculating unit 218 calculates the error value F, the control unit 214 compares the calculated error value with a reference value set in advance, and generates a control signal according to the result of the comparison. The reference value may vary.
Specifically, if the calculated error value is greater than the reference value, the control unit 214 generates a control signal instructing the factor value setting unit 212 to operate again. In this case, the error value calculating unit 218 also operates again, and the control unit 214 compares an error value recalculated according to a reset factor value with the reference value.
Conversely, if the calculated error value is smaller than the reference value, the control unit 214 instructs the mapping unit 222 to operate. In response to the control signal generated by the control unit 214, the mapping unit assigns n target weights to the n stored basic 3D models, respectively, adds the n stored basic 3D models with the n target weights, and creates a 3D shape of the given 2D image.
Here, the target weight denotes a set weight for which a calculated error value is smaller than the reference value. For the sake of explanation, the target weight may be defined as a tth set weight. If the first estimated shape is defined by Equations 9 through 11 and Ec is defined by Equation 11, the mapping unit 222 assigns target weights to the n stored basic 3D models, adds the n stored basic 3D models with the target weights and an average shape of the n stored basic 3D models, and creates a 3D shape.
If the calculated error value is equal to the reference value, the control unit 214 may generate the control signal instructing the factor value setting unit 212 to reoperate or indicating the mapping unit 222 to operate. OUT2 indicates a generated 3D shape.
A method of creating a 3D shape according to the present invention has been described above. To this end, a face texture estimating unit 250 forms a predetermined texture on a 3D shape generated by the mapping unit 222. OUT3 indicates a textured 3D face shape.
The factor value setting unit 212 may set factor values that gradually reduce calculated error values. In other words, the factor value setting unit 212 sets a factor value greater than a previously set factor value by a first predetermined value. An error value calculated according to the currently set factor value may be smaller than an error value calculated according to the previously set factor value. To this end, the factor value setting unit 212 may set factor values using a Newton algorithm expressed as
Tt=Tt-1−step*∂F/∂T(αt-1,Tt-1,ƒt-1) (15),
αtαt-1−step*∂F/∂α(αt-1,Tt-1,ƒt-1) (16),
ƒt=ƒt-1−step*∂F/∂f(αt-1,Tt-1,ƒt-1) (17),
Referring to
Equations 15 through 17 will now be described geometrically. Referring to
Even when the Newton algorithm is used, a factor value that increases the error value F may be set. Referring to
To solve this problem, if the factor value setting unit 212 of
If an error value calculated according to a currently set factor value is still greater than an error value calculated according to its previously set factor value, the factor value setting unit 212 may set a factor value greater than the previously set factor value by a third predetermined value. The third predetermined value is a constant smaller than the second predetermined value.
Ultimately, an embodiment of the present invention accurately estimates a 3D shape by determining a combination of 3D models that can minimize the difference between a 3D shape estimated using the perspective projection model and a 3D shape created by combining stored 3D models and that can minimize the extent to which the created 3D shape deviates from a predetermined model.
The control unit 214 initializes all factor values (operation 1310). After operation 1310, the control unit 214 instructs the factor value setting unit 212 to operate and the factor value setting unit 212 sets a factor value accordingly (operation 1320).
After operation 1320, the error value calculating unit 218 calculates an error value F (operation 1330) and transmits the calculated error value to the control unit 214. The control unit 214, which receives the error value, determines whether the error value calculating unit 218 calculated the error value more than twice (operation 1340).
In operation 1340, if the control unit 214 determines that the error value calculating unit 218 calculated the error value once, operation 1310 is performed. If the control unit 214 determines that the error value calculating unit 218 calculated the error value more than twice, the control unit 214 compares a current error value and a previous error value calculated by the error value calculating unit 218 (operation 1350).
As a result of comparison in operation 1350, if the current error value is greater than the previous error value, operation 1310 is performed. Conversely, if the current error value is smaller than the previous value, the control unit 214 determines whether the current error value calculated by the error value calculating unit 218 is smaller than a reference value (operation 1360).
In operation 1360, if the control unit 214 determines that the current error value is greater than the reference value, operation 1310 is performed. Conversely, if the control unit 214 determines that the current error value is smaller than the reference value, the mapping unit 222 creates a 3D shape of a given 2D image (operation 1370).
As described above, according to an apparatus and method of creating a 3D shape and a computer-readable recording medium storing a computer program for executing the method according to embodiments of the present invention, even when a single 2D image is given, a 3D shape of the 2D image can be accurately estimated.
According to an apparatus and method of creating a 3D shape and a computer-readable recording medium storing a computer program for executing the method according to embodiments of the present invention, even when feature points of a given 2D image are not accurately detected using the ASM algorithm, a 3D shape of the 2D image can be accurately estimated. Thus, a 3D shape that can always be recognized as a human face can be created.
Further, according to an apparatus and method of creating a 3D shape and a computer-readable recording medium storing a computer program for executing the method according to embodiments of the present invention, a 3D shape of a given 2D image can be quickly created.
Embodiments of the present invention can also be implemented as computer-readable code on a computer-readable recording medium. The computer-readable recording medium is any data storage device that can store data which can be thereafter read by a computer system. Examples of the computer-readable recording medium include read-only memory (ROM), random-access memory (RAM), CD-ROMs, magnetic tapes, floppy disks, optical data storage devices, and carrier waves (such as data transmission through the Internet).
The computer-readable recording medium can also be distributed over network-coupled computer systems so that the computer-readable code is stored and executed in a distributed fashion.
Although a few embodiments of the present invention have been shown and described, the present invention is not limited to the described embodiments. Instead, it would be appreciated by those skilled in the art that changes may be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.
Number | Date | Country | Kind |
---|---|---|---|
2005-0011411 | Feb 2005 | KR | national |