WO2020108610A1 - 图像处理方法、装置、计算机可读介质及电子设备 - Google Patents

图像处理方法、装置、计算机可读介质及电子设备 Download PDF

Info

Publication number
WO2020108610A1
WO2020108610A1 PCT/CN2019/121935 CN2019121935W WO2020108610A1 WO 2020108610 A1 WO2020108610 A1 WO 2020108610A1 CN 2019121935 W CN2019121935 W CN 2019121935W WO 2020108610 A1 WO2020108610 A1 WO 2020108610A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
face
images
area
texture image
Prior art date
Application number
PCT/CN2019/121935
Other languages
English (en)
French (fr)
Inventor
林祥凯
暴林超
凌永根
宋奕兵
刘威
Original Assignee
腾讯科技(深圳)有限公司
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 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Publication of WO2020108610A1 publication Critical patent/WO2020108610A1/zh
Priority to US17/184,571 priority Critical patent/US11961325B2/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/161Detection; Localisation; Normalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/25Fusion techniques
    • G06F18/253Fusion techniques of extracted features
    • 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/60Editing figures and text; Combining figures or text
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • G06T7/73Determining position or orientation of objects or cameras using feature-based methods
    • G06T7/75Determining position or orientation of objects or cameras using feature-based methods involving models

Definitions

  • the present invention relates to the field of computers and communication technologies, and in particular, to an image processing method, device, computer-readable medium, and electronic equipment.
  • Face reconstruction is a key technology, and in practice there are many application scenarios, such as the reconstruction of human face images in 3D virtual reality applications, 3D augmented reality applications, and 3D game applications.
  • the key to determining the reconstruction effect and user experience lies in the reconstruction of facial texture images.
  • the texture images obtained by the texture image reconstruction scheme proposed in the related art are generally rough and have low accuracy.
  • Embodiments of the present invention provide an image processing method, apparatus, computer readable medium, and electronic equipment, which can improve the accuracy of generated texture images to a certain extent.
  • An embodiment of the present invention provides an image processing method, including: separately projecting a face model of a target object to multiple pieces of the target object collected through the multiple perspectives according to multiple perspective parameters corresponding to multiple perspectives In the face image, to determine the correspondence between the area on the face model and the area in the face image; based on the correspondence and the target area in the face model that needs to generate a texture image, Extracting images corresponding to the target area from the plurality of face images respectively; fusing the images corresponding to the target area respectively extracted from the plurality of face images to generate a The texture image is described.
  • An embodiment of the present invention also provides an image processing apparatus, including: a projection unit, configured to respectively project a face model of a target object to all the acquired data through the multiple perspectives according to multiple perspective parameters corresponding to the multiple perspectives Multiple face images of the target object to determine the correspondence between the area on the face model and the area in the face image; an extraction unit is used to determine the relationship between the face and the person The target area in the face model that needs to generate the texture image, extract the images corresponding to the target area from the multiple face images respectively; the fusion unit is used to extract the respective face images from the multiple face images The image corresponding to the target area is fused to generate the texture image.
  • the projection unit is configured to: determine a rotation translation parameter and an orthogonal projection parameter of each face image relative to the face model according to the viewing angle parameter; A rotation and translation parameter of each face image relative to the face model to determine a projection angle of the face model with respect to each face image; a projection of the face model with respect to each face image according to the face model The angle and the orthogonal projection parameters of each face image relative to the face model project each three-dimensional point on the face model into the multiple face images.
  • the projection unit is configured to: determine a position at which the three-dimensional point on the face model is projected onto the respective face images; for the respective face images A first position at which only one three-dimensional point is projected, the three-dimensional point projected at the first position is regarded as a three-dimensional point corresponding to the first position; for each face image, there are multiple three-dimensional points In the second position projected, the three-dimensional point with the smallest depth information among the plurality of three-dimensional points is used as the three-dimensional point corresponding to the second position.
  • the extraction unit is configured to determine, based on the corresponding relationship and the target area in the face model where the texture image needs to be generated, the An area corresponding to the target area; extracting partial images from the areas corresponding to the target area in the respective face images, respectively.
  • the extraction unit is configured to: determine the face orientation contained in each face image according to the viewing angle parameter corresponding to each face image; The orientation of the face contained in the personal face image to determine the image that needs to be extracted from the area corresponding to the target area in each of the face images; according to the need, from the face image corresponding to the target area For the images extracted in the corresponding area, partial images are extracted from the respective face images.
  • the fusion unit is configured to perform fusion processing on the image corresponding to the target area by using a Laplacian pyramid fusion algorithm or a Poisson fusion algorithm.
  • the image processing apparatus further includes: a repair unit for determining a defect area in the texture image that needs to be repaired; and acquiring the defect from a predetermined texture image A repair image corresponding to the area; adding the repair image to the texture image and replacing the defective area to repair the texture image.
  • the repair unit is further configured to adjust the color of the repaired image according to the color of the defective area.
  • the repair unit is configured to: detect the nostril region and/or lip region in the texture image; use the nostril region and/or lip region as the defect region .
  • the image processing apparatus further includes: an illumination removal unit for calculating a spherical harmonic illumination coefficient in the texture image based on a spherical harmonic illumination model; according to the spherical harmonic The illumination coefficient removes the illumination in the texture image.
  • the image processing apparatus further includes: a rendering processing unit, configured to calculate an average color of each pixel in the texture image; and use the average color as the texture
  • the background color of the image generates the background image of the texture image; filtering the boundary between the texture image and the background image to obtain a processed texture image; and processing the person through the processed texture image Face model for rendering.
  • the image processing apparatus further includes: a target area determining unit for cutting the specified three-dimensional face model according to the specified tangent; expanding the three-dimensional along the tangent The face model obtains a two-dimensional face image; a designated area is selected from the two-dimensional face image as the target area.
  • An embodiment of the present invention also provides a computer-readable medium on which a computer program is stored, and when the computer program is executed by a processor, the image processing method as described in the above embodiment is implemented.
  • An embodiment of the present invention also provides an electronic device, including: one or more processors; a storage device, configured to store one or more programs, when the one or more programs are used by the one or more processors When executed, the one or more processors are caused to implement the image processing method as described in the above embodiments.
  • the face model of the target object is projected into multiple face images of the target object collected from multiple angles of view to accurately determine the area and person on the face model
  • the correspondence between the regions in the face image can be accurately extracted from the face image to the partial image data used to generate the texture image based on the correspondence, thereby improving the accuracy of the generated texture image.
  • FIG. 1 shows a schematic diagram of an exemplary system architecture to which the technical solutions of embodiments of the present invention can be applied;
  • FIG. 2 schematically shows a flowchart of an image processing method according to an embodiment of the present invention
  • FIG. 3 schematically shows a flowchart of respectively projecting a face model into multiple face images according to viewing angle parameters according to an embodiment of the present invention
  • FIG. 4 schematically shows a flowchart of extracting images associated with a target area from multiple face images according to an embodiment of the present invention
  • FIG. 5 schematically shows a flowchart of an image processing method according to an embodiment of the present invention
  • FIG. 6 schematically shows a flowchart of an image processing method according to an embodiment of the present invention
  • FIG. 7 schematically shows a flowchart of an image processing method according to an embodiment of the present invention.
  • FIG. 8 schematically shows a flowchart of an image processing method according to an embodiment of the present invention.
  • FIG. 9 shows a schematic diagram of a face model and a face image according to an embodiment of the present invention.
  • FIG. 10 shows a schematic diagram of processing a face model to obtain a texture image template according to an embodiment of the present invention
  • FIG. 11 shows a schematic diagram of the effect of projecting a face model onto a face image according to an embodiment of the invention
  • FIG. 12 shows a schematic diagram of a covered area according to an embodiment of the present invention.
  • FIG. 13 shows a schematic diagram of a part of images obtained by covering a region according to an embodiment of the present invention
  • FIG. 14 is a schematic diagram showing the effect of fusing extracted images according to an embodiment of the present invention.
  • FIG. 15 is a schematic diagram showing the comparison of the effect of detail repair on the fused image according to an embodiment of the present invention.
  • FIG. 16 shows a schematic comparison of the effect of performing detailed repair on the fused image shown in FIG. 14 according to an embodiment of the present invention
  • FIG. 17 shows a schematic comparison of the effect of removing light in an image according to an embodiment of the present invention.
  • FIG. 18 shows a schematic comparison of the effects of fusing and filtering a texture image and a background image according to an embodiment of the present invention
  • FIG. 19 shows a schematic diagram of the effect of rendering a face model through a texture image according to an embodiment of the present invention
  • FIG. 20 schematically shows a block diagram of an image processing apparatus according to an embodiment of the present invention.
  • FIG. 21 shows a schematic structural diagram of a computer system suitable for implementing an electronic device according to an embodiment of the present invention.
  • FIG. 1 shows a schematic diagram of an exemplary system architecture to which the technical solutions of embodiments of the present invention can be applied.
  • the system architecture may include a terminal device (as shown in FIG. 1, one or more of a smart phone 101, a tablet computer 102, and a portable computer 103, and of course, a desktop computer, etc.), a network 104 ⁇ Server105.
  • the network 104 is used as a medium for providing a communication link between the terminal device and the server 105.
  • the network 104 may include various connection types, such as wired communication links, wireless communication links, and so on.
  • the numbers of terminal devices, networks, and servers in FIG. 1 are only schematic. According to the implementation needs, there can be any number of terminal devices, networks and servers.
  • the server 105 may be a server cluster composed of multiple servers.
  • the terminal device may send the face model of the target object and multiple face images of the target object collected from multiple perspectives through the network 104, and the perspective parameters corresponding to the respective face images to Server 105.
  • the server 105 can project the face model into the multiple face images according to the perspective parameters to determine the facial model.
  • the facial model Correspondence between the area and the area in the face image, and based on the correspondence and the target area in the face model that needs to generate a texture image, extract images corresponding to the target area from the multiple face images, Furthermore, the images corresponding to the target area extracted from the multiple face images are fused to generate a texture image of the target object.
  • the image processing method provided by the embodiment of the present invention is generally executed by the server 105, and accordingly, the image processing device is generally provided in the server 105.
  • the terminal device may also have similar functions as the server, so as to execute the image processing scheme provided by the embodiment of the present invention.
  • FIG. 2 schematically shows a flowchart of an image processing method according to an embodiment of the present invention.
  • the image processing method may be executed by a server, and the server may be the server shown in FIG. 1.
  • the image processing method includes at least steps S210 to S240.
  • step S210 a face model of the target object and a plurality of face images of the target object collected through multiple perspectives are acquired, and perspective parameters corresponding to the respective face images are acquired.
  • the face model of the target object may be generated by scanning the face of the target device through scanning, or may be a three-dimensional face model reconstructed from multiple two-dimensional face images of the target object.
  • the face model refers to a data set used to describe a three-dimensional topological structure of a human face or a head including the human face.
  • the multiple face images of the target object collected through multiple perspectives may include the side face images of the target object (such as the face image of the left face and the face image of the right face, etc. ) And face image etc.
  • the angle of view corresponding to the face image is a parameter when the face image is collected by the camera, for example, it may include a rotation parameter, a translation parameter, an orthogonal projection parameter, and the like.
  • step S220 the face model is projected into the multiple face images according to the viewing angle parameters to determine the area between the area on the face model and the area in the face image Correspondence.
  • the correspondence between the area on the face model and the area in the face image may be the correspondence between the point on the face model and the point in the face image, or It is the correspondence between the line segment/closed shape (such as triangle) on the face model and the line segment/closed shape in the face image.
  • the process of separately projecting a face model into the multiple face images according to the viewing angle parameters in step S220 may specifically include:
  • Step S310 Determine the rotation translation parameter and orthogonal projection parameter of each face image relative to the face model according to the viewing angle parameter.
  • Step S320 Determine the projection angle of the face model for each face image according to the rotation and translation parameters of each face image relative to the face model.
  • the projection angle of the face model can be adjusted according to the rotation and translation parameters of each face image relative to the face model.
  • the projection angle of the face model can be adjusted so that the face model is adjusted to the same orientation as the face image, and then projected into each face image.
  • Step S330 According to the projection angle of the face model for each face image and the orthogonal projection parameters of each face image relative to the face model, the three-dimensional points on the face model are Projected into the multiple face images.
  • the position where the three-dimensional point on the face model is projected onto each face image can be determined.
  • the three-dimensional point projected at the first position is taken as the three-dimensional point corresponding to the first position; and for each face image
  • There are a plurality of 3D points projected to the second position and the 3D point with the smallest depth information among the plurality of 3D points is used as the 3D point corresponding to the second position, to solve the problem that the 3D points with different depth information overlap after projection problem.
  • step S230 based on the correspondence relationship and the target area in the face model that needs to generate a texture image, the target area corresponding to the target area is extracted from the multiple face images Image.
  • the target area in step S230 may be determined by the following process: the specified three-dimensional face model is cut according to a specified tangent line, and the three-dimensional face model is developed along the tangent line to obtain a two-dimensional person For the face image, select a specified area from the two-dimensional face image as the target area.
  • the specified three-dimensional face model may be the face model of the target object, or may be another face model with the same topological structure as the face model of the target object.
  • the process of extracting images corresponding to the target area from the multiple face images in step S230 may include the following steps:
  • Step S410 based on the correspondence relationship and the target area in the face model that needs to generate a texture image, determine the area corresponding to the target area in each face image.
  • the points on the face model correspond to the points in the face image, it can be determined according to the target area in the face model that each face image corresponds to the target area Area.
  • Step S420 Extract partial images from the areas corresponding to the target area in the respective face images, respectively.
  • the face orientation contained in each face image can be determined according to the viewing angle parameters corresponding to each face image, and then the person needs to be determined from the face orientation contained in each face image An image extracted from the area corresponding to the target area in the face image, and further extracting a partial image from each face image according to needs from the images extracted from the area corresponding to the target area in each face image.
  • step S240 the images corresponding to the target area extracted from the plurality of face images are fused to generate the texture image.
  • the Laplace pyramid fusion algorithm or Poisson fusion algorithm may be used to perform fusion processing on the image corresponding to the target area.
  • the technical solution of the above embodiment of the present invention enables the accurate projection of the region on the face model (such as the points on the face model) and the person through the projection of the face model on the multiple face images collected from multiple angles of view Correspondence between the areas on the face image (such as points on the face image), which can be accurately extracted from the face image to the partial image used to generate the texture image based on the correspondence, improving the accuracy of the generated texture image Sex.
  • the image processing method includes the following steps:
  • Step S510 Determine the defect area in the texture image that needs to be repaired.
  • the defect area in the texture image that needs to be repaired may be a problem area during image fusion, for example, because the nostril area and/or the lip area in the texture image may have defects during the fusion process, it may be The nostril area and/or lip area in the texture image is taken as the defect area that needs to be repaired.
  • Step S520 Obtain a repair image corresponding to the defective area from a predetermined texture image.
  • the predetermined texture image may be a standard texture image template, and the repair image corresponding to the defective area is used to repair the defective area.
  • the defect area is a nostril
  • the nostril image can be acquired from a predetermined texture image to repair the defect area.
  • Step S530 Add the repaired image to the texture image and replace the defective area to repair the texture image.
  • the color of the repaired image can also be adjusted according to the color of the defect area.
  • the defect area is a lip
  • the color of the acquired lip image may be set according to the color of the lip in the defect area.
  • the color of the repaired image may be adjusted after the repaired image is added to the texture image, or the color of the repaired image may be adjusted before the repaired image is added to the texture image.
  • the image processing method includes the following steps:
  • Step S610 Calculate the spherical harmonic illumination coefficient in the texture image based on the spherical harmonic illumination model.
  • Step S620 Remove the illumination in the texture image according to the spherical harmonic illumination coefficient.
  • the technical solution of the embodiment shown in FIG. 6 makes it possible to remove the light in the texture image, so as to add light when subsequently rendering the face model through the texture image, and ensure that the face model has a better effect after rendering.
  • the image processing method includes the following steps:
  • Step S710 Calculate the average color of each pixel in the texture image.
  • Step S720 generating the background image of the texture image by using the average color as the background color of the texture image.
  • the texture image may be added to the background image for fusion processing, for example, the Laplace pyramid fusion algorithm or the Poisson fusion algorithm may be used for fusion processing of the texture image and the background image.
  • Step S730 Filter the boundary between the texture image and the background image to obtain a processed texture image.
  • the boundary between the texture image and the background image can be filtered through a Gaussian filter.
  • Step S740 rendering the face model through the processed texture image.
  • the technical solution of the embodiment shown in FIG. 7 enables post-processing of the texture image, and improves the effect of rendering the texture image onto the face model.
  • the image processing method according to an embodiment of the present invention includes the following steps S810 to S870, which are described in detail as follows:
  • step S810 a face model, three face images and corresponding camera poses are input.
  • the input face model is shown as 901, and the three face images are shown as 902, 903, and 904.
  • the face model 901 may be a three-dimensional model reconstructed from face images 902, 903, and 904, or a three-dimensional model obtained by scanning a face.
  • the camera poses corresponding to the face images 902, 903, and 904 are the angle of view parameters of the face image, which may include, for example, rotation parameters, translation parameters, and orthogonal projection parameters.
  • step S820 a standard texture image template is created.
  • a predetermined tangent line (such as a vertical direction) may be taken from the back of the head Tangent), and then expand it as a cylinder, and scale each column to the same length to obtain a two-dimensional image 1002, and then you can cut out the middle part from the two-dimensional image 1002 as a uvmap (texture image) template
  • the corresponding parts can be extracted from the face images 902, 903 and 904 to fill the uvmap template to generate a texture image of the face.
  • step S830 the face model is projected onto the face images of various perspectives to obtain the correspondence between the three-dimensional points on the face model and the two-dimensional points on the face image.
  • the two-dimensional point x [u, v]
  • the three-dimensional point X [x, y, z]
  • f represents the parameter of orthogonal projection.
  • the process of projecting points on the 3D model onto the 2D face image it is possible to determine whether occlusion will occur according to the depth information of the points on the 3D model, to ensure that the distance from the camera The point is the last point projected.
  • the process of projecting the three-dimensional point on the face model to the face image record the position of each triangle projected on the face model onto the two-dimensional image, and record the depth information of the three-dimensional point at the position If depth information has been recorded at a certain location, if there are other three-dimensional points projected to the location, the three-dimensional point with the smallest depth information is selected as the point corresponding to the location.
  • FIG. 11 The specific projection effect is shown in FIG. 11, where 1101 in FIG. 11 is the face image before projection, and 1102 is a schematic diagram of the effect of projecting the face model onto the face image. It can be seen from Figure 11 that if the reconstruction of the face model is probably accurate, then each point on the face model can be found in the corresponding position on the two-dimensional face image, and then this correspondence can be recorded, and according to this Correspondence to extract texture images from two-dimensional face images.
  • step S840 extract partial texture maps from the three face images and perform fusion processing.
  • the selected three face images are left, center, and right face images, respectively, and the camera pose corresponding to the image is obtained . So you can determine which image's face is left-centered, center-centered, and right-handed based on the camera pose corresponding to the image, and preset the mask area corresponding to the head right, left, and center 1201, 1202 and 1203, and then based on the mask areas 1201, 1202 and 1203 to obtain the unoccluded partial areas from the three face images, the specific partial areas are obtained as 1301, 1302 and 1303 in FIG. 13 As shown.
  • fusion processing may be performed to obtain a fusion image (that is, a texture image that needs to be extracted).
  • a fusion image that is, a texture image that needs to be extracted.
  • the Laplacian pyramid method can be used for fusion, or the Poisson fusion algorithm for fusion. The specific fusion effect is shown in FIG. 14.
  • step S850 the details of the texture image are repaired.
  • the cause of this problem may be that the part is inside the nostril. It cannot be extracted from the original image. It may also be because the generated face model is inaccurate, and the corresponding area on the original image is also inaccurate, so the texture image in the wrong position is extracted. Except for the nostril part, other parts (such as the mouth) may also have similar situations. For example, the nostril and the mouth area in the fusion image 1501 shown in FIG. 15 have unreasonable problems.
  • the processing solution is to select a part of the image corresponding to the problem area from the standard uvmap (standard uvmap image 1502 shown in FIG. 15), and then adjust its color to the same color as the problem area, and replace the fused image The problem area is sufficient, and the final effect is shown in the image 1503 shown in FIG. 15.
  • the fusion image 1401 shown in FIG. 14 is processed through the above-mentioned processing method, and the resulting processed image is shown as 1601 in FIG. 16, which eliminates unreasonable problems in the fusion image and repairs the details of the fusion image.
  • step S860 the light on the texture image is removed.
  • the illumination on the texture image obtained by the technical solution of the above embodiment is not necessarily uniform, and if the illumination is added during the later rendering, the display will be unreasonable.
  • a 3-order spherical harmonic lighting model can be used to simulate the light. Equation 2:
  • color represents the lighted color on the texture image (may be an n ⁇ 3 matrix, 3 is the three channels of RGB, n represents the length ⁇ width of the texture image), and albedo represents the final target de-illuminated image (may be n ⁇ 3 matrix, 3 is RGB three channels), H represents spherical harmonic basis (can be n ⁇ 9 matrix), light represents spherical harmonic illumination coefficient (may be 9 ⁇ 3 matrix)
  • the spherical harmonic basis H includes 9 spherical harmonic basis functions.
  • n x , n y , and n z are used to represent the normal direction, these 9 spherical harmonic basis functions are as shown in Equation 3 below. Show:
  • albedo in the process of solving albedo, albedo is first initialized to the average color, and then light is calculated, and in turn, albedo is calculated by light, and iterates many times until convergence.
  • the specific process can be as follows:
  • the processing result finally obtained through the above processing scheme is shown as 1701 in FIG. 17, and it can be seen that the color in the processed image is significantly more uniform.
  • step S870 the texture image is post-processed.
  • the background color can be set to the average color of the image.
  • a large Gaussian filter can be used to smooth the edges of the background image and the texture image.
  • the image 1801 is the image before the texture image and the background image are fused and filtered
  • the image 1802 is the image after the texture image and the background image are fused and filtered.
  • the face model 901 shown in FIG. 9 can be rendered from the texture image, and the resulting rendering effect is shown in FIG. 19.
  • FIG. 20 schematically shows a block diagram of an image processing apparatus according to an embodiment of the present invention.
  • an image processing apparatus 2000 includes: an acquisition unit 2002, a projection unit 2004, an extraction unit 2006, and a fusion unit 2008.
  • the obtaining unit 2002 is used to obtain the face model of the target object and multiple face images of the target object collected through multiple perspectives, and to obtain the viewing angle parameters corresponding to each face image;
  • the projection unit 2004 is used to The viewing angle parameters project the face model into the multiple face images to determine the correspondence between the area on the face model and the area in the face image;
  • the extraction unit 2006 For extracting images corresponding to the target area from the multiple face images based on the corresponding relationship and the target area in the face model that needs to generate a texture image;
  • the fusion unit 2008 is used to separate The image corresponding to the target area extracted from the plurality of face images is subjected to fusion processing to generate the texture image.
  • the projection unit 2004 is configured to: determine the rotation and translation parameters and the orthogonal projection parameters of each face image relative to the face model according to the viewing angle parameters; according to the respective faces The rotation and translation parameters of the image relative to the face model, to determine the projection angle of the face model for each face image; according to the projection angle of the face model for each face image and the respective The three-dimensional points on the face model are projected into the multiple face images with respect to the orthogonal projection parameters of the face model with respect to the face model.
  • the projection unit 2004 is configured to: determine the position at which the three-dimensional points on the face model are projected onto the individual face images; for each individual face image, there is only one three-dimensional point The first projected position, the three-dimensional point projected at the first position is regarded as the three-dimensional point corresponding to the first position; for each face image, there are a plurality of three-dimensional points projected to the second For the position, the three-dimensional point with the smallest depth information among the plurality of three-dimensional points is used as the three-dimensional point corresponding to the second position.
  • the extraction unit 2006 is configured to determine that each face image corresponds to the target area based on the corresponding relationship and the target area in the face model where the texture image needs to be generated Areas; extracting partial images from the areas corresponding to the target area in the respective face images.
  • the extraction unit 2006 is configured to: determine the face orientation contained in each face image according to the viewing angle parameters corresponding to each face image; according to the Face orientation of, determine the image that needs to be extracted from the area corresponding to the target area in each face image; extract from the area corresponding to the target area in each face image as needed Part of the image of each face image.
  • the fusion unit 2008 is configured to: use a Laplacian pyramid fusion algorithm or a Poisson fusion algorithm to perform fusion processing on the image corresponding to the target area.
  • the image processing apparatus 2000 further includes: a repair unit, configured to determine a defect area that needs to be repaired in the texture image; and obtain a repair image corresponding to the defect area from a predetermined texture image ; Add the repaired image to the texture image and replace the defective area to repair the texture image.
  • a repair unit configured to determine a defect area that needs to be repaired in the texture image; and obtain a repair image corresponding to the defect area from a predetermined texture image ; Add the repaired image to the texture image and replace the defective area to repair the texture image.
  • the repair unit is further configured to adjust the color of the repaired image according to the color of the defective area.
  • the repair unit is configured to: detect the nostril region and/or lip region in the texture image; and use the nostril region and/or lip region as the defect region.
  • the image processing apparatus 2000 further includes: an illumination removal unit for calculating a spherical harmonic illumination coefficient in the texture image based on a spherical harmonic illumination model; and removing the texture according to the spherical harmonic illumination coefficient The light in the image.
  • the image processing apparatus 2000 further includes: a rendering processing unit, configured to calculate an average color of each pixel in the texture image; and use the average color as the background color of the texture image A background image of the texture image; filtering the boundary between the texture image and the background image to obtain a processed texture image; and rendering the face model through the processed texture image.
  • a rendering processing unit configured to calculate an average color of each pixel in the texture image; and use the average color as the background color of the texture image A background image of the texture image; filtering the boundary between the texture image and the background image to obtain a processed texture image; and rendering the face model through the processed texture image.
  • the image processing apparatus 2000 further includes: a target area determining unit for cutting the specified three-dimensional face model according to a specified tangent; expanding the three-dimensional face model along the tangent to obtain a two-dimensional Face image; select a specified area from the two-dimensional face image as the target area.
  • FIG. 21 shows a schematic structural diagram of a computer system suitable for implementing an electronic device according to an embodiment of the present invention.
  • the computer system 2100 includes a central processing unit (Central Processing Unit, CPU) 2101, which can be loaded into a random unit according to a program stored in a read-only memory (Read-Only Memory, ROM) 2102 or from the storage section 2108 Random Access (RAM) 2103 program is executed to perform various appropriate actions and processes.
  • ROM Read-Only Memory
  • RAM Random Access
  • the CPU 2101, ROM 2102, and RAM 2103 are connected to each other through a bus 2104.
  • An input/output (Input/Output, I/O) interface 2105 is also connected to the bus 2104.
  • the following components are connected to the I/O interface 2105: input section 2106 including keyboard, mouse, etc.; including output section 2107 such as cathode ray tube (Cathode Ray Tube, CRT), liquid crystal display (Liquid Crystal Display, LCD), etc., and speakers A storage section 2108 including a hard disk, etc.; and a communication section 2109 including a network interface card such as a LAN (Local Area Network) card, modem, etc.
  • the communication section 2109 performs communication processing via a network such as the Internet.
  • the driver 2110 is also connected to the I/O interface 2105 as needed.
  • a removable medium 2111 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 2110 as necessary, so that the computer program read out therefrom is installed into the storage portion 2108 as needed.
  • embodiments of the present invention include a computer program product including a computer program carried on a computer-readable medium, the computer program containing program code for performing the method shown in the flowchart.
  • the computer program may be downloaded and installed from the network through the communication section 2109, and/or installed from the removable medium 2111.
  • CPU central processing unit
  • the computer-readable medium shown in the embodiments of the present invention may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two.
  • the computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination of the above.
  • Computer readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable removable Erasable Programmable Read Only Memory (EPROM), flash memory, optical fiber, portable compact disk read-only memory (Compact Disc Read-Only Memory, CD-ROM), optical storage device, magnetic storage device, or any suitable of the above The combination.
  • the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, apparatus, or device.
  • the computer-readable signal medium may include a data signal propagated in the baseband or as part of the carrier wave, in which the computer-readable program code is carried.
  • This propagated data signal can take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • the computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, and the computer-readable medium may send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device. .
  • the program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
  • each block in the flowchart or block diagram may represent a module, a program segment, or a part of code, and the above-mentioned module, program segment, or part of code contains one or more for implementing a prescribed logical function Executable instructions.
  • the functions noted in the block may occur out of the order noted in the figures. For example, two blocks represented in succession may actually be executed in parallel, and they may sometimes be executed in reverse order, depending on the functions involved.
  • each block in the block diagram or flowchart, and a combination of blocks in the block diagram or flowchart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be used It is realized by a combination of dedicated hardware and computer instructions.
  • the units described in the embodiments of the present invention may be implemented in software or hardware, and the described units may also be provided in a processor. Among them, the names of these units do not constitute a limitation on the unit itself under certain circumstances.
  • the present application also provides a computer-readable medium, which may be included in the electronic device described in the foregoing embodiment; or may exist alone without being assembled into the electronic device in.
  • the computer-readable medium carries one or more programs. When the one or more programs are executed by one of the electronic devices, the electronic device causes the electronic device to implement the method described in the foregoing embodiments.
  • the example embodiments described here can be implemented by software, or can be implemented by software in combination with necessary hardware. Therefore, the technical solution according to the embodiment of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, U disk, mobile hard disk, etc.) or on the network , Including several instructions to enable a computing device (which may be a personal computer, server, touch terminal, or network device, etc.) to execute the method according to the embodiments of the present invention.
  • a computing device which may be a personal computer, server, touch terminal, or network device, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Human Computer Interaction (AREA)
  • Multimedia (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Data Mining & Analysis (AREA)
  • Quality & Reliability (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Image Processing (AREA)
  • Image Generation (AREA)

Abstract

本发明的实施例提供了一种图像处理方法、装置、计算机可读介质及电子设备。该图像处理方法包括:根据多个视角对应的多个视角参数分别将目标对象的人脸模型投影到通过所述多个视角采集到的所述目标对象的多张人脸图像中,以确定所述人脸模型上的区域与所述人脸图像中的区域之间的对应关系;基于所述对应关系和所述人脸模型中需要生成纹理图像的目标区域,分别从所述多张人脸图像中提取与所述目标区域相对应的图像;将分别从所述多张人脸图像中提取出的与所述目标区域相对应的图像进行融合处理,生成所述纹理图像。本发明实施例的技术方案能够提高生成的纹理图像的准确性。

Description

图像处理方法、装置、计算机可读介质及电子设备
本申请要求于2018年11月30日提交中国专利局、申请号为201811455877.4、发明名称为“图像处理方法、装置、计算机可读介质及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及计算机及通信技术领域,具体而言,涉及一种图像处理方法、装置、计算机可读介质及电子设备。
发明背景
人脸重建是一项关键技术,在实际中也有很多的应用场景,比如在3D虚拟现实应用、3D增强现实应用、3D游戏应用中对人物脸部图像进行重建。其中,决定重建效果和用户体验的关键在于脸部纹理图像的重建。然而,相关技术中提出的纹理图像重建方案得到的纹理图像通常比较粗糙、准确性较低。
发明内容
本发明的实施例提供了一种图像处理方法、装置、计算机可读介质及电子设备,可以在一定程度上提高生成的纹理图像的准确性。
本发明实施例提供了一种图像处理方法,包括:根据多个视角对应的多个视角参数分别将目标对象的人脸模型投影到通过所述多个视角采集到的所述目标对象的多张人脸图像中,以确定所述人脸模型上的区域与所述人脸图像中的区域之间的对应关系;基于所述对应关系和所述人脸模型中需要生成纹理图像的目标区域,分别从所述多张人脸图像中提取与所述目标区域相对应的图像;将分别从所述多张人脸图像中提取出的与所述目标区域相对应的图像进行融合处理,生成所述纹理图像。
本发明实施例还提供了一种图像处理装置,包括:投影单元,用于 根据多个视角对应的多个视角参数分别将目标对象的人脸模型投影到通过所述多个视角采集到的所述目标对象的多张人脸图像中,以确定所述人脸模型上的区域与所述人脸图像中的区域之间的对应关系;提取单元,用于基于所述对应关系和所述人脸模型中需要生成纹理图像的目标区域,分别从所述多张人脸图像中提取与所述目标区域相对应的图像;融合单元,用于将分别从所述多张人脸图像中提取出的与所述目标区域相对应的图像进行融合处理,生成所述纹理图像。
在本发明的一些实施例中,基于前述方案,所述投影单元配置为:根据所述视角参数确定所述各个人脸图像相对于所述人脸模型的旋转平移参数和正交投影参数;根据所述各个人脸图像相对于所述人脸模型的旋转平移参数,确定所述人脸模型针对所述各个人脸图像的投影角度;根据所述人脸模型针对所述各个人脸图像的投影角度和所述各个人脸图像相对于所述人脸模型的正交投影参数,将所述人脸模型上的各个三维点投影到所述多张人脸图像中。
在本发明的一些实施例中,基于前述方案,所述投影单元配置为:确定所述人脸模型上的三维点投影到所述各个人脸图像上的位置;对于所述各个人脸图像中仅有一个三维点投影到的第一位置,将投影到所述第一位置处的三维点作为与所述第一位置相对应的三维点;对于所述各个人脸图像中有多个三维点投影到的第二位置,将所述多个三维点中深度信息最小的三维点作为与所述第二位置相对应的三维点。
在本发明的一些实施例中,基于前述方案,所述提取单元配置为:基于所述对应关系和所述人脸模型中需要生成纹理图像的目标区域,确定所述各个人脸图像中与所述目标区域相对应的区域;分别从所述各个人脸图像中与所述目标区域相对应的区域内提取出部分图像。
在本发明的一些实施例中,基于前述方案,所述提取单元配置为:根据所述各个人脸图像对应的视角参数,确定所述各个人脸图像中包含的人脸朝向;根据所述各个人脸图像中包含的人脸朝向,确定需要从所述各个人脸图像中与所述目标区域相对应的区域内提取的图像;根据需 要从所述各个人脸图像中与所述目标区域相对应的区域内提取的图像,从所述各个人脸图像中提取出部分图像。
在本发明的一些实施例中,基于前述方案,所述融合单元配置为:采用拉普拉斯金字塔融合算法或泊松融合算法对提取出与所述目标区域相对应的图像进行融合处理。
在本发明的一些实施例中,基于前述方案,所述的图像处理装置还包括:修复单元,用于确定所述纹理图像中需要修复的缺陷区域;从预定的纹理图像中获取与所述缺陷区域相对应的修复图像;将所述修复图像添加至所述纹理图像中并替换掉所述缺陷区域,以对所述纹理图像进行修复。
在本发明的一些实施例中,基于前述方案,所述修复单元还用于根据所述缺陷区域的颜色调整所述修复图像的颜色。
在本发明的一些实施例中,基于前述方案,所述修复单元配置为:检测所述纹理图像中的鼻孔区域和/或嘴唇区域;将所述鼻孔区域和/或嘴唇区域作为所述缺陷区域。
在本发明的一些实施例中,基于前述方案,所述的图像处理装置还包括:光照去除单元,用于基于球谐光照模型计算所述纹理图像中的球谐光照系数;根据所述球谐光照系数去除所述纹理图像中的光照。
在本发明的一些实施例中,基于前述方案,所述的图像处理装置还包括:渲染处理单元,用于计算所述纹理图像中各个像素点的平均颜色;将所述平均颜色作为所述纹理图像的背景颜色生成所述纹理图像的背景图像;对所述纹理图像与所述背景图像之间的边界进行滤波处理,得到处理后的纹理图像;通过所述处理后的纹理图像对所述人脸模型进行渲染。
在本发明的一些实施例中,基于前述方案,所述的图像处理装置还包括:目标区域确定单元,用于将指定的三维人脸模型按照指定切线剖开;沿所述切线展开所述三维人脸模型得到二维人脸图像;从所述二维 人脸图像中选择指定区域作为所述目标区域。
本发明实施例还提供了一种计算机可读介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现如上述实施例中所述的图像处理方法。
本发明实施例还提供了一种电子设备,包括:一个或多个处理器;存储装置,用于存储一个或多个程序,当所述一个或多个程序被所述一个或多个处理器执行时,使得所述一个或多个处理器实现如上述实施例中所述的图像处理方法。
在本发明实施例的技术方案中,通过将目标对象的人脸模型分别投影到以多个视角采集到的目标对象的多张人脸图像中,以准确确定该人脸模型上的区域与人脸图像中的区域之间的对应关系,进而能够基于该对应关系从人脸图像准确提取到用于生成纹理图像的部分图像数据,提高了生成的纹理图像的准确性。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本发明。
附图简要说明
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本发明的实施例,并与说明书一起用于解释本发明的原理。显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。在附图中:
图1示出了可以应用本发明实施例的技术方案的示例性系统架构的示意图;
图2示意性示出了根据本发明的一个实施例的图像处理方法的流程图;
图3示意性示出了根据本发明的一个实施例的根据视角参数分别将 人脸模型投影到多张人脸图像中的流程图;
图4示意性示出了根据本发明的一个实施例的分别从多张人脸图像中提取与目标区域相关联的图像的流程图;
图5示意性示出了根据本发明的一个实施例的图像处理方法的流程图;
图6示意性示出了根据本发明的一个实施例的图像处理方法的流程图;
图7示意性示出了根据本发明的一个实施例的图像处理方法的流程图;
图8示意性示出了根据本发明的一个实施例的图像处理方法的流程图;
图9示出了根据本发明的一个实施例的人脸模型及人脸图像的示意图;
图10示出了根据本发明的一个实施例的对人脸模型进行处理得到纹理图像模板的示意图;
图11示出了根据本发明的一个实施例的将人脸模型投影到人脸图像上的效果示意图;
图12示出了根据本发明的一个实施例的设置的遮盖区域示意图;
图13示出了根据本发明的一个实施例的通过遮盖区域获取到的部分图像示意图;
图14示出了根据本发明的一个实施例的对提取到的图像进行融合后的效果示意图;
图15示出了根据本发明的一个实施例的对融合后的图像进行细节修复的效果对比示意图;
图16示出了根据本发明的一个实施例的对图14中所示的融合图像 进行细节修复的效果对比示意图;
图17示出了根据本发明的一个实施例的对图像中的光照进行去除的效果对比示意图;
图18示出了根据本发明的一个实施例的对纹理图像和背景图像进行融合及滤波处理的效果对比示意图;
图19示出了根据本发明的一个实施例的通过纹理图像对人脸模型进行渲染后的效果示意图;
图20示意性示出了根据本发明的一个实施例的图像处理装置的框图;
图21示出了适于用来实现本发明实施例的电子设备的计算机系统的结构示意图。
实施本发明的方式
现在将参考附图更全面地描述示例实施方式。然而,示例实施方式能够以多种形式实施,且不应被理解为限于在此阐述的范例;相反,提供这些实施方式使得本发明将更加全面和完整,并将示例实施方式的构思全面地传达给本领域的技术人员。
此外,所描述的特征、结构或特性可以以任何合适的方式结合在一个或更多实施例中。在下面的描述中,提供许多具体细节从而给出对本发明的实施例的充分理解。然而,本领域技术人员将意识到,可以实践本发明的技术方案而没有特定细节中的一个或更多,或者可以采用其它的方法、组元、装置、步骤等。在其它情况下,不详细示出或描述公知方法、装置、实现或者操作以避免模糊本发明的各方面。
附图中所示的方框图仅仅是功能实体,不一定必须与物理上独立的实体相对应。即,可以采用软件形式来实现这些功能实体,或在一个或多个硬件模块或集成电路中实现这些功能实体,或在不同网络和/或处理器装置和/或微控制器装置中实现这些功能实体。
附图中所示的流程图仅是示例性说明,不是必须包括所有的内容和操作/步骤,也不是必须按所描述的顺序执行。例如,有的操作/步骤还可以分解,而有的操作/步骤可以合并或部分合并,因此实际执行的顺序有可能根据实际情况改变。
图1示出了可以应用本发明实施例的技术方案的示例性系统架构的示意图。
如图1所示,系统架构可以包括终端设备(如图1中所示智能手机101、平板电脑102和便携式计算机103中的一种或多种,当然也可以是台式计算机等等)、网络104和服务器105。网络104用以在终端设备和服务器105之间提供通信链路的介质。网络104可以包括各种连接类型,例如有线通信链路、无线通信链路等等。
应该理解,图1中的终端设备、网络和服务器的数目仅仅是示意性的。根据实现需要,可以具有任意数目的终端设备、网络和服务器。比如服务器105可以是多个服务器组成的服务器集群等。
在本发明的一个实施例中,终端设备可以通过网络104将目标对象的人脸模型和通过多个视角采集到的目标对象的多张人脸图像,以及各个人脸图像对应的视角参数发送至服务器105。服务器105在获取到该人脸模型、该多张人脸图像和该视角参数之后,可以根据该视角参数分别将人脸模型投影到该多张人脸图像中,以确定该人脸模型上的区域与人脸图像中的区域之间的对应关系,并基于该对应关系和人脸模型中需要生成纹理图像的目标区域,分别从这多张人脸图像中提取与目标区域相对应的图像,进而将分别从该多张人脸图像中提取出的与目标区域相对应的图像进行融合处理,生成目标对象的纹理图像。
需要说明的是,本发明实施例所提供的图像处理方法一般由服务器105执行,相应地,图像处理装置一般设置于服务器105中。但是,在本发明的其它实施例中,终端设备也可以与服务器具有相似的功能,从而执行本发明实施例所提供的图像处理方案。
图2示意性示出了根据本发明的一个实施例的图像处理方法的流程图,该图像处理方法可以由服务器来执行,该服务器可以是图1中所示的服务器。参照图2所示,该图像处理方法至少包括步骤S210至步骤S240。
在步骤S210中,获取目标对象的人脸模型和通过多个视角采集到的所述目标对象的多张人脸图像,并获取各个人脸图像对应的视角参数。
在本发明的一个实施例中,目标对象的人脸模型可以是通过扫描设备对人脸进行扫描后生成的,也可以是通过目标对象的多张二维人脸图像重建出的三维人脸模型。
人脸模型是指用于描述人脸或者包括人脸的头部的三维拓扑结构的数据集合。
在本发明的一个实施例中,通过多个视角采集到的目标对象的多张人脸图像可以包括目标对象的侧脸图像(如左侧脸的人脸图像和右侧脸的人脸图像等)和正脸图像等。人脸图像对应的视角参数是通过相机采集人脸图像时的参数,比如可以包括旋转参数、平移参数、正交投影参数等。
在步骤S220中,根据所述视角参数分别将所述人脸模型投影到所述多张人脸图像中,以确定所述人脸模型上的区域与所述人脸图像中的区域之间的对应关系。
在本发明的一个实施例中,人脸模型上的区域与人脸图像中的区域之间的对应关系可以是人脸模型上的点与人脸图像中的点之间的对应关系,还可以是人脸模型上的线段/封闭形状(如三角形)与人脸图像中的线段/封闭形状之间的对应关系。
在本发明的一个实施例中,如图3所示,步骤S220中根据视角参数分别将人脸模型投影到所述多张人脸图像中的过程,具体可以包括:
步骤S310,根据视角参数确定所述各个人脸图像相对于所述人脸模型的旋转平移参数和正交投影参数。
步骤S320,根据所述各个人脸图像相对于所述人脸模型的旋转平移参数,确定所述人脸模型针对所述各个人脸图像的投影角度。
在本发明的一个实施例中,由于人脸模型是三维模型,因此可以根据各个人脸图像相对于人脸模型的旋转平移参数来调整人脸模型的投影角度。比如可以通过调整人脸模型的投影角度,以使得将人脸模型调整为与人脸图像相同的朝向,然后再投影至各个人脸图像中。
步骤S330,根据所述人脸模型针对所述各个人脸图像的投影角度和所述各个人脸图像相对于所述人脸模型的正交投影参数,将所述人脸模型上的各个三维点投影到所述多张人脸图像中。
在本发明的一个实施例中,在将人脸模型上的各个三维点投影到人脸图像中后,可以确定人脸模型上的三维点投影到各个人脸图像上的位置。其中,对于各个人脸图像中仅有一个三维点投影到的第一位置,将投影到该第一位置处的三维点作为与该第一位置相对应的三维点;而对于各个人脸图像中有多个三维点投影到的第二位置,将该多个三维点中深度信息最小的三维点作为与该第二位置相对应的三维点,以解决深度信息不同的三维点投影后发生重叠的问题。
继续参照图2所示,在步骤S230中,基于所述对应关系和所述人脸模型中需要生成纹理图像的目标区域,分别从所述多张人脸图像中提取与所述目标区域相对应的图像。
在本发明的一个实施例中,步骤S230中的目标区域可以通过如下过程来确定:将指定的三维人脸模型按照指定切线剖开,沿所述切线展开所述三维人脸模型得到二维人脸图像,从所述二维人脸图像中选择指定区域作为所述目标区域。其中,指定的三维人脸模型可以是目标对象的人脸模型,也可以是与目标对象的人脸模型的拓扑结构相同的其它人脸模型。
在本发明的一个实施例中,如图4所示,步骤S230中分别从所述多张人脸图像中提取与目标区域相对应的图像的过程,可以包括如下步骤:
步骤S410,基于所述对应关系和所述人脸模型中需要生成纹理图像的目标区域,确定所述各个人脸图像中与所述目标区域相对应的区域。
在本发明的一个实施例中,由于人脸模型上的点与人脸图像中的点存在对应关系,因此可以根据人脸模型中的目标区域来确定各个人脸图像中与该目标区域相对应的区域。
步骤S420,分别从所述各个人脸图像中与所述目标区域相对应的区域内提取出部分图像。
在本发明的一个实施例中,可以根据各个人脸图像对应的视角参数,确定各个人脸图像中包含的人脸朝向,然后根据各个人脸图像中包含的人脸朝向,确定需要从各个人脸图像中与目标区域相对应的区域内提取的图像,进而根据需要从各个人脸图像中与目标区域相对应的区域内提取的图像,从各个人脸图像中提取出部分图像。
继续参照图2所示,在步骤S240中,将分别从所述多张人脸图像中提取出的与所述目标区域相对应的图像进行融合处理,以生成所述纹理图像。
在本发明的一个实施例中,可以采用拉普拉斯金字塔融合算法或泊松融合算法对提取出与目标区域相对应的图像进行融合处理。
本发明上述实施例的技术方案使得能够通过人脸模型在以多个视角采集到的多张人脸图像上的投影来准确得到人脸模型上的区域(如人脸模型上的点)与人脸图像上的区域(如人脸图像上的点)之间的对应关系,进而能够基于该对应关系从人脸图像准确提取到用于生成纹理图像的部分图像,提高了生成的纹理图像的准确性。
基于前述实施例中生成纹理图像的技术方案,如图5所示,根据本发明的一个实施例的图像处理方法包括如下步骤:
步骤S510,确定纹理图像中需要修复的缺陷区域。
在本发明的一个实施例中,纹理图像中需要修复的缺陷区域可以是 图像融合时出现问题的区域,比如由于纹理图像中的鼻孔区域和/或嘴唇区域可能在融合过程中出现缺陷,因此可以将纹理图像中的鼻孔区域和/或嘴唇区域作为需要修复的缺陷区域。
步骤S520,从预定的纹理图像中获取与所述缺陷区域相对应的修复图像。
在本发明的一个实施例中,预定的纹理图像可以是标准的纹理图像模板,与缺陷区域相对应的修复图像用于对该缺陷区域进行修复。比如,若缺陷区域为鼻孔,则可以从预定的纹理图像中获取到鼻孔图像来修复缺陷区域。
步骤S530,将所述修复图像添加至所述纹理图像中并替换掉所述缺陷区域,以对所述纹理图像进行修复。
在本发明的一个实施例中,还可以根据缺陷区域的颜色调整修复图像的颜色。比如缺陷区域为嘴唇,则在从预定的纹理图像中获取到嘴唇图像之后,可以根据缺陷区域中的嘴唇颜色来设置获取到的嘴唇图像的颜色。其中,可以在将修复图像添加至纹理图像中之后再调整修复图像的颜色,也可以在将修复图像添加至纹理图像中之前来调整修复图像的颜色。
基于前述实施例中生成纹理图像的技术方案,如图6所示,根据本发明的一个实施例的图像处理方法包括如下步骤:
步骤S610,基于球谐光照模型计算纹理图像中的球谐光照系数。
步骤S620,根据所述球谐光照系数去除纹理图像中的光照。
图6所示实施例的技术方案使得能够去除纹理图像中的光照,以便于后续通过纹理图像对人脸模型进行渲染时添加光照,确保对人脸模型进行渲染后具有较优的效果。
基于前述实施例中生成纹理图像的技术方案,如图7所示,根据本发明的一个实施例的图像处理方法包括如下步骤:
步骤S710,计算纹理图像中各个像素点的平均颜色。
步骤S720,将所述平均颜色作为所述纹理图像的背景颜色生成所述纹理图像的背景图像。
在本发明的一个实施例中,可以将纹理图像添加至背景图像上进行融合处理,比如采用拉普拉斯金字塔融合算法或泊松融合算法对纹理图像和背景图像进行融合处理。
步骤S730,对所述纹理图像与所述背景图像之间的边界进行滤波处理,得到处理后的纹理图像。
在本发明的一个实施例中,可以通过高斯滤波器来对纹理图像与背景图像之间的边界进行滤波处理。
步骤S740,通过所述处理后的纹理图像对所述人脸模型进行渲染。
图7所示实施例的技术方案使得能够对纹理图像进行后处理,提高了将纹理图像渲染至人脸模型上的效果。
以下结合图8至图19,以采集目标对象的三张人脸图像为例对本发明实施例的技术方案进行详细阐述:
如图8所示,根据本发明的一个实施例的图像处理方法,包括如下步骤S810至步骤S870,详细说明如下:
在步骤S810中,输入人脸模型、三张人脸图像和对应的相机姿态。
在本发明的一个实施例中,如图9所示,输入的人脸模型如901所示,三张人脸图像如902、903和904所示。其中,人脸模型901可以是根据人脸图像902、903和904重建的三维模型,也可以是通过对人脸进行扫描得到的三维模型。
在本发明的一个实施例中,人脸图像902、903和904对应的相机姿态即为人脸图像的视角参数,比如可以包括旋转参数、平移参数和正交投影参数等。
在步骤S820中,创建标准的纹理图像模板。
在本发明的一个实施例中,如图10所示,对于一个给定拓扑结构的人脸模型1001(该人脸模型可以是mesh模型),可以从后脑勺沿着预定的切线(如竖直方向的切线)剖开,然后将其当作一个圆柱展开,并将每一列缩放成同样的长度得到一张二维图像1002,进而可以从二维图像1002中抠出中间的部分作为uvmap(纹理图像)模板1003,进而可以从人脸图像902、903和904中抠出相应的部分来填补uvmap模板,生成人脸的纹理图像。
在步骤S830中,将人脸模型投影到各个视角的人脸图像上,得到人脸模型上的三维点与人脸图像上的二维点之间的对应关系。
在本发明的一个实施例中,由于步骤S810中已经获取到了人脸模型901和人脸图像902、903和904相对于人脸模型的旋转平移和正交投影参数,因此可以参考如下公式1将重建好的三维模型上的三维点投影到人脸图像902、903和904上:
Figure PCTCN2019121935-appb-000001
其中,在公式1中,二维点x=[u,v],三维点X=[x,y,z],f表示正交投影的参数。通过上述公式1可以将重建好的人脸模型投影到各个二维的人脸图像上。
在本发明的一个实施例中,在将三维模型上的点投影到二维人脸图像上的过程中,可以根据三维模型上的点的深度信息判断一下是否会出现遮挡,保证距离相机近的点是最后投影到的点。具体地,在将人脸模型上的三维点投影到人脸图像的过程中,记录人脸模型上的每个三角形投影到二维图像上的位置,同时在该位置记录下三维点的深度信息,如果某个位置已经记录了深度信息,若再有其它三维点投影到该位置,则选择深度信息最小的三维点作为该位置对应的点。
具体投影效果如图11所示,其中图11中的1101为投影前的人脸图 像,1102为将人脸模型投影到人脸图像上的效果示意图。从图11中可以看出,若人脸模型重建大概准确,则人脸模型上的每一个点是可以在二维人脸图像上找到对应位置的,进而可以记录这种对应关系,并根据这个对应关系来从二维人脸图像中提取纹理图像。
在步骤S840中,从三张人脸图像中提取部分纹理图并进行融合处理。
在本发明的一个实施例中,如图9和图12所示,由于选取的三张人脸图像分别为偏左、偏中间、偏右的人脸图像,并且由于获取到了图像对应的相机姿态,因此可以根据图像对应的相机姿态确定哪张图像的人脸是偏左、偏中间和偏右的,并据此预设分别对应于头偏右、偏左和偏中间的mask(遮盖)区域1201、1202和1203,进而基于该mask区域1201、1202和1203来分别从这三张人脸图像中获取到未被遮挡的部分区域,具体获取到的部分区域如图13中1301、1302和1303所示。
在本发明的一个实施例中,在通过mask区域从这三张人脸图像中提取出部分区域之后,可以进行融合处理,得到融合图像(也即需要提取的纹理图像)。其中,为了保证融合时图像边界过度自然,可以采用拉普拉斯金字塔的方法进行融合,或者采用泊松融合算法进行融合,具体融合效果如图14所示。
在步骤S850中,修复纹理图像的细节。
在本发明的一个实施例中,图像融合处理之后可能会出现部分细节显示不合理的问题,比如图14中所示的鼻孔部分1401,造成这种问题的原因可能是由于该部分是鼻孔内部,无法从原图上提取到,还可能是由于生成的人脸模型不准确,其对应在原图上的区域也不准确,因此提取到了错误位置的纹理图像。除了鼻孔部位之外,其它部位(比如嘴巴)也可能出现类似情况,比如图15中所示的融合图像1501中的鼻孔和嘴巴区域出现了不合理的问题,对于这种问题,本发明实施例的处理方案是从标准的uvmap上(如图15中所示的标准uvmap图像1502)抠出与问题区域对应的部分图像,然后将其颜色调整为与问题区域相同的颜色, 并替换掉融合图像上的问题区域即可,最后得到的效果如图15中所示的图像1503。
通过上述的处理方式对图14中所示的融合图像1401进行处理,得到的处理后图像如图16中的1601所示,即消除了融合图像中的不合理问题,修复了融合图像的细节。
在步骤S860中,去除纹理图像上的光照。
在本发明的一个实施例中,通过上述实施例的技术方案得到的纹理图像上的光照不一定均匀,后期在进行渲染时若加上光照会显示不合理。比如图17中所示的图像1601中的区域1602中有明显的反光,为了去除图像1601中的光照,在本发明的实施例中可以采用3阶球谐光照模型来模拟光照,具体公式如下述公式2所示:
color=albedo×(H×light)            公式2
其中,color表示纹理图像上的带光照的颜色(可以是n×3的矩阵,3是RGB三个通道,n表示纹理图像的长×宽),albedo表示最后得到的目标去光照图像(可以是n×3的矩阵,3是RGB三个通道),H表示球谐基(可以是n×9的矩阵),light表示球谐光照系数(可以是9×3的矩阵)
在本发明的一个实施例中,球谐基H包含9个球谐基函数,当使用n x,n y,n z表示法线方向时,这9个球谐基函数分别如下述公式3所示:
Figure PCTCN2019121935-appb-000002
从上述公式3中可以看到球谐基函数是依赖于法线方向的。
在本发明的一个实施例中,在求解albedo的过程中,首先初始化 albedo为平均颜色,然后计算出light,再反过来通过light计算出albedo,迭代多次直至收敛。具体过程可以如下:
初始化albedo为平均颜色ρ 0;将ρ 0代入上述公式2中,使用最小二乘法获得初始的球谐光照系数L 0;将球谐光照系数L 0代入上述公式2中求解得到新的ρ 1;再次使用最小二乘法估计球谐光照系数L 1,并以此类推,直到迭代多次(比如5次)后收敛即可得出albedo。
通过上述处理方案最终得到的处理结果如图17中1701所示,可见处理后的图像中的颜色明显更加均匀。
在步骤S870中,纹理图像后处理。
在本发明的一个实施例中,在对纹理图像处理之后,由于本发明实施例中的纹理图像不需要头发,因此可以将背景颜色设置为图像的平均颜色。为了保证背景图像和纹理图像的融合不会有明显的分界,并且过滤掉纹理图像上的头发鬓角等干扰因素,可以背景图像和纹理图像的边缘做一个很大的高斯滤波来进行平滑处理,同时使用拉普拉斯金字塔算法或泊松融合算法融合背景图像和纹理图像。具体的处理效果如图18所示,图像1801为对纹理图像和背景图像进行融合及滤波处理之前的图像,图像1802为对纹理图像和背景图像进行融合及滤波处理之后的图像。
在本发明的一个实施例中,当得到处理后的纹理图像之后,可以通过该纹理图像渲染图9中所示的人脸模型901,最后得到的渲染效果如图19所示。
图8至图19以采集目标对象的三张人脸图像为例对本发明实施例的技术方案进行详细阐述,需要说明的是,在本发明的其他实施例中,也可以采集更多张人脸图像进行处理。
以下介绍本发明的装置实施例,可以用于执行本发明上述实施例中的图像处理方法。对于本发明装置实施例中未披露的细节,请参照本发 明上述的图像处理方法的实施例。
图20示意性示出了根据本发明的一个实施例的图像处理装置的框图。
参照图20所示,根据本发明的一个实施例的图像处理装置2000,包括:获取单元2002、投影单元2004、提取单元2006和融合单元2008。
其中,获取单元2002用于获取目标对象的人脸模型和通过多个视角采集到的所述目标对象的多张人脸图像,并获取各个人脸图像对应的视角参数;投影单元2004用于根据所述视角参数分别将所述人脸模型投影到所述多张人脸图像中,以确定所述人脸模型上的区域与所述人脸图像中的区域之间的对应关系;提取单元2006用于基于所述对应关系和所述人脸模型中需要生成纹理图像的目标区域,分别从所述多张人脸图像中提取与所述目标区域相对应的图像;融合单元2008用于将分别从所述多张人脸图像中提取出的与所述目标区域相对应的图像进行融合处理,生成所述纹理图像。
在本发明的一个实施例中,投影单元2004配置为:根据所述视角参数确定所述各个人脸图像相对于所述人脸模型的旋转平移参数和正交投影参数;根据所述各个人脸图像相对于所述人脸模型的旋转平移参数,确定所述人脸模型针对所述各个人脸图像的投影角度;根据所述人脸模型针对所述各个人脸图像的投影角度和所述各个人脸图像相对于所述人脸模型的正交投影参数,将所述人脸模型上的各个三维点投影到所述多张人脸图像中。
在本发明的一个实施例中,投影单元2004配置为:确定所述人脸模型上的三维点投影到所述各个人脸图像上的位置;对于所述各个人脸图像中仅有一个三维点投影到的第一位置,将投影到所述第一位置处的三维点作为与所述第一位置相对应的三维点;对于所述各个人脸图像中有多个三维点投影到的第二位置,将所述多个三维点中深度信息最小的三维点作为与所述第二位置相对应的三维点。
在本发明的一个实施例中,提取单元2006配置为:基于所述对应关系和所述人脸模型中需要生成纹理图像的目标区域,确定所述各个人脸图像中与所述目标区域相对应的区域;分别从所述各个人脸图像中与所述目标区域相对应的区域内提取出部分图像。
在本发明的一个实施例中,提取单元2006配置为:根据所述各个人脸图像对应的视角参数,确定所述各个人脸图像中包含的人脸朝向;根据所述各个人脸图像中包含的人脸朝向,确定需要从所述各个人脸图像中与所述目标区域相对应的区域内提取的图像;根据需要从所述各个人脸图像中与所述目标区域相对应的区域内提取的图像,从所述各个人脸图像中提取出部分图像。
在本发明的一个实施例中,融合单元2008配置为:采用拉普拉斯金字塔融合算法或泊松融合算法对提取出与所述目标区域相对应的图像进行融合处理。
在本发明的一个实施例中,图像处理装置2000还包括:修复单元,用于确定所述纹理图像中需要修复的缺陷区域;从预定的纹理图像中获取与所述缺陷区域相对应的修复图像;将所述修复图像添加至所述纹理图像中并替换掉所述缺陷区域,以对所述纹理图像进行修复。
在本发明的一个实施例中,所述修复单元还用于根据所述缺陷区域的颜色调整所述修复图像的颜色。
在本发明的一个实施例中,所述修复单元配置为:检测所述纹理图像中的鼻孔区域和/或嘴唇区域;将所述鼻孔区域和/或嘴唇区域作为所述缺陷区域。
在本发明的一个实施例中,图像处理装置2000还包括:光照去除单元,用于基于球谐光照模型计算所述纹理图像中的球谐光照系数;根据所述球谐光照系数去除所述纹理图像中的光照。
在本发明的一个实施例中,图像处理装置2000还包括:渲染处理单元,用于计算所述纹理图像中各个像素点的平均颜色;将所述平均颜色 作为所述纹理图像的背景颜色生成所述纹理图像的背景图像;对所述纹理图像与所述背景图像之间的边界进行滤波处理,得到处理后的纹理图像;通过所述处理后的纹理图像对所述人脸模型进行渲染。
在本发明的一个实施例中,图像处理装置2000还包括:目标区域确定单元,用于将指定的三维人脸模型按照指定切线剖开;沿所述切线展开所述三维人脸模型得到二维人脸图像;从所述二维人脸图像中选择指定区域作为所述目标区域。
图21示出了适于用来实现本发明实施例的电子设备的计算机系统的结构示意图。
需要说明的是,图21示出的电子设备的计算机系统2100仅是一个示例,不应对本发明实施例的功能和使用范围带来任何限制。
如图21所示,计算机系统2100包括中央处理单元(Central Processing Unit,CPU)2101,其可以根据存储在只读存储器(Read-Only Memory,ROM)2102中的程序或者从存储部分2108加载到随机访问存储器(Random Access Memory,RAM)2103中的程序而执行各种适当的动作和处理。在RAM 2103中,还存储有系统操作所需的各种程序和数据。CPU 2101、ROM 2102以及RAM 2103通过总线2104彼此相连。输入/输出(Input/Output,I/O)接口2105也连接至总线2104。
以下部件连接至I/O接口2105:包括键盘、鼠标等的输入部分2106;包括诸如阴极射线管(Cathode Ray Tube,CRT)、液晶显示器(Liquid Crystal Display,LCD)等以及扬声器等的输出部分2107;包括硬盘等的存储部分2108;以及包括诸如LAN(Local Area Network,局域网)卡、调制解调器等的网络接口卡的通信部分2109。通信部分2109经由诸如因特网的网络执行通信处理。驱动器2110也根据需要连接至I/O接口2105。可拆卸介质2111,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器2110上,以便于从其上读出的计算机程序根据需要被安装入存储部分2108。
特别地,根据本发明的实施例,下文参考流程图描述的过程可以被实现为计算机软件程序。例如,本发明的实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信部分2109从网络上被下载和安装,和/或从可拆卸介质2111被安装。在该计算机程序被中央处理单元(CPU)2101执行时,执行本申请的系统中限定的各种功能。
需要说明的是,本发明实施例所示的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(Erasable Programmable Read Only Memory,EPROM)、闪存、光纤、便携式紧凑磁盘只读存储器(Compact Disc Read-Only Memory,CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本发明中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本发明中,计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:无线、有线等等,或者上述的任意合适的组合。
附图中的流程图和框图,图示了按照本发明各种实施例的系统、方 法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,上述模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图或流程图中的每个方框、以及框图或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
描述于本发明实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现,所描述的单元也可以设置在处理器中。其中,这些单元的名称在某种情况下并不构成对该单元本身的限定。
作为另一方面,本申请还提供了一种计算机可读介质,该计算机可读介质可以是上述实施例中描述的电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被一个该电子设备执行时,使得该电子设备实现上述实施例中所述的方法。
应当注意,尽管在上文详细描述中提及了用于动作执行的设备的若干模块或者单元,但是这种划分并非强制性的。实际上,根据本发明的实施方式,上文描述的两个或更多模块或者单元的特征和功能可以在一个模块或者单元中具体化。反之,上文描述的一个模块或者单元的特征和功能可以进一步划分为由多个模块或者单元来具体化。
通过以上的实施方式的描述,本领域的技术人员易于理解,这里描述的示例实施方式可以通过软件实现,也可以通过软件结合必要的硬件的方式来实现。因此,根据本发明实施方式的技术方案可以以软件产品的形式体现出来,该软件产品可以存储在一个非易失性存储介质(可以是CD-ROM,U盘,移动硬盘等)中或网络上,包括若干指令以使得一 台计算设备(可以是个人计算机、服务器、触控终端、或者网络设备等)执行根据本发明实施方式的方法。
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本发明的其它实施方案。本申请旨在涵盖本发明的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本发明的一般性原理并包括本发明未公开的本技术领域中的公知常识或惯用技术手段。
应当理解的是,本发明并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本发明的范围仅由所附的权利要求来限制。

Claims (26)

  1. 一种图像处理方法,其特征在于,包括:
    根据多个视角对应的多个视角参数分别将目标对象的人脸模型投影到通过所述多个视角采集到的所述目标对象的多张人脸图像中,以确定所述人脸模型上的区域与所述人脸图像中的区域之间的对应关系;
    基于所述对应关系和所述人脸模型中需要生成纹理图像的目标区域,分别从所述多张人脸图像中提取与所述目标区域相对应的图像;
    将分别从所述多张人脸图像中提取出的与所述目标区域相对应的图像进行融合处理,生成所述纹理图像。
  2. 根据权利要求1所述的图像处理方法,其特征在于,根据所述视角参数分别将所述人脸模型投影到所述多张人脸图像中,包括:
    根据所述视角参数确定所述各个人脸图像相对于所述人脸模型的旋转平移参数和正交投影参数;
    根据所述各个人脸图像相对于所述人脸模型的旋转平移参数,确定所述人脸模型针对所述各个人脸图像的投影角度;
    根据所述人脸模型针对所述各个人脸图像的投影角度和所述各个人脸图像相对于所述人脸模型的正交投影参数,将所述人脸模型上的各个三维点投影到所述多张人脸图像中。
  3. 根据权利要求2所述的图像处理方法,其特征在于,将所述人脸模型上的各个三维点投影到所述多张人脸图像中,包括:
    确定所述人脸模型上的三维点投影到所述各个人脸图像上的位置;
    对于所述各个人脸图像中仅有一个三维点投影到的第一位置,将投影到所述第一位置处的三维点作为与所述第一位置相对应的三维点;
    对于所述各个人脸图像中有多个三维点投影到的第二位置,将所述多个三维点中深度信息最小的三维点作为与所述第二位置相对应的三 维点。
  4. 根据权利要求1所述的图像处理方法,其特征在于,基于所述对应关系和所述人脸模型中需要生成纹理图像的目标区域,分别从所述多张人脸图像中提取与所述目标区域相对应的图像,包括:
    基于所述对应关系和所述人脸模型中需要生成纹理图像的目标区域,确定所述各个人脸图像中与所述目标区域相对应的区域;
    分别从所述各个人脸图像中与所述目标区域相对应的区域内提取出部分图像。
  5. 根据权利要求4所述的图像处理方法,其特征在于,分别从所述各个人脸图像中与所述目标区域相对应的区域内提取出部分图像,包括:
    根据所述各个人脸图像对应的视角参数,确定所述各个人脸图像中包含的人脸朝向;
    根据所述各个人脸图像中包含的人脸朝向,确定需要从所述各个人脸图像中与所述目标区域相对应的区域内提取的图像;
    根据需要从所述各个人脸图像中与所述目标区域相对应的区域内提取的图像,从所述各个人脸图像中提取出部分图像。
  6. 根据权利要求1所述的图像处理方法,其特征在于,将分别从所述多张人脸图像中提取出的与所述目标区域相对应的图像进行融合处理,包括:
    采用拉普拉斯金字塔融合算法或泊松融合算法对提取出与所述目标区域相对应的图像进行融合处理。
  7. 根据权利要求1所述的图像处理方法,其特征在于,在生成所述纹理图像之后,所述图像处理方法还包括:
    确定所述纹理图像中需要修复的缺陷区域;
    从预定的纹理图像中获取与所述缺陷区域相对应的修复图像;
    将所述修复图像添加至所述纹理图像中并替换掉所述缺陷区域,对所述纹理图像进行修复。
  8. 根据权利要求7所述的图像处理方法,其特征在于,还包括:根据所述缺陷区域的颜色调整所述修复图像的颜色。
  9. 根据权利要求7所述的图像处理方法,其特征在于,确定所述纹理图像中需要修复的缺陷区域,包括:
    检测所述纹理图像中的鼻孔区域和/或嘴唇区域;
    将所述鼻孔区域和/或嘴唇区域作为所述缺陷区域。
  10. 根据权利要求1所述的图像处理方法,其特征在于,在生成所述纹理图像之后,所述图像处理方法还包括:
    基于球谐光照模型计算所述纹理图像中的球谐光照系数;
    根据所述球谐光照系数去除所述纹理图像中的光照。
  11. 根据权利要求1所述的图像处理方法,其特征在于,在生成所述纹理图像之后,所述图像处理方法还包括:
    计算所述纹理图像中各个像素点的平均颜色;
    将所述平均颜色作为所述纹理图像的背景颜色生成所述纹理图像的背景图像;
    对所述纹理图像与所述背景图像之间的边界进行滤波处理,得到处理后的纹理图像;
    通过所述处理后的纹理图像对所述人脸模型进行渲染。
  12. 根据权利要求1至11中任一项所述的图像处理方法,其特征在于,还包括:
    将指定的三维人脸模型按照指定切线剖开;
    沿所述切线展开所述三维人脸模型得到二维人脸图像;
    从所述二维人脸图像中选择指定区域作为所述目标区域。
  13. 一种图像处理装置,其特征在于,包括:
    投影单元,用于根据多个视角对应的多个视角参数分别将目标对象的人脸模型投影到通过所述多个视角采集到的所述目标对象的多张人脸图像中,以确定所述人脸模型上的区域与所述人脸图像中的区域之间的对应关系;
    提取单元,用于基于所述对应关系和所述人脸模型中需要生成纹理图像的目标区域,分别从所述多张人脸图像中提取与所述目标区域相对应的图像;
    融合单元,用于将分别从所述多张人脸图像中提取出的与所述目标区域相对应的图像进行融合处理,生成所述纹理图像。
  14. 根据权利要求13所述的图像处理装置,其特征在于,所述投影单元用于:
    根据所述视角参数确定所述各个人脸图像相对于所述人脸模型的旋转平移参数和正交投影参数;
    根据所述各个人脸图像相对于所述人脸模型的旋转平移参数,确定所述人脸模型针对所述各个人脸图像的投影角度;
    根据所述人脸模型针对所述各个人脸图像的投影角度和所述各个人脸图像相对于所述人脸模型的正交投影参数,将所述人脸模型上的各个三维点投影到所述多张人脸图像中。
  15. 根据权利要求14所述的图像处理装置,其特征在于,所述投影单元用于:
    确定所述人脸模型上的三维点投影到所述各个人脸图像上的位置;
    对于所述各个人脸图像中仅有一个三维点投影到的第一位置,将投影到所述第一位置处的三维点作为与所述第一位置相对应的三维点;
    对于所述各个人脸图像中有多个三维点投影到的第二位置,将所述多个三维点中深度信息最小的三维点作为与所述第二位置相对应的三维点。
  16. 根据权利要求13所述的图像处理装置,其特征在于,所述提取单元用于:
    基于所述对应关系和所述人脸模型中需要生成纹理图像的目标区域,确定所述各个人脸图像中与所述目标区域相对应的区域;
    分别从所述各个人脸图像中与所述目标区域相对应的区域内提取出部分图像。
  17. 根据权利要求16所述的图像处理装置,其特征在于,所述提取单元用于:
    根据所述各个人脸图像对应的视角参数,确定所述各个人脸图像中包含的人脸朝向;
    根据所述各个人脸图像中包含的人脸朝向,确定需要从所述各个人脸图像中与所述目标区域相对应的区域内提取的图像;
    根据需要从所述各个人脸图像中与所述目标区域相对应的区域内提取的图像,从所述各个人脸图像中提取出部分图像。
  18. 根据权利要求13所述的图像处理装置,其特征在于,所述融合单元用于:
    采用拉普拉斯金字塔融合算法或泊松融合算法对提取出与所述目标区域相对应的图像进行融合处理。
  19. 根据权利要求13所述的图像处理装置,其特征在于,进一步包括:
    修复单元,用于确定所述纹理图像中需要修复的缺陷区域;从预定的纹理图像中获取与所述缺陷区域相对应的修复图像;将所述修复图像添加至所述纹理图像中并替换掉所述缺陷区域,以对所述纹理图像进行 修复。
  20. 根据权利要求19所述的图像处理装置,其特征在于,所述修复单元进一步用于包括:
    还根据所述缺陷区域的颜色调整所述修复图像的颜色。
  21. 根据权利要求19所述的图像处理装置,其特征在于,所述修复单元用于:
    所检测所述纹理图像中的鼻孔区域和/或嘴唇区域;将所述鼻孔区域和/或嘴唇区域作为所述缺陷区域。
  22. 根据权利要求13所述的图像处理装置,其特征在于,进一步包括:
    光照去除单元,用于基于球谐光照模型计算所述纹理图像中的球谐光照系数;根据所述球谐光照系数去除所述纹理图像中的光照。
  23. 根据权利要求13所述的图像处理装置,其特征在于,进一步包括:
    渲染处理单元,用于计算所述纹理图像中各个像素点的平均颜色;将所述平均颜色作为所述纹理图像的背景颜色生成所述纹理图像的背景图像;对所述纹理图像与所述背景图像之间的边界进行滤波处理,得到处理后的纹理图像;通过所述处理后的纹理图像对所述人脸模型进行渲染。
  24. 根据权利要求13所述的图像处理装置,其特征在于,进一步包括:
    目标区域确定单元,用于将指定的三维人脸模型按照指定切线剖开;沿所述切线展开所述三维人脸模型得到二维人脸图像;从所述二维人脸图像中选择指定区域作为所述目标区域。
  25. 一种计算机可读介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1至12中任一项所述 的图像处理方法。
  26. 一种电子设备,其特征在于,包括:
    一个或多个处理器;
    存储装置,用于存储一个或多个程序,当所述一个或多个程序被所述一个或多个处理器执行时,使得所述一个或多个处理器实现如权利要求1至12中任一项所述的图像处理方法。
PCT/CN2019/121935 2018-11-30 2019-11-29 图像处理方法、装置、计算机可读介质及电子设备 WO2020108610A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US17/184,571 US11961325B2 (en) 2018-11-30 2021-02-24 Image processing method and apparatus, computer-readable medium, and electronic device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811455877.4A CN109409335B (zh) 2018-11-30 2018-11-30 图像处理方法、装置、计算机可读介质及电子设备
CN201811455877.4 2018-11-30

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/184,571 Continuation US11961325B2 (en) 2018-11-30 2021-02-24 Image processing method and apparatus, computer-readable medium, and electronic device

Publications (1)

Publication Number Publication Date
WO2020108610A1 true WO2020108610A1 (zh) 2020-06-04

Family

ID=65456639

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/121935 WO2020108610A1 (zh) 2018-11-30 2019-11-29 图像处理方法、装置、计算机可读介质及电子设备

Country Status (3)

Country Link
US (1) US11961325B2 (zh)
CN (1) CN109409335B (zh)
WO (1) WO2020108610A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111798399A (zh) * 2020-07-10 2020-10-20 北京字节跳动网络技术有限公司 一种图像处理方法、装置以及电子设备

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109409335B (zh) * 2018-11-30 2023-01-20 腾讯科技(深圳)有限公司 图像处理方法、装置、计算机可读介质及电子设备
CN110163953B (zh) * 2019-03-11 2023-08-25 腾讯科技(深圳)有限公司 三维人脸重建方法、装置、存储介质和电子装置
CN109978759B (zh) * 2019-03-27 2023-01-31 北京市商汤科技开发有限公司 图像处理方法及装置和图像生成网络的训练方法及装置
CN110691195B (zh) * 2019-10-15 2021-03-30 重庆灵翎互娱科技有限公司 一种基于三维人脸拍摄的光线检测方法和设备
CN110766611A (zh) * 2019-10-31 2020-02-07 北京沃东天骏信息技术有限公司 图像处理方法、装置、存储介质及电子设备
CN111192223B (zh) * 2020-01-07 2022-09-30 腾讯科技(深圳)有限公司 人脸纹理图像的处理方法、装置、设备及存储介质
CN110895823B (zh) * 2020-01-10 2020-06-05 腾讯科技(深圳)有限公司 一种三维模型的纹理获取方法、装置、设备及介质
CN111325823B (zh) * 2020-02-05 2022-09-27 腾讯科技(深圳)有限公司 人脸纹理图像的获取方法、装置、设备及存储介质
CN113496469B (zh) * 2020-04-01 2023-10-10 北京达佳互联信息技术有限公司 图像处理方法、装置、电子设备和存储介质
CN111507889A (zh) * 2020-04-13 2020-08-07 北京字节跳动网络技术有限公司 图像处理方法、装置、电子设备及计算机可读存储介质
CN112489169B (zh) * 2020-12-17 2024-02-13 脸萌有限公司 人像图像处理方法及装置
CN112734629B (zh) * 2020-12-30 2022-12-27 广州极飞科技股份有限公司 一种正射影像生成方法、装置、设备及存储介质
CN112884889B (zh) * 2021-04-06 2022-05-20 北京百度网讯科技有限公司 模型训练、人头重建方法,装置,设备以及存储介质
CN115953330B (zh) * 2023-03-13 2023-05-26 腾讯科技(深圳)有限公司 虚拟场景图像的纹理优化方法、装置、设备和存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050008199A1 (en) * 2003-03-24 2005-01-13 Kenneth Dong Facial recognition system and method
CN101320484A (zh) * 2008-07-17 2008-12-10 清华大学 一种基于人脸全自动定位的三维人脸识别方法
CN101561874A (zh) * 2008-07-17 2009-10-21 清华大学 一种人脸图像识别的方法
CN109409335A (zh) * 2018-11-30 2019-03-01 腾讯科技(深圳)有限公司 图像处理方法、装置、计算机可读介质及电子设备

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9852543B2 (en) * 2015-03-27 2017-12-26 Snap Inc. Automated three dimensional model generation
US10796480B2 (en) * 2015-08-14 2020-10-06 Metail Limited Methods of generating personalized 3D head models or 3D body models
CN106910247B (zh) * 2017-03-20 2020-10-02 厦门黑镜科技有限公司 用于生成三维头像模型的方法和装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050008199A1 (en) * 2003-03-24 2005-01-13 Kenneth Dong Facial recognition system and method
CN101320484A (zh) * 2008-07-17 2008-12-10 清华大学 一种基于人脸全自动定位的三维人脸识别方法
CN101561874A (zh) * 2008-07-17 2009-10-21 清华大学 一种人脸图像识别的方法
CN109409335A (zh) * 2018-11-30 2019-03-01 腾讯科技(深圳)有限公司 图像处理方法、装置、计算机可读介质及电子设备

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111798399A (zh) * 2020-07-10 2020-10-20 北京字节跳动网络技术有限公司 一种图像处理方法、装置以及电子设备
CN111798399B (zh) * 2020-07-10 2024-04-30 抖音视界有限公司 一种图像处理方法、装置以及电子设备

Also Published As

Publication number Publication date
US20210183044A1 (en) 2021-06-17
CN109409335A (zh) 2019-03-01
US11961325B2 (en) 2024-04-16
CN109409335B (zh) 2023-01-20

Similar Documents

Publication Publication Date Title
WO2020108610A1 (zh) 图像处理方法、装置、计算机可读介质及电子设备
JP7181977B2 (ja) 3次元再構成において構造特徴を検出し、組み合わせるための方法およびシステム
US9679192B2 (en) 3-dimensional portrait reconstruction from a single photo
JP6613605B2 (ja) 深度画像の深度値復元方法及びシステム
US8711143B2 (en) System and method for interactive image-based modeling of curved surfaces using single-view and multi-view feature curves
US9990780B2 (en) Using computed facial feature points to position a product model relative to a model of a face
US10424112B2 (en) Mesh boundary smoothing
CN111768477B (zh) 三维人脸表情基建立方法及装置、存储介质及电子设备
US8670606B2 (en) System and method for calculating an optimization for a facial reconstruction based on photometric and surface consistency
JP2013097806A (ja) 映像処理装置及び方法
CN107578467B (zh) 一种医疗器械三维建模方法及装置
CN112257657B (zh) 脸部图像融合方法及装置、存储介质、电子设备
US8633926B2 (en) Mesoscopic geometry modulation
CN111275824A (zh) 用于交互式增强现实的表面重建
CN115496864B (zh) 模型构建方法、重建方法、装置、电子设备及存储介质
US20210166476A1 (en) Automatic 3D Image Reconstruction Process from Real-World 2D Images
Li et al. 3d human avatar digitization from a single image
CN115810101A (zh) 三维模型风格化方法、装置、电子设备及存储介质
JP2005275646A (ja) 3次元描画モデル生成方法、3次元モデル描画方法及びそのプログラム
Petkov et al. Interactive visibility retargeting in vr using conformal visualization
CN114399610A (zh) 基于引导先验的纹理映射系统和方法
US8891857B2 (en) Concave surface modeling in image-based visual hull
CN115690359B (zh) 一种点云处理方法、装置、电子设备及存储介质
US8907976B2 (en) Resolution-adaptive mesh smoothing brush
CN115082640A (zh) 基于单张图像的3d人脸模型纹理重建方法及设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19889864

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19889864

Country of ref document: EP

Kind code of ref document: A1