CN109584327B - Face aging simulation method, device and equipment - Google Patents

Face aging simulation method, device and equipment Download PDF

Info

Publication number
CN109584327B
CN109584327B CN201811324007.3A CN201811324007A CN109584327B CN 109584327 B CN109584327 B CN 109584327B CN 201811324007 A CN201811324007 A CN 201811324007A CN 109584327 B CN109584327 B CN 109584327B
Authority
CN
China
Prior art keywords
type
aging
face
image
aged
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811324007.3A
Other languages
Chinese (zh)
Other versions
CN109584327A (en
Inventor
张少林
宁欣
勾多多
董肖莉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Wave Kingdom Co ltd
Original Assignee
Shenzhen Wave Kingdom Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Wave Kingdom Co ltd filed Critical Shenzhen Wave Kingdom Co ltd
Priority to CN201811324007.3A priority Critical patent/CN109584327B/en
Publication of CN109584327A publication Critical patent/CN109584327A/en
Application granted granted Critical
Publication of CN109584327B publication Critical patent/CN109584327B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/001Texturing; Colouring; Generation of texture or colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/40Filling a planar surface by adding surface attributes, e.g. colour or texture

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)

Abstract

The invention relates to a face aging simulation method, a device and equipment, wherein the method comprises the following steps: triangulating the to-be-aged simulated face images aligned with each other to obtain a first class of triangular meshes, triangulating the target aged face images to obtain a second class of triangular meshes; acquiring triangle coordinates of first-class pixel points in a first-class triangle mesh; acquiring a second type triangular surface corresponding to each first type pixel point in a second type triangular grid, and acquiring new Cartesian coordinates of each first type pixel point based on the corresponding triangular coordinates and a triangular coordinate system of the corresponding second type triangular surface; collecting pixel values of second-class pixel points corresponding to each new Cartesian coordinate on the target aging face image; and obtaining an aging image to be output according to the sum of the pixel values of the first type of pixel points on the aging-to-be-simulated human face image and the pixel values of the corresponding second type of pixel points. The invention improves the fidelity of the aging simulation image to be output and the timeliness of image simulation.

Description

Face aging simulation method, device and equipment
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to a method, an apparatus, and a device for face aging simulation.
Background
In recent years, a computer graphic image technology is an emerging technology which is developed rapidly, and quantitative prediction of the aging process of a human face by using the technology is gradually the subject of hot research. For aging simulation of face appearance, the conventional methods for aging simulation of faces can be roughly divided into: simulating an aging process based on the face prototype; synthesizing based on reconstructed face aging; face aging simulation based on learning.
In the implementation process, the inventor finds that at least the following problems exist in the conventional technology:
the human face aging simulation algorithm in the traditional technology has program redundancy to a certain extent, and part of the algorithm needs to rely on a large amount of data for model training and the like. The method has the advantages of complex process, high requirement and long time consumption, and is easy to influence the real-time performance and the fidelity.
Disclosure of Invention
The invention aims to provide a face aging simulation method, a face aging simulation device and face aging simulation equipment aiming at the defects of the traditional technology.
According to an embodiment of the invention, the invention provides a human face aging simulation method, which comprises the following steps:
triangulating the to-be-aged simulated face images aligned with each other to obtain a first class of triangular meshes, triangulating the target aged face images to obtain a second class of triangular meshes;
Taking pixel points of the to-be-aged simulated face image contained in the first type triangular grid as first type pixel points, and obtaining triangular coordinates of the first type pixel points in a first type triangular surface based on the original Cartesian coordinates of the first type pixel points of the to-be-aged simulated face image and a triangular coordinate system formed by three vertexes of the first type triangular surface in the first type triangular grid;
acquiring a second type triangular surface corresponding to a first type triangular surface in which each first type pixel point is positioned in a second type triangular grid, and acquiring a new Cartesian coordinate of each first type pixel point on a target aging face image based on a triangular coordinate system formed by corresponding triangular coordinates and three vertexes in the corresponding second type triangular surface;
taking the pixel points of the target aging image contained in the second class triangle mesh as second class pixel points, and collecting the pixel values of the second class pixel points corresponding to the new Cartesian coordinates on the target aging face image according to the new Cartesian coordinates;
and obtaining the pixel value of the first type pixel point on the aging image to be output determined based on the aging analog face image to be output according to the sum of the pixel value of the first type pixel point on the aging analog face image to be aged and the pixel value of the corresponding second type pixel point, so as to obtain the aging image to be output.
In one embodiment, according to a sum of pixel values of a first type of pixel points on an image of a simulated human face to be aged and pixel values of corresponding second type of pixel points, obtaining pixel values of the first type of pixel points on an image to be aged determined based on the image of the simulated human face to be aged, and obtaining the image to be aged includes:
and mapping the determined pixel value on the aging image to be output to the first type pixel point corresponding to the human face image to be aged according to the original Cartesian coordinates of the first type pixel point corresponding to the new Cartesian coordinates and according to the texture mapping, so as to obtain the aging image to be output.
In one embodiment, a method for obtaining an aging image to be output includes:
the operation is based on the following formula:
SRC new (i,j)=SRC(i,j)·(1-t)+REF(i new ,j new )·t(1)
wherein SRC new (i, j) determining pixel values on an aging image to be output for a first type of pixel points based on the aging-to-be-aged simulated face image; SRC (i, j) is the pixel value of the first type pixel point on the to-be-aged simulated face image; REF (i) new ,j new ) The pixel values of the second type of pixel points corresponding to the new Cartesian coordinates on the target aging face image are obtained; t is a preset adjustment constant for adjusting the aging degree; (i, j) is the original Cartesian coordinates of the corresponding first type pixel points on the aging image to be output, which are determined based on the aging-to-be-simulated face image; (i) new ,j new ) -said new cartesian coordinates representing said first class of pixels;
and taking the operation result as the pixel value of the first type pixel point on the to-be-aged output image determined based on the to-be-aged simulated face image, and obtaining the to-be-aged output image.
In one embodiment, triangulating the to-be-aged simulated face images aligned with each other to obtain a first class of triangular meshes, triangulating the target aged face image to obtain a second class of triangular meshes includes:
calibrating a first type of preset position characteristic point in the to-be-aged simulated face image and a second type of preset position characteristic point in the target aged face image; the first type of preset position feature points are pixel points of the human face positions of the to-be-aged simulated human face image, wherein the human face feature points are not calibrated when the human faces are aligned; the second type of preset position feature points are pixel points of the face positions of the target aging image, which are not subjected to face feature point calibration when the faces of the second type of preset position feature points are aligned;
triangulating a determined face area of the simulated face image to be aged according to the feature points of each first preset part and the feature points of each face of the simulated face image to be aged to obtain a first triangular mesh; and triangulating the face area of the determined target aging face image according to the feature points of the second preset parts and the feature points of the target aging face image to obtain a second class triangle network.
In one embodiment, before calibrating the first type of preset position feature points in the to-be-aged simulated face image and the second type of preset position feature points in the target aged face image, the method further includes:
and respectively marking out each face characteristic point of the to-be-aged simulated face image and each face characteristic point of the target aged face image, and carrying out face alignment on the to-be-aged simulated face image and the target aged image.
In one embodiment, after triangulating the to-be-aged simulated face images aligned with each other to obtain a first class triangle mesh and triangulating the target aged face image to obtain a second class triangle mesh, the method further comprises:
and traversing each pixel point of the to-be-aged simulated face image, and identifying all first-type pixel points respectively contained in each first-type triangular surface in the first-type triangular grid.
In one embodiment, after obtaining the pixel value of the first type pixel point on the aging image to be output determined based on the aging-to-be-aged simulated face image, the method further includes:
according to the second class triangle mesh, performing black-and-white binarization on the target aging face image to obtain a black-and-white binarization image of the target aging image in the second class triangle mesh;
And carrying out poisson fusion on the ageing images to be output according to the black-white binarized images to obtain final ageing simulation images.
According to an embodiment of the present invention, there is also provided a face aging simulation apparatus, including:
the triangle mesh acquisition module is used for triangulating the to-be-aged simulated face images aligned with each other face to obtain a first class of triangle meshes, and triangulating the target aged face image to obtain a second class of triangle meshes;
the triangle coordinate conversion module is used for taking pixel values of the to-be-aged simulated face image contained in the first type triangle grid as first type pixel points, and obtaining triangle coordinates of the first type pixel points in the first type triangular surface based on the original Cartesian coordinates of the first type pixel points of the to-be-aged simulated face image and a triangle coordinate system formed by three vertexes of the first type triangular surface where the first type pixel points are located in the first type triangle grid;
the new Cartesian coordinate conversion module is used for acquiring a second type triangular surface corresponding to the first type triangular surface where each first type pixel point is located in the second type triangular grid, and acquiring a new Cartesian coordinate of each first type pixel point on the target aging face image based on the corresponding triangular coordinate and a triangular coordinate system formed by three vertexes in the corresponding second type triangular surface;
The aging data acquisition module is used for taking the pixel points of the target aging image contained in the second class triangular mesh as second class pixel points, and acquiring the pixel values of the second class pixel points corresponding to the new Cartesian coordinates on the target aging face image according to the new Cartesian coordinates;
and the aging simulation module is used for obtaining the pixel value of the first type pixel point on the aging image to be output determined based on the aging simulation face image to be output according to the sum of the pixel value of the first type pixel point on the aging simulation face image to be aged and the pixel value of the corresponding second type pixel point to obtain the aging image to be output.
According to an embodiment of the present invention, the present invention further provides a facial aging simulation apparatus, including a memory and a processor, where the memory stores a computer program, and the method is characterized in that the processor implements each step of the facial aging simulation method according to the present invention when executing the computer program.
According to an embodiment of the present invention, there is also provided a computer storage medium having a computer program stored thereon, which when executed by a processor implements the steps of the face aging simulation method of the present invention.
One of the above technical solutions has the following advantages and beneficial effects:
According to the face aging simulation method, the face aging simulation device and the face aging simulation equipment, the first type triangle mesh and the second type triangle mesh which are obtained by triangulating the face images to be aged and the target aging face images and aligned with each other are obtained, and the area to be aged and simulated is accurately determined and obtained. And the triangle coordinates of the first type of pixels are converted based on the original Cartesian coordinates of the first type of pixels of the face image to be aged and the triangle surfaces in the first type of triangle grids, so that the pixel values of the corresponding pixels of the first type of pixels on the target aged face image are inversely converted through the second type of triangle surfaces in the second type of triangle grids and the triangle coordinates, and the aged image to be output is further obtained. The invention constructs triangle grids of the to-be-aged simulated face image and the target aged face image, and inverts and converts new Cartesian coordinates of each first type pixel point of the to-be-aged simulated face image on the target aged face image based on a triangle coordinate system. And further accurately acquiring pixel values of all pixel points of the target aging image, and carrying out aging simulation on the to-be-aged simulated human face image by combining the pixel values of all first-class pixel points of the to-be-aged simulated human face image. The aging simulation process is simpler, the topological deformation processing of the image is easy to realize, the fidelity of the aging simulation image to be output is improved, the timeliness of the image simulation is improved, and the more natural human face aging image can be effectively synthesized.
Drawings
Fig. 1 shows a flow chart of a face aging simulation method according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of the face aging simulation method of the present invention for obtaining a first class triangle mesh and a second class triangle mesh;
FIG. 3 is a schematic diagram of a simulated face image to be aged and a target aging image not aligned with each other's face in the face aging simulation method of the present invention;
FIG. 4 is a schematic view showing the effect of face alignment in the face aging simulation method of the present invention;
FIG. 5 is a schematic diagram showing feature points of a first preset part of a simulated face image to be aged, which are calibrated to be aligned with each other in the face aging simulation method of the present invention;
FIG. 6 is a schematic diagram showing triangulation in the face aging simulation method of the present invention;
FIG. 7 is a schematic diagram of the face aging simulation method of the present invention after texture mapping;
FIG. 8 is a schematic view of a black and white binarized image in the face aging simulation method of the present invention;
FIG. 9 is a schematic diagram of a final output aging simulation image in the face aging simulation method of the present invention;
FIG. 10 is a schematic diagram showing a process of black-and-white binarization by the face aging simulation method of the present invention;
FIG. 11 is a schematic flow chart of a face aging simulation method according to another embodiment of the face of the present invention;
fig. 12 is a block diagram of a face aging simulator according to an embodiment of the present invention;
fig. 13 is a block diagram of a face aging simulation apparatus according to an embodiment of the present invention.
Detailed description of the preferred embodiment
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be further described with reference to the following examples with reference to the accompanying drawings.
Face prototypes of different age groups are constructed based on an aging process simulation method of the face prototypes, and differences of shapes and textures among the face prototypes are added into a face image through a cartoon technology, so that the face is directly and linearly aged to a target age group. The method not only considers the change of the shape of the face along with the time, but also considers the change of the texture information. Secondly, another way is to inspire the method of synthesizing the aging effect through illumination, and render the aging face with any target age. The method uses the optical flow method to adjust and process the illumination of the average face, so the obtained average face has clearer shape and texture. In the aging synthesis stage of the face, the face is deformed by adopting an optical flow method, and compared with the face aging synthesis method based on a prototype realized by addition and subtraction operation, the aging simulation effect is better.
On the other hand, for face aging synthesis based on reconstruction, an input face image is given, several aging face bases are selected in a target age group, and weighted combination is carried out on the aging face bases, so that the face image for aging the input image to the target age group is synthesized. If a batch of face images are arbitrarily selected from all the library images of the target age group as the aging face base and are linearly combined by using the same weighting coefficient, the selected aging face bases are equivalent to average faces. A part of researchers put forward an aging simulation method based on matrix decomposition based on an image super-resolution method of coefficient expression learning. The core idea is that a super-resolution algorithm needs to be trained on library images in different age groups. Firstly, an input face image needs to be downsampled, then super-resolution reconstruction is carried out on the face image by using a trained super-resolution algorithm of a target age group, and the reconstructed image is an instant aged face image. Based on the face aging simulation of learning, for an input face image, the method is used for predicting the displacement difference between the input face and the face of the target age group, the input face is deformed through the displacement difference, and the face image obtained after deformation is aged immediately. Researchers use SVM (support vector machine) to train out the feature point positions of faces in different age groups. For an input face image, the positions of characteristic points when the input face ages to other age groups can be predicted by using a trained model, so that the target age group of the input face aging deformation value is subjected to image deformation technology. Aiming at the problems of the method in real time and fidelity, the invention provides a face aging image which has lower scheme complexity and can synthesize more natural faces.
Referring to fig. 1, in one embodiment, the present invention provides a face aging simulation method, including the following steps:
step S110: triangulating the to-be-aged simulated face images aligned with each other to obtain a first class triangle mesh, and triangulating the target aged face image to obtain a second class triangle mesh.
Specifically, the face alignment is a process of normalizing the different shapes of the face in the to-be-aged simulated face image and the face in the target aged face image, and one face shape is as close to the other face shape as possible. The face feature points of the faces in the two face graphs are detected respectively, the respective face area ranges are determined, and then the face alignment can be carried out on the to-be-aged simulated face image and the target aged face image in an affine transformation mode. Further, when the first type triangular mesh is a polygonal mesh formed by triangular faces, the triangular mesh is formed by connecting pixel points in a face area range determined in the simulated face image to be aged into the triangular faces. When the second class triangle mesh is used for triangular sectioning of the target aging image, pixel points in the face area range determined by the target aging image are connected to form polygonal meshes which are formed by triangular faces. Wherein the triangulation may be Delaunay triangulation.
According to the invention, the uniform and smooth surface patch grids of the first type triangle mesh surface and the second type triangle mesh surface can be obtained, so that a connection relationship can be established between the to-be-aged simulated face graph and the pixel points to be calculated and processed on the target aging image, the topological deformation of the image can be realized during aging simulation, and accuracy loss, algorithm errors and the like are not easy to occur.
Step S120: and taking the pixel points of the to-be-aged simulated face image contained in the first type triangular grid as first type pixel points, and obtaining the triangular coordinates of the first type pixel points in the first type triangular surface based on the original Cartesian coordinates of the first type pixel points of the to-be-aged simulated face image and the triangular coordinate system formed by the three vertexes of the first type triangular surface in the first type triangular grid.
Specifically, in the cartesian coordinate system, three vertices of each first-class triangular surface in the first-class triangular mesh form a triangle, respectively, and form a triangle coordinate system. And taking a triangle formed by three vertexes of a first triangular surface where the first type pixel point is positioned in the first type triangular grid as a kernel of a triangle coordinate system, namely, taking the triangle formed by the first type triangular surface where the first type pixel point is positioned as a center, and calculating to obtain the triangle coordinate system of the first type pixel point in the corresponding first type triangular surface.
Specifically, any one first type triangular surface in the first type triangular mesh is taken, three vertexes of the triangular surface are A, B and C respectively, a triangle is formed by the three vertexes, any one first type pixel point P in the first type triangular surface is taken, and the coordinate of the point P in a triangular coordinate system formed by the vertexes A, B and C is (x) a ,x b ). The triangular coordinates of point P can be obtained based on the following formula:
T=MC
wherein t= (x a x b ) T ;C=(p x p y 1) T
k t =(A y -C y )(B x -C x )-(A x -C x )(B y -C y )。
The primary Cartesian coordinates of the first type pixel point P are (P x ,P y ) The original Cartesian coordinates of point A are (A x ,A y ) The original Cartesian coordinates of point B are (B x ,B y ) The original Cartesian coordinates of point C are (C x ,C y )。
According to the invention, the triangular coordinate system formed by the triangular faces of the first type in the triangular grids of the first type and the first type pixel points are beneficial to accurately obtaining the first type pixel points on the face image to be aged in aging simulation, and the pixel values of the pixel points to be mapped on the target aged face image are improved, so that the efficiency of traversing the first type pixel points is improved.
Step S130: and acquiring a second type triangular surface corresponding to the first type triangular surface where each first type pixel point is positioned in the second type triangular grid, and acquiring a new Cartesian coordinate of each first type pixel point on the target aging face image based on the corresponding triangular coordinate and a triangular coordinate system formed by three vertexes in the corresponding second type triangular surface.
Specifically, three vertexes of each second class triangular surface in the second class triangular mesh form a triangle respectively, and form a triangle coordinate system. Based on the step S110, the first triangular faces in the first triangular meshes and the second triangular faces in the second triangular meshes are in one-to-one correspondence, so that the second triangular faces corresponding to the first triangular faces in the second triangular meshes where the first pixel points are located can be obtained.
Specifically, a first type pixel point P in a first type triangle mesh and a second type triangle face in a second type triangle mesh corresponding to the first type triangle face where the first type pixel point P is located are taken. Taking the triangular surface of the second type, recording three vertexes of the triangular surface as A, B and C respectively, and forming a triangle by the three vertexes. The new cartesian coordinates of point P can be obtained based on the following formula:
P=OW
wherein p= (P x P y );W=(x a x b 1-x a -x b )。
The primary Cartesian coordinates of the first type pixel point P are (Px, P y ) The original Cartesian coordinates of point A are (A x ,A y ) The original Cartesian coordinates of point B are (B x ,B y ) The original Cartesian coordinates of point C are (C x ,C y ) The triangular coordinates of the point P are (x a ,x b )。
The invention is based on the one-to-one correspondence relation between each first triangular surface in the first triangular mesh and each second triangular surface in the second triangular mesh after the simulated face image to be aged and the target aged face image are triangulated respectively when the faces are aligned, and the new Cartesian coordinates of each first pixel point on the target aged face image can be reversibly converted. The invention is beneficial to accurately mapping and adjusting the ageing facial texture when the human face is aged for the simulated human face image to be aged.
Step S140: and taking the pixel points of the target aging image contained in the second class triangle mesh as second class pixel points, and collecting the pixel values of the second class pixel points corresponding to the new Cartesian coordinates on the target aging face image according to the new Cartesian coordinates.
Specifically, the new cartesian coordinates are corresponding cartesian coordinates in a first class of pixel points in a first class of triangle meshes of the face image to be simulated to be aged and a second class of triangle meshes of the target aged face image during aging simulation, and further pixel values of the second class of pixel points of the cartesian coordinates are obtained.
According to the invention, the new Cartesian coordinates of each first type of pixel point can be inversely transformed so as to search the pixel value of the mapping required by the aging adjustment of each first type of pixel point in the aging simulation of the target aging face image, thereby being beneficial to improving the fidelity and the operation efficiency of the face aging simulation.
Step S150: and obtaining the pixel value of the first type pixel point on the aging image to be output determined based on the aging analog face image to be output according to the sum of the pixel value of the first type pixel point on the aging analog face image to be aged and the pixel value of the corresponding second type pixel point, so as to obtain the aging image to be output.
Specifically, the pixel values of the first type pixel points on the to-be-aged simulated face image are fused with the pixel values of the corresponding second type pixel points, so that the to-be-output aged image is prevented from being distorted.
The invention is based on the establishment of the triangle coordinate system, the first class triangle grids and the second class triangle grids, and the new Cartesian coordinates are inversely transformed through the triangle coordinate system, so that when each first class pixel point of the human face image to be aged is aged and adjusted, the pixel value of the second class pixel point can be accurately searched on the coordinates corresponding to the target aged human face image, and meanwhile, the continuity in the aging simulation process can be ensured, and the condition of incomplete aging of the aged image to be output is prevented.
According to the human face aging simulation method, the first type triangle mesh and the second type triangle mesh which are obtained by triangulating the human face images to be aged and the target aging human face images and aligned with each other are obtained, and the simulation area to be aged is accurately determined and obtained. And the triangle coordinates of the first type of pixels are converted based on the original Cartesian coordinates of the first type of pixels of the face image to be aged and the triangle surfaces in the first type of triangle grids, so that the pixel values of the corresponding pixels of the first type of pixels on the target aged face image are inversely converted through the second type of triangle surfaces in the second type of triangle grids and the triangle coordinates, and the aged image to be output is further obtained. The invention constructs triangle grids of the to-be-aged simulated face image and the target aged face image, and inverts and converts new Cartesian coordinates of each first type pixel point of the to-be-aged simulated face image on the target aged face image based on a triangle coordinate system. And further accurately acquiring pixel values of all pixel points of the target aging image, and carrying out aging simulation on the to-be-aged simulated human face image by combining the pixel values of all first-class pixel points of the to-be-aged simulated human face image. The aging simulation process is simpler, the topological deformation processing of the image is easy to realize, the fidelity of the aging simulation image to be output is improved, the timeliness of the image simulation is improved, and the more natural human face aging image can be effectively synthesized.
In a specific embodiment, according to a sum of pixel values of a first type of pixel points on an image of a to-be-aged analog human face and pixel values of corresponding second type of pixel points, the step of obtaining the to-be-output aged image by obtaining the pixel values of the first type of pixel points on the to-be-output aged image based on the to-be-aged analog human face image includes:
step S4: and mapping the determined pixel value on the aging image to be output to the first type pixel point corresponding to the human face image to be aged according to the original Cartesian coordinates of the first type pixel point corresponding to the new Cartesian coordinates and according to the texture mapping, so as to obtain the aging image to be output.
In particular, texture mapping is the process of mapping texels on a target aging face image to pixels in a simulated face image to be aged. Specifically, the original Cartesian coordinates of the first type of pixel points corresponding to the new Cartesian coordinates are searched on the to-be-aged simulated face image, the determined pixel values on the to-be-output aged image are mapped onto the first type of pixel points corresponding to the to-be-aged simulated face image according to texture mapping, and then the to-be-output aged image is obtained.
The invention is based on texture mapping and the corresponding relation between the original Cartesian coordinates and the new Cartesian coordinates of the first type pixel points, and can improve the accuracy and the operation efficiency of aging simulation.
In a specific embodiment, the method for obtaining the aging image to be output includes:
the operation is based on the following formula:
SRC new (i,j)=SRC(i,j)·(1-t)+REF(i new ,j new )·t(1)
wherein SRC new (i, j) determining pixel values on an aging image to be output for a first type of pixel points based on the aging-to-be-aged simulated face image; SRC (i, j) is the pixel value of the first type pixel point on the to-be-aged simulated face image; REF (i) new ,j new ) Aging person at target for new Cartesian coordinatesPixel values of corresponding second class pixel points on the face image; t is a preset adjustment constant for adjusting the degree of aging.
And taking the operation result as the pixel value of the first type pixel point on the to-be-aged output image determined based on the to-be-aged simulated face image, and obtaining the to-be-aged output image.
The invention aims to reduce the distortion degree of an aging image to be output, adds the pixel value of a first type pixel point on the aging-simulated human face image to be aged, takes an adjustment constant for adjusting the aging degree as a coefficient, and further takes the operation result as the pixel value of the first type pixel point on the aging-simulated human face image to be aged. According to the invention, the pixel values of the first type pixel points are converted to finish the aging simulation of the human face image to be aged, so that the output image to be aged is obtained, the efficiency and the precision of the aging simulation are improved, and the output image to be aged is close to a real human face.
Referring to fig. 2, in combination with fig. 3, fig. 4, fig. 5, and fig. 6, in a specific embodiment, triangulating a to-be-aged simulated face image aligned with each other to obtain a first class of triangle meshes, triangulating a target aged face image to obtain a second class of triangle meshes includes:
step S210: calibrating a first type of preset position characteristic point in the to-be-aged simulated face image and a second type of preset position characteristic point in the target aged face image; the first type of preset position feature points are pixel points of the human face positions of the to-be-aged simulated human face image, wherein the human face feature points are not calibrated when the human faces are aligned; the second type of preset position feature points are the pixel points of the face positions of the target aging image, which are not subjected to face feature point calibration when the faces of the second type of preset position feature points are aligned.
Specifically, the target aging face image may be an image of aging characteristics of any one target aging age group. According to the invention, the aging simulation area of the human face image to be aged can be limited by marking the first type preset part characteristic points and the second type preset part characteristic points, the integrity of the aging area of the human face is ensured, and the problems of missing the aging simulation part, uneven textures of the output image to be aged and discontinuous or distorted image breakage are prevented.
Step S220: triangulating a determined face area of the simulated face image to be aged according to the feature points of each first preset part and the feature points of each face of the simulated face image to be aged to obtain a first triangular mesh; and triangulating the face area of the determined target aging face image according to the feature points of the second preset parts and the feature points of the target aging face image to obtain a second class triangle network.
Specifically, as shown in fig. 4, fig. 4 (a) is a face-aligned simulated face image to be aged, and fig. 4 (b) is a face-aligned target aged face image. As shown in fig. 5, the small gray points in fig. 5 are feature points of each first type of preset part of the forehead part, where the feature points of the first type of preset part may be, but are not limited to, feature points of a face part, which are not calibrated by the face feature points, when the (a) to-be-aged human face image and the (b) target aged human face image in fig. 3 are aligned with each other, as shown in fig. 3. Further, after the face area of the to-be-aged simulated face image and the face area of the target aged face image are determined, triangulation is performed respectively, and an effect diagram shown in fig. 6 is obtained.
The invention determines the human face area of the aging simulation, is beneficial to accurately obtaining the pixel value of the pixel points which should be mapped on the target aging human face image by each first type of pixel points during the aging simulation, and improves the fidelity and the operation efficiency of the human face aging simulation.
Referring to fig. 5, in a specific embodiment, before calibrating the first type of preset location feature points in the to-be-aged simulated face image and the second type of preset location feature points in the target aged face image, the method further includes:
step S8: and respectively marking out each face characteristic point of the to-be-aged simulated face image and each face characteristic point of the target aged face image, and carrying out face alignment on the to-be-aged simulated face image and the target aged image.
Specifically, by face feature point calibration, the shape of a face and a face region in an image can be detected and identified. When the center point, the nose tip point and the two mouth corner points of the two eyeballs of the to-be-aged simulated face image and the target aged face image are aligned, the two faces can be regarded as being aligned. As shown in fig. 5, fig. 5 is an effect diagram of face alignment of a target aging face image to a to-be-aged simulated face image.
The invention is helpful to accurately map the texture of the aged human face and adjust the aging when the human face is aged by the human face feature point calibration and the human face alignment.
Referring to fig. 6, in a specific embodiment, after triangulating the to-be-aged simulated face image aligned with each other to obtain a first class of triangle meshes and triangulating the target aged face image to obtain a second class of triangle meshes, the method further includes:
step S12: and traversing each pixel point of the to-be-aged simulated face image, and identifying all first-type pixel points respectively contained in each first-type triangular surface in the first-type triangular grid.
Specifically, through the step, a first triangular surface where the first type of pixel points are located in the first type of triangular meshes can be identified, and the pixel points of the to-be-aged simulated face image which are not contained in the first type of triangular meshes are removed. Specifically, in the image shown in fig. 6, given a pixel point of a face image to be aged and a triangular surface of a first type, a triangle coordinate (x a ,x b ) Let x c =1-x a -x b If x a ,x b ,x c At least one of which is negative, the point is outside the triangle; if x a ,x b ,x c All are non-negative numbers and at least one of them is 0, then the pixel point is on triangle edge; if x a ,x b ,x c All positive numbers, the points are inside the triangle. And further can recognize the simulated face image to be agedWhether the pixel points are in a first type triangle mesh or not, and in which first type triangular surface each first type pixel point in the first type triangle mesh is contained.
The human face aging simulation method can exclude the pixels of the human face image to be aged, which are not contained in the first type triangular meshes, so that the first type triangular face where each first type pixel is located is identified. The invention can calculate the triangle coordinates of the first type pixel points, is beneficial to improving the precision of texture mapping when performing aging simulation, and simplifies the operation process and the operation efficiency.
Referring to fig. 10, in combination with fig. 4, fig. 7, fig. 8, and fig. 9, in a specific embodiment, after obtaining the pixel values of the first type of pixels on the aging image to be output determined based on the aging analog face image to be aged, obtaining the aging image to be output further includes:
step S310: and according to the second class triangle mesh, performing black-and-white binarization on the target aging face image to obtain a black-and-white binarization image of the target aging image in the second class triangle mesh.
Specifically, the black-and-white binarization threshold value can be obtained to perform black-and-white binarization, and the second type pixel points in the second type triangular surface of the second type triangular grid are set to be white, otherwise, are set to be black, so that a black-and-white binarization image of the target aging image in the second type triangular grid is obtained as shown in fig. 8.
Step S320: and carrying out poisson fusion on the ageing images to be output according to the black-white binarized images to obtain final ageing simulation images.
Specifically, a gradient field M in the face region range shown in fig. 4 (b) and a gradient field N of the image in the face region range shown in fig. 4 (a) are obtained respectively, further, a gradient field Z shown in fig. 7 is obtained according to the gradient field M and the gradient field N, and fig. 7 is a schematic diagram after texture mapping in the face aging simulation method, that is, an aging image to be fused is to be output. Further, the divergence is obtained by the gradient field Z as shown in fig. 7. Specifically, the pixel value of the fusion result is obtained based on the following formula:
Ax=b
where a is a coefficient matrix constructed according to the image size of fig. 7, b is the divergence, and x is the pixel value of the fusion result. I.e. the final output aging simulation image as shown in fig. 9 can be obtained by poisson fusion according to the above equation.
The human face aging simulation method can enable the final output aging image to be seamless and more natural, and can improve the fidelity of aging simulation.
Referring to fig. 11, as a preferred embodiment, the face aging simulation method of the present invention further includes the following steps:
step S10: and (5) inputting an image.
The input simulated face image RCS to be aged is shown in fig. 3 (a) and the target aged face image is shown in fig. 3 (b).
Step S20: face detection and face feature point positioning.
And carrying out face detection and face feature point positioning on the simulated face image SRC to be aged and the target aged face image REF.
Step S30: the faces are aligned.
And carrying out face alignment on the target aging face image REF to the to-be-aged simulated face image SRC, wherein the alignment effect is shown in fig. 4.
Step S40: and (5) calibrating forehead characteristic points.
The characteristic points of the forehead part are calibrated by using the general standard proportion of the face length and the face width of a human body, namely 7 forehead characteristic points marked by the positions of the small gray points as shown in figure 5.
Step S50: delaunay triangulation
Based on the deformation of the triangular coordinate system. Triangulated Delaunay triangulation is performed on the simulated face image RCS to be aged and the target aging image REF to obtain a first class triangle mesh and a second class triangle mesh. The triangulation effect of the simulated face image to be aged is shown in fig. 6.
Step S60: and simulating the traversal of the face image RCS and the first type triangular mesh to be aged.
And traversing all first-class pixel points in the to-be-aged simulated face image RCS, and identifying all first-class pixel points respectively contained in all first-class triangular faces in the first-class triangular grids. Further, pixel points not in the triangular surface of the first type are not processed in the aging simulation.
Step S70: the original Cartesian coordinates are converted into triangle coordinates.
Judging a first type triangular surface where the first type pixel point (i, j) is located, and recording three vertexes of the first type triangular surface as a, b and c. Triangle coordinates of the first type pixel point (i, j) are calculated using a triangle formed by the three vertices as a kernel of the triangle coordinate system. Wherein (i, j) is the primary Cartesian coordinates of the first class of pixel points.
Step S80: and (5) texture mapping.
And inversely transforming new Cartesian coordinates of the first type pixel points (i, j) in the target aging face image REF by using a one-to-one correspondence relation between the RSC corresponding to the to-be-aged simulated face image and the triangular surface of the target aging face image REF. Texture mapping based on triangle coordinate deformation is accomplished as follows: the effect of the texture mapping is shown in fig. 7, and the aging image to be output is obtained.
SRC new (i,j)=SRC(i,j)·(1-t)+REF(i new ,j new )·t(1)
Step S90: poisson fusion.
Poisson fusion is performed on the ageing images to be output to be fused of fig. 7. The second type pixel points in the second type triangular surface of the second type triangular mesh are set to be white, otherwise, are set to be black, and therefore, as shown in fig. 8, a black-and-white binarized image (mask) of the target aging image in the second type triangular mesh is obtained. Further, a gradient field M of the mask region shown in fig. 4 (b) and a gradient field N of the image in the face region shown in fig. 4 (a) are obtained respectively, further, a gradient field Z shown in fig. 7 is obtained according to the gradient field M and the gradient field N, and fig. 7 is a schematic diagram after texture mapping in the face aging simulation method, namely, an aging image to be fused is to be output. Further, the divergence is obtained by the gradient field Z as shown in fig. 7. Further, a coefficient matrix is constructed according to the image size of fig. 7, based on the coefficient matrix and the divergence, and a poisson fusion algorithm is utilized to enable the inside and outside of the mask area to be seamlessly fused, and the fusion effect is as shown in fig. 9, namely, the aging simulation image is finally output.
The invention constructs triangle grids of the to-be-aged simulated face image and the target aged face image, and inverts and converts new Cartesian coordinates of each first type pixel point of the to-be-aged simulated face image on the target aged face image based on a triangle coordinate system. And further accurately acquiring pixel values of all pixel points of the target aging image, and carrying out aging simulation on the to-be-aged simulated human face image by combining the pixel values of all first-class pixel points of the to-be-aged simulated human face image. The aging simulation process is simpler, the topological deformation processing of the image is easy to realize, the fidelity of the aging simulation image to be output is improved, the timeliness of the image simulation is improved, and the more natural human face aging image can be effectively synthesized.
Referring to fig. 12, in one embodiment, the present invention provides a face aging simulation apparatus, including:
the triangle mesh acquisition module 110 is configured to triangulate the to-be-aged simulated face images aligned with each other to obtain a first class of triangle meshes, and triangulate the target aged face image to obtain a second class of triangle meshes.
The triangle coordinate conversion module 120 is configured to take pixels of the to-be-aged simulated face image included in the first type triangle mesh as first type pixels, and obtain triangle coordinates of each first type pixel in the first type triangular surface based on the original cartesian coordinates of each first type pixel of the to-be-aged simulated face image and a triangle coordinate system formed by three vertices of the first type triangular surface where the first type pixel is located in the first type triangle mesh.
The new cartesian coordinate conversion module 130 is configured to obtain a second type triangular surface corresponding to the first type triangular surface where each first type pixel point is located in the second type triangular grid, and obtain a new cartesian coordinate of each first type pixel point on the target aging face image based on the corresponding triangular coordinate and a triangular coordinate system formed by three vertices in the corresponding second type triangular surface.
The aging data collection module 140 is configured to collect, according to each new cartesian coordinate, pixel values of the second type pixel points corresponding to each new cartesian coordinate on the target aging face image, with the second type pixel points of the target aging image included in the second type triangle mesh.
The aging simulation module 150 is configured to obtain, according to a sum of a pixel value of a first type of pixel point on the to-be-aged simulated face image and a pixel value of a corresponding second type of pixel point, a pixel value of the first type of pixel point on the to-be-output aging image determined based on the to-be-aged simulated face image, and obtain the to-be-output aging image.
According to the human face aging simulation device, the first type triangle mesh and the second type triangle mesh which are obtained by triangulating the human face images to be aged and the target aging human face images and aligned with each other are obtained, and the area to be aged and simulated is accurately determined and obtained. And the triangle coordinates of the first type of pixels are converted based on the original Cartesian coordinates of the first type of pixels of the face image to be aged and the triangle surfaces in the first type of triangle grids, so that the pixel values of the corresponding pixels of the first type of pixels on the target aged face image are inversely converted through the second type of triangle surfaces in the second type of triangle grids and the triangle coordinates, and the aged image to be output is further obtained. The invention constructs triangle grids of the to-be-aged simulated face image and the target aged face image, and inverts and converts new Cartesian coordinates of each first type pixel point of the to-be-aged simulated face image on the target aged face image based on a triangle coordinate system. And further accurately acquiring pixel values of all pixel points of the target aging image, and carrying out aging simulation on the to-be-aged simulated human face image by combining the pixel values of all first-class pixel points of the to-be-aged simulated human face image. The aging simulation process is simpler, the topological deformation processing of the image is easy to realize, the fidelity of the aging simulation image to be output is improved, the timeliness of the image simulation is improved, and the more natural human face aging image can be effectively synthesized.
In a specific embodiment, the aging simulation module includes:
the texture mapping unit is used for mapping the determined pixel value on the aging image to be output to the first type pixel point corresponding to the aging-simulated human face image according to the original Cartesian coordinate of the first type pixel point corresponding to the new Cartesian coordinate and according to the texture mapping, so as to obtain the aging image to be output.
The invention is based on texture mapping and the corresponding relation between the original Cartesian coordinates and the new Cartesian coordinates of the first type pixel points, and can improve the accuracy and the operation efficiency of aging simulation.
In a specific embodiment, the aging simulation module further comprises:
an aging adjustment unit for performing an operation based on the following formula:
SRC new (i,j)=SRC(i,j)·(1-t)+REF(i new ,j new )·t(1)
wherein SRC new (i, j) determining pixel values on an aging image to be output for a first type of pixel points based on the aging-to-be-aged simulated face image; SRC (i, j) is the pixel value of the first type pixel point on the to-be-aged simulated face image; REF (i) new ,j new ) The pixel values of the second type of pixel points corresponding to the new Cartesian coordinates on the target aging face image are obtained; t is a preset adjustment constant for adjusting the aging degree; (i, j) is the original Cartesian coordinates of the corresponding first type pixel points on the aging image to be output, which are determined based on the aging-to-be-simulated face image; (i) new ,j new ) The new cartesian coordinates representing the first class of pixel points.
And the data processing unit is used for taking the operation result as the pixel value of the first type pixel point on the to-be-aged output image determined based on the to-be-aged simulated face image to obtain the to-be-aged output image.
The invention aims to reduce the distortion degree of an aging image to be output, adds the pixel value of a first type pixel point on the aging-simulated human face image to be aged, takes an adjustment constant for adjusting the aging degree as a coefficient, and further takes the operation result as the pixel value of the first type pixel point on the aging-simulated human face image to be aged. According to the invention, the pixel values of the first type pixel points are converted to finish the aging simulation of the human face image to be aged, so that the output image to be aged is obtained, the efficiency and the precision of the aging simulation are improved, and the output image to be aged is close to a real human face.
In a specific embodiment, the acquiring triangle mesh module comprises:
the characteristic point calibration unit is used for calibrating the characteristic points of the first type of preset parts in the to-be-aged simulated face image and the characteristic points of the second type of preset parts in the target aged face image; the first type of preset position feature points are pixel points of the human face positions of the to-be-aged simulated human face image, wherein the human face feature points are not calibrated when the human faces are aligned; the second type of preset position feature points are the pixel points of the face positions of the target aging image, which are not subjected to face feature point calibration when the faces of the second type of preset position feature points are aligned.
The triangulation unit is used for performing triangulation on the determined face area of the to-be-aged simulated face image according to the feature points of each first preset part and the feature points of each face of the to-be-aged simulated face image to obtain a first class triangle mesh; and triangulating the face area of the determined target aging face image according to the feature points of the second preset parts and the feature points of the target aging face image to obtain a second class triangle network.
The invention determines the human face area of the aging simulation, is beneficial to accurately obtaining the pixel value of the pixel points which should be mapped on the target aging human face image by each first type of pixel points during the aging simulation, and improves the fidelity and the operation efficiency of the human face aging simulation.
In a specific embodiment, the method further comprises:
the face alignment module is used for respectively marking out each face characteristic point of the to-be-aged simulated face image and each face characteristic point of the target aged face image, and carrying out face alignment on the to-be-aged simulated face image and the target aged image.
The invention is helpful to accurately map the texture of the aged human face and adjust the aging when the human face is aged by the human face feature point calibration and the human face alignment.
In a specific embodiment, the method further comprises:
the pixel point traversing module is used for traversing each pixel point of the to-be-aged simulated face image and identifying all first-class pixel points respectively contained in each first-class triangular surface in the first-class triangular grid.
The human face aging simulation device can exclude the pixels of the human face image to be aged, which are not contained in the first type triangular meshes, so that the first type triangular face where each first type pixel is located is identified. The invention can calculate the triangle coordinates of the first type pixel points, is beneficial to improving the precision of texture mapping when performing aging simulation, and simplifies the operation process and the operation efficiency.
In a specific embodiment, the method further comprises:
and the binarization module is used for carrying out black-and-white binarization on the target aging face image according to the second class triangle mesh to obtain a black-and-white binarization image of the target aging image in the second class triangle mesh.
And the image fusion module is used for carrying out poisson fusion on the ageing images to be output according to the black-white binarized images to obtain final ageing simulation images.
The human face aging simulation device can enable the final output aging image to be seamless and more natural, and can improve the fidelity of aging simulation.
For specific limitations of the face aging simulation apparatus, reference may be made to the above limitations of the face aging simulation method, and detailed descriptions thereof are omitted herein. The modules in the face aging simulation device can be all or partially realized by software, hardware and a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
Referring to fig. 13, in one embodiment, the present invention provides a face aging simulation apparatus, which may be a server, whose internal structure diagram may be as shown in fig. 13. The system of the human face aging simulation equipment comprises a processor, a memory and a network interface which are connected through a system bus. Wherein the processor is configured to provide computing and control capabilities. The memory of the human face aging simulation device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the human face aging simulation device is used for storing image data. The network interface of the human face aging simulation device is used for communicating with an external terminal through network connection. The computer program, when executed by the processor, may implement a face aging simulation method.
It will be appreciated by those skilled in the art that the structure shown in fig. 11 is merely a block diagram of a portion of the structure associated with the present application and is not limiting of the computer device to which the present application applies, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In one embodiment, the present invention provides a computer readable storage medium having a computer program stored thereon, which when executed by a processor, implements the steps of a face aging simulation method. Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the various embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other manners as well. The apparatus embodiments described above are merely illustrative, for example, flow diagrams and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and articles of manufacture according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional modules or units in various embodiments of the invention may be integrated together to form a single part, or the modules may exist alone, or two or more modules may be integrated to form a single part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored on a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a smart phone, a personal computer, a server, a network device, or the like) to perform all or part of the steps of the method of the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing description of the preferred embodiments of the invention is not intended to be limiting, but rather is intended to cover all modifications, equivalents, alternatives, and improvements that fall within the spirit and scope of the invention.

Claims (8)

1. The human face aging simulation method is characterized by comprising the following steps of:
respectively marking each face characteristic point of the to-be-aged simulated face image and each face characteristic point of the target aged face image, and carrying out face alignment on the to-be-aged simulated face image and the target aged face image;
calibrating a first type of preset position characteristic point in the to-be-aged simulated face image and a second type of preset position characteristic point in the target aged face image; the first type of preset position feature points are pixel points of the face positions of the to-be-aged simulated face image, wherein the face feature points are not calibrated when faces of the first type of preset position feature points are aligned; the second type of preset position feature points are pixel points of the face positions of the target aging face image, which are not subjected to face feature point calibration when the faces of the second type of preset position feature points are aligned;
triangulating a face region of the to-be-aged simulated face image according to the feature points of the first preset parts and the feature points of the to-be-aged simulated face image to obtain a first class triangle mesh; performing triangulation on the determined face area of the target aging face image according to the second-class preset part feature points and the face feature points of the target aging face image to obtain a second-class triangle network;
Taking pixel points of the to-be-aged simulated face image contained in the first type triangular mesh as first type pixel points, and obtaining triangular coordinates of the first type pixel points in a first type triangular surface based on original Cartesian coordinates of the first type pixel points of the to-be-aged simulated face image and a triangular coordinate system formed by three vertexes of the first type triangular surface where the first type pixel points are located in the first type triangular mesh;
acquiring a second triangular surface corresponding to the first triangular surface of each first type pixel point in the second triangular grid, and acquiring a new Cartesian coordinate of each first type pixel point on the target aging face image based on the corresponding triangular coordinate and a triangular coordinate system formed by three vertexes in the corresponding second triangular surface;
taking the pixel points of the target aging face image contained in the second class triangular mesh as second class pixel points, and collecting the pixel values of the second class pixel points corresponding to the new Cartesian coordinates on the target aging face image according to the new Cartesian coordinates;
And obtaining the pixel value of the first type pixel point on the aging image to be output determined based on the aging analog face image to be aged according to the sum of the pixel value of the first type pixel point on the aging analog face image to be aged and the pixel value of the corresponding second type pixel point, so as to obtain the aging image to be output.
2. The face aging simulation method according to claim 1, wherein the step of obtaining the to-be-output aging image from the sum of the pixel values of the first type of pixel points on the to-be-aged simulated face image and the pixel values of the corresponding second type of pixel points by obtaining the pixel values of the first type of pixel points on the to-be-output aging image determined based on the to-be-aged simulated face image includes:
and mapping the pixel value on the determined aging image to be output to the first type pixel point corresponding to the analog human face image to be aged according to the original Cartesian coordinates of the first type pixel point corresponding to the new Cartesian coordinates and according to texture mapping, so as to obtain the aging image to be output.
3. The face aging simulation method according to claim 1, wherein the method for obtaining the aging image to be output comprises:
The operation is based on the following formula:
wherein,,determining pixel values on the aging image to be output for the first type pixel points based on the aging-to-be-aged simulated face image; />The pixel values of the first type pixel points on the to-be-aged simulated face image are obtained; />The pixel values of the second type of pixel points corresponding to the new Cartesian coordinates on the target aging face image are obtained;tis a preset adjustment constant for adjusting the aging degree; (ij) The primary Cartesian coordinates of the corresponding first type pixel points on the to-be-output aging image are determined based on the to-be-aged simulated face image;-said new cartesian coordinates representing said first class of pixels;
and taking the operation result as a pixel value of a first type pixel point on the to-be-aged output image determined based on the to-be-aged simulated face image, and obtaining the to-be-aged output image.
4. A face aging simulation method according to any one of claims 1 to 3, wherein, after triangulating the face images to be aged aligned with each other to obtain a first class of triangular meshes and triangulating the target aging face image to obtain a second class of triangular meshes, the method further comprises:
And traversing each pixel point of the to-be-aged simulated face image, and identifying all first-type pixel points respectively contained in each first-type triangular surface in the first-type triangular grid.
5. The face aging simulation method according to claim 4, wherein after obtaining pixel values of the first type of pixels on an aging image to be output determined based on the aging simulated face image, obtaining the aging image to be output, further comprises:
performing black-and-white binarization on the target aging face image according to the second class triangle mesh to obtain a black-and-white binarization image of the target aging face image in the second class triangle mesh;
and carrying out poisson fusion on the aging image to be output according to the black-white binarized image to obtain a final output aging simulation image.
6. A human face aging simulation device, comprising:
the method comprises the steps of obtaining a triangular grid module, wherein the triangular grid module is used for respectively marking each face characteristic point of an analog face image to be aged and each face characteristic point of a target aging face image, and carrying out face alignment on the analog face image to be aged and the target aging face image; calibrating a first type of preset position characteristic point in the to-be-aged simulated face image and a second type of preset position characteristic point in the target aged face image; the first type of preset position feature points are pixel points of the face positions of the to-be-aged simulated face image, wherein the face feature points are not calibrated when faces of the first type of preset position feature points are aligned; the second type of preset position feature points are pixel points of the face positions of the target aging face image, which are not subjected to face feature point calibration when the faces of the second type of preset position feature points are aligned; triangulating a face region of the to-be-aged simulated face image according to the feature points of the first preset parts and the feature points of the to-be-aged simulated face image to obtain a first class triangle mesh; performing triangulation on the determined face area of the target aging face image according to the second-class preset part feature points and the face feature points of the target aging face image to obtain a second-class triangle network;
The triangle coordinate conversion module is used for taking pixel points of the to-be-aged simulated face image contained in the first type triangle grid as first type pixel points, and obtaining triangle coordinates of the first type pixel points in the first type triangular surface based on the original Cartesian coordinates of the first type pixel points of the to-be-aged simulated face image and a triangle coordinate system formed by three vertexes of the first type triangular surface where the first type pixel points are located in the first type triangle grid;
the new Cartesian coordinate conversion module is used for acquiring a second type triangular surface corresponding to the first type triangular surface where each first type pixel point is located in the second type triangular grid, and acquiring a new Cartesian coordinate of each first type pixel point on the target aging face image based on the corresponding triangular coordinate and a triangular coordinate system formed by three vertexes in the corresponding second type triangular surface;
the aging data acquisition module is used for taking the pixel points of the target aging face image contained in the second class triangular mesh as second class pixel points, and acquiring the pixel values of the second class pixel points corresponding to the new Cartesian coordinates on the target aging face image according to the new Cartesian coordinates;
And the aging simulation module is used for obtaining the pixel value of the first type pixel point on the aging image to be output determined based on the aging simulation face image to be output according to the sum of the pixel value of the first type pixel point on the aging simulation face image to be aged and the pixel value of the corresponding second type pixel point, so as to obtain the aging image to be output.
7. A facial aging simulation device comprising a memory and a processor, said memory storing a computer program, characterized in that the processor implements the steps of the method according to any one of claims 1 to 5 when executing said computer program.
8. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 5.
CN201811324007.3A 2018-11-08 2018-11-08 Face aging simulation method, device and equipment Active CN109584327B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811324007.3A CN109584327B (en) 2018-11-08 2018-11-08 Face aging simulation method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811324007.3A CN109584327B (en) 2018-11-08 2018-11-08 Face aging simulation method, device and equipment

Publications (2)

Publication Number Publication Date
CN109584327A CN109584327A (en) 2019-04-05
CN109584327B true CN109584327B (en) 2023-07-25

Family

ID=65921811

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811324007.3A Active CN109584327B (en) 2018-11-08 2018-11-08 Face aging simulation method, device and equipment

Country Status (1)

Country Link
CN (1) CN109584327B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110163832B (en) * 2019-05-24 2021-06-08 北京百度网讯科技有限公司 Face fusion method and device and terminal
CN111652791B (en) * 2019-06-26 2024-03-08 广州虎牙科技有限公司 Face replacement display method, face replacement live broadcast device, electronic equipment and storage medium
CN111652024B (en) * 2019-07-05 2023-09-01 广州虎牙科技有限公司 Face display and live broadcast method and device, electronic equipment and storage medium
CN111275610B (en) * 2020-01-08 2023-08-18 杭州小影创新科技股份有限公司 Face aging image processing method and system
CN112330529A (en) * 2020-11-03 2021-02-05 上海镱可思多媒体科技有限公司 Dlid-based face aging method, system and terminal
CN112884642B (en) * 2021-03-23 2022-07-08 福州大学 Real-time facial aging simulation method based on face recognition technology
CN113762173B (en) * 2021-09-09 2024-05-07 北京地平线信息技术有限公司 Training method and device for face optical flow estimation and optical flow value prediction model

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104599325A (en) * 2013-10-30 2015-05-06 中国科学院苏州纳米技术与纳米仿生研究所 Three-dimensional face resampling method
CN105117712A (en) * 2015-09-15 2015-12-02 北京天创征腾信息科技有限公司 Single-sample human face recognition method compatible for human face aging recognition
CN105787974A (en) * 2014-12-24 2016-07-20 中国科学院苏州纳米技术与纳米仿生研究所 Establishment method for establishing bionic human facial aging model

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104599325A (en) * 2013-10-30 2015-05-06 中国科学院苏州纳米技术与纳米仿生研究所 Three-dimensional face resampling method
CN105787974A (en) * 2014-12-24 2016-07-20 中国科学院苏州纳米技术与纳米仿生研究所 Establishment method for establishing bionic human facial aging model
CN105117712A (en) * 2015-09-15 2015-12-02 北京天创征腾信息科技有限公司 Single-sample human face recognition method compatible for human face aging recognition

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"三角形坐标系下人脸图像连续性研究";陆飞等;《计算机辅助设计与图形学学报》;20170531;第821-828页 *

Also Published As

Publication number Publication date
CN109584327A (en) 2019-04-05

Similar Documents

Publication Publication Date Title
CN109584327B (en) Face aging simulation method, device and equipment
CN111968235B (en) Object attitude estimation method, device and system and computer equipment
CN109829930B (en) Face image processing method and device, computer equipment and readable storage medium
CN109859098B (en) Face image fusion method and device, computer equipment and readable storage medium
WO2020119458A1 (en) Facial landmark detection method and apparatus, computer device and storage medium
CN111161349B (en) Object posture estimation method, device and equipment
CN111523414A (en) Face recognition method and device, computer equipment and storage medium
CN111553858B (en) Image restoration method and system based on generation countermeasure network and application thereof
US11508107B2 (en) Additional developments to the automatic rig creation process
CN113111861A (en) Face texture feature extraction method, 3D face reconstruction method, device and storage medium
CN111382618B (en) Illumination detection method, device, equipment and storage medium for face image
CN105719248A (en) Real-time human face deforming method and system
CN113689578A (en) Human body data set generation method and device
CN115239861A (en) Face data enhancement method and device, computer equipment and storage medium
CN115457492A (en) Target detection method and device, computer equipment and storage medium
CN114049268A (en) Image correction method, image correction device, electronic equipment and computer-readable storage medium
CN115205450A (en) Three-dimensional scanning data processing method, device, system, equipment and medium
CN113012271B (en) Finger three-dimensional model texture mapping method based on UV (ultraviolet) mapping
CN117422802A (en) Three-dimensional figure digital reconstruction method, device, terminal equipment and storage medium
CN109934926B (en) Model data processing method, device, readable storage medium and equipment
CN116977539A (en) Image processing method, apparatus, computer device, storage medium, and program product
CN115630660B (en) Barcode positioning method and device based on convolutional neural network
US20230401670A1 (en) Multi-scale autoencoder generation method, electronic device and readable storage medium
Ma et al. A lighting robust fitting approach of 3D morphable model for face reconstruction
CN117078853B (en) Workpiece defect sample amplification method based on digital twin body and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant