CN114693515A - Image deformation method and device, electronic device and storage medium - Google Patents
Image deformation method and device, electronic device and storage medium Download PDFInfo
- Publication number
- CN114693515A CN114693515A CN202210323348.9A CN202210323348A CN114693515A CN 114693515 A CN114693515 A CN 114693515A CN 202210323348 A CN202210323348 A CN 202210323348A CN 114693515 A CN114693515 A CN 114693515A
- Authority
- CN
- China
- Prior art keywords
- target
- image
- deformation
- pixel
- key point
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 58
- 230000000694 effects Effects 0.000 claims abstract description 45
- 230000008859 change Effects 0.000 claims abstract description 39
- 238000012545 processing Methods 0.000 claims description 46
- 238000013507 mapping Methods 0.000 claims description 37
- 239000000463 material Substances 0.000 claims description 23
- 238000004590 computer program Methods 0.000 claims description 15
- 230000004044 response Effects 0.000 claims description 5
- 238000010586 diagram Methods 0.000 description 22
- 230000006870 function Effects 0.000 description 14
- 210000003128 head Anatomy 0.000 description 8
- 238000001514 detection method Methods 0.000 description 6
- 238000005516 engineering process Methods 0.000 description 5
- 230000010365 information processing Effects 0.000 description 5
- 230000002452 interceptive effect Effects 0.000 description 5
- 230000009466 transformation Effects 0.000 description 5
- PXFBZOLANLWPMH-UHFFFAOYSA-N 16-Epiaffinine Natural products C1C(C2=CC=CC=C2N2)=C2C(=O)CC2C(=CC)CN(C)C1C2CO PXFBZOLANLWPMH-UHFFFAOYSA-N 0.000 description 4
- 230000005540 biological transmission Effects 0.000 description 4
- 230000008569 process Effects 0.000 description 4
- 238000004422 calculation algorithm Methods 0.000 description 3
- 230000018109 developmental process Effects 0.000 description 3
- 238000003491 array Methods 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 2
- 238000013527 convolutional neural network Methods 0.000 description 2
- 239000000835 fiber Substances 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 230000001902 propagating effect Effects 0.000 description 2
- 230000000007 visual effect Effects 0.000 description 2
- RYGMFSIKBFXOCR-UHFFFAOYSA-N Copper Chemical compound [Cu] RYGMFSIKBFXOCR-UHFFFAOYSA-N 0.000 description 1
- 244000035744 Hura crepitans Species 0.000 description 1
- 230000003190 augmentative effect Effects 0.000 description 1
- 238000013475 authorization Methods 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 229910052802 copper Inorganic materials 0.000 description 1
- 239000010949 copper Substances 0.000 description 1
- 238000013135 deep learning Methods 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 210000000887 face Anatomy 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000004807 localization Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 229920001690 polydopamine Polymers 0.000 description 1
- 230000002441 reversible effect Effects 0.000 description 1
- 230000011218 segmentation Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000012549 training Methods 0.000 description 1
- 230000001052 transient effect Effects 0.000 description 1
- 230000002747 voluntary effect Effects 0.000 description 1
- 238000004260 weight control Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/04—Context-preserving transformations, e.g. by using an importance map
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/70—Determining position or orientation of objects or cameras
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30196—Human being; Person
- G06T2207/30201—Face
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Processing Or Creating Images (AREA)
Abstract
本公开涉及一种图像变形方法及装置、电子设备和存储介质,所述方法包括:获取包括目标对象的待处理图像;获取预设的参考图像中参考对象的变形信息,变形信息表征参考对象的参考关键点在移动前与移动后的位置,参考关键点用于控制参考图像变形;根据变形信息,确定待处理图像中与参考关键点对应的目标关键点,以及确定参考关键点与目标关键点之间的位置变化信息;基于位置变化信息确定目标关键点的变形位置,并根据目标关键点的变形位置,对待处理图像进行变形处理,得到目标图像,目标图像中的目标对象具备变形效果。本公开实施例可实现对目标图像中的目标对象实现自定义变形。
The present disclosure relates to an image deformation method and device, an electronic device, and a storage medium. The method includes: acquiring an image to be processed including a target object; acquiring deformation information of a reference object in a preset reference image, where the deformation information represents the deformation of the reference object. The position of the reference key point before and after the movement, the reference key point is used to control the deformation of the reference image; according to the deformation information, the target key point corresponding to the reference key point in the image to be processed is determined, and the reference key point and the target key point are determined. Based on the position change information, the deformation position of the target key point is determined, and according to the deformation position of the target key point, the image to be processed is deformed to obtain the target image, and the target object in the target image has the deformation effect. The embodiments of the present disclosure can realize self-defined deformation of the target object in the target image.
Description
技术领域technical field
本公开涉及计算机技术领域,尤其涉及一种图像变形方法及装置、电子设备和存储介质。The present disclosure relates to the field of computer technology, and in particular, to an image deformation method and device, an electronic device, and a storage medium.
背景技术Background technique
目前,例如手机、平板等智能设备中安装的相机应用中通常都有特效变形功能,以满足用户的趣味性需求。现有技术中,通常是用户直接选择相机功能中提供的变形模板,无法满足用户自定义变形效果的需求。At present, camera applications installed in smart devices such as mobile phones and tablets usually have special effects deformation functions to meet the interesting needs of users. In the prior art, the user usually directly selects the deformation template provided in the camera function, which cannot meet the user's requirement of customizing the deformation effect.
发明内容SUMMARY OF THE INVENTION
本公开提出了一种图像变形技术方案。The present disclosure proposes a technical solution for image deformation.
根据本公开的一方面,提供了一种图像变形方法,包括:获取包括目标对象的待处理图像;获取预设的参考图像中参考对象的变形信息,所述变形信息表征所述参考对象的参考关键点在移动前与移动后的位置,所述参考关键点用于控制所述参考图像变形;根据所述变形信息,确定所述待处理图像中与所述参考关键点对应的目标关键点,以及确定所述参考关键点与所述目标关键点之间的位置变化信息;基于所述位置变化信息确定所述目标关键点的变形位置,并根据所述目标关键点的变形位置,对所述待处理图像进行变形处理,得到目标图像,所述目标图像中的目标对象具备变形效果。According to an aspect of the present disclosure, an image deformation method is provided, including: acquiring an image to be processed including a target object; acquiring deformation information of a reference object in a preset reference image, where the deformation information represents the reference of the reference object the position of the key point before and after the movement, the reference key point is used to control the deformation of the reference image; according to the deformation information, determine the target key point corresponding to the reference key point in the image to be processed, and determine the position change information between the reference key point and the target key point; determine the deformation position of the target key point based on the position change information, and determine the deformation position of the target key point according to the deformation position of the target key point. The to-be-processed image is deformed to obtain a target image, where the target object in the target image has a deformation effect.
在一种可能的实现方式中,所述基于所述位置变化信息确定所述目标关键点的变形位置,包括:获取所述参考对象与所述目标对象中指定部位的比例关系信息;根据所述比例关系信息以及所述位置变化信息,确定所述目标关键点的变形位置In a possible implementation manner, the determining the deformation position of the target key point based on the position change information includes: acquiring information on a proportional relationship between the reference object and a specified part in the target object; proportional relationship information and the position change information to determine the deformation position of the target key point
在一种可能的实现方式中,所述获取所述参考对象与所述目标对象中指定部位的比例关系信息,包括:根据所述参考对象的参考关键点信息,确定所述参考对象的指定部位之间的第一比例信息;根据所述目标对象的目标关键点信息,确定所述目标对象的指定部位之间的第二比例信息;根据所述第一比例信息及所述第二比例信息,确定所述指定部位的比例关系信息。In a possible implementation manner, the acquiring the proportional relationship information between the reference object and the designated part in the target object includes: determining the designated part of the reference object according to the reference key point information of the reference object According to the target key point information of the target object, the second scale information between the designated parts of the target object is determined; according to the first scale information and the second scale information, The proportional relationship information of the designated part is determined.
在一种可能的实现方式中,所述根据所述比例关系信息以及所述位置变化信息,确定所述目标关键点的变形位置,包括:根据所述位置变化信息以及所述目标关键点在所述待处理图像中的初始位置,确定所述目标关键点相对于所述参考关键点的相对变形位置;根据所述比例关系信息与所述相对变形位置,确定所述目标关键点的变形位置。In a possible implementation manner, the determining the deformation position of the target key point according to the proportional relationship information and the position change information includes: according to the position change information and the target key point where the target key point is located The initial position in the image to be processed is determined, and the relative deformation position of the target key point relative to the reference key point is determined; the deformation position of the target key point is determined according to the scale relationship information and the relative deformation position.
在一种可能的实现方式中,所述根据所述目标关键点的变形位置,对所述待处理图像进行变形处理,得到目标图像,包括:根据所述目标关键点的变形位置以及所述目标关键点在所述待处理图像中的初始位置,确定所述待处理图像中每个像素点的目标像素位置;根据所述待处理图像中每个像素点的目标像素位置,对所述待处理图像进行变形处理,得到所述目标图像。In a possible implementation manner, performing deformation processing on the to-be-processed image according to the deformation position of the target key point to obtain the target image includes: according to the deformation position of the target key point and the target image The initial position of the key point in the image to be processed determines the target pixel position of each pixel in the image to be processed; according to the target pixel position of each pixel in the image to be processed, the The image is deformed to obtain the target image.
在一种可能的实现方式中,所述方法还包括:获取所述待处理图像对应的网格,所述网格是按照预设的划分尺寸对所述待处理图像进行网格划分得到的,所述网格包括多个具有所述划分尺寸的子网格;其中,所述根据所述目标关键点的变形位置以及所述目标关键点在所述待处理图像中的初始位置,确定所述待处理图像中每个像素点的目标像素位置,包括:根据所述初始位置、所述变形位置以及所述待处理图像中第一类像素点的第一初始像素位置,确定所述第一类像素点的第一目标像素位置,所述第一类像素点包括所述待处理图像中处于所述子网格的网格顶点处的像素点;根据所述第一初始像素位置、所述第一目标像素位置以及所述待处理图像中第二类像素点的第二初始像素位置,确定所述第二类像素点的第二目标像素位置,所述第二类像素点包括所述待处理图像中处于所述子网格的网格内部的像素点;其中,所述目标像素位置包括所述第一类像素点的第一目标像素位置以及所述第二类像素点的第二目标像素位置。In a possible implementation manner, the method further includes: acquiring a grid corresponding to the image to be processed, where the grid is obtained by meshing the image to be processed according to a preset division size, The grid includes a plurality of sub-grids with the divided size; wherein, the determination of the The target pixel position of each pixel in the image to be processed includes: determining the first type of pixel according to the initial position, the deformed position and the first initial pixel position of the first type of pixel in the image to be processed The first target pixel position of the pixel point, the first type of pixel point includes the pixel point located at the grid vertex of the sub-grid in the image to be processed; according to the first initial pixel position, the first pixel point a target pixel position and a second initial pixel position of a second type of pixel point in the image to be processed, determine a second target pixel position of the second type of pixel point, the second type of pixel point includes the to-be-processed pixel point The pixel points in the image inside the grid of the sub-grid; wherein, the target pixel position includes the first target pixel position of the first type of pixel point and the second target pixel of the second type of pixel point Location.
在一种可能的实现方式中,所述根据所述初始位置、所述变形位置以及所述待处理图像中第一类像素点的第一初始像素位置,确定所述第一类像素点的第一目标像素位置,包括:根据所述初始位置与所述变形位置,确定所述待处理图像对应的位置映射关系,所述位置映射关系表征所述待处理图像中的像素点在变形处理前与变形处理后的映射关系;根据所述第一类像素点的第一初始像素位置与所述位置映射关系,确定所述第一类像素点的第一目标像素位置。In a possible implementation manner, the first type of pixel point of the first type of pixel is determined according to the initial position, the deformed position, and the first initial pixel position of the first type of pixel point in the to-be-processed image. A target pixel position, comprising: determining a position mapping relationship corresponding to the to-be-processed image according to the initial position and the deformed position, where the position-mapping relationship represents that the pixel points in the to-be-processed image are connected with each other before the deformation processing. The mapping relationship after deformation processing; according to the first initial pixel position of the first type of pixel point and the position mapping relationship, the first target pixel position of the first type of pixel point is determined.
在一种可能的实现方式中,所述根据所述第一初始像素位置、所述第一目标像素位置以及所述待处理图像中第二类像素点的第二初始像素位置,确定所述第二类像素点的第二目标像素位置,包括:根据所述第一初始像素位置以及所述第一目标像素位置,确定所述第一类像素点对应的位置移动向量,所述位置移动向量表征所述第一类像素点从所述第一初始像素位置移动至所述第一目标像素位置的移动方向与移动距离;根据所述第二类像素点的第二初始像素位置,对所述第二类像素点所属子网格上的第一类像素点的位置移动向量进行插值处理,得到所述第二类像素点的目标移动向量;根据所述目标移动向量以及所述第二初始像素位置,确定所述第二类像素点的第二目标像素位置。In a possible implementation manner, determining the The second target pixel position of the second type of pixel point includes: determining the position movement vector corresponding to the first type pixel point according to the first initial pixel position and the first target pixel position, and the position movement vector represents The moving direction and moving distance of the first type of pixel point moving from the first initial pixel position to the first target pixel position; according to the second initial pixel position of the second type of pixel point, the first Perform interpolation processing on the position movement vector of the first type pixel point on the sub-grid to which the second type pixel point belongs to obtain the target movement vector of the second type pixel point; according to the target movement vector and the second initial pixel position , and determine the second target pixel position of the second type of pixel point.
在一种可能的实现方式中,所述方法还包括:响应于针对变形素材的设置操作,将所述设置操作指示的参考图像的变形信息确定为变形素材,所述变形素材用于对待变形图像中的目标对象进行变形。In a possible implementation manner, the method further includes: in response to a setting operation for the deformed material, determining the deformation information of the reference image indicated by the setting operation as the deformation material, where the deformation material is used for the image to be deformed to deform the target object in .
根据本公开的一方面,提供了一种图像变形装置,包括:图像获取模块,用于获取包括目标对象的待处理图像;信息获取模块,用于获取预设的参考图像中参考对象的变形信息,所述变形信息表征所述参考对象的参考关键点在移动前与移动后的位置,所述参考关键点用于控制所述参考图像变形;确定模块,用于根据所述变形信息,确定所述待处理图像中与所述参考关键点对应的目标关键点,以及确定所述参考关键点与所述目标关键点之间的位置变化信息;变形模块,用于基于所述位置变化信息确定所述目标关键点的变形位置,并根据所述目标关键点的变形位置,对所述待处理图像进行变形处理,得到目标图像,所述目标图像中的目标对象具备变形效果。According to an aspect of the present disclosure, an image deformation apparatus is provided, comprising: an image acquisition module for acquiring an image to be processed including a target object; and an information acquisition module for acquiring deformation information of a reference object in a preset reference image , the deformation information represents the position of the reference key point of the reference object before and after the movement, and the reference key point is used to control the deformation of the reference image; the determination module is used to determine the deformation information according to the deformation information. the target key point corresponding to the reference key point in the to-be-processed image, and determine the position change information between the reference key point and the target key point; the deformation module is used to determine the target key point based on the position change information The deformation position of the target key point is obtained, and according to the deformation position of the target key point, the image to be processed is deformed to obtain a target image, and the target object in the target image has a deformation effect.
在一种可能的实现方式中,所述变形模块,包括:比例获取子模块,用于获取所述参考对象与所述目标对象中指定部位的比例关系信息;位置确定子模块,用于根据所述比例关系信息以及所述位置变化信息,确定所述目标关键点的变形位置In a possible implementation manner, the deformation module includes: a scale acquisition sub-module for acquiring proportional relationship information between the reference object and a specified part in the target object; a position determination sub-module for The proportional relationship information and the position change information are used to determine the deformation position of the target key point.
在一种可能的实现方式中,所述获取所述参考对象与所述目标对象中指定部位的比例关系信息,包括:根据所述参考对象的参考关键点信息,确定所述参考对象的指定部位之间的第一比例信息;根据所述目标对象的目标关键点信息,确定所述目标对象的指定部位之间的第二比例信息;根据所述第一比例信息及所述第二比例信息,确定所述指定部位的比例关系信息。In a possible implementation manner, the acquiring the proportional relationship information between the reference object and the designated part in the target object includes: determining the designated part of the reference object according to the reference key point information of the reference object According to the target key point information of the target object, the second scale information between the designated parts of the target object is determined; according to the first scale information and the second scale information, The proportional relationship information of the designated part is determined.
在一种可能的实现方式中,所述根据所述比例关系信息以及所述位置变化信息,确定所述目标关键点的变形位置,包括:根据所述位置变化信息以及所述目标关键点在所述待处理图像中的初始位置,确定所述目标关键点相对于所述参考关键点的相对变形位置;根据所述比例关系信息与所述相对变形位置,确定所述目标关键点的变形位置。In a possible implementation manner, the determining the deformation position of the target key point according to the proportional relationship information and the position change information includes: according to the position change information and the target key point where the target key point is located The initial position in the image to be processed is determined, and the relative deformation position of the target key point relative to the reference key point is determined; the deformation position of the target key point is determined according to the scale relationship information and the relative deformation position.
在一种可能的实现方式中,所述变形模块,包括:像素位置确定子模块,用于根据所述目标关键点的变形位置以及所述目标关键点在所述待处理图像中的初始位置,确定所述待处理图像中每个像素点的目标像素位置;变形子模块,用于根据所述待处理图像中每个像素点的目标像素位置,对所述待处理图像进行变形处理,得到所述目标图像。In a possible implementation manner, the deformation module includes: a pixel position determination sub-module, configured to, according to the deformation position of the target key point and the initial position of the target key point in the image to be processed, Determine the target pixel position of each pixel in the to-be-processed image; the deformation sub-module is configured to perform deformation processing on the to-be-processed image according to the target pixel position of each pixel in the to-be-processed image to obtain the the target image.
在一种可能的实现方式中,所述装置还包括:网格获取模块,用于获取所述待处理图像对应的网格,所述网格是按照预设的划分尺寸对所述待处理图像进行网格划分得到的,所述网格包括多个具有所述划分尺寸的子网格;其中,所述根据所述目标关键点的变形位置以及所述目标关键点在所述待处理图像中的初始位置,确定所述待处理图像中每个像素点的目标像素位置,包括:根据所述初始位置、所述变形位置以及所述待处理图像中第一类像素点的第一初始像素位置,确定所述第一类像素点的第一目标像素位置,所述第一类像素点包括所述待处理图像中处于所述子网格的网格顶点处的像素点;根据所述第一初始像素位置、所述第一目标像素位置以及所述待处理图像中第二类像素点的第二初始像素位置,确定所述第二类像素点的第二目标像素位置,所述第二类像素点包括所述待处理图像中处于所述子网格的网格内部的像素点;其中,所述目标像素位置包括所述第一类像素点的第一目标像素位置以及所述第二类像素点的第二目标像素位置。In a possible implementation manner, the apparatus further includes: a grid acquiring module, configured to acquire a grid corresponding to the to-be-processed image, where the grid is based on a preset division size for the to-be-processed image Obtained by performing grid division, the grid includes a plurality of sub-grids with the divided size; wherein, the deformation position of the target key point and the target key point are in the image to be processed according to the deformation position determine the target pixel position of each pixel in the image to be processed, including: according to the initial position, the deformation position and the first initial pixel position of the first type of pixel in the image to be processed , determine the first target pixel position of the first type of pixel point, and the first type of pixel point includes the pixel point at the grid vertex of the sub-grid in the image to be processed; according to the first type of pixel point The initial pixel position, the first target pixel position, and the second initial pixel position of the second type of pixel point in the image to be processed, determine the second target pixel position of the second type of pixel point, the second type of pixel point The pixel points include the pixel points in the image to be processed that are inside the grid of the sub-grid; wherein, the target pixel position includes the first target pixel position of the first type of pixel point and the second type of pixel point. The second target pixel position of the pixel point.
在一种可能的实现方式中,所述根据所述初始位置、所述变形位置以及所述待处理图像中第一类像素点的第一初始像素位置,确定所述第一类像素点的第一目标像素位置,包括:根据所述初始位置与所述变形位置,确定所述待处理图像对应的位置映射关系,所述位置映射关系表征所述待处理图像中的像素点在变形处理前与变形处理后的映射关系;根据所述第一类像素点的第一初始像素位置与所述位置映射关系,确定所述第一类像素点的第一目标像素位置。In a possible implementation manner, the first type of pixel point of the first type of pixel is determined according to the initial position, the deformed position, and the first initial pixel position of the first type of pixel point in the to-be-processed image. A target pixel position, comprising: determining a position mapping relationship corresponding to the to-be-processed image according to the initial position and the deformed position, where the position-mapping relationship represents that the pixel points in the to-be-processed image are connected with each other before the deformation processing. The mapping relationship after deformation processing; according to the first initial pixel position of the first type of pixel point and the position mapping relationship, the first target pixel position of the first type of pixel point is determined.
在一种可能的实现方式中,所述根据所述第一初始像素位置、所述第一目标像素位置以及所述待处理图像中第二类像素点的第二初始像素位置,确定所述第二类像素点的第二目标像素位置,包括:根据所述第一初始像素位置以及所述第一目标像素位置,确定所述第一类像素点对应的位置移动向量,所述位置移动向量表征所述第一类像素点从所述第一初始像素位置移动至所述第一目标像素位置的移动方向与移动距离;根据所述第二类像素点的第二初始像素位置,对所述第二类像素点所属子网格上的第一类像素点的位置移动向量进行插值处理,得到所述第二类像素点的目标移动向量;根据所述目标移动向量以及所述第二初始像素位置,确定所述第二类像素点的第二目标像素位置。In a possible implementation manner, determining the The second target pixel position of the second type of pixel point includes: determining the position movement vector corresponding to the first type pixel point according to the first initial pixel position and the first target pixel position, and the position movement vector represents The moving direction and moving distance of the first type of pixel point moving from the first initial pixel position to the first target pixel position; according to the second initial pixel position of the second type of pixel point, the first Perform interpolation processing on the position movement vector of the first type pixel point on the sub-grid to which the second type pixel point belongs to obtain the target movement vector of the second type pixel point; according to the target movement vector and the second initial pixel position , and determine the second target pixel position of the second type of pixel point.
在一种可能的实现方式中,所述装置还包括:素材设置模块,用于响应于针对变形素材的设置操作,将所述设置操作指示的参考图像的变形信息确定为变形素材,所述变形素材用于对待变形图像中的目标对象进行变形。In a possible implementation manner, the apparatus further includes: a material setting module, configured to, in response to a setting operation for a deformed material, determine the deformation information of the reference image indicated by the setting operation as a deformed material, and the deformed material Footage is used to deform the target object in the image to be deformed.
根据本公开的一方面,提供了一种电子设备,包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器被配置为调用所述存储器存储的指令,以执行上述方法。According to an aspect of the present disclosure, there is provided an electronic device, comprising: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to invoke the instructions stored in the memory to execute the above method.
根据本公开的一方面,提供了一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述方法。According to an aspect of the present disclosure, there is provided a computer-readable storage medium having computer program instructions stored thereon, the computer program instructions implementing the above method when executed by a processor.
在本公开实施例中,能够根据参考图像上的参考关键点的变形信息,将参考对象的变形效果同步映射至待处理图像中的目标对象上,这样不仅可以对目标图像中的目标对象实现自定义变形,且目标图像中的目标对象会保持与参考对象相似的变形效果而不受待处理图像中该目标对象的位姿变化的影响。In the embodiment of the present disclosure, the deformation effect of the reference object can be synchronously mapped to the target object in the to-be-processed image according to the deformation information of the reference key points on the reference image. Deformation is defined, and the target object in the target image will maintain a similar deformation effect as the reference object without being affected by the pose change of the target object in the image to be processed.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,而非限制本公开。根据下面参考附图对示例性实施例的详细说明,本公开的其它特征及方面将变得清楚。It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. Other features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments with reference to the accompanying drawings.
附图说明Description of drawings
此处的附图被并入说明书中并构成本说明书的一部分,这些附图示出了符合本公开的实施例,并与说明书一起用于说明本公开的技术方案。The accompanying drawings, which are incorporated into and constitute a part of this specification, illustrate embodiments consistent with the present disclosure, and together with the description, serve to explain the technical solutions of the present disclosure.
图1示出根据本公开实施例的图像变形方法的流程图。FIG. 1 shows a flowchart of an image warping method according to an embodiment of the present disclosure.
图2示出根据本公开实施例的一种参考图像的示意图。FIG. 2 shows a schematic diagram of a reference image according to an embodiment of the present disclosure.
图3示出根据本公开实施例的一种待处理图像的示意图。FIG. 3 shows a schematic diagram of an image to be processed according to an embodiment of the present disclosure.
图4示出根据本公开实施例的一种目标图像的示意图。FIG. 4 shows a schematic diagram of a target image according to an embodiment of the present disclosure.
图5示出根据本公开实施例的一种网格的示意图。FIG. 5 shows a schematic diagram of a grid according to an embodiment of the present disclosure.
图6示出根据本公开实施例的图像变形装置的框图。FIG. 6 shows a block diagram of an image warping apparatus according to an embodiment of the present disclosure.
图7示出根据本公开实施例的一种电子设备1900的框图。FIG. 7 shows a block diagram of an
具体实施方式Detailed ways
以下将参考附图详细说明本公开的各种示例性实施例、特征和方面。附图中相同的附图标记表示功能相同或相似的元件。尽管在附图中示出了实施例的各种方面,但是除非特别指出,不必按比例绘制附图。Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numbers in the figures denote elements that have the same or similar functions. While various aspects of the embodiments are shown in the drawings, the drawings are not necessarily drawn to scale unless otherwise indicated.
在这里专用的词“示例性”意为“用作例子、实施例或说明性”。这里作为“示例性”所说明的任何实施例不必解释为优于或好于其它实施例。The word "exemplary" is used exclusively herein to mean "serving as an example, embodiment, or illustration." Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments.
本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中术语“至少一种”表示多种中的任意一种或多种中的至少两种的任意组合,例如,包括A、B、C中的至少一种,可以表示包括从A、B和C构成的集合中选择的任意一个或多个元素。The term "and/or" in this article is only an association relationship to describe the associated objects, indicating that there can be three kinds of relationships, for example, A and/or B, it can mean that A exists alone, A and B exist at the same time, and A and B exist independently B these three cases. In addition, the term "at least one" herein refers to any combination of any one of the plurality or at least two of the plurality, for example, including at least one of A, B, and C, and may mean including from A, B, and C. Any one or more elements selected from the set of B and C.
另外,为了更好地说明本公开,在下文的具体实施方式中给出了众多的具体细节。本领域技术人员应当理解,没有某些具体细节,本公开同样可以实施。在一些实例中,对于本领域技术人员熟知的方法、手段、元件和电路未作详细描述,以便于凸显本公开的主旨。In addition, in order to better illustrate the present disclosure, numerous specific details are set forth in the following detailed description. It will be understood by those skilled in the art that the present disclosure may be practiced without certain specific details. In some instances, methods, means, components and circuits well known to those skilled in the art have not been described in detail so as not to obscure the subject matter of the present disclosure.
图1示出根据本公开实施例的图像变形方法的流程图,所述图像变形方法可以由终端设备或服务器等电子设备执行,终端设备可以为用户设备(User Equipment,UE)、移动设备、用户终端、终端、蜂窝电话、无绳电话、个人数字助理(Personal Digital Assistant,PDA)、手持设备、计算设备、车载设备、可穿戴设备等,所述方法可以通过处理器调用存储器中存储的计算机可读指令的方式来实现,或者,可通过服务器执行所述方法。如图1所示,所述图像变形方法包括:1 shows a flowchart of an image warping method according to an embodiment of the present disclosure. The image warping method may be executed by an electronic device such as a terminal device or a server. The terminal device may be User Equipment (UE), mobile device, user Terminals, terminals, cellular phones, cordless phones, personal digital assistants (Personal Digital Assistants, PDAs), handheld devices, computing devices, vehicle-mounted devices, wearable devices, etc., the method can be readable by a computer by invoking a computer stored in a memory by a processor The method can be implemented in the form of instructions, or the method can be executed by a server. As shown in Figure 1, the image deformation method includes:
在步骤S11中,获取包括目标对象的待处理图像。In step S11, an image to be processed including the target object is acquired.
其中,待处理图像可以是图像采集设备(例如摄像头、相机等)实时采集的图像,也可以是从图像采集设备采集的视频数据中提取的图像帧,对此本公开实施例不作限制。The image to be processed may be an image collected in real time by an image capture device (eg, a camera, a camera, etc.), or an image frame extracted from video data collected by the image capture device, which is not limited in this embodiment of the present disclosure.
应理解的是,图像采集设备可以作为部件设置于上述电子设备中,或采用无线连接(如WIFI连接)或有线连接(如USB连接)等方式与上述电子设备进行通信连接,以获取图像采集设备采集的待处理图像;当然,待处理图像还可以是从上述电子设备的本地存储中调取的数据,或从其它电子设备中传输的数据,对此本公开实施例不作限制。It should be understood that the image capture device can be set in the above electronic device as a component, or communicated with the above electronic device by means of wireless connection (such as WIFI connection) or wired connection (such as USB connection), so as to obtain the image capture device. The collected image to be processed; of course, the to-be-processed image may also be data retrieved from the local storage of the electronic device or data transmitted from other electronic devices, which is not limited to this embodiment of the present disclosure.
其中,目标对象例如可以包括人脸、人体等,应理解的是,若目标对象为人脸,则本公开实施例可以实现人脸变形,若目标对象为人体,则本公开实施例可以实现人体变形,本公开实施例对于目标对象的类别不作限制。The target object may include, for example, a human face, a human body, etc. It should be understood that if the target object is a human face, the embodiment of the present disclosure can realize the deformation of the human face, and if the target object is a human body, the embodiment of the present disclosure can realize the deformation of the human body , the embodiment of the present disclosure does not limit the category of the target object.
在步骤S12中,获取预设的参考图像中参考对象的变形信息。In step S12, the deformation information of the reference object in the preset reference image is acquired.
应理解的是,当用户期望对待处理图像中的目标对象实现特效变形时,可以启动电子设备中相关的应用程序(如手机中的相机应用)进入该特效变形功能对应的图形交互界面,图形交互界面中可以显示有上述参考图像,以便于用户移动参考图像上的参考关键点,来获取参考图像中参考对象的变形信息。It should be understood that when the user expects the target object in the image to be processed to achieve special effect deformation, he can start the relevant application in the electronic device (such as the camera application in the mobile phone) to enter the graphical interaction interface corresponding to the special effect deformation function, and the graphical interaction The above-mentioned reference image may be displayed in the interface, so that the user can move the reference key points on the reference image to obtain deformation information of the reference object in the reference image.
其中,参考图像可以理解为向用户提供的用于自定义变形效果的图像,应理解的是,参考图像中的参考对象与目标对象是同一类别,从而可以有效将参考图像的变形效果映射至待处理图像中的目标对象上。The reference image can be understood as an image provided to the user for customizing the deformation effect. It should be understood that the reference object in the reference image and the target object are of the same category, so that the deformation effect of the reference image can be effectively mapped to the waiting object. Process the target object in the image.
在一种可能的实现方式中,参考关键点可以包括参考图像上预先设置的用于控制参考图像变形的参考关键点,参考图像上可以预先设置有多个参考关键点,参考关键点可以用于控制参考图像变形,也即参考关键点可以被移动。图2示出根据本公开实施例的一种参考图像的示意图,如图2中示出参考人脸上的各个人脸关键点可以是参考关键点。In a possible implementation manner, the reference key points may include reference key points preset on the reference image for controlling the deformation of the reference image, the reference image may be preset with multiple reference key points, and the reference key points may be used for Controls the deformation of the reference image, i.e. the reference key points can be moved. FIG. 2 shows a schematic diagram of a reference image according to an embodiment of the present disclosure. As shown in FIG. 2 , each face key point on the reference face may be a reference key point.
其中,参考关键点可以是对参考图像进行对象关键点检测得到的,例如,当参考对象为人脸时,可以对参考图像进行人脸关键点检测,得到参考图像中人脸的参考关键点;当参考对象为人体时,可以对参考图像进行人体关键点检测,得到参考图像中人体的参考关键点。应理解的是,本公开实施例对于关键点检测的实现方式不做限制。The reference key points may be obtained by detecting object key points on the reference image. For example, when the reference object is a human face, the face key point detection may be performed on the reference image to obtain the reference key points of the face in the reference image; when When the reference object is a human body, the human body key point detection can be performed on the reference image to obtain the reference key points of the human body in the reference image. It should be understood that the embodiments of the present disclosure do not limit the implementation manner of key point detection.
如上所述,参考图像上的参考关键点可以被移动,那么变形信息表征参考对象的参考关键点在移动前与移动后的位置。在一种可能的实现方式中,例如可以是通过拖拽的方式移动参考关键点,或还可以先选定某几个参考关键点,并针对选定的参考关键点设置移动参数,如设置移动后的位置等,实现针对参考关键点的移动操作,对此本公开实施例不作限制。As described above, the reference key points on the reference image can be moved, and the deformation information represents the positions of the reference key points of the reference object before and after the movement. In a possible implementation, for example, the reference key points may be moved by dragging, or some reference key points may be selected first, and movement parameters may be set for the selected reference key points, such as setting the movement After the location, etc., the movement operation for the reference key point is implemented, which is not limited by the embodiment of the present disclosure.
应理解的是,一次可以移动至少一个参考关键点,参考关键点可以移动至少一次,每移动一次参考关键点后可以确定一次变形信息,变形信息可以表征至少一个参考关键点在移动前与移动后的位置。It should be understood that at least one reference key point can be moved at a time, and the reference key point can be moved at least once, and the deformation information can be determined after each movement of the reference key point. The deformation information can represent at least one reference key point before and after moving. s position.
在步骤S13中,根据变形信息,确定待处理图像中与参考关键点对应的目标关键点,以及确定参考关键点与目标关键点之间的位置变化信息。In step S13, according to the deformation information, the target key point corresponding to the reference key point in the image to be processed is determined, and the position change information between the reference key point and the target key point is determined.
其中,可以采用与检测参考对象的参考关键点相同的关键点检测方式,对待处理图像进行关键点检测,得到待处理图像中目标对象的目标关键点,这样目标关键点与参考关键点可以是对应的,从而便于利用参考关键点的变形信息,确定出与参考关键点对应的目标关键点,以及确定出参考关键点与目标关键点之间的位置变化信息。Among them, the same key point detection method as the reference key point of the reference object can be used to perform key point detection on the image to be processed to obtain the target key point of the target object in the to-be-processed image, so that the target key point and the reference key point can be corresponding Therefore, it is convenient to use the deformation information of the reference key point to determine the target key point corresponding to the reference key point, and to determine the position change information between the reference key point and the target key point.
其中,参考关键点与目标关键点可以分别具有索引标识,索引标识可以分别表征参考对象上不同参考关键点以及目标对象上的不同目标关键点,从而可以便捷地知晓与参考关键点对应的目标关键点。举例来说,若参考关键点为参考对象的嘴角关键点,那么与参考关键点对应的目标关键点也是目标对象的嘴角关键点。The reference key point and the target key point may respectively have index identifiers, and the index identifiers may respectively represent different reference key points on the reference object and different target key points on the target object, so that the target key corresponding to the reference key point can be easily known. point. For example, if the reference key point is the mouth corner key point of the reference object, then the target key point corresponding to the reference key point is also the mouth corner key point of the target object.
如上所述,变形信息可以表征参考对象的参考关键点在移动前与移动后的位置,位置变化信息可以包括目标关键点相对于参考关键点的移动向量,移动向量可以表征目标关键点相对于参考关键点的相对移动方向及相对移动距离。例如,若某参考关键点在移动前的位置为(x0,y0),移动后位置为(x1,y1),那么相对位置信息可以表示为移动向量(x1-x0,y1-y0)。As mentioned above, the deformation information can represent the position of the reference key point of the reference object before and after the movement, the position change information can include the movement vector of the target key point relative to the reference key point, and the movement vector can represent the target key point relative to the reference key point. The relative movement direction and relative movement distance of the key points. For example, if the position of a reference key point before moving is (x0, y0) and the position after moving is (x1, y1), then the relative position information can be expressed as a moving vector (x1-x0, y1-y0).
在步骤S14中,基于位置变化信息确定目标关键点的变形位置,并根据目标关键点的变形位置,对待处理图像进行变形处理,得到目标图像,目标图像中的目标对象具备变形效果。In step S14, the deformation position of the target key point is determined based on the position change information, and according to the deformation position of the target key point, the image to be processed is deformed to obtain a target image, and the target object in the target image has a deformation effect.
其中,变形位置可以表征目标关键点在目标对象达到变形效果后的位置。如上所述,位置变化信息可以包括目标关键点相对于参考关键点的移动向量,在已知目标关键点在待处理图像中的初始位置以及该位置变化信息后,可以得到目标关键点在目标对象达到变形后的变形位置。例如,沿用上述基于变形信息所确定出的相对位置信息(x1-x0,y1-y0),若与参考关键点对应的目标关键点的初始位置为(x2,y2),则该目标关键点的变形位置可以表示为(x2+x1-x0,y2+y1-y0)。Among them, the deformation position can represent the position of the target key point after the target object achieves the deformation effect. As mentioned above, the position change information can include the movement vector of the target key point relative to the reference key point. After the initial position of the target key point in the image to be processed and the position change information are known, it can be obtained that the target key point is in the target object. The deformed position after deformation is reached. For example, following the relative position information (x1-x0, y1-y0) determined based on the deformation information above, if the initial position of the target key point corresponding to the reference key point is (x2, y2), then the target key point's initial position is (x2, y2). The deformed position can be represented as (x2+x1-x0, y2+y1-y0).
其中,本领域技术人员可以采用本领域已知的计算机视觉技术,例如OpenCV,实现根据目标关键点的变形位置,对待处理图像进行变形处理,得到目标图像,对此本公开实施例不作限制。在一种可能的实现方式中,目标图像可以同步显示在上述图形交互界面中,这样在用户移动参考图像上的参考关键点时,可以同步显示目标对象的变形效果。Wherein, those skilled in the art can use computer vision technology known in the art, such as OpenCV, to realize the deformation processing of the image to be processed according to the deformation position of the target key point to obtain the target image, which is not limited by the embodiment of the present disclosure. In a possible implementation manner, the target image can be displayed in the above-mentioned graphical interactive interface synchronously, so that when the user moves the reference key point on the reference image, the deformation effect of the target object can be displayed synchronously.
图3示出根据本公开实施例的一种待处理图像的示意图,图4示出根据本公开实施例的一种目标图像的示意图,其中,根据图2示出的参考图像中参考关键点的变形信息,可以将图2中参考人脸的变形效果映射至图3中的目标人脸上,得到图4示出的目标人脸,图4示出的目标人脸具有与图2示出的参考人脸相似的变形效果。FIG. 3 shows a schematic diagram of an image to be processed according to an embodiment of the present disclosure, and FIG. 4 shows a schematic diagram of a target image according to an embodiment of the present disclosure. deformation information, the deformation effect of the reference face in Fig. 2 can be mapped to the target face in Fig. 3 to obtain the target face shown in Fig. 4, the target face shown in Fig. Refer to the face-like deformation effect.
在本公开实施例中,能够根据参考图像上的参考关键点的变形信息,将参考对象的变形效果同步映射至待处理图像中的目标对象上,这样不仅可以对目标图像中的目标对象实现自定义变形,且目标图像中的目标对象会保持与参考对象相似的变形效果而不受待处理图像中该目标对象的位姿变化的影响。In the embodiment of the present disclosure, the deformation effect of the reference object can be synchronously mapped to the target object in the to-be-processed image according to the deformation information of the reference key points on the reference image. Deformation is defined, and the target object in the target image will maintain a similar deformation effect as the reference object without being affected by the pose change of the target object in the image to be processed.
考虑到,待处理图像可以是多个,各个待处理图像中的目标对象的位姿可能是变化的,也即目标对象在待处理图像中相对于参考图像中的参考对象来说可能是较大或较小的,为了能使待处理图像中的目标对象更自然地达到与参考对象相似的变形效果,可以按比例对待处理图像中的目标对象进行变形,也即按比例确定目标关键点在变形后的变形位置,基于按比例确定的变形位置,确定待处理图像中每个像素点的目标像素位置,再对待处理图像的变形处理,使得变形处理后的目标图像中目标对象的变形效果更自然。Considering that there may be multiple images to be processed, the pose of the target object in each to-be-processed image may vary, that is, the target object in the to-be-processed image may be larger than the reference object in the reference image Or smaller, in order to make the target object in the image to be processed more naturally achieve a similar deformation effect to the reference object, the target object in the image to be processed can be deformed proportionally, that is, the target key points in the deformation can be determined proportionally. After the deformation position, based on the deformation position determined in proportion, the target pixel position of each pixel in the image to be processed is determined, and then the deformation processing of the image to be processed is performed, so that the deformation effect of the target object in the target image after deformation processing is more natural. .
在一种可能的实现方式中,在步骤S14中,基于位置变化信息确定目标关键点的变形位置,包括:In a possible implementation manner, in step S14, the deformation position of the target key point is determined based on the position change information, including:
步骤S141:获取参考对象与目标对象中指定部位的比例关系信息。Step S141: Obtain the proportional relationship information between the reference object and the designated part in the target object.
其中,指定部位可以是目标对象上比较稳定的、不易发生剧烈变化的部位,比例关系信息可以理解为参考对象的指定部位与目标对象的指定部位之间的尺寸比例。例如,若目标对象为人脸,则指定部位可以是眼部,比例关系信息可以是参考对象的眼距与目标对象的眼距之间的比例,若目标对象为人体,则指定部位可以是头颈,比例关系信息可以是参考对象的头颈高度与目标对象的头颈高度之间的比例。The designated part may be a relatively stable part on the target object that is not prone to drastic changes, and the proportional relationship information can be understood as the size ratio between the designated part of the reference object and the designated part of the target object. For example, if the target object is a human face, the designated part can be the eye, and the ratio relationship information can be the ratio between the eye distance of the reference object and the eye distance of the target object; if the target object is a human body, the designated part can be the head and neck, The proportional relationship information may be a ratio between the height of the head and neck of the reference object and the height of the head and neck of the target object.
在一种可能的实现方式中,获取参考对象与目标对象中指定部位的比例关系信息,包括:根据参考对象的参考关键点信息,确定参考对象的指定部位之间的第一比例信息;根据目标对象的目标关键点信息,确定目标对象的指定部位之间的第二比例信息;根据第一比例信息及第二比例信息,确定指定部位的比例关系信息。通过该方式,可以有效确定出指定部位的比例关系信息。In a possible implementation manner, acquiring the proportional relationship information between the reference object and the specified part in the target object includes: determining the first proportional information between the specified parts of the reference object according to the reference key point information of the reference object; The target key point information of the object determines the second ratio information between the designated parts of the target object; according to the first ratio information and the second ratio information, the ratio relationship information of the designated parts is determined. In this way, the proportional relationship information of the designated part can be effectively determined.
其中,第一比例信息可以理解为参考对象的指定部位之间的距离信息,第二比例信息可以理解为目标对象的指定部位之间的距离信息,例如,若指定部位为眼部,则第一比例信息可以是参考对象的两眼之间的眼距,第二比例信息可以是目标对象的两眼之间的眼距;若指定部位为头颈,第一比例信息可以是参考对象的头部顶端与颈部底端之间的头颈高度,第二比例信息可以是目标对象的头部顶端与颈部底端之间的头颈高度。The first scale information can be understood as the distance information between the designated parts of the reference object, and the second scale information can be understood as the distance information between the designated parts of the target object. For example, if the designated part is the eye, the first The scale information may be the eye distance between the eyes of the reference object, and the second scale information may be the eye distance between the eyes of the target object; if the specified part is the head and neck, the first scale information may be the top of the head of the reference object The height of the head and neck between the bottom of the neck and the bottom of the neck, the second scale information may be the height of the head and the neck between the top of the head and the bottom of the neck of the target object.
其中,参考关键点信息可以包括参考关键点的位置坐标,目标关键点信息可以包括目标关键点的位置坐标。应理解的是,参考对象的指定部位的第一比例信息,可以根据参考对象的指定部位所对应的参考关键点的位置坐标确定,目标对象的指定部位的第二比例信息,可以根据目标对象的指定部位所对应的目标关键点的位置坐标确定。The reference key point information may include the position coordinates of the reference key point, and the target key point information may include the position coordinates of the target key point. It should be understood that the first scale information of the designated part of the reference object can be determined according to the position coordinates of the reference key point corresponding to the designated part of the reference object, and the second scale information of the designated part of the target object can be determined according to the position coordinates of the reference key point corresponding to the designated part of the reference object. The position coordinates of the target key points corresponding to the specified parts are determined.
其中,根据第一比例信息及第二比例信息,确定指定部位的比例关系信息,可以包括:将第一比例信息与第二比例信息之间的比值,确定为指定部位的比例关系信息;或,将第二比例信息与第一比例信息之间的比值,确定为指定部位的比例关系信息,对此本公开实施例不作限制。Wherein, determining the proportional relationship information of the specified part according to the first proportional information and the second proportional information may include: determining the ratio between the first proportional information and the second proportional information as the proportional relationship information of the specified part; or, The ratio between the second proportion information and the first proportion information is determined as the proportion relationship information of the designated part, which is not limited in this embodiment of the present disclosure.
步骤S142:根据比例关系信息以及位置变化信息,确定目标关键点的变形位置。Step S142: Determine the deformation position of the target key point according to the proportional relationship information and the position change information.
在一种可能的实现方式中,根据比例关系信息以及位置变化信息,确定目标关键点的变形位置,包括:根据位置变化信息以及目标关键点在待处理图像中的初始位置,确定目标关键点相对于参考关键点的相对变形位置;根据比例关系信息与相对变形位置,确定目标关键点的变形位置。通过该方式,可以利用比例关系信息实现按比例确定目标关键点在变形后的变形位置。In a possible implementation manner, determining the deformation position of the target key point according to the scale relationship information and the position change information, including: determining the relative position of the target key point according to the position change information and the initial position of the target key point in the image to be processed. The relative deformation position of the reference key point; according to the proportional relationship information and the relative deformation position, the deformation position of the target key point is determined. In this way, the proportional relationship information can be used to realize the proportional determination of the deformed position of the target key point after the deformation.
如上所述,比例关系信息可以包括目标关键点相对于参考关键点的移动向量,其中,根据位置变化信息以及目标关键点在待处理图像中的初始位置,确定目标关键点相对于参考关键点的相对变形位置,可以包括:将目标关键点的初始位置与移动向量相加,得到相对变形位置。其中,根据比例关系信息与相对变形位置,确定目标关键点的变形位置,可以包括:将相对变形位置乘以上述比例关系信息,得到该目标关键点的变形位置。As described above, the proportional relationship information may include the movement vector of the target key point relative to the reference key point, wherein the position change information and the initial position of the target key point in the image to be processed are determined to determine the relative movement of the target key point relative to the reference key point. The relative deformation position may include: adding the initial position of the target key point and the movement vector to obtain the relative deformation position. Wherein, determining the deformation position of the target key point according to the proportional relationship information and the relative deformation position may include: multiplying the relative deformation position by the above proportional relationship information to obtain the deformation position of the target key point.
例如,沿用上述基于变形信息所确定出的相对位置信息(x1-x0,y1-y0),若与参考关键点对应的目标关键点的初始位置为(x2,y2),参考对象相对于目标对象的比例关系信息表示为1/2,则该目标关键点的变形位置可以表示为 For example, following the relative position information (x1-x0, y1-y0) determined based on the deformation information above, if the initial position of the target key point corresponding to the reference key point is (x2, y2), the reference object is relative to the target object The proportional relationship information of , is expressed as 1/2, then the deformation position of the target key point can be expressed as
在本公开实施例中,能够基于比例关系信息将参考对象的变形效果按比例映射到目标对象上,从而实现更自然的变形效果。In the embodiment of the present disclosure, the deformation effect of the reference object can be proportionally mapped to the target object based on the scale relationship information, so as to achieve a more natural deformation effect.
考虑到,上述步骤S14中仅基于目标关键点的变形位置,对待处理图像进行变形处理所得到的目标图像中的目标对象的变形效果不够自然,目标对象的变形可能会影响待处理图像中每个像素点的像素位置,在一种可能的实现方式中,在步骤S14中,根据目标关键点的变形位置,对待处理图像进行变形处理,得到目标图像,可以包括:Considering that the deformation effect of the target object in the target image obtained by deforming the image to be processed is only based on the deformation position of the target key point in the above step S14, the deformation effect of the target object is not natural enough, and the deformation of the target object may affect each image in the image to be processed. The pixel position of the pixel point, in a possible implementation manner, in step S14, according to the deformation position of the target key point, the image to be processed is deformed to obtain the target image, which may include:
步骤S143:根据目标关键点的变形位置以及目标关键点在待处理图像中的初始位置,确定待处理图像中每个像素点的目标像素位置。Step S143: Determine the target pixel position of each pixel in the image to be processed according to the deformation position of the target key point and the initial position of the target key point in the image to be processed.
其中,根据目标关键点的变形位置以及目标关键点在待处理图像中的初始位置,确定待处理图像中每个像素点的目标像素位置,可以包括:根据目标关键点的变形位置以及初始位置,确定由初始位置移动至变形位置的位置映射关系,也即得到待处理图像中每个像素点由变形前的初始像素位置映射至变形后的目标像素位置之间的位置映射关系;根据该位置映射关系以及每个像素点的初始像素位置,确定每个像素点在变形后的目标像素位置。应理解的是,待处理图像中的每个像素点包括目标对象上的像素点,因此变形处理后的目标图像中的目标对象具有与参考图像中参考对象相似的变形效果。Wherein, determining the target pixel position of each pixel in the image to be processed according to the deformation position of the target key point and the initial position of the target key point in the image to be processed may include: according to the deformation position and the initial position of the target key point, Determine the position mapping relationship from the initial position to the deformed position, that is, obtain the position mapping relationship between each pixel in the image to be processed from the initial pixel position before deformation to the target pixel position after deformation; according to the position mapping relationship and the initial pixel position of each pixel point to determine the target pixel position of each pixel point after deformation. It should be understood that each pixel point in the image to be processed includes a pixel point on the target object, so the target object in the deformed target image has a similar deformation effect to the reference object in the reference image.
其中,可以基于仿射变换原理,实现根据初始位置与变形位置,确定由初始位置变换至变形位置的位置映射关系,对此本公开实施例不作限制。在一种可能的实现方式中,公式(1)可以是基于仿射变换原理得到的一种表征位置映射关系的仿射变换公式,可以利用公式(1)所确定的位置映射关系,得到待处理图像中每个像素点的目标像素位置。Wherein, based on the principle of affine transformation, it is possible to determine the position mapping relationship transformed from the initial position to the deformed position according to the initial position and the deformed position, which is not limited in this embodiment of the present disclosure. In a possible implementation manner, formula (1) may be an affine transformation formula obtained based on the principle of affine transformation to characterize the position mapping relationship, and the position mapping relationship determined by formula (1) may be used to obtain the pending processing The target pixel location for each pixel in the image.
其中, i代表第i个与参考关键点对应的第i个目标关键点,pi代表第i个目标关键点的初始位置,qi代表第i个目标关键点的变形位置,v代表待处理图像中任一像素点的初始像素位置,wi代表像素点对应的权重,α代表预设权重控制参数,该α可以是根据图像变形时的自然程度设置的经验值,fr(v)代表像素点v的目标像素位置,⊥代表对二维向量进行如下变换:(x,y)⊥=(-y,x),T代表转置。in, i represents the i-th target key point corresponding to the reference key point, pi represents the initial position of the i -th target key point, qi represents the deformation position of the i-th target key point, and v represents the image to be processed. The initial pixel position of any pixel point, w i represents the weight corresponding to the pixel point, α represents the preset weight control parameter, the α can be an empirical value set according to the natural degree of image deformation, fr (v) represents the pixel point The target pixel position of v, ⊥ represents the following transformation of the two-dimensional vector: (x,y) ⊥ =(-y,x), T represents the transpose.
应理解的是,上述公式(1)是本公开实施例提供的一种位置映射关系的确定方式,本领域技术人员可以选用本领域任意已知的仿射变换算法,确定上述位置映射关系,对此本公开实施例不作限制。It should be understood that the above formula (1) is a method for determining the position mapping relationship provided by the embodiment of the present disclosure, and those skilled in the art can select any affine transformation algorithm known in the art to determine the above position mapping relationship, and correct the position mapping relationship. This embodiment of the present disclosure is not limited.
步骤S144:根据待处理图像中每个像素点的目标像素位置,对待处理图像进行变形处理,得到目标图像。Step S144: Perform deformation processing on the image to be processed according to the target pixel position of each pixel in the image to be processed to obtain a target image.
如上所述,本领域技术人员可以采用本领域已知的计算机视觉技术,例如OpenCV,实现根据每个像素点的目标像素位置,对待处理图像进行变形处理,得到目标图像,对此本公开实施例不作限制。As described above, those skilled in the art can use computer vision technologies known in the art, such as OpenCV, to deform the image to be processed according to the target pixel position of each pixel to obtain the target image. For this, the embodiments of the present disclosure No restrictions apply.
在本公开实施例中,可以基于变形位置以及初始位置所确定出的待处理图像中每个像素点的目标像素位置,有效地对待处理图像进行变形处理。In the embodiment of the present disclosure, the image to be processed can be effectively deformed based on the deformation position and the target pixel position of each pixel point in the image to be processed determined based on the initial position.
如上所述,在步骤S143中,可以利用目标对象的初始位置与变形位置所确定的位置映射关系,确定待处理图像中每个像素点的目标像素位置,来对待处理图像进行变形处理。考虑到,待处理图像的分辨率可能较大,上述基于位置映射关系直接计算待处理图像中每个像素点的目标像素位置所需的运算量也较大,为了减少计算目标像素位置所需的运算量,提高目标像素位置的计算效率,在一种可能的实现方式中,所述方法还包括:As described above, in step S143, the target pixel position of each pixel in the image to be processed can be determined by using the position mapping relationship determined between the initial position of the target object and the deformed position to perform deformation processing on the image to be processed. Considering that the resolution of the image to be processed may be relatively large, the amount of computation required to directly calculate the target pixel position of each pixel in the image to be processed based on the position mapping relationship is also relatively large, in order to reduce the calculation of the target pixel position. The amount of computation increases the computational efficiency of the target pixel position. In a possible implementation, the method further includes:
获取待处理图像对应的网格,网格是按照预设的划分尺寸对待处理图像进行网格划分得到的,网格包括多个具有划分尺寸的子网格。A grid corresponding to the image to be processed is obtained, the grid is obtained by dividing the image to be processed by grid according to a preset division size, and the grid includes a plurality of sub-grids with divided sizes.
其中,划分尺寸可以根据实际需求设置,例如可以设置为10×10像素大小,对此本公开实施例不作限制。图5示出根据本公开实施例的一种网格的示意图,图5示出的网格可以是对图3示出的待处理图像按照10×10像素大小进行网格划分所得到的,图5的每个子网格具有10×10像素大小。The division size may be set according to actual requirements, for example, may be set to a size of 10×10 pixels, which is not limited in this embodiment of the present disclosure. FIG. 5 shows a schematic diagram of a grid according to an embodiment of the present disclosure. The grid shown in FIG. 5 may be obtained by dividing the image to be processed shown in FIG. 3 into a grid according to a size of 10×10 pixels. Each subgrid of 5 has a size of 10×10 pixels.
基于上述待处理图像对应的网格,在一种可能的实现方式中,在步骤S143中,根据目标关键点的变形位置以及目标关键点在待处理图像中的初始位置,确定待处理图像中每个像素点的目标像素位置,可以包括:Based on the grid corresponding to the above-mentioned image to be processed, in a possible implementation manner, in step S143, according to the deformation position of the target key point and the initial position of the target key point in the image to be processed, determine each point in the image to be processed. The target pixel position of a pixel point, which can include:
步骤S1431:根据初始位置、变形位置以及待处理图像中的第一类像素点的第一初始像素位置,确定第一类像素点的第一目标像素位置,第一类像素点包括待处理图像中处于子网格的网格顶点处的像素点。Step S1431: Determine the first target pixel position of the first type of pixel point according to the initial position, the deformed position and the first initial pixel position of the first type of pixel point in the image to be processed, and the first type of pixel point includes in the image to be processed. The pixel at the mesh vertex of the submesh.
其中,第一目标像素位置表征第一类像素点在目标对象达到变形效果后的像素位置。在一种可能的实现方式中,根据初始位置、变形位置以及待处理图像中的第一类像素点的第一初始像素位置,确定第一类像素点的第一目标像素位置,包括:根据初始位置与变形位置,确定待处理图像对应的位置映射关系;根据第一类像素点的第一初始像素位置与位置映射关系,确定第一类像素点的第一目标像素位置。通过该方式,可以基于位置映射关系有效得到待处理图像中处于网格顶点的第一类像素点的第一目标像素位置。Wherein, the first target pixel position represents the pixel position of the first type of pixel point after the target object achieves the deformation effect. In a possible implementation manner, determining the first target pixel position of the first type of pixel point according to the initial position, the deformed position and the first initial pixel position of the first type of pixel point in the image to be processed includes: according to the initial The position and deformation position determine the position mapping relationship corresponding to the image to be processed; according to the first initial pixel position and the position mapping relationship of the first type pixel point, the first target pixel position of the first type pixel point is determined. In this way, the first target pixel position of the first type of pixel points at the vertices of the mesh in the image to be processed can be effectively obtained based on the position mapping relationship.
其中,位置映射关系表征待处理图像中的像素点在变形处理前与变形处理后的映射关系,或者说表征待处理图像的像素点在目标对象达到变形效果前与达到变形效果后的映射关系。在一种可能的实现方式中,可以参照上述本公开实施例中位置映射关系的确定方式,例如利用上述公式(1),实现确定该待处理图像对应的位置映射关系以及确定第一类像素点的第一目标像素位置,对此本公开实施例不作限制。The position mapping relationship represents the mapping relationship between the pixels in the image to be processed before the deformation processing and after the deformation processing, or the mapping relationship between the pixels in the image to be processed before the target object achieves the deformation effect and after the deformation effect is achieved. In a possible implementation manner, the determination method of the position mapping relationship in the above-mentioned embodiment of the present disclosure can be referred to, for example, the above formula (1) is used to realize the determination of the position mapping relationship corresponding to the image to be processed and the determination of the first type of pixel point. The first target pixel position of , which is not limited in this embodiment of the present disclosure.
步骤S1432:根据第一初始像素位置、第一目标像素位置以及待处理图像中第二类像素点的第二初始像素位置,确定第二类像素点的第二目标像素位置,第二类像素点包括待处理图像中处于子网格的网格内部的像素点。Step S1432: According to the first initial pixel position, the first target pixel position and the second initial pixel position of the second type of pixel point in the image to be processed, determine the second target pixel position of the second type of pixel point, the second type of pixel point. Include pixels in the image to be processed that are inside the grid of the subgrid.
应理解的是,待处理图像中的每个像素点可以包括待处理图像中处于子网格的网格顶点的第一类像素点以及处于子网格的网格内部的第二类像素点,则目标像素位置包括第一类像素点的第一目标像素位置以及第二类像素点的第二目标像素位置。It should be understood that each pixel point in the image to be processed may include a first-type pixel point located at a grid vertex of the sub-grid and a second-type pixel point located inside the grid of the sub-grid in the image to be processed, The target pixel position includes the first target pixel position of the first type of pixel point and the second target pixel position of the second type of pixel point.
其中,第二目标像素位置表征第二类像素点在目标对象达到变形效果后的像素位置。在一种可能的实现方式中,根据第一初始像素位置、第一目标像素位置以及待处理图像中第二类像素点的第二初始像素位置,确定第二类像素点的第二目标像素位置,包括:根据第一初始像素位置以及第一目标像素位置,确定第一类像素点对应的位置移动向量,位置移动向量表征第一类像素点从第一初始像素位置移动至第一目标像素位置的移动方向与移动距离;根据第二类像素点的第二初始像素位置,对第二类像素点所属子网格上的第一类像素点的位置移动向量进行插值处理,得到第二类像素点对应的目标移动向量;根据目标移动向量以及第二初始像素位置,确定第二类像素点的第二目标像素位置。通过该方式,可以基于插值的方式,利用第二类像素点周围的第一类像素点的位置移动向量,高效地得到待处理图像中处于网格内部的第二类像素点的第二目标像素位置。Wherein, the second target pixel position represents the pixel position of the second type of pixel point after the target object achieves the deformation effect. In a possible implementation manner, the second target pixel position of the second type of pixel is determined according to the first initial pixel position, the first target pixel position and the second initial pixel position of the second type of pixel in the image to be processed , including: according to the first initial pixel position and the first target pixel position, determining the position movement vector corresponding to the first type of pixel point, the position movement vector representing the movement of the first type of pixel point from the first initial pixel position to the first target pixel position According to the second initial pixel position of the second type of pixel point, the position movement vector of the first type of pixel point on the sub-grid to which the second type of pixel point belongs is interpolated to obtain the second type of pixel point. The target movement vector corresponding to the point; the second target pixel position of the second type of pixel point is determined according to the target movement vector and the second initial pixel position. In this way, the second target pixel of the second type of pixel in the grid to be processed in the image to be processed can be efficiently obtained by using the position movement vector of the first type of pixel point around the second type of pixel point based on the interpolation method Location.
其中,可以参照上述相对移动向量的确定方式,实现根据第一初始像素位置以及第一目标像素位置,确定第一类像素点对应的位置移动向量,也即,将各个第一类像素点的第一目标像素位置与第一初始像素位置相减,得到各个第一类像素点的位置移动向量,对此本公开实施例不作限制。Wherein, it is possible to determine the position movement vector corresponding to the first type of pixel point according to the first initial pixel position and the first target pixel position with reference to the above-mentioned determination method of the relative movement vector, that is, to determine the first type of pixel point of each first type of pixel point. A target pixel position is subtracted from the first initial pixel position to obtain the position movement vector of each first-type pixel point, which is not limited in this embodiment of the present disclosure.
其中,针对任一个第二类像素点,第二类像素点所属子网格可以理解为包含该第二类像素点的子网格,第二类像素点所属子网格上的第一类像素点可以理解为处于包含该第二类像素点的子网格的网格顶点处的像素点。应理解的是,待处理图像对应的网格中的任一子网格内可以包含多个第二类像素点,可以根据任一个第二类像素点的第二初始像素位置,对处于包含该第二类像素点的子网格的网格顶点处的第一类像素点的位置移动向量进行插值处理,例如线性插值、非线性插值等,得到该第二类像素点对应的目标移动向量。Wherein, for any second-type pixel point, the sub-grid to which the second-type pixel point belongs can be understood as a sub-grid containing the second-type pixel point, and the first-type pixel on the sub-grid to which the second-type pixel point belongs A point can be understood as a pixel point at a mesh vertex of a sub-mesh containing the second type of pixel point. It should be understood that any sub-grid in the grid corresponding to the image to be processed may contain a plurality of second-type pixel points, and according to the second initial pixel position of any second-type pixel point, a Perform interpolation processing, such as linear interpolation, nonlinear interpolation, on the position movement vector of the first type pixel point at the grid vertex of the second type pixel point sub-grid, to obtain the target movement vector corresponding to the second type pixel point.
其中,根据目标移动向量以及第二初始像素位置,确定第二类像素点的第二目标像素位置,例如可以包括:将第二初始像素位置与目标移动向量相加,得到第二类像素点的第二目标像素位置。Wherein, determining the second target pixel position of the second type of pixel point according to the target movement vector and the second initial pixel position, for example, may include: adding the second initial pixel position and the target movement vector to obtain the second type of pixel point The second target pixel location.
如上所述,参考图像与目标图像是可以是一起展示在操作界面中的,那么在用户移动参考关键点时,可以按照上述步骤S1431至步骤S1432的过程对参考图像同时进行变形处理,使参考图像中的参考对象的变形效果显示的更自然。As mentioned above, the reference image and the target image can be displayed together in the operation interface, then when the user moves the reference key point, the reference image can be deformed simultaneously according to the process of steps S1431 to S1432, so that the reference image The deformation effects of reference objects in , appear more natural.
在本公开实施例中,可以基于位置映射关系计算网格顶点处的第一类像素点在目标对象达到变形效果后的第一目标像素位置,并通过插值方式计算得到网格内部的第二类像素点的第二目标像素位置,由于插值计算所需的运算量小于基于位置映射关系确定目标像素位置所需的运算量,从而可以有效减少计算目标像素位置所需的运算量,提高目标像素位置的计算效率。In this embodiment of the present disclosure, the first target pixel positions of the first type of pixels at the vertices of the grid after the target object achieves the deformation effect can be calculated based on the position mapping relationship, and the second type of pixels inside the grid can be obtained by interpolation. The second target pixel position of the pixel point, because the amount of computation required for interpolation calculation is less than the amount of computation required to determine the target pixel position based on the position mapping relationship, which can effectively reduce the amount of computation required to calculate the target pixel position and improve the target pixel position. computational efficiency.
考虑到用户可能期望保存自定义变形效果,以便于之后直接使用该自定义变形效果,或将自定义变形效果分享给其他用户等需求,在一种可能的实现方式中,所述方法还包括:响应于针对变形素材的设置操作,将设置操作指示的参考图像的变形信息确定为变形素材,变形素材用于对待变形图像中的目标对象进行变形。通过该方式,可以将用户自定义的变形效果进行保存,以便于用户直接使用自定义的变形效果。Considering that the user may wish to save the custom deformation effect so as to directly use the custom deformation effect later, or share the custom deformation effect with other users, in a possible implementation manner, the method further includes: In response to the setting operation for the deformed material, the deformation information of the reference image indicated by the setting operation is determined as the deformation material, and the deformation material is used to deform the target object in the image to be deformed. In this way, the user-defined deformation effect can be saved, so that the user can directly use the user-defined deformation effect.
其中,待变形图像可以是任意包含目标对象的图像。变形素材可以以数据包的形式进行保存和/或共享,数据包中可以包括参考关键点的索引标识以及变形信息。这样当用户选择该变形素材时,可以直接利用该变形素材对应的数据包对待变形图像中的目标对象进行变形。The image to be deformed may be any image containing the target object. The deformed material may be saved and/or shared in the form of a data package, and the data package may include an index identifier of a reference key point and deformation information. In this way, when the user selects the deformation material, the target object in the to-be-deformed image can be deformed directly by using the data packet corresponding to the deformation material.
应理解的是,本领域技术人员可以采用本领域已知的软件开发技术,设计并开发出上述本公开实施例中图像变形方法的应用程序及对应的图形交互界面,图形交互界面中可以提供设置变形素材的操作控件,以便于用户设置变形素材、将变形素材进行保存和/或共享等,对此本公开实施例不作限制。It should be understood that those skilled in the art can use software development technologies known in the art to design and develop the application program of the image deformation method in the above-mentioned embodiment of the present disclosure and the corresponding graphical interactive interface, and the graphical interactive interface can provide settings. The operation control of the deformed material is convenient for the user to set the deformed material, save and/or share the deformed material, etc., which is not limited in this embodiment of the present disclosure.
可以理解,本公开提及的上述各个方法实施例,在不违背原理逻辑的情况下,均可以彼此相互结合形成结合后的实施例,限于篇幅,本公开不再赘述。本领域技术人员可以理解,在具体实施方式的上述方法中,各步骤的具体执行顺序应当以其功能和可能的内在逻辑确定。It can be understood that the above-mentioned method embodiments mentioned in the present disclosure can be combined with each other to form a combined embodiment without violating the principle and logic. Those skilled in the art can understand that, in the above method of the specific embodiment, the specific execution order of each step should be determined by its function and possible internal logic.
此外,本公开还提供了图像变形装置、电子设备、计算机可读存储介质、程序,上述均可用来实现本公开提供的任一种图像变形方法,相应技术方案和描述和参见方法部分的相应记载,不再赘述。In addition, the present disclosure also provides image warping apparatuses, electronic devices, computer-readable storage media, and programs, all of which can be used to implement any image warping method provided by the present disclosure. For the corresponding technical solutions and descriptions, refer to the corresponding records in the Methods section. ,No longer.
图6示出根据本公开实施例的图像变形装置的框图,如图6所示,所述装置包括:FIG. 6 shows a block diagram of an image deformation apparatus according to an embodiment of the present disclosure. As shown in FIG. 6 , the apparatus includes:
图像获取模块101,用于获取包括目标对象的待处理图像;an
信息获取模块102,用于获取预设的参考图像中参考对象的变形信息,所述变形信息表征所述参考对象的参考关键点在移动前与移动后的位置,所述参考关键点用于控制所述参考图像变形;The
确定模块103,用于根据所述变形信息,确定所述待处理图像中与所述参考关键点对应的目标关键点,以及确定所述参考关键点与所述目标关键点之间的位置变化信息;A
变形模块104,用于基于所述位置变化信息确定所述目标关键点的变形位置,并根据所述目标关键点的变形位置,对所述待处理图像进行变形处理,得到目标图像,所述目标图像中的目标对象具备变形效果。The
在一种可能的实现方式中,所述变形模块104,包括:比例获取子模块,用于获取所述参考对象与所述目标对象中指定部位的比例关系信息;位置确定子模块,用于根据所述比例关系信息以及所述位置变化信息,确定所述目标关键点的变形位置In a possible implementation manner, the
在一种可能的实现方式中,所述获取所述参考对象与所述目标对象中指定部位的比例关系信息,包括:根据所述参考对象的参考关键点信息,确定所述参考对象的指定部位之间的第一比例信息;根据所述目标对象的目标关键点信息,确定所述目标对象的指定部位之间的第二比例信息;根据所述第一比例信息及所述第二比例信息,确定所述指定部位的比例关系信息。In a possible implementation manner, the acquiring the proportional relationship information between the reference object and the designated part in the target object includes: determining the designated part of the reference object according to the reference key point information of the reference object According to the target key point information of the target object, the second scale information between the designated parts of the target object is determined; according to the first scale information and the second scale information, The proportional relationship information of the designated part is determined.
在一种可能的实现方式中,所述根据所述比例关系信息以及所述位置变化信息,确定所述目标关键点的变形位置,包括:根据所述位置变化信息以及所述目标关键点在所述待处理图像中的初始位置,确定所述目标关键点相对于所述参考关键点的相对变形位置;根据所述比例关系信息与所述相对变形位置,确定所述目标关键点的变形位置。In a possible implementation manner, the determining the deformation position of the target key point according to the proportional relationship information and the position change information includes: according to the position change information and the target key point where the target key point is located The initial position in the image to be processed is determined, and the relative deformation position of the target key point relative to the reference key point is determined; the deformation position of the target key point is determined according to the scale relationship information and the relative deformation position.
在一种可能的实现方式中,所述变形模块104,包括:像素位置确定子模块,用于根据所述目标关键点的变形位置以及所述目标关键点在所述待处理图像中的初始位置,确定所述待处理图像中每个像素点的目标像素位置;变形子模块,用于根据所述待处理图像中每个像素点的目标像素位置,对所述待处理图像进行变形处理,得到所述目标图像。In a possible implementation manner, the
在一种可能的实现方式中,所述装置还包括:网格获取模块,用于获取所述待处理图像对应的网格,所述网格是按照预设的划分尺寸对所述待处理图像进行网格划分得到的,所述网格包括多个具有所述划分尺寸的子网格;其中,所述根据所述目标关键点的变形位置以及所述目标关键点在所述待处理图像中的初始位置,确定所述待处理图像中每个像素点的目标像素位置,包括:根据所述初始位置、所述变形位置以及所述待处理图像中第一类像素点的第一初始像素位置,确定所述第一类像素点的第一目标像素位置,所述第一类像素点包括所述待处理图像中处于所述子网格的网格顶点处的像素点;根据所述第一初始像素位置、所述第一目标像素位置以及所述待处理图像中第二类像素点的第二初始像素位置,确定所述第二类像素点的第二目标像素位置,所述第二类像素点包括所述待处理图像中处于所述子网格的网格内部的像素点;其中,所述目标像素位置包括所述第一类像素点的第一目标像素位置以及所述第二类像素点的第二目标像素位置。In a possible implementation manner, the apparatus further includes: a grid acquiring module, configured to acquire a grid corresponding to the to-be-processed image, where the grid is based on a preset division size for the to-be-processed image Obtained by performing grid division, the grid includes a plurality of sub-grids with the divided size; wherein, the deformation position of the target key point and the target key point are in the image to be processed according to the deformation position determine the target pixel position of each pixel in the image to be processed, including: according to the initial position, the deformation position and the first initial pixel position of the first type of pixel in the image to be processed , determine the first target pixel position of the first type of pixel point, and the first type of pixel point includes the pixel point at the grid vertex of the sub-grid in the image to be processed; according to the first type of pixel point The initial pixel position, the first target pixel position, and the second initial pixel position of the second type of pixel point in the image to be processed, determine the second target pixel position of the second type of pixel point, the second type of pixel point The pixel points include the pixel points in the image to be processed that are inside the grid of the sub-grid; wherein, the target pixel position includes the first target pixel position of the first type of pixel point and the second type of pixel point. The second target pixel position of the pixel point.
在一种可能的实现方式中,所述根据所述初始位置、所述变形位置以及所述待处理图像中第一类像素点的第一初始像素位置,确定所述第一类像素点的第一目标像素位置,包括:根据所述初始位置与所述变形位置,确定所述待处理图像对应的位置映射关系,所述位置映射关系表征所述待处理图像中的像素点在变形处理前与变形处理后的映射关系;根据所述第一类像素点的第一初始像素位置与所述位置映射关系,确定所述第一类像素点的第一目标像素位置。In a possible implementation manner, the first type of pixel point of the first type of pixel is determined according to the initial position, the deformed position, and the first initial pixel position of the first type of pixel point in the to-be-processed image. A target pixel position, comprising: determining a position mapping relationship corresponding to the to-be-processed image according to the initial position and the deformed position, where the position-mapping relationship represents that the pixel points in the to-be-processed image are connected with each other before the deformation processing. The mapping relationship after deformation processing; according to the first initial pixel position of the first type of pixel point and the position mapping relationship, the first target pixel position of the first type of pixel point is determined.
在一种可能的实现方式中,所述根据所述第一初始像素位置、所述第一目标像素位置以及所述待处理图像中第二类像素点的第二初始像素位置,确定所述第二类像素点的第二目标像素位置,包括:根据所述第一初始像素位置以及所述第一目标像素位置,确定所述第一类像素点对应的位置移动向量,所述位置移动向量表征所述第一类像素点从所述第一初始像素位置移动至所述第一目标像素位置的移动方向与移动距离;根据所述第二类像素点的第二初始像素位置,对所述第二类像素点所属子网格上的第一类像素点的位置移动向量进行插值处理,得到所述第二类像素点的目标移动向量;根据所述目标移动向量以及所述第二初始像素位置,确定所述第二类像素点的第二目标像素位置。In a possible implementation manner, determining the The second target pixel position of the second type of pixel point includes: determining the position movement vector corresponding to the first type pixel point according to the first initial pixel position and the first target pixel position, and the position movement vector represents The moving direction and moving distance of the first type of pixel point moving from the first initial pixel position to the first target pixel position; according to the second initial pixel position of the second type of pixel point, the first Perform interpolation processing on the position movement vector of the first type pixel point on the sub-grid to which the second type pixel point belongs to obtain the target movement vector of the second type pixel point; according to the target movement vector and the second initial pixel position , and determine the second target pixel position of the second type of pixel point.
在一种可能的实现方式中,所述装置还包括:素材设置模块,用于响应于针对变形素材的设置操作,将所述设置操作指示的参考图像的变形信息确定为变形素材,所述变形素材用于对待变形图像中的目标对象进行变形。In a possible implementation manner, the apparatus further includes: a material setting module, configured to, in response to a setting operation for a deformed material, determine the deformation information of the reference image indicated by the setting operation as a deformed material, and the deformed material Footage is used to deform the target object in the image to be deformed.
在本公开实施例中,能够根据参考图像上的参考关键点的变形信息,将参考对象的变形效果同步映射至待处理图像中的目标对象上,这样不仅可以对目标图像中的目标对象实现自定义变形,且目标图像中的目标对象会保持与参考对象相似的变形效果而不受待处理图像中该目标对象的位姿变化的影响。In the embodiment of the present disclosure, the deformation effect of the reference object can be synchronously mapped to the target object in the to-be-processed image according to the deformation information of the reference key points on the reference image. Deformation is defined, and the target object in the target image will maintain a similar deformation effect as the reference object without being affected by the pose change of the target object in the image to be processed.
在一些实施例中,本公开实施例提供的装置具有的功能或包含的模块可以用于执行上文方法实施例描述的方法,其具体实现可以参照上文方法实施例的描述,为了简洁,这里不再赘述。In some embodiments, the functions or modules included in the apparatuses provided in the embodiments of the present disclosure may be used to execute the methods described in the above method embodiments. For specific implementation, reference may be made to the descriptions of the above method embodiments. For brevity, here No longer.
本公开实施例还提出一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述方法。计算机可读存储介质可以是易失性或非易失性计算机可读存储介质。Embodiments of the present disclosure further provide a computer-readable storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the foregoing method is implemented. Computer-readable storage media can be volatile or non-volatile computer-readable storage media.
本公开实施例还提出一种电子设备,包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器被配置为调用所述存储器存储的指令,以执行上述方法。An embodiment of the present disclosure further provides an electronic device, including: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to invoke the instructions stored in the memory to execute the above method.
本公开实施例还提供了一种计算机程序产品,包括计算机可读代码,或者承载有计算机可读代码的非易失性计算机可读存储介质,当所述计算机可读代码在电子设备的处理器中运行时,所述电子设备中的处理器执行上述方法。Embodiments of the present disclosure also provide a computer program product, including computer-readable codes, or a non-volatile computer-readable storage medium carrying computer-readable codes, when the computer-readable codes are stored in a processor of an electronic device When running in the electronic device, the processor in the electronic device executes the above method.
本公开涉及增强现实领域,通过获取现实环境中的目标对象的图像信息,进而借助各类视觉相关算法实现对目标对象的相关特征、状态及属性进行检测或识别处理,从而得到与具体应用匹配的虚拟与现实相结合的AR效果。示例性的,目标对象可涉及与人体相关的脸部、肢体、手势、动作等,或者与物体相关的标识物、标志物,或者与场馆或场所相关的沙盘、展示区域或展示物品等。视觉相关算法可涉及视觉定位、SLAM、三维重建、图像注册、背景分割、对象的关键点提取及跟踪、对象的位姿或深度检测等。具体应用不仅可以涉及跟真实场景或物品相关的导览、导航、讲解、重建、虚拟效果叠加展示等交互场景,还可以涉及与人相关的特效处理,比如妆容美化、肢体美化、特效展示、虚拟模型展示等交互场景。可通过卷积神经网络,实现对目标对象的相关特征、状态及属性进行检测或识别处理。上述卷积神经网络是基于深度学习框架进行模型训练而得到的网络模型。The present disclosure relates to the field of augmented reality. By acquiring the image information of the target object in the real environment, the relevant features, states and attributes of the target object can be detected or recognized with the help of various visual correlation algorithms, so as to obtain the image information matching the specific application. AR effect that combines virtual and reality. Exemplarily, the target object may involve faces, limbs, gestures, movements, etc. related to the human body, or objects, markers, or sandboxes, display areas, or display items related to venues or venues. Vision-related algorithms may involve visual localization, SLAM, 3D reconstruction, image registration, background segmentation, object keypoint extraction and tracking, object pose or depth detection, etc. The specific application can not only involve interactive scenes such as navigation, navigation, explanation, reconstruction, and virtual effect overlay display related to real scenes or items, but also special effects processing related to people, such as makeup beautification, body beautification, special effects display, virtual Model display and other interactive scenarios. The relevant features, states and attributes of the target object can be detected or recognized through the convolutional neural network. The above convolutional neural network is a network model obtained by model training based on a deep learning framework.
电子设备可以被提供为终端、服务器或其它形态的设备。The electronic device may be provided as a terminal, server or other form of device.
图7示出根据本公开实施例的一种电子设备1900的框图。例如,电子设备1900可以被提供为一服务器或终端设备。参照图7,电子设备1900包括处理组件1922,其进一步包括一个或多个处理器,以及由存储器1932所代表的存储器资源,用于存储可由处理组件1922的执行的指令,例如应用程序。存储器1932中存储的应用程序可以包括一个或一个以上的每一个对应于一组指令的模块。此外,处理组件1922被配置为执行指令,以执行上述方法。FIG. 7 shows a block diagram of an
电子设备1900还可以包括一个电源组件1926被配置为执行电子设备1900的电源管理,一个有线或无线网络接口1950被配置为将电子设备1900连接到网络,和一个输入输出(I/O)接口1958。电子设备1900可以操作基于存储在存储器1932的操作系统,例如微软服务器操作系统(Windows ServerTM),苹果公司推出的基于图形用户界面操作系统(Mac OSXTM),多用户多进程的计算机操作系统(UnixTM),自由和开放原代码的类Unix操作系统(LinuxTM),开放原代码的类Unix操作系统(FreeBSDTM)或类似。The
在示例性实施例中,还提供了一种非易失性计算机可读存储介质,例如包括计算机程序指令的存储器1932,上述计算机程序指令可由电子设备1900的处理组件1922执行以完成上述方法。In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as
本公开可以是系统、方法和/或计算机程序产品。计算机程序产品可以包括计算机可读存储介质,其上载有用于使处理器实现本公开的各个方面的计算机可读程序指令。The present disclosure may be a system, method and/or computer program product. The computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for causing a processor to implement various aspects of the present disclosure.
计算机可读存储介质可以是可以保持和存储由指令执行设备使用的指令的有形设备。计算机可读存储介质例如可以是(但不限于)电存储设备、磁存储设备、光存储设备、电磁存储设备、半导体存储设备或者上述的任意合适的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、静态随机存取存储器(SRAM)、便携式压缩盘只读存储器(CD-ROM)、数字多功能盘(DVD)、记忆棒、软盘、机械编码设备、例如其上存储有指令的打孔卡或凹槽内凸起结构、以及上述的任意合适的组合。这里所使用的计算机可读存储介质不被解释为瞬时信号本身,诸如无线电波或者其他自由传播的电磁波、通过波导或其他传输媒介传播的电磁波(例如,通过光纤电缆的光脉冲)、或者通过电线传输的电信号。A computer-readable storage medium may be a tangible device that can hold and store instructions for use by the instruction execution device. The computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples (non-exhaustive list) of computer readable storage media include: portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM) or flash memory), static random access memory (SRAM), portable compact disk read only memory (CD-ROM), digital versatile disk (DVD), memory sticks, floppy disks, mechanically coded devices, such as printers with instructions stored thereon Hole cards or raised structures in grooves, and any suitable combination of the above. Computer-readable storage media, as used herein, are not to be construed as transient signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (eg, light pulses through fiber optic cables), or through electrical wires transmitted electrical signals.
这里所描述的计算机可读程序指令可以从计算机可读存储介质下载到各个计算/处理设备,或者通过网络、例如因特网、局域网、广域网和/或无线网下载到外部计算机或外部存储设备。网络可以包括铜传输电缆、光纤传输、无线传输、路由器、防火墙、交换机、网关计算机和/或边缘服务器。每个计算/处理设备中的网络适配卡或者网络接口从网络接收计算机可读程序指令,并转发该计算机可读程序指令,以供存储在各个计算/处理设备中的计算机可读存储介质中。The computer readable program instructions described herein may be downloaded to various computing/processing devices from a computer readable storage medium, or to an external computer or external storage device over a network such as the Internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers. A network adapter card or network interface in each computing/processing device receives computer-readable program instructions from a network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in each computing/processing device .
用于执行本公开操作的计算机程序指令可以是汇编指令、指令集架构(ISA)指令、机器指令、机器相关指令、微代码、固件指令、状态设置数据、或者以一种或多种编程语言的任意组合编写的源代码或目标代码,所述编程语言包括面向对象的编程语言—诸如Smalltalk、C++等,以及常规的过程式编程语言—诸如“C”语言或类似的编程语言。计算机可读程序指令可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络—包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。在一些实施例中,通过利用计算机可读程序指令的状态信息来个性化定制电子电路,例如可编程逻辑电路、现场可编程门阵列(FPGA)或可编程逻辑阵列(PLA),该电子电路可以执行计算机可读程序指令,从而实现本公开的各个方面。Computer program instructions for carrying out operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or instructions in one or more programming languages. Source or object code, written in any combination, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as the "C" language or similar programming languages. The computer readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server implement. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (eg, using an Internet service provider through the Internet connect). In some embodiments, custom electronic circuits, such as programmable logic circuits, field programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), can be personalized by utilizing state information of computer readable program instructions. Computer readable program instructions are executed to implement various aspects of the present disclosure.
这里参照根据本公开实施例的方法、装置(系统)和计算机程序产品的流程图和/或框图描述了本公开的各个方面。应当理解,流程图和/或框图的每个方框以及流程图和/或框图中各方框的组合,都可以由计算机可读程序指令实现。Aspects of the present disclosure are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer readable program instructions.
这些计算机可读程序指令可以提供给通用计算机、专用计算机或其它可编程数据处理装置的处理器,从而生产出一种机器,使得这些指令在通过计算机或其它可编程数据处理装置的处理器执行时,产生了实现流程图和/或框图中的一个或多个方框中规定的功能/动作的装置。也可以把这些计算机可读程序指令存储在计算机可读存储介质中,这些指令使得计算机、可编程数据处理装置和/或其他设备以特定方式工作,从而,存储有指令的计算机可读介质则包括一个制造品,其包括实现流程图和/或框图中的一个或多个方框中规定的功能/动作的各个方面的指令。These computer readable program instructions may be provided to a processor of a general purpose computer, special purpose computer or other programmable data processing apparatus to produce a machine that causes the instructions when executed by the processor of the computer or other programmable data processing apparatus , resulting in means for implementing the functions/acts specified in one or more blocks of the flowchart and/or block diagrams. These computer readable program instructions can also be stored in a computer readable storage medium, these instructions cause a computer, programmable data processing apparatus and/or other equipment to operate in a specific manner, so that the computer readable medium storing the instructions includes An article of manufacture comprising instructions for implementing various aspects of the functions/acts specified in one or more blocks of the flowchart and/or block diagrams.
也可以把计算机可读程序指令加载到计算机、其它可编程数据处理装置、或其它设备上,使得在计算机、其它可编程数据处理装置或其它设备上执行一系列操作步骤,以产生计算机实现的过程,从而使得在计算机、其它可编程数据处理装置、或其它设备上执行的指令实现流程图和/或框图中的一个或多个方框中规定的功能/动作。Computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other equipment to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other equipment to produce a computer-implemented process , thereby causing instructions executing on a computer, other programmable data processing apparatus, or other device to implement the functions/acts specified in one or more blocks of the flowcharts and/or block diagrams.
附图中的流程图和框图显示了根据本公开的多个实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或指令的一部分,所述模块、程序段或指令的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more functions for implementing the specified logical function(s) executable instructions. In some alternative implementations, the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks 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 is also noted that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented in dedicated hardware-based systems that perform the specified functions or actions , or can be implemented in a combination of dedicated hardware and computer instructions.
该计算机程序产品可以具体通过硬件、软件或其结合的方式实现。在一个可选实施例中,所述计算机程序产品具体体现为计算机存储介质,在另一个可选实施例中,计算机程序产品具体体现为软件产品,例如软件开发包(Software Development Kit,SDK)等等。The computer program product can be specifically implemented by hardware, software or a combination thereof. In an optional embodiment, the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (Software Development Kit, SDK), etc. Wait.
上文对各个实施例的描述倾向于强调各个实施例之间的不同之处,其相同或相似之处可以互相参考,为了简洁,本文不再赘述。The above descriptions of the various embodiments tend to emphasize the differences between the various embodiments, and the similarities or similarities can be referred to each other. For the sake of brevity, details are not repeated herein.
本领域技术人员可以理解,在具体实施方式的上述方法中,各步骤的撰写顺序并不意味着严格的执行顺序而对实施过程构成任何限定,各步骤的具体执行顺序应当以其功能和可能的内在逻辑确定。Those skilled in the art can understand that in the above method of the specific implementation, the writing order of each step does not mean a strict execution order but constitutes any limitation on the implementation process, and the specific execution order of each step should be based on its function and possible Internal logic is determined.
若本申请技术方案涉及个人信息,应用本申请技术方案的产品在处理个人信息前,已明确告知个人信息处理规则,并取得个人自主同意。若本申请技术方案涉及敏感个人信息,应用本申请技术方案的产品在处理敏感个人信息前,已取得个人单独同意,并且同时满足“明示同意”的要求。例如,在摄像头等个人信息采集装置处,设置明确显著的标识告知已进入个人信息采集范围,将会对个人信息进行采集,若个人自愿进入采集范围即视为同意对其个人信息进行采集;或者在个人信息处理的装置上,利用明显的标识/信息告知个人信息处理规则的情况下,通过弹窗信息或请个人自行上传其个人信息等方式获得个人授权;其中,个人信息处理规则可包括个人信息处理者、个人信息处理目的、处理方式以及处理的个人信息种类等信息。If the technical solution of this application involves personal information, the product applying the technical solution of this application has clearly informed the personal information processing rules and obtained the individual's voluntary consent before processing personal information. If the technical solution of the present application involves sensitive personal information, the product applying the technical solution of the present application has obtained the individual's individual consent before processing sensitive personal information, and at the same time satisfies the requirement of "express consent". For example, at the personal information collection device such as a camera, a clear and conspicuous sign is set to inform that the personal information has entered the collection range, and the personal information will be collected. On the device for personal information processing, where the personal information processing rules are informed by obvious signs/information, personal authorization is obtained through pop-up information or by asking individuals to upload their personal information; among them, personal information processing rules may include personal information processing rules. Information processor, purpose of processing personal information, method of processing, and types of personal information processed.
以上已经描述了本公开的各实施例,上述说明是示例性的,并非穷尽性的,并且也不限于所披露的各实施例。在不偏离所说明的各实施例的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。本文中所用术语的选择,旨在最好地解释各实施例的原理、实际应用或对市场中的技术的改进,或者使本技术领域的其它普通技术人员能理解本文披露的各实施例。Various embodiments of the present disclosure have been described above, and the foregoing descriptions are exemplary, not exhaustive, and not limiting of the disclosed embodiments. Numerous modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein was chosen to best explain the principles of the various embodiments, the practical application or improvement over the technology in the marketplace, or to enable others of ordinary skill in the art to understand the various embodiments disclosed herein.
Claims (12)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210323348.9A CN114693515A (en) | 2022-03-29 | 2022-03-29 | Image deformation method and device, electronic device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210323348.9A CN114693515A (en) | 2022-03-29 | 2022-03-29 | Image deformation method and device, electronic device and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114693515A true CN114693515A (en) | 2022-07-01 |
Family
ID=82140336
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210323348.9A Pending CN114693515A (en) | 2022-03-29 | 2022-03-29 | Image deformation method and device, electronic device and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114693515A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2024120446A1 (en) * | 2022-12-07 | 2024-06-13 | 北京字跳网络技术有限公司 | Methods and apparatus for generating special effect item and special effect image, device, and storage medium |
WO2024179319A1 (en) * | 2023-02-28 | 2024-09-06 | 北京字跳网络技术有限公司 | Image processing method and apparatus, and electronic device |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109584151A (en) * | 2018-11-30 | 2019-04-05 | 腾讯科技(深圳)有限公司 | Method for beautifying faces, device, terminal and storage medium |
CN110069195A (en) * | 2019-01-31 | 2019-07-30 | 北京字节跳动网络技术有限公司 | Image pulls deformation method and device |
CN110070479A (en) * | 2019-01-31 | 2019-07-30 | 北京字节跳动网络技术有限公司 | Anamorphose pulls independent positioning method and device |
CN111862287A (en) * | 2020-07-20 | 2020-10-30 | 广州市百果园信息技术有限公司 | Eye texture image generation method, texture mapping method, device and electronic device |
CN112381729A (en) * | 2020-11-12 | 2021-02-19 | 广州繁星互娱信息科技有限公司 | Image processing method, device, terminal and storage medium |
CN112464696A (en) * | 2019-10-29 | 2021-03-09 | 广州虎牙科技有限公司 | Image processing method, device, equipment and storage medium |
CN112528707A (en) * | 2019-09-18 | 2021-03-19 | 广州虎牙科技有限公司 | Image processing method, device, equipment and storage medium |
-
2022
- 2022-03-29 CN CN202210323348.9A patent/CN114693515A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109584151A (en) * | 2018-11-30 | 2019-04-05 | 腾讯科技(深圳)有限公司 | Method for beautifying faces, device, terminal and storage medium |
CN110069195A (en) * | 2019-01-31 | 2019-07-30 | 北京字节跳动网络技术有限公司 | Image pulls deformation method and device |
CN110070479A (en) * | 2019-01-31 | 2019-07-30 | 北京字节跳动网络技术有限公司 | Anamorphose pulls independent positioning method and device |
CN112528707A (en) * | 2019-09-18 | 2021-03-19 | 广州虎牙科技有限公司 | Image processing method, device, equipment and storage medium |
CN112464696A (en) * | 2019-10-29 | 2021-03-09 | 广州虎牙科技有限公司 | Image processing method, device, equipment and storage medium |
CN111862287A (en) * | 2020-07-20 | 2020-10-30 | 广州市百果园信息技术有限公司 | Eye texture image generation method, texture mapping method, device and electronic device |
CN112381729A (en) * | 2020-11-12 | 2021-02-19 | 广州繁星互娱信息科技有限公司 | Image processing method, device, terminal and storage medium |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2024120446A1 (en) * | 2022-12-07 | 2024-06-13 | 北京字跳网络技术有限公司 | Methods and apparatus for generating special effect item and special effect image, device, and storage medium |
WO2024179319A1 (en) * | 2023-02-28 | 2024-09-06 | 北京字跳网络技术有限公司 | Image processing method and apparatus, and electronic device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11842514B1 (en) | Determining a pose of an object from rgb-d images | |
US20210035346A1 (en) | Multi-Plane Model Animation Interaction Method, Apparatus And Device For Augmented Reality, And Storage Medium | |
US10726599B2 (en) | Realistic augmentation of images and videos with graphics | |
CN109887003A (en) | A kind of method and apparatus initialized for carrying out three-dimensional tracking | |
Joshi | OpenCV with Python by example | |
CN112766215B (en) | Face image processing method and device, electronic equipment and storage medium | |
CN113822965A (en) | Image rendering processing method, device and equipment and computer storage medium | |
CN112766027A (en) | Image processing method, device, equipment and storage medium | |
KR20230162107A (en) | Facial synthesis for head rotations in augmented reality content | |
CN114693515A (en) | Image deformation method and device, electronic device and storage medium | |
CN116097316A (en) | Object recognition neural network for modeless central prediction | |
CN112528707A (en) | Image processing method, device, equipment and storage medium | |
KR20220126063A (en) | Image processing method and image processing apparatus for generating recontructed image | |
CN108597034B (en) | Method and apparatus for generating information | |
US11158122B2 (en) | Surface geometry object model training and inference | |
US12086929B2 (en) | Material estimation for three-dimensional (3D) modeling | |
CN115018979A (en) | Image reconstruction method, apparatus, electronic device, storage medium and program product | |
US20250037325A1 (en) | Environment map upscaling for digital image generation | |
WO2022179603A1 (en) | Augmented reality method and related device thereof | |
KR101630257B1 (en) | 3D image providing system and providing method thereof | |
CN114463167A (en) | Model display method and device, electronic equipment and storage medium | |
US10540823B2 (en) | Method and apparatus for determining a planar surface | |
CN112799507A (en) | Human body virtual model display method, device, electronic device and storage medium | |
US20250118102A1 (en) | Query deformation for landmark annotation correction | |
US20250118025A1 (en) | Flexible 3d landmark detection |
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 |