WO2022042291A1 - 一种图像处理方法、装置、电子设备和存储介质 - Google Patents

一种图像处理方法、装置、电子设备和存储介质 Download PDF

Info

Publication number
WO2022042291A1
WO2022042291A1 PCT/CN2021/111737 CN2021111737W WO2022042291A1 WO 2022042291 A1 WO2022042291 A1 WO 2022042291A1 CN 2021111737 W CN2021111737 W CN 2021111737W WO 2022042291 A1 WO2022042291 A1 WO 2022042291A1
Authority
WO
WIPO (PCT)
Prior art keywords
target
virtual model
points
point
trajectory
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.)
Ceased
Application number
PCT/CN2021/111737
Other languages
English (en)
French (fr)
Inventor
潘嘉荔
郭燚
黎小凤
吴金远
陈旭
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to EP21860130.0A priority Critical patent/EP4163777A4/en
Priority to JP2023507570A priority patent/JP7540796B2/ja
Publication of WO2022042291A1 publication Critical patent/WO2022042291A1/zh
Priority to US18/060,466 priority patent/US11776209B2/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating three-dimensional [3D] models or images for computer graphics
    • G06T19/20Editing of three-dimensional [3D] images, e.g. changing shapes or colours, aligning objects or positioning parts
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three-dimensional [3D] modelling for computer graphics
    • G06T17/10Constructive solid geometry [CSG] using solid primitives, e.g. cylinders, cubes
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04845Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range for image manipulation, e.g. dragging, rotation, expansion or change of colour
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04847Interaction techniques to control parameter settings, e.g. interaction with sliders or dials
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • G06F3/04883Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures for inputting data by handwriting, e.g. gesture or text
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2200/00Indexing scheme for image data processing or generation, in general
    • G06T2200/24Indexing scheme for image data processing or generation, in general involving graphical user interfaces [GUIs]
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2219/00Indexing scheme for manipulating 3D models or images for computer graphics
    • G06T2219/20Indexing scheme for editing of 3D models
    • G06T2219/2021Shape modification

Definitions

  • the present disclosure relates to the field of information technology, and in particular, to an image processing method, apparatus, electronic device, and storage medium.
  • an application program in the prior art may add a virtual model to a preset image or an image collected by a terminal device to enhance the interest of the image.
  • the virtual model added in the preset image or the image collected by the smart terminal in the prior art is preset.
  • the virtual model can be stored in the application program, terminal device or remote server in advance, and the user can select the virtual model. It is relatively limited and reduces the flexibility of virtual model display.
  • the embodiments of the present disclosure provide an image processing method, apparatus, electronic device and storage medium, which can generate a virtual model that meets user requirements in real time according to the sliding trajectory input by the user, Thus, the flexibility of the virtual model is improved.
  • Embodiments of the present disclosure provide an image processing method, including:
  • the first virtual model is displayed at a first position in the target image.
  • Embodiments of the present disclosure also provide an image processing apparatus, including:
  • the acquisition module is used to acquire the sliding track input by the user on the display component
  • a generating module configured to generate a first virtual model corresponding to the sliding trajectory according to the sliding trajectory
  • the display module is used for displaying the first virtual model in the first position in the target image.
  • Embodiments of the present disclosure also provide an electronic device, the electronic device comprising:
  • processors one or more processors
  • a storage device for storing one or more programs
  • the one or more processors When the one or more programs are executed by the one or more processors, the one or more processors implement the image processing method as described above.
  • Embodiments of the present disclosure also provide a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, implements the above-mentioned image processing method.
  • the image processing method provided by the embodiment of the present disclosure generates a virtual model corresponding to the sliding trajectory by acquiring the sliding trajectory input by the user on the display component,
  • the virtual model is displayed at the first position in the target image, so that different virtual models can be generated according to different sliding trajectories input by the user.
  • the shapes of the virtual models are also different.
  • the virtual model in the target image can be changed with the change of the sliding trajectory input by the user, that is, a virtual model that meets the user's needs can be generated in real time according to the sliding trajectory input by the user, thereby improving the display flexibility of the virtual model.
  • FIG. 1 is a flowchart of an image processing method in an embodiment of the disclosure
  • FIG. 2 is a schematic diagram of a sliding track in an embodiment of the disclosure
  • FIG. 3 is a schematic diagram of a face image in an embodiment of the disclosure.
  • FIG. 4 is a schematic diagram of a virtual model in an embodiment of the present disclosure.
  • FIG. 5 is a schematic diagram of virtual models that are mirror images of each other in an embodiment of the present disclosure.
  • FIG. 6 is a flowchart of another image processing method in an embodiment of the disclosure.
  • FIG. 7 is a schematic diagram of a trajectory point in an embodiment of the present disclosure.
  • FIG. 8 is a schematic diagram of a preset sub-model and a target sub-model in an embodiment of the present disclosure
  • FIG. 9 is a schematic diagram of a virtual model in an embodiment of the present disclosure.
  • FIG. 10 is a flowchart of another image processing method in an embodiment of the disclosure.
  • FIG. 11 is a schematic diagram of a sliding trajectory and a virtual model in an embodiment of the disclosure.
  • FIG. 13 is a schematic diagram of a user interface in an embodiment of the disclosure.
  • FIG. 15 is a schematic structural diagram of an image processing apparatus according to an embodiment of the disclosure.
  • FIG. 16 is a schematic structural diagram of an electronic device according to an embodiment of the disclosure.
  • the term “including” and variations thereof are open-ended inclusions, ie, "including but not limited to”.
  • the term “based on” is “based at least in part on.”
  • the term “one embodiment” means “at least one embodiment”; the term “another embodiment” means “at least one additional embodiment”; the term “some embodiments” means “at least some embodiments”. Relevant definitions of other terms will be given in the description below.
  • FIG. 1 is a flowchart of an image processing method in an embodiment of the present disclosure.
  • This embodiment can be applied to the case where image processing is performed in a client.
  • the method can be executed by an image processing apparatus, and the apparatus can use software and/or
  • the device can be implemented in a hardware manner, and the apparatus can be configured in an electronic device, such as a mobile terminal, specifically including a mobile phone, a computer, or a tablet computer.
  • this embodiment may be applicable to the case where image processing is performed in the server, the method may be executed by an image processing apparatus, and the apparatus may be implemented in software and/or hardware, and the apparatus may be configured in an electronic device, such as a server .
  • the method may specifically include:
  • the terminal 21 may be provided with a display component, and the display component may specifically include a screen, such as a touch screen.
  • the terminal 21 can acquire the sliding track input by the user on the touch screen.
  • the terminal 21 may be connected to an external display component, such as a touchpad, and the terminal 21 acquires the sliding track input by the user on the touchpad.
  • the terminal 21 may also be installed with a camera.
  • the camera can be used to capture images, such as face images.
  • the terminal 21 may be installed with an application program of an image type or a video type.
  • the application program calls the camera, the camera captures an image, and the captured image can form a preview on the display component.
  • the terminal 21 may add a virtual model to the image. For example, when the user needs to display the virtual model on the image, the user can slide on the display component, so that the terminal 21 can obtain the sliding track of the user on the display component.
  • a virtual model trigger button may be displayed on the display component of the terminal 21 or the user interface of the application program, and the terminal 21 may detect and acquire the sliding track input by the user on the display component according to the user's operation of the virtual model trigger button.
  • the sliding track may be a continuous curve.
  • the sliding trajectory can also be a straight line. This embodiment does not limit this.
  • the terminal 21 may generate a virtual model corresponding to the sliding track according to the sliding track, and the virtual model is recorded as the first virtual model.
  • the virtual model may be a three-dimensional model or a two-dimensional model. Since the first virtual model is generated according to the user's sliding track on the screen, the shape of the first virtual model is similar to the shape of the sliding track. For example, taking the sliding track in FIG. 2 as an example, the first virtual model corresponding to the sliding track may be a virtual model similar to a horn.
  • a target image may be displayed on the screen of the terminal 21 , and the target image may include, for example, a face image.
  • the terminal takes the sliding trajectory in FIG. 2 as an example, based on the sliding trajectory, the terminal generates a first virtual model similar to a bull horn corresponding to the sliding trajectory.
  • the terminal 21 may display the first virtual model similar to a cow's horn at a first position in the face image, and the first position may be a preset position, or the first position may be a random position.
  • the preset position may be determined by the user, for example, the preset position may be a position selected by the user in the display component or the face image. Alternatively, the preset position may also be a certain position in a display component or a face image predetermined by the terminal 21 . This embodiment does not specifically limit the preset position.
  • the first position may be a certain position of the forehead of the face in the face image, and the first position is denoted as ( ⁇ , ⁇ ). Wherein, ( ⁇ , ⁇ ) may represent the coordinates of the first position in the face coordinate system.
  • the terminal 21 can adsorb the first virtual model 23 similar to the horn on the first position ( ⁇ , ⁇ ), as shown in FIG. 4 , 22 represents the first position ( ⁇ , ⁇ ), and 23 represents the adsorption on The first virtual model on ( ⁇ , ⁇ ).
  • the terminal 21 may place the first virtual model 23 at the first position ( ⁇ , ⁇ ) by means of mapping or the like.
  • the image processing method provided by the embodiment of the present disclosure generates a virtual model corresponding to the sliding trajectory by acquiring the sliding trajectory input by the user on the display component, and displays the virtual model on the first position in the target image, so that the virtual model can be displayed according to the Different sliding trajectories input by the user generate different virtual models. For example, when the shapes of the sliding trajectories are different, the shapes of the virtual models are also different. Therefore, the virtual model in the target image can be changed with the change of the sliding trajectory input by the user, that is, a virtual model that meets the user's needs can be generated in real time according to the sliding trajectory input by the user, thereby improving the display flexibility of the virtual model.
  • displaying the first virtual model at the first position in the target image includes: displaying the first virtual model at the first position of the target object in the target image.
  • the terminal 21 can attach the first virtual model 23 to the first position 22 of the human face.
  • the terminal 21 may specifically overlap the center point of the bottom surface of the first virtual model 23 with the first position 22 of the human face.
  • the point on the first position 22 may specifically be a certain key point of the human face in the human face image.
  • the orientation of the key point at the first position in the three-dimensional space is consistent with the Y-axis of the model coordinate system where the first virtual model 23 is located. Among them, the orientation of the key points in the three-dimensional space can be determined by a machine learning algorithm.
  • the Y-axis direction of the model coordinate system may be a direction passing through the center point of the bottom surface of the first virtual model 23 and perpendicular to the bottom surface.
  • the method further includes: receiving a mirror image control instruction; a second position symmetrical to the first position; a second virtual model that is a mirror image of the first virtual model is displayed on the second position.
  • the terminal 21 may receive a user's triggering operation, for example, triggering a "mirror" button on the screen, a voice trigger, a gesture trigger, an expression trigger, etc., to determine whether the face is related to the first and a second position that is symmetrical in position, and displays a second virtual model that is a mirror image of the first virtual model at the second position.
  • the terminal 21 may further determine the relationship between the human face and the first face immediately or after a predetermined period of time after displaying the first virtual model at the first position of the human face in the target image. and a second position that is symmetrical in position, and displays a second virtual model that is a mirror image of the first virtual model at the second position.
  • a mirror button 134 may also be displayed on the display component of the terminal 21 or the user interface of the application program.
  • the terminal 21 attaches the first virtual model 23 to the first position 22 of the face, the user can perform a trigger operation on the mirror button 134, and the trigger operation can trigger the terminal 21 to generate a mirror control instruction.
  • the terminal 21 may determine a second position on the human face that is symmetric to the first position ( ⁇ , ⁇ ) in response to the mirror control instruction, for example, the second position is denoted as (1- ⁇ , ⁇ ).
  • ( ⁇ , ⁇ ) and (1- ⁇ , ⁇ ) are the coordinates in the face coordinate system.
  • the terminal 21 may display a second virtual model that is a mirror image of the first virtual model 23 at the second position (1- ⁇ , ⁇ ). As shown in FIG. 5, 24 represents the second position (1- ⁇ , ⁇ ), and 25 represents the second virtual model 25 adsorbed on (1- ⁇ , ⁇ ).
  • the terminal 21 displays a second virtual model that is a mirror image of the first virtual model 23 at the second position (1- ⁇ , ⁇ ), which may include the following possible implementations:
  • the terminal 21 may first rotate the first virtual model 23 by 180 degrees to obtain the second virtual model 25 , and then adsorb the second virtual model 25 to the second position 24 superior.
  • the terminal 21 may first adsorb the first virtual model 23 to the second position 24 . Then, the first virtual model 23 adsorbed on the second position 24 is rotated by 180 degrees to obtain the second virtual model 25 .
  • the first virtual model is The first virtual model adsorbed on the position and the second virtual model adsorbed on the second position form a mirror image effect. It not only saves the calculation amount required for reconstructing the second virtual model, but also further improves the flexibility and aesthetics of the display of the virtual model in the target image.
  • FIG. 4 an exemplary illustration is given by taking a face image as an example.
  • the target image is not limited to a face image, for example, it can also be an image of other objects.
  • the target object is also not limited to being a human face, for example, it can be other objects and so on. This disclosure does not limit this.
  • the user inputs a sliding track on the screen.
  • the following takes the terminal 21 as an example to introduce the process of the terminal 21 generating a first virtual model corresponding to the sliding track according to the sliding track.
  • generating a first virtual model corresponding to the sliding trajectory according to the sliding trajectory including the following steps as shown in FIG. 6 :
  • the terminal 21 may determine a plurality of target points related to the sliding track according to the sliding track.
  • the multiple target points related to the sliding track may specifically be multiple track points or multiple sampling points of the sliding track.
  • the sliding track can be composed of multiple track points, and each track point can be used as a target point.
  • the terminal 21 may perform uniform sampling or non-uniform sampling on the sliding track to obtain multiple sampling points, and each sampling point may be used as a target point.
  • the target point 71 may be any one of a plurality of target points.
  • determining, according to the sliding track, multiple target points related to the sliding track includes: determining, according to the sliding track, multiple track points in the sliding track; Fitting calculation is performed on the plurality of trajectory points to obtain a fitting curve; and the fitting curve is sampled to obtain a plurality of target points related to the sliding trajectory.
  • the target point includes the sampling point on the fitting curve.
  • the terminal 21 may obtain a track point on the sliding track according to the sliding track, and the track point may be one or more.
  • multiple track points are used as an example for schematic illustration. It is assumed that the multiple points shown in FIG. 7 can be multiple track points on the sliding track.
  • the point set P includes n trajectory points. The specific value of n is not limited here.
  • P1, P2, P3, ..., Pn may be two-dimensional points, respectively, that is, the point set P may be a two-dimensional point set.
  • P1, P2, P3, ..., Pn may be two-dimensional points in a screen coordinate system, and the coordinate origin of the screen coordinate system may be the lower right corner of the screen.
  • a preset fitting algorithm can be selected to perform fitting calculation on P1, P2, P3, . . . , Pn to obtain a fitting curve.
  • the present embodiment does not specifically limit the fitting algorithm.
  • the fitted fitting curve may be a cubic spline fitting curve.
  • x represents the coordinate of any point on the fitting curve on the X-axis of the screen coordinate system
  • y represents the coordinate of any point on the fitting curve on the Y-axis of the screen coordinate system
  • a, b, c, and d represent fitting coefficients, respectively.
  • the terminal 21 may sample the fitting curve, for example, uniform sampling or non-uniform sampling, to obtain sampling points on the fitting curve, and the sampling points may be one or more.
  • a plurality of sampling points are taken as an example for schematic illustration.
  • multiple sampling points can be recorded as C1, C2, C3, —, Cm, that is, there are m sampling points.
  • the specific value of m is not limited here, nor the size of n and m. relation.
  • the terminal 21 may use the sampling points C1, C2, C3, . . . , Cm as multiple target points related to the sliding trajectory. Each sample point can be used as a target point.
  • C1, C2, C3, ..., Cm can be two-dimensional points in the screen coordinate system.
  • the preset sub-models corresponding to different target points may be the same or different.
  • this embodiment does not limit the shape of the preset sub-model corresponding to each target point, for example, it may be a regular body or an irregular body, or may also be a regular plane figure or an irregular plane figure.
  • the terminal 21 may also acquire a preset sub-model corresponding to each of the multiple target points.
  • the shapes of the preset sub-models corresponding to different target points in C1, C2, C3, ..., Cm may be different.
  • the preset sub-model corresponding to the target point C1 is a cylinder
  • the corresponding preset submodel is a cone.
  • the shapes of the preset sub-models corresponding to different target points in C1, C2, C3, ..., Cm may be the same, for example, they are all cylinders.
  • the cylinders corresponding to different target points may have the same size or different sizes.
  • the preset sub-models corresponding to different target points in C1, C2, C3, ..., Cm are all cylinders, and the sizes of the cylinders corresponding to different target points are different for illustrative illustration. .
  • the size of the cylinder corresponding to each target point in C1, C2, C3, ..., Cm decreases sequentially.
  • the preset sub-model corresponding to the target point is converted into a target sub-model.
  • the preset sub-model corresponding to C1 is a cylinder without a radian
  • the target sub-model obtained by converting the preset sub-model may be a cylinder with a radian.
  • the geometric information of the target point includes at least one of the following: an offset of the target point relative to a starting trajectory point in the plurality of trajectory points; the target point is on the fitting curve tangent direction.
  • the multiple points shown in FIG. 7 may be multiple track points on the sliding track.
  • the track point P1 in P1, P2, P3, ..., Pn may be the starting track point in the sliding track. Since P1, P2, P3, ..., Pn and C1, C2, C3, ..., Cm are all two-dimensional points that can be in the screen coordinate system, that is, P1, P2, P3, ising,Pn and C1,C2,C3, «,Cm in the same coordinate system. Therefore, according to the coordinates of the target point C1 in the screen coordinate system and the coordinates of the initial trajectory point P1 in the screen coordinate system, the offset of the target point C1 relative to the initial trajectory point P1 can be determined. The amount is recorded as T.
  • the tangent direction of the target point C1 on the fitting curve can also be determined, and the tangent direction is denoted as R.
  • the offset of the target point C1 relative to the initial trajectory point P1 and/or the tangent direction of the target point C1 on the fitting curve may be recorded as the geometric information of the target point C1.
  • the geometric information of the target point C1 is not limited to this, and may also include other geometric information.
  • the terminal 21 can convert the preset sub-model corresponding to each target point into the target sub-model according to the geometric information of each target point in C1, C2, C3, . . . , Cm.
  • Converting the preset sub-model corresponding to each target point into a target sub-model according to the geometric information of each target point in the plurality of target points includes: according to the offset of the target point relative to the starting trajectory point The shift amount and the tangent direction of the target point on the fitting curve are used to convert the preset sub-model corresponding to the target point into a target sub-model.
  • the preset sub-model corresponding to the target point C1 can be converted into the target sub-model.
  • the preset sub-models corresponding to other target points can be converted into target sub-models.
  • the offsets of different target points in C1, C2, C3, ..., Cm relative to the starting trajectory point P1 may be different.
  • different target points in C1, C2, C3, ..., Cm may also have different tangent directions on the fitted curve. Therefore, according to the offsets of different target points in C1, C2, C3,..., Cm relative to the starting trajectory point P1, and the tangent directions of different target points on the fitting curve, the The preset sub-models corresponding to different target points are converted into different target sub-models.
  • the preset sub-model corresponding to the target point is converted into A target sub-model, comprising: according to the offset of the target point relative to the starting trajectory point and the tangent direction of the target point on the fitting curve, assigning a preset sub-model corresponding to the target point A plurality of first points on the target point are converted into a plurality of corresponding second points; and a target sub-model corresponding to the target point is generated according to the plurality of second points.
  • the preset sub-model corresponding to C1 is a cylinder without radian, such as the cylinder 81 shown in FIG. 8 .
  • Points on the upper circular surface, the lower circular surface and the side wall of the cylinder can be used as the vertices of the cylinder.
  • each vertex coordinate on the cylinder can be converted to obtain a new vertex coordinate.
  • the vertex before conversion may be recorded as the first point
  • the new vertex after conversion may be recorded as the second point.
  • the first point and the second point correspond one by one.
  • the new vertices can be connected to form a new cylinder.
  • the relative positional relationship between each second point can be determined according to the relative positional relationship between each first point, and further according to the relative positional relationship between each second point
  • the relative positional relationship between the points and the coordinates of each second point can connect adjacent second points to form a new cylinder.
  • the new cylinder may be a cylinder with a certain arc.
  • this new cylinder can be noted as the target submodel.
  • the preset sub-model corresponding to the target point is Converting a plurality of first points into a plurality of corresponding second points includes: converting the offset of the target point relative to the starting trajectory point into a three-dimensional offset; converting the target point in the simulation The tangent direction on the composite curve is converted into a three-dimensional tangent direction; according to the three-dimensional offset and the three-dimensional tangent direction, a plurality of first points on the preset sub-model corresponding to the target point are converted into a corresponding plurality of first points Second point.
  • the preset sub-model corresponding to C1 is a cylinder 81 as shown in FIG. 8 .
  • the upper circular surface, the lower circular surface and the point on the side wall of the cylinder can be used as the vertices of the cylinder, the coordinates of each vertex in the model coordinate system are marked as V, and the model coordinate system can be a three-dimensional coordinate system. Therefore, each vertex on the preset sub-model corresponding to the target point C1 may be a three-dimensional point.
  • the offset T of the target point C1 relative to the starting trajectory point P1 and the tangent direction R of the target point C1 on the fitting curve are both two-dimensional vectors
  • the offset T can be converted into a three-dimensional offset , which converts the tangent direction R to a 3D tangent direction.
  • the three-dimensional offset converted from the offset T is recorded as T1.
  • T1 can be the three-dimensional offset obtained by converting the offset T to the model coordinate system, or T1 can be the offset The three-dimensional offset obtained by directly adding a third dimension value, such as 0, on the basis of the quantity T.
  • the three-dimensional tangent direction converted from the tangent direction R is recorded as R1.
  • R1 can be the three-dimensional tangent direction obtained by converting the tangent direction R to the model coordinate system, or R1 can be the basis of the tangent direction R.
  • V1 and R1 the coordinates V of each vertex on the preset sub-model corresponding to the target point C1 can be transformed, and the transformed coordinates are marked as V1.
  • the relationship between V1, T1, R1, and V is as follows (1):
  • V1 T1*R1*V (1)
  • each vertex on the preset sub-model corresponding to the target point C1 is marked as the first point.
  • the point on the coordinate V1 obtained by converting the coordinate V of the first point can be marked as the second point. That is, the first point and the second point correspond one-to-one.
  • the target sub-model corresponding to the preset sub-model can be generated according to the second point corresponding to each first point.
  • the adjacent points of each first point the adjacent points of each second point can be determined. point, and further, connect adjacent second points to form a target sub-model corresponding to the preset sub-model.
  • the target submodel may be a cylinder with a certain arc, such as cylinder 82 shown in FIG. 8 . It can be understood that, the conversion shown in FIG. 8 is only a schematic illustration, and is not specifically limited.
  • converting a plurality of first points on the preset sub-model corresponding to the target point into a plurality of corresponding second points including: according to the The three-dimensional offset, the three-dimensional tangent direction, and the scaling value corresponding to the target point are converted into a plurality of corresponding second points on the preset sub-model corresponding to the target point.
  • the preset sub-models corresponding to different target points in C1, C2, C3, ..., Cm are all cylinders, and the cylinders corresponding to different target points have the same size.
  • different target points in C1,C2,C3,...,Cm can also have different scaling values.
  • the scaling value of the preset sub-model corresponding to each target point in C1, C2, C3, ..., Cm increases sequentially, wherein, the larger the scaling value is, the conversion of the preset sub-model will be obtained. The smaller the target submodel.
  • the scaling value of the preset sub-model corresponding to the target point C1 is denoted as S1, and the relationship between V1, T1, R1, V, and S1 is shown in the following (2):
  • V1 T1*R1*V*S1 (2)
  • each vertex on the preset sub-model corresponding to the target point C1 is marked as the first point.
  • the point on the coordinate V1 obtained by converting the coordinate V of the first point can be marked as the second point. That is, the first point and the second point correspond one-to-one.
  • the cylinder 82 is a new cylinder obtained by converting the cylinder 81 .
  • Each vertex on the cylinder 82 is marked as a second point, and each vertex on the cylinder 82 corresponds to each vertex on the cylinder 81 one-to-one.
  • the cylinder 82 may also be a reduced cylinder according to the scaling value corresponding to the target point C1.
  • the lower circular surface of the target sub-model corresponding to the target point C1 can be used as the bottom surface of the first virtual model
  • the upper circular surface of the target sub-model corresponding to the target point C1 can be the lower side of the target sub-model corresponding to the target point C2.
  • the circular surfaces are connected.
  • the upper circular surface of the target sub-model corresponding to the target point C2 can be connected to the lower circular surface of the target sub-model corresponding to the target point C3, and so on to obtain the first virtual model. That is, one target submodel can be connected to another target submodel.
  • multiple target sub-models may also be connected to one target sub-model.
  • a larger target sub-model can be connected to multiple smaller target sub-models, and each smaller target sub-model can continue to be connected to one or more smaller target sub-models, and so on, so that The first virtual model may be bifurcated.
  • generating a first virtual model corresponding to the sliding trajectory according to the target sub-model corresponding to each target point including: according to the identifier of each target point, assigning each target point
  • the corresponding target sub-models are connected to form a first virtual model corresponding to the sliding track; wherein, the identification of the target point is used to determine that the target sub-model corresponding to the target point is in the first virtual model. in the location.
  • the target sub-model 91 may be the target sub-model corresponding to the target point C1
  • the target sub-model 92 may be the target sub-model corresponding to the target point C2
  • the target sub-models corresponding to each target point in C1, C2, C3, ..., Cm are connected together in sequence, thereby forming a first virtual model corresponding to the user's sliding trajectory on the screen.
  • the model may be 90 as shown in FIG. 9 .
  • the target sub-model corresponding to each target point may be already connected to each other, thus saving additional connection process.
  • each target point in C1, C2, C3, ..., Cm may correspond to an identifier, for example, an index. That is, each target point may have a corresponding identifier, and the identifier of each target point may be unique. Specifically, the identifier of each target point is used to determine the position of the target sub-model corresponding to the target point in the first virtual model 90.
  • each target sub-model can be used as an element of the first virtual model 90 . The position of each element in the first virtual model 90 may be noted as the vertex color of the element.
  • the track points in the sliding track are determined through the sliding track input by the user on the screen. Since the sliding speed corresponding to each track point on the sliding track is uneven, each track The distribution of points on the sliding track may not be uniform.
  • a fitting curve is obtained, and the fitting curve is further sampled, so that the sampling points are evenly distributed on the fitting curve.
  • the preset sub-model corresponding to each sampling point is converted into a target sub-model, and according to the target sub-model corresponding to each sampling point, a first sub-model corresponding to the sliding trajectory is generated. virtual model, thereby improving the similarity between the first virtual model and the sliding trajectory, so that the first virtual model can better meet user requirements and improve user experience.
  • FIG. 10 is a flowchart of another image processing method in an embodiment of the disclosure. This embodiment further specifically describes the image processing method on the basis of the above-mentioned embodiment. Correspondingly, as shown in FIG. 10 , the method of this embodiment is applied to a terminal, and the specific steps are as follows:
  • S1001 is similar to the process of acquiring the user's sliding track on the display component described in the foregoing embodiment, and details are not described herein again.
  • S1002 is similar to the process of generating the first virtual model corresponding to the sliding trajectory according to the sliding trajectory described in the foregoing embodiment, and details are not repeated here.
  • the sliding direction of the sliding track is longitudinal, for example, from top to bottom, or from bottom to top.
  • the sliding direction of the sliding track may also be lateral, as shown in FIG. 11 , from left to right, or from right to left.
  • the direction of the first virtual model can also be adjusted according to the sliding direction of the sliding track.
  • the direction of the first virtual model may specifically be the Y-axis direction of the model coordinate system where the first virtual model is located.
  • adjusting the direction of the first virtual model according to the sliding direction of the sliding track includes: determining the direction of the starting track point in the sliding track relative to other track points in the sliding track; The starting track point in the sliding track is aggregated and calculated relative to the directions of other track points in the sliding track to obtain the aggregation direction; according to the aggregation direction, the direction of the first virtual model is adjusted.
  • the sliding direction of the sliding track is from left to right. Since the sliding track is horizontal, the first virtual model corresponding to the sliding track is also horizontal, such as the first virtual model 110 shown in FIG. 11 . Further, the direction of the first virtual model 110 can be adjusted according to the sliding direction of the sliding track.
  • P1 is the starting track point in the sliding track
  • P2 is the second track point in the sliding track
  • Pn is the nth track point in the sliding track.
  • the direction of the starting track point P1 relative to other track points can be determined.
  • the direction of the starting track point P1 relative to other track points may specifically be a vector of the starting track point P1 pointing to the other track points.
  • the vector from the initial trajectory point P1 to the second trajectory point P2 is recorded as L1
  • the vector from the initial trajectory point P1 to P3 is recorded as L2
  • the vector from the initial trajectory point P1 to Pn is recorded as L(n-1 ).
  • L1, L2, ..., L(n-1) constitute a vector set L
  • L ⁇ L1, L2, ..., L(n-1) ⁇ .
  • a preset clustering algorithm is used to perform clustering calculation on each vector in the vector set L, and a clustered vector is obtained, and the direction of the clustered vector is recorded as the main axis direction, and the main axis direction is recorded as the aggregation. direction.
  • this embodiment does not specifically limit the clustering algorithm. Since each vector in the vector set L is a two-dimensional vector of the screen coordinate system, the clustered vector is also a two-dimensional vector. Further, the aggregated direction can be transformed into the model coordinate system to obtain a 3D vector.
  • This three-dimensional vector is denoted as K. Further calculate the angle between the three-dimensional vector K and the Y axis of the model coordinate system, and convert the angle into a three-dimensional matrix.
  • the first virtual model is composed of multiple target sub-models.
  • the vertex coordinate on each target sub-model is V1 described in the above embodiment, therefore, the vertex coordinate on the first virtual model is V1.
  • Each vertex coordinate V1 on the first virtual model is multiplied by the three-dimensional matrix, so as to realize the rotation of the first virtual model.
  • the rotated first virtual model may be the first virtual model 23 shown in FIG. 4 or FIG. 5 .
  • the direction of the first virtual model can be adjusted according to the sliding direction of the sliding track, so that the first virtual model can be rotated as shown in FIG. 4 or FIG. 5 . 23 of the first virtual model. That is to say, by adjusting the direction of the first virtual model through the sliding direction of the sliding track, it is possible to make the first virtual model always face up when presented on the target image, that is, the center point of the bottom surface of the first virtual model 23 and the The adsorption points are coincident, and the orientation of the adsorption points in the three-dimensional space is consistent with the Y-axis of the model coordinate system where the first virtual model 23 is located.
  • the direction-adjusted first virtual model may be displayed at the first position in the target image.
  • the first virtual model 23 shown in FIG. 4 or FIG. 5 is adsorbed on the first position 22 of the human face.
  • S1003 may also be executed after S1004, that is, according to the sliding trajectory, generate and match the sliding trajectory. After corresponding to the first virtual model, the first virtual model is first displayed at the first position in the target image, and then the direction of the first virtual model at the first position is adjusted.
  • a second virtual model may also be displayed at a second position symmetrical to the first position, as shown in FIG. 5 .
  • the method for adjusting the direction of the second virtual model may be similar to the method for adjusting the direction of the first virtual model, and details are not described herein again.
  • the direction of the first virtual model may also be adjusted first to obtain the adjusted first virtual model. Then, a second position symmetrical to the first position is determined, and a second virtual model is displayed on the second position, and the second virtual model and the adjusted first virtual model are mirror images of each other.
  • the direction of the first virtual model is adjusted by the sliding direction of the sliding track, so that the first virtual model is always presented on the target image facing up, thereby avoiding the sliding direction of the sliding track from affecting the first virtual model.
  • the rendering of a virtual model on the target image is affected.
  • FIG. 12 is a flowchart of another image processing method in an embodiment of the disclosure. This embodiment further specifically describes the image processing method on the basis of the above-mentioned embodiment. Correspondingly, as shown in FIG. 12 , the method of this embodiment is applied to a terminal, and the specific steps are as follows:
  • S1202 may refer to the above-mentioned process of generating the first virtual model corresponding to the sliding trajectory according to the sliding trajectory, which will not be repeated here.
  • S1203 may refer to the above-mentioned process of displaying the first virtual model at the first position in the target image, which will not be repeated here.
  • the terminal 21 may further adjust the parameters of the first virtual model according to user requirements and/or audio information.
  • the audio information may be audio information in the surrounding environment of the terminal 21 , or may also be audio information played by the terminal 21 .
  • adjusting the parameters of the first virtual model includes: receiving a parameter adjustment instruction for the first virtual model; and adjusting the parameter adjustment instruction of the first virtual model in response to the parameter adjustment instruction. parameter.
  • icons for adjusting parameters of the virtual model may be displayed on the terminal screen.
  • a parameter adjustment instruction for the first virtual model can be triggered.
  • the terminal adjusts the parameters of the first virtual model in response to the parameter adjustment instruction.
  • the parameters of the first virtual model include at least one of the following: size, radian, number of sub-models, material of the sub-model, shape of the sub-model, rotation information of the sub-model, angle of the sub-model, and the like.
  • the icons used to adjust the parameters of the virtual model may be multiple groups of arrows as shown in FIG.
  • each group of arrows is used to adjust a parameter of the first virtual model, and different arrow directions represent different adjustments direction, for example, increase or decrease.
  • the present disclosure does not limit the icon form of adjusting the model parameters or the manner of triggering the adjustment.
  • adjusting the parameters of the first virtual model includes: acquiring audio information; and adjusting the parameters of the first virtual model according to the parameters of the audio information.
  • the terminal 21 may collect audio information, and adjust the parameters of the first virtual model according to the parameters of the audio information.
  • the parameters of the audio information may include: volume, spectrum, rebeat, pitch, and the like.
  • the parameters of the audio information may also be referred to as attribute information of the audio information.
  • the parameters of the first virtual model may also be referred to as attribute information of the first virtual model.
  • this embodiment does not limit the correspondence between the parameters of the audio information and the parameters of the first virtual model.
  • the terminal can adjust the size of the first virtual model according to the volume of the audio information, adjust the material of the first virtual model according to the replay of the audio information, and adjust the radian of the first virtual model according to the frequency spectrum of the audio information.
  • the material of the first virtual model may include: a luminous material, a non-luminous material, and the like.
  • the method before acquiring the audio information, further includes: receiving an audio information playing instruction; and playing the audio information in response to the audio information playing instruction.
  • an audio switch button 130 may also be displayed on the screen of the terminal shown in FIG. 13 .
  • the audio information playing instruction can be triggered, and further, the terminal 21 plays the audio information in response to the audio information playing instruction. Further, the terminal 21 may collect the audio information, and adjust the parameters of the first virtual model according to the parameters of the audio information.
  • acquiring audio information includes: collecting audio information in a surrounding environment.
  • the terminal 21 may not play audio information, but collect audio information in a periodic environment, and further adjust the parameters of the first virtual model according to the parameters of the audio information.
  • the terminal 21 may update the first virtual model according to the adjusted parameters. Further, the terminal 21 displays the updated first virtual model on the first position in the target image.
  • the terminal 21 adjusts the parameters of the first virtual model and updates the first virtual model, it can also refer to the method shown in FIG.
  • the first virtual models are mirror images of each other's second virtual models.
  • the above-mentioned method for adjusting the parameters of the first virtual model is also applicable to adjusting the second virtual model
  • the parameters of the second virtual model are similar to the parameters of the first virtual model as described above, and are not repeated here.
  • parameters of other virtual models other than the first virtual model and the second virtual model in the target image may also refer to the parameters of the first virtual model as described above.
  • the parameters of the first virtual model and the parameters of the second virtual model can be adjusted at the same time.
  • the terminal can simultaneously adjust the parameters of the first virtual model and the second virtual model corresponding to the icon according to the user's operation on the icon. parameter.
  • the parameters of the first virtual model and the parameters of the second virtual model can also be adjusted independently.
  • the terminal can adjust the parameters of the first virtual model corresponding to the icon according to the user's operation on the icon, and according to the user's operation on another icon The operation of the icon adjusts a parameter of the second virtual model corresponding to the other icon.
  • the parameters of the instruction or audio information can be adjusted according to the parameters triggered by the user, and the parameters of the virtual model can be adjusted, so that the virtual model can be displayed in the target image in real time. Changes to further improve the flexibility of the virtual model to be displayed in the target image.
  • the terminal 21 can collect a face image through a camera.
  • An audio switch button 130 and a start modeling button 131 may be displayed on the screen of the terminal 21 .
  • the terminal 21 can play the audio information or stop playing the audio information according to the user's operation on the audio switch key 130 .
  • the terminal 21 may display the trajectory drawing area according to the user's operation of the modeling start button 131 , and this embodiment does not limit the position of the trajectory drawing area.
  • the track drawing area can be displayed anywhere on the screen.
  • the face image may remain displayed on the screen, or may not be displayed on the screen.
  • the face image and the track drawing area can be located on the same layer or on different layers.
  • the display layer of the track drawing area can be located on the face Above the display layer of the image.
  • the user inputs a trajectory in the trajectory drawing area.
  • the terminal 21 generates a virtual model according to the user's operation of the model generation button 132, combining the trajectory and the program algorithm. Further, the terminal 21 displays the virtual model at the first position in the face. At this point, the parameters of the virtual model can be adjusted in real time.
  • the terminal 21 adjusts the parameters of the virtual model according to the user's operation on the arrow-shaped icons on the screen, so that the virtual model can be converted into different appearances or different materials. For example, increase the virtual model.
  • the terminal 21 may update the virtual model in the face image according to the user's operation of the adjustment completion button 133 .
  • the terminal 21 can also generate virtual models that are mirror images of each other in the face image according to the user's operation on the mirror button 134, thereby increasing the number of virtual models in the face image.
  • the terminal 21 can also return to the starting state according to the user's operation on the return control button 135 .
  • the virtual model is generated by the terminal in combination with the trajectory input by the user and the program algorithm in the terminal.
  • the terminal can construct different virtual models.
  • the virtual model generated by the terminal may be the virtual model similar to the horns as described above.
  • the virtual model generated by the terminal may be a virtual model similar to antlers.
  • the preset sub-models adopted by the first program algorithm and the second program algorithm are different. Therefore, the virtual models generated by the first program algorithm and the second program algorithm based on the same trajectory are different.
  • the virtual model is generated in different ways.
  • the generation method may be a connection method between multiple elements of the virtual model. For example, one element may be connected to one element when the virtual model is constructed by the first program algorithm. For example, a larger cylinder is connected to a smaller cylinder.
  • the virtual model is constructed by the second program algorithm, multiple elements can be connected to one element. For example, a larger cylinder can be connected to multiple smaller cylinders, resulting in a bifurcation of the virtual model.
  • the terminal screen can display the identifiers of various virtual models or the identifiers of various program algorithms, and according to the identifiers of the virtual models or the identifiers of the program algorithms selected by the user, combined with the trajectory input by the user, a virtual model corresponding to the identifiers is generated.
  • Model Therefore, the virtual model is more in line with the user's needs, that is, the virtual model is generated in real time according to the user's needs, and the flexibility of the virtual model is further improved.
  • the shape of the virtual model is not limited to horns and antlers, and may also have other shapes.
  • the program algorithm for constructing the virtual model is also not limited to the first program algorithm and the second program algorithm, and other program algorithms are also possible.
  • FIG. 15 is a schematic structural diagram of an image processing apparatus according to an embodiment of the disclosure.
  • the image processing apparatus provided by the embodiment of the present disclosure may be configured in a client or may be configured in a server, and the image processing apparatus 150 specifically includes:
  • an acquisition module 151 configured to acquire the sliding track input by the user on the display component
  • a generating module 152 configured to generate a first virtual model corresponding to the sliding trajectory according to the sliding trajectory
  • the display module 153 is configured to display the first virtual model at a first position in the target image.
  • the generating module 152 includes: a determining unit 1521, a converting unit 1522 and a generating unit 1523;
  • a determining unit 1521 configured to determine a plurality of target points related to the sliding trajectory according to the sliding trajectory
  • the obtaining module 151 is further configured to: obtain a preset sub-model corresponding to each target point in the plurality of target points;
  • Conversion unit 1522 is used to convert the preset sub-model corresponding to each target point into a target sub-model according to the geometric information of each target point in the plurality of target points;
  • the generating unit 1523 is configured to generate a first virtual model corresponding to the sliding track according to the target sub-model corresponding to each target point respectively.
  • the determining unit 1521 determines, according to the sliding track, multiple target points related to the sliding track, it is specifically configured to: determine, according to the sliding track, multiple track points in the sliding track; The plurality of trajectory points are fitted and calculated to obtain a fitting curve; the fitting curve is sampled to obtain a plurality of target points related to the sliding trajectory, and the target points include the points on the fitting curve. Sampling point.
  • the geometric information of the target point includes at least one of the following:
  • the geometric information of the target point includes an offset of the target point relative to a starting trajectory point among the plurality of trajectory points and a tangent direction of the target point on the fitting curve.
  • the conversion unit 1522 is specifically configured to: according to the offset of the target point relative to the starting trajectory point and the tangent direction of the target point on the fitting curve, convert the preset corresponding to the target point. It is assumed that a plurality of first points on the sub-model are converted into a plurality of corresponding second points; and a target sub-model corresponding to the target point is generated according to the plurality of second points.
  • the conversion unit 1522 converts the preset sub-point corresponding to the target point according to the offset of the target point relative to the starting trajectory point and the tangent direction of the target point on the fitting curve.
  • the multiple first points on the model are converted into the corresponding multiple second points, it is specifically used for: converting the offset of the target point relative to the starting trajectory point into a three-dimensional offset; converting the offset The tangent direction of the target point on the fitting curve is converted into a three-dimensional tangent direction; according to the three-dimensional offset and the three-dimensional tangent direction, a plurality of first points on the preset sub-model corresponding to the target point are converted Convert to the corresponding multiple second points.
  • the converting unit 1522 converts a plurality of first points on the preset sub-model corresponding to the target point into a plurality of corresponding second points according to the three-dimensional offset and the three-dimensional tangent direction, It is specifically used for: converting a plurality of first points on the preset sub-model corresponding to the target point into corresponding Multiple second points.
  • the generating unit 1523 when the generating unit 1523 generates the first virtual model corresponding to the sliding track according to the target sub-model corresponding to each target point, the generating unit 1523 is specifically used for: according to the identification of each target point, The target sub-models corresponding to each target point are connected to obtain a first virtual model corresponding to the sliding track; wherein, the identification of the target point is used to determine the target sub-model corresponding to the target point. position in the first virtual model.
  • the image processing apparatus 150 further includes: an adjustment module 154, configured to adjust the direction of the first virtual model according to the sliding direction of the sliding track.
  • the adjustment module 154 is specifically configured to: determine the relative relationship between the starting track point in the sliding track and other tracks in the sliding track. The direction of the point; the aggregation calculation is performed on the direction of the initial trajectory point in the sliding trajectory relative to other trajectory points in the sliding trajectory to obtain the aggregation direction; the direction of the first virtual model is adjusted according to the aggregation direction.
  • the display module 153 when displaying the first virtual model at the first position in the target image, is specifically configured to: display the first virtual model at the first position of the target object in the target image.
  • the image processing apparatus 150 further includes: a determining module 155 and a receiving module 156, the receiving module 156 is configured to receive the mirror image after the display module 153 displays the first virtual model at the first position of the target object in the target image control instruction; the determining module 155 is configured to, in response to the mirror image control instruction, determine a second position on the target object that is symmetrical with the first position; the display module 153 is further configured to: display on the second position
  • the first virtual models are mutually mirrored second virtual models.
  • the adjustment module 154 is further configured to: after the display module 153 displays the first virtual model at the first position in the target image, adjust the parameters of the first virtual model; according to the adjusted parameters, The first virtual model is updated.
  • the adjustment module 154 when adjusting the parameters of the first virtual model, is specifically configured to: receive a parameter adjustment instruction for the first virtual model; and adjust the first virtual model in response to the parameter adjustment instruction parameter.
  • the obtaining module 151 is further configured to: obtain audio information; when adjusting the parameters of the first virtual model, the adjustment module 154 is specifically configured to: adjust the parameters of the first virtual model according to the parameters of the audio information .
  • the image processing apparatus 150 further includes: an audio playback module 157; before the acquisition module 151 acquires audio information, the receiving module 156 is used to receive an audio information playback instruction; the audio playback module 157 is used to respond to the audio information playback instruction , play the audio information.
  • an audio playback module 157 before the acquisition module 151 acquires audio information, the receiving module 156 is used to receive an audio information playback instruction; the audio playback module 157 is used to respond to the audio information playback instruction , play the audio information.
  • the image processing apparatus 150 further includes: a collection module 158; the collection module 158 is configured to collect audio information in the surrounding environment.
  • the image processing apparatus provided by the embodiments of the present disclosure can execute the steps executed by the client or the server in the image processing method provided by the method embodiments of the present disclosure, and the execution steps and beneficial effects will not be repeated here.
  • FIG. 16 is a schematic structural diagram of an electronic device according to an embodiment of the disclosure. Referring specifically to FIG. 16 below, it shows a schematic structural diagram of an electronic device 1600 suitable for implementing an embodiment of the present disclosure.
  • the electronic device 1600 in the embodiment of the present disclosure may include, but is not limited to, such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle-mounted terminal ( For example, mobile terminals such as car navigation terminals) and the like, and stationary terminals such as digital TVs, desktop computers, and the like.
  • the electronic device shown in FIG. 16 is only an example, and should not impose any limitation on the function and scope of use of the embodiments of the present disclosure.
  • electronic device 1600 may include processing means (eg, central processing unit, graphics processor, etc.) 1601, which may be loaded into random access according to a program stored in read only memory (ROM) 1602 or from storage means 1608 Various appropriate actions and processes are executed by the programs in the memory (RAM) 1603 . In the RAM 1603, various programs and data necessary for the operation of the electronic device 1600 are also stored.
  • the processing device 1601, the ROM 1602, and the RAM 1603 are connected to each other through a bus 1604.
  • Input/output (I/O) interface 1605 is also connected to bus 1604 .
  • the following devices can be connected to the I/O interface 1605: input devices 1606 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; including, for example, a liquid crystal display (LCD), speakers, vibration An output device 1607 of a computer, etc.; a storage device 1608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1609. Communication means 1609 may allow electronic device 1600 to communicate wirelessly or by wire with other devices to exchange data. While FIG. 16 shows an electronic device 1600 having various means, it should be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
  • embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated in the flowchart.
  • the computer program may be downloaded and installed from a network via communication device 1609, or from storage device 1608, or from ROM 1602.
  • the processing apparatus 1601 the above-mentioned functions defined in the methods of the embodiments of the present disclosure are executed.
  • the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the above two.
  • the computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or a combination of any of the above. More specific examples of computer readable storage media may include, but are not limited to, electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable Programmable read only memory (EPROM or flash memory), fiber optics, portable compact disk read only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
  • a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave with computer-readable program code embodied thereon. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • a computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device .
  • Program code embodied on a computer readable medium may be transmitted using any suitable medium including, but not limited to, electrical wire, optical fiber cable, RF (radio frequency), etc., or any suitable combination of the foregoing.
  • the client and server can use any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol) to communicate, and can communicate with digital data in any form or medium Communication (eg, a communication network) interconnects.
  • HTTP HyperText Transfer Protocol
  • Examples of communication networks include local area networks (“LAN”), wide area networks (“WAN”), the Internet (eg, the Internet), and peer-to-peer networks (eg, ad hoc peer-to-peer networks), as well as any currently known or future development network of.
  • the above-mentioned computer-readable medium may be included in the above-mentioned electronic device; or may exist alone without being assembled into the electronic device.
  • the above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by the electronic device, the electronic device:
  • the first virtual model is displayed at a first position in the target image.
  • the electronic device may also perform other steps in the above-mentioned image processing method.
  • Computer program code for performing operations of the present disclosure may be written in one or more programming languages, including but not limited to object-oriented programming languages—such as Java, Smalltalk, C++, and This includes conventional procedural programming languages - such as the "C" language or similar programming languages.
  • the program code 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.
  • 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 Internet connection).
  • LAN local area network
  • WAN wide area network
  • each block in the flowchart or block diagrams may represent a module, segment, or portion of code that contains one or more logical functions for implementing the specified functions executable instructions.
  • the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved.
  • 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 operations , or can be implemented in a combination of dedicated hardware and computer instructions.
  • the units involved in the embodiments of the present disclosure may be implemented in a software manner, and may also be implemented in a hardware manner. Among them, the name of the unit does not constitute a limitation of the unit itself under certain circumstances.
  • exemplary types of hardware logic components include: Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), Systems on Chips (SOCs), Complex Programmable Logical Devices (CPLDs) and more.
  • FPGAs Field Programmable Gate Arrays
  • ASICs Application Specific Integrated Circuits
  • ASSPs Application Specific Standard Products
  • SOCs Systems on Chips
  • CPLDs Complex Programmable Logical Devices
  • a machine-readable medium may be a tangible medium that may contain or store a program for use by or in connection with the instruction execution system, apparatus or device.
  • the machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium.
  • Machine-readable media may include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or devices, or any suitable combination of the foregoing.
  • machine-readable storage media would include one or more wire-based electrical connections, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), fiber optics, compact disk read only memory (CD-ROM), optical storage, magnetic storage, or any suitable combination of the foregoing.
  • RAM random access memory
  • ROM read only memory
  • EPROM or flash memory erasable programmable read only memory
  • CD-ROM compact disk read only memory
  • magnetic storage or any suitable combination of the foregoing.
  • the present disclosure provides an image processing method, including:
  • the first virtual model is displayed at a first position in the target image.
  • generating a first virtual model corresponding to the sliding trajectory according to the sliding trajectory includes:
  • the preset sub-model corresponding to each target point is converted into a target sub-model
  • a first virtual model corresponding to the sliding track is generated.
  • determining a plurality of target points related to the sliding trajectory according to the sliding trajectory including:
  • the sliding trajectory determine a plurality of trajectory points in the sliding trajectory
  • Fitting calculation is performed on the plurality of trajectory points to obtain a fitting curve
  • the fitting curve is sampled, and multiple sampling points on the fitting curve are used as multiple target points related to the sliding track.
  • the geometric information of the target point includes at least one of the following:
  • the preset sub-model corresponding to each target point is converted into a target sub-model, including:
  • the preset sub-model corresponding to the target point is converted into a target sub-model.
  • the preset sub-model corresponding to the target point is converted into the target sub-model, including:
  • a plurality of first Points are converted to corresponding multiple second points;
  • a target sub-model corresponding to the target points is generated according to the plurality of second points.
  • the image processing method provided by the present disclosure according to the offset of the target point relative to the starting trajectory point and the target point on the fitting curve
  • the tangent direction of the target point is converted from a plurality of first points on the preset sub-model corresponding to the target point to a plurality of corresponding second points, including:
  • a plurality of first points on the preset sub-model corresponding to the target point are converted into a plurality of corresponding second points.
  • multiple The first point is converted to corresponding multiple second points, including:
  • the 3D offset, the 3D tangent direction, and the scaling value corresponding to the target point convert a plurality of first points on the preset sub-model corresponding to the target point to a plurality of corresponding second points point.
  • generating a first virtual model corresponding to the sliding trajectory according to the target sub-model corresponding to each target point including:
  • the target sub-models corresponding to each target point are connected to obtain a first virtual model corresponding to the sliding track;
  • the identifier of the target point is used to determine the position of the target sub-model corresponding to the target point in the first virtual model.
  • the method further includes:
  • adjusting the direction of the first virtual model according to the sliding direction of the sliding track includes:
  • the direction of the first virtual model is adjusted.
  • displaying the first virtual model at the first position in the target image includes:
  • the first virtual model is displayed at the first position of the target object in the target image.
  • the method further includes:
  • a second virtual model mirroring the first virtual model is displayed at the second position.
  • the method further includes:
  • the first virtual model is updated according to the adjusted parameters.
  • adjusting the parameters of the first virtual model includes:
  • parameters of the first virtual model are adjusted.
  • adjusting the parameters of the first virtual model includes:
  • the parameters of the first virtual model are adjusted according to the parameters of the audio information.
  • the method before acquiring the audio information, the method further includes:
  • the audio information is played.
  • acquiring audio information includes:
  • the present disclosure provides an image processing apparatus, including:
  • the acquisition module is used to acquire the sliding track input by the user on the display component
  • a generating module configured to generate a first virtual model corresponding to the sliding trajectory according to the sliding trajectory
  • the display module is used for displaying the first virtual model in the first position in the target image.
  • the present disclosure provides an image processing apparatus, and the generating module includes: a determining unit, a converting unit, and a generating unit;
  • a determining unit configured to determine a plurality of target points related to the sliding trajectory according to the sliding trajectory
  • the acquisition module is also used for: acquiring a preset sub-model corresponding to each target point in the plurality of target points; a conversion unit for converting each target point according to the geometric information of each target point in the plurality of target points; The preset sub-model corresponding to the target point is converted into the target sub-model;
  • a generating unit configured to generate a first virtual model corresponding to the sliding track according to the target sub-models corresponding to each target point respectively.
  • the present disclosure provides an image processing apparatus, when the determining unit determines, according to the sliding trajectory, multiple target points related to the sliding trajectory, specifically for: according to the sliding trajectory sliding track, determining multiple track points in the sliding track; performing fitting calculation on the multiple track points to obtain a fitting curve; sampling the fitting curve, sampling points are used as multiple target points related to the sliding trajectory.
  • the present disclosure provides an image processing apparatus, and the geometric information of the target point includes at least one of the following:
  • the present disclosure provides an image processing apparatus, and the conversion unit is specifically configured to: according to the offset of the target point relative to the starting trajectory point and the position of the target point in For the tangent direction on the fitting curve, the plurality of first points on the preset sub-model corresponding to the target point are converted into a plurality of corresponding second points; Describe the target sub-model corresponding to the target point.
  • the present disclosure provides an image processing apparatus, and the conversion unit is specifically configured to: convert the offset of the target point relative to the starting trajectory point into a three-dimensional offset ; Convert the tangent direction of the target point on the fitting curve into a three-dimensional tangent direction; A first point is converted into a corresponding plurality of second points.
  • the present disclosure provides an image processing apparatus, wherein the conversion unit converts the image on the preset sub-model corresponding to the target point according to the three-dimensional offset and the three-dimensional tangent direction.
  • the conversion unit converts the image on the preset sub-model corresponding to the target point according to the three-dimensional offset and the three-dimensional tangent direction.
  • the present disclosure provides an image processing apparatus, wherein the generating unit generates a first virtual model corresponding to the sliding trajectory according to the target sub-model corresponding to each target point respectively, when generating the first virtual model corresponding to the sliding trajectory , which is specifically used to: connect the target sub-models corresponding to each target point according to the identifier of each target point, and obtain the first virtual model corresponding to the sliding track; wherein, the target point The identifier of is used to determine the position of the target sub-model corresponding to the target point in the first virtual model.
  • the present disclosure provides an image processing apparatus, and the image processing apparatus further includes: an adjustment module, configured to adjust the sliding direction of the first virtual model according to the sliding direction of the sliding track. direction.
  • the present disclosure provides an image processing apparatus, when the adjustment module adjusts the direction of the first virtual model according to the sliding direction of the sliding track, it is specifically configured to: determine the direction of the starting track point in the sliding track relative to other track points in the sliding track; perform aggregation calculation on the direction of the starting track point in the sliding track relative to other track points in the sliding track to obtain the aggregation direction; According to the aggregation direction, the direction of the first virtual model is adjusted.
  • the present disclosure provides an image processing apparatus.
  • the display module displays the first virtual model in a first position in a target image, it is specifically configured to: display the first virtual model at a first position in a target image.
  • the virtual model is displayed at the first position of the target object in the target image.
  • the present disclosure provides an image processing apparatus, the image processing apparatus further includes: a determining module and a receiving module, where the receiving module is used for the display module to display the first virtual model on a target After the first position of the target object in the image, a mirror image control instruction is received; the determining module is configured to, in response to the mirror image control instruction, determine a second position on the target object that is symmetrical with the first position; the display module is further configured to : Display a second virtual model that is a mirror image of the first virtual model at the second position.
  • the present disclosure provides an image processing apparatus, and the adjustment module is further configured to: after the display module displays the first virtual model in a first position in a target image, adjust the parameters of the first virtual model; according to the adjusted parameters, the first virtual model is updated.
  • the present disclosure provides an image processing apparatus, when the adjustment module adjusts the parameters of the first virtual model, it is specifically configured to: receive a parameter adjustment instruction for the first virtual model ; in response to the parameter adjustment instruction, adjust the parameters of the first virtual model.
  • the present disclosure provides an image processing apparatus, wherein the acquisition module is further configured to: acquire audio information; when the adjustment module adjusts the parameters of the first virtual model, it is specifically configured to: parameters of the audio information, and adjust the parameters of the first virtual model.
  • the present disclosure provides an image processing apparatus, the image processing apparatus further includes: an audio playback module; before the acquisition module acquires audio information, the receiving module is configured to receive audio information playback instructions; audio The playing module is configured to play the audio information in response to the audio information playing instruction.
  • the present disclosure provides an image processing apparatus, the image processing apparatus further includes: an acquisition module; the acquisition module is configured to acquire audio information in a surrounding environment.
  • the present disclosure provides an electronic device, comprising:
  • processors one or more processors
  • memory for storing one or more programs
  • the one or more processors When the one or more programs are executed by the one or more processors, the one or more processors implement the image processing method as provided in any one of the present disclosure.
  • the present disclosure provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, realizes image processing as described in any one of the present disclosure method.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Geometry (AREA)
  • Computer Graphics (AREA)
  • Software Systems (AREA)
  • Architecture (AREA)
  • Computer Hardware Design (AREA)
  • Processing Or Creating Images (AREA)
  • Image Processing (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

一种图像处理方法、装置、电子设备和存储介质,该方法包括:获取用户在显示组件上输入的滑动轨迹(S101);根据所述滑动轨迹,生成与所述滑动轨迹对应的第一虚拟模型(S102);将所述第一虚拟模型显示在目标图像中的第一位置(S103)。该方法通过获取用户在显示组件上输入的滑动轨迹,生成与该滑动轨迹对应的虚拟模型,并将虚拟模型显示在目标图像中的第一位置上,从而使得目标图像中的虚拟模型可以随着用户输入的滑动轨迹的变化而变化,即可以根据用户输入的滑动轨迹实时生成满足用户需求的虚拟模型,从而提高了虚拟模型显示的灵活性。

Description

一种图像处理方法、装置、电子设备和存储介质
本申请要求于2020年08月31日提交国家知识产权局、申请号为202010901576.0、申请名称为“一种图像处理方法、装置、电子设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本公开涉及信息技术领域,尤其涉及一种图像处理方法、装置、电子设备和存储介质。
背景技术
随着智能终端的发展,越来越多的应用程序(Application,APP)可以安装在智能终端中,并为用户提供相应的服务。
例如,现有技术中的应用程序可以在预设图像或终端设备采集的图像中增加虚拟模型,以增强图像的趣味性。
但是,现有技术在预设图像或智能终端采集的图像中增加的虚拟模型是预先设置好的,例如,虚拟模型可以预先存储在应用程序、终端设备或远程服务器中,用户可以选择的虚拟模型比较局限,降低了虚拟模型显示的灵活性。
发明内容
为了解决上述技术问题或者至少部分地解决上述技术问题,本公开实施例提供了一种图像处理方法、装置、电子设备和存储介质,可以根据用户输入的滑动轨迹实时生成满足用户需求的虚拟模型,从而提高了虚拟模型的灵活性。
本公开实施例提供了一种图像处理方法,包括:
获取用户在显示组件上输入的滑动轨迹;
根据所述滑动轨迹,生成与所述滑动轨迹对应的第一虚拟模型;
将所述第一虚拟模型显示在目标图像中的第一位置。
本公开实施例还提供了一种图像处理装置,包括:
获取模块,用于获取用户在显示组件上输入的滑动轨迹;
生成模块,用于根据所述滑动轨迹,生成与所述滑动轨迹对应的第一虚拟模型;
显示模块,用于将所述第一虚拟模型显示在目标图像中的第一位置。
本公开实施例还提供了一种电子设备,所述电子设备包括:
一个或多个处理器;
存储装置,用于存储一个或多个程序;
当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如上所述的图像处理方法。
本公开实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如上所述的图像处理方法。
本公开实施例提供的技术方案与现有技术相比具有如下优点:本公开实施例提供的图 像处理方法,通过获取用户在显示组件上输入的滑动轨迹,生成与该滑动轨迹对应的虚拟模型,并将虚拟模型显示在目标图像中的第一位置上,从而可以根据用户输入的不同的滑动轨迹,生成不同的虚拟模型,例如,当滑动轨迹的形状不同时,虚拟模型的形状也不同,从而使得目标图像中的虚拟模型可以随着用户输入的滑动轨迹的变化而变化,即可以根据用户输入的滑动轨迹实时生成满足用户需求的虚拟模型,从而提高了虚拟模型显示的灵活性。
附图说明
结合附图并参考以下具体实施方式,本公开各实施例的上述和其他特征、优点及方面将变得更加明显。贯穿附图中,相同或相似的附图标记表示相同或相似的元素。应当理解附图是示意性的,原件和元素不一定按照比例绘制。
图1为本公开实施例中的一种图像处理方法的流程图;
图2为本公开实施例中的滑动轨迹的示意图;
图3为本公开实施例中的人脸图像的示意图;
图4为本公开实施例中的虚拟模型的示意图;
图5为本公开实施例中的互为镜像的虚拟模型的示意图;
图6为本公开实施例中的另一种图像处理方法的流程图;
图7为本公开实施例中的轨迹点的示意图;
图8为本公开实施例中的预设子模型和目标子模型的示意图;
图9为本公开实施例中的虚拟模型的示意图;
图10为本公开实施例中的另一种图像处理方法的流程图;
图11为本公开实施例中的滑动轨迹与虚拟模型的示意图;
图12为本公开实施例中的另一种图像处理方法的流程图;
图13为本公开实施例中的用户界面的示意图;
图14为本公开实施例中的另一种图像处理方法的流程图;
图15为本公开实施例中的一种图像处理装置的结构示意图;
图16为本公开实施例中的一种电子设备的结构示意图。
具体实施方式
下面将参照附图更详细地描述本公开的实施例。虽然附图中显示了本公开的某些实施例,然而应当理解的是,本公开可以通过各种形式来实现,而且不应该被解释为限于这里阐述的实施例,相反提供这些实施例是为了更加透彻和完整地理解本公开。应当理解的是,本公开的附图及实施例仅用于示例性作用,并非用于限制本公开的保护范围。
应当理解,本公开的方法实施方式中记载的各个步骤可以按照不同的顺序执行,和/或并行执行。此外,方法实施方式可以包括附加的步骤和/或省略执行示出的步骤。本公开的范围在此方面不受限制。
本文使用的术语“包括”及其变形是开放性包括,即“包括但不限于”。术语“基于”是“至少部分地基于”。术语“一个实施例”表示“至少一个实施例”;术语“另一实施例” 表示“至少一个另外的实施例”;术语“一些实施例”表示“至少一些实施例”。其他术语的相关定义将在下文描述中给出。
需要注意,本公开中提及的“第一”、“第二”等概念仅用于对不同的装置、模块或单元进行区分,并非用于限定这些装置、模块或单元所执行的功能的顺序或者相互依存关系。
需要注意,本公开中提及的“一个”、“多个”的修饰是示意性而非限制性的,本领域技术人员应当理解,除非在上下文另有明确指出,否则应该理解为“一个或多个”。
本公开实施方式中的多个装置之间所交互的消息或者信息的名称仅用于说明性的目的,而并不是用于对这些消息或信息的范围进行限制。
图1为本公开实施例中的一种图像处理方法的流程图,本实施例可适用于客户端中进行图像处理的情况,该方法可以由图像处理装置执行,该装置可以采用软件和/或硬件的方式实现,该装置可配置于电子设备中,例如移动终端,具体包括手机、电脑或平板电脑等。或者,本实施例可适用于服务端中进行图像处理的情况,该方法可以由图像处理装置执行,该装置可以采用软件和/或硬件的方式实现,该装置可配置于电子设备中,例如服务器。
如图1所示,该方法具体可以包括:
S101、获取用户在显示组件上输入的滑动轨迹。
如图2所示,终端21可设置有显示组件,该显示组件具体可以包括屏幕,例如可以是触摸屏。终端21可以获取用户在该触摸屏上输入的滑动轨迹。或者,终端21可与外界的显示组件,例如触摸板连接,终端21获取用户在该触摸板上输入的滑动轨迹。
具体的,终端21还可安装有摄像头。当用户打开终端21的相机按钮时,该摄像头可用于采集图像,例如人脸图像。或者,该终端21可安装有图像类或视频类的应用程序,当该应用程序调用该摄像头时,该摄像头采集图像,并且采集的图像可以在该显示组件上形成预览。在本公开实施例中,终端21可以在图像中增加虚拟模型。例如,当用户需要在图像上显示虚拟模型时,用户可以在显示组件上进行滑动,从而使得终端21可以获取到用户在显示组件上的滑动轨迹。或者终端21的显示组件或应用程序的用户界面上可显示有虚拟模型触发按键,终端21可以根据用户对该虚拟模型触发按键的操作,检测并获取用户在显示组件上输入的滑动轨迹。如图2所示,该滑动轨迹可以是一段连续的曲线。在一些可能的实现方式中,滑动轨迹也可以是直线。本实施例对此不作限定。
S102、根据所述滑动轨迹,生成与所述滑动轨迹对应的第一虚拟模型。
进一步,终端21可根据该滑动轨迹生成一个与该滑动轨迹对应的虚拟模型,该虚拟模型记为第一虚拟模型。该虚拟模型可以是三维模型,或者也可以是二维模型。由于第一虚拟模型是根据用户在屏幕上的滑动轨迹生成的,因此,第一虚拟模型的形状和滑动轨迹的形状相类似。例如,以图2中的滑动轨迹为例,该滑动轨迹对应的第一虚拟模型可以是一个类似于牛角的虚拟模型。
S103、将所述第一虚拟模型显示在目标图像中的第一位置。
如图3所示,终端21的屏幕上可以显示有目标图像,该目标图像例如,可以包括人脸图像。进一步,以图2中的滑动轨迹为例,基于该滑动轨迹,终端生成与该滑动轨迹对应的类似于牛角的第一虚拟模型。终端21可以将该类似于牛角的第一虚拟模型显示在人脸图 像中的第一位置,该第一位置可以是预设位置,或者该第一位置可以是随机位置。
当第一位置为预设位置时,该预设位置可以是用户确定的,例如,该预设位置可以是用户在显示组件或人脸图像中选择的位置。或者,该预设位置还可以是终端21预先确定的显示组件或人脸图像中的某一位置。本实施例并不对该预设位置进行具体限定。在图3中的示例性图示中,该第一位置可以是人脸图像中人脸的额头某一位置,该第一位置记为(μ,ν)。其中,(μ,ν)可以表示该第一位置在人脸坐标系中的坐标。
具体的,终端21可以将类似于牛角的第一虚拟模型23吸附在该第一位置(μ,ν)上,如图4所示,22表示第一位置(μ,ν),23表示吸附在(μ,ν)上的第一虚拟模型。其中,终端21可以通过贴图等方式将第一虚拟模型23在第一位置(μ,ν)上。
本公开实施例提供的图像处理方法,通过获取用户在显示组件上输入的滑动轨迹,生成与该滑动轨迹对应的虚拟模型,并将虚拟模型显示在目标图像中的第一位置上,从而可以根据用户输入的不同的滑动轨迹,生成不同的虚拟模型,例如,当滑动轨迹的形状不同时,虚拟模型的形状也不同。从而使得目标图像中的虚拟模型可以随着用户输入的滑动轨迹的变化而变化,即可以根据用户输入的滑动轨迹实时生成满足用户需求的虚拟模型,从而提高了虚拟模型显示的灵活性。
在上述实施例的基础上,将所述第一虚拟模型显示在目标图像中的第一位置,包括:将所述第一虚拟模型显示在目标图像中目标物体的第一位置。
如图4所示,终端21可以将第一虚拟模型23吸附在人脸第一位置22。终端21在将第一虚拟模型23吸附在人脸第一位置22时,具体可以将第一虚拟模型23底面的中心点与人脸第一位置22重合。在一个实施例中,该第一位置22上的点具体可以是人脸图像中人脸的某个关键点。另外,该第一位置上的关键点在三维空间中的朝向与第一虚拟模型23所在的模型坐标系的Y轴一致。其中,关键点在三维空间中的朝向可以通过机器学习的算法来确定。模型坐标系的Y轴方向可以是经过第一虚拟模型23的底面中心点并且垂直于该底面的方向。
可选的,将所述第一虚拟模型显示在目标图像中目标物体的第一位置之后,所述方法还包括:接收镜像控制指令;响应于所述镜像控制指令,确定所述目标物体上与所述第一位置对称的第二位置;在所述第二位置上显示与所述第一虚拟模型互为镜像的第二虚拟模型。
在一个实施例中,终端21可以接收用户的触发操作,例如,对屏幕中的“镜像”按钮的触发、语音触发、手势触发、表情触发等等,确定所述人脸上与所述第一位置对称的第二位置,并在所述第二位置上显示与所述第一虚拟模型互为镜像的第二虚拟模型。在另一个实施例中,终端21还可以在将所述第一虚拟模型显示在目标图像中人脸的第一位置之后,立即或者经过预定时间段,确定所述人脸上与所述第一位置对称的第二位置,并在所述第二位置上显示与所述第一虚拟模型互为镜像的第二虚拟模型。
例如图4所示,终端21的显示组件或应用程序的用户界面上还可以显示有镜像按键134。终端21在将第一虚拟模型23吸附在人脸第一位置22之后,用户可以对镜像按键134 进行触发操作,并且该触发操作可以触发终端21生成镜像控制指令。进一步,终端21可以响应于该镜像控制指令,确定出人脸上与该第一位置(μ,ν)相对称的第二位置,例如,该第二位置记为(1-μ,ν)。其中,(μ,ν)和(1-μ,ν)均是人脸坐标系中的坐标。进一步,终端21可以在该第二位置(1-μ,ν)上显示与第一虚拟模型23互为镜像的第二虚拟模型。如图5所示,24表示第二位置(1-μ,ν),25表示吸附在(1-μ,ν)上的第二虚拟模型25。
具体的,终端21在该第二位置(1-μ,ν)上显示与第一虚拟模型23互为镜像的第二虚拟模型,可包括如下几种可行的实现方式:
在一种可能的实现方式中,在图4的基础上,终端21可以先将第一虚拟模型23旋转180度,得到第二虚拟模型25,然后将第二虚拟模型25吸附在第二位置24上。
在另一种可能的实现方式中,在图4的基础上,终端21可以先将第一虚拟模型23吸附在第二位置24上。然后,对吸附在第二位置24上的第一虚拟模型23进行180度旋转,得到第二虚拟模型25。
本公开实施例提供的图像处理方法,通过确定目标图像中与第一位置对称的第二位置,并在第二位置上显示与第一虚拟模型互为镜像的第二虚拟模型,从而使得第一位置上吸附的第一虚拟模型和第二位置上吸附的第二虚拟模型形成一种镜像的效果。不仅节省了重新构建第二虚拟模型所需的计算量,同时还进一步提高了目标图像中虚拟模型显示的灵活性和美感。
图4中以人脸图像作为示例进行示例性的说明。本领域技术人员应当理解的是,在其他实施例中,目标图像不限于人脸图像,例如,还可以是其他物体图像。目标物体也不限于是人脸,例如可以是其他物体等等。本公开不对此进行限制。
如图2所示,用户在屏幕中输入了滑动轨迹,下面以终端21为例来介绍一下,终端21根据该滑动轨迹生成与该滑动轨迹对应的第一虚拟模型的过程。在上述实施例的基础上,根据所述滑动轨迹,生成与所述滑动轨迹对应的第一虚拟模型,包括如图6所示的如下几个步骤:
S601、根据所述滑动轨迹,确定与所述滑动轨迹相关的多个目标点。
如图2所示,当用户在屏幕中输入滑动轨迹后,终端21可以根据该滑动轨迹,确定与该滑动轨迹相关的多个目标点。
在一种可能的方式中,与该滑动轨迹相关的多个目标点具体可以是该滑动轨迹的多个轨迹点或多个采样点。如图7所示,滑动轨迹可以由多个轨迹点构成,每个轨迹点可以作为一个目标点。或者,终端21可以在滑动轨迹上进行均匀采样或非均匀采样得到多个采样点,每个采样点可以作为一个目标点。例如,目标点71可以是多个目标点中任意的一个目标点。
在另一种可能的方式中,根据所述滑动轨迹,确定与所述滑动轨迹相关的多个目标点,包括:根据所述滑动轨迹,确定所述滑动轨迹中的多个轨迹点;对所述多个轨迹点进行拟合计算,得到拟合曲线;对所述拟合曲线进行采样,获得与滑动轨迹相关的多个目标点。其中,目标点包括所述拟合曲线上的采样点。
当用户在屏幕中输入滑动轨迹后,终端21可以根据该滑动轨迹获得该滑动轨迹上的轨迹点,该轨迹点可以是一个或多个。本实施例以多个轨迹点为例进行示意性说明。假设图7所示的多个点可以是滑动轨迹上的多个轨迹点。多个轨迹点可以构成一个点集,该点集记为P,P={P1,P2,P3,......,Pn}。其中,P1,P2,P3,......,Pn分别表示轨迹点。例如,点集P中包括n个轨迹点。此处并不限定n的具体值。具体的,P1,P2,P3,......,Pn分别可以是二维点,也就是说,点集P可以是一个二维点集。例如,P1,P2,P3,......,Pn可以是屏幕坐标系中的二维点,该屏幕坐标系的坐标原点可以是屏幕的右下角。
由于在滑动轨迹生成的过程中,该滑动轨迹上每个轨迹点对应的滑动速度不均匀,因此,P1,P2,P3,......,Pn在滑动轨迹上的分布可能不均匀。本实施例中,可以选用预设的拟合算法对P1,P2,P3,......,Pn进行拟合计算,得到拟合曲线。其中,本实施例并不对该拟合算法进行具体限定,例如,拟合出的拟合曲线可以是三次样条拟合曲线。该拟合曲线可以表示为y=ax3+bx2+cx+d。其中,x表示拟合曲线上的任意一点在屏幕坐标系的X轴上的坐标,y表示拟合曲线上的任意一点在屏幕坐标系的Y轴上的坐标。a、b、c、d分别表示拟合系数。
进一步,终端21可以对拟合曲线进行采样,例如,均匀采样或非均匀采样,得到拟合曲线上的采样点,该采样点可以是一个或多个。具体的,以多个采样点为例进行示意性说明。例如,多个采样点可记为C1,C2,C3,......,Cm,即采样点为m个,此处并不对m的具体值进行限定,也不限定n和m的大小关系。进一步,终端21可以将采样点C1,C2,C3,......,Cm作为与滑动轨迹相关的多个目标点。每一个采样点可作为一个目标点。同理,C1,C2,C3,......,Cm可以是屏幕坐标系中的二维点。
S602、获取与所述多个目标点中每个目标点对应的预设子模型。
以C1,C2,C3,......,Cm作为与滑动轨迹相关的多个目标点为例,每个目标点可对应有一个预设子模型。其中,不同目标点对应的预设子模型可以相同,也可以不同。另外,本实施例并不限定每个目标点对应的预设子模型的形状,例如,可以是规则体或不规则体,或者也可以是规则的平面图形或不规则的平面图形。
具体的,终端21在确定出与滑动轨迹相关的多个目标点后,还可以获取多个目标点中每个目标点对应的预设子模型。
S603、根据所述多个目标点中每个目标点的几何信息,将每个目标点对应的预设子模型转换为目标子模型。
具体的,C1,C2,C3,......,Cm中不同目标点对应的预设子模型的形状可以不同,例如,目标点C1对应的预设子模型为圆柱体,目标点C2对应的预设子模型为圆锥体。
或者,C1,C2,C3,......,Cm中不同目标点对应的预设子模型的形状可以相同,例如,均为圆柱体。其中,不同目标点对应的圆柱体的大小可以相同,也可以不同。
本实施例以C1,C2,C3,......,Cm中不同目标点对应的预设子模型均为圆柱体、并且不同目标点对应的圆柱体的大小不同为例进行示意性说明。例如,C1,C2,C3,......,Cm中每个目标点对应的圆柱体的大小依次减小。
进一步,将该目标点对应的预设子模型转换为目标子模型。例如,以目标点C1为例, C1对应的预设子模型为一个没有弧度的圆柱体,对预设子模型进行转换后得到的目标子模型可以是一个有弧度的圆柱体。
可选的,所述目标点的几何信息包括如下至少一种:所述目标点相对于所述多个轨迹点中起始轨迹点的偏移量;所述目标点在所述拟合曲线上的切线方向。
例如,图7所示的多个点可以是滑动轨迹上的多个轨迹点。P1,P2,P3,......,Pn中的轨迹点P1可以是滑动轨迹中的起始轨迹点。由于P1,P2,P3,......,Pn和C1,C2,C3,......,Cm均为可以是屏幕坐标系中的二维点,即P1,P2,P3,......,Pn和C1,C2,C3,......,Cm在同一个坐标系中。因此,根据目标点C1在该屏幕坐标系中的坐标和起始轨迹点P1在该屏幕坐标系中的坐标,可以确定出目标点C1相对于起始轨迹点P1的偏移量,该偏移量记为T。进一步,还可以确定出目标点C1在拟合曲线上的切线方向,该切线方向记为R。其中,目标点C1相对于起始轨迹点P1的偏移量和/或目标点C1在拟合曲线上的切线方向可记为目标点C1的几何信息。可以理解的是,目标点C1的几何信息并不限于此,还可以包括其他的几何信息。另外,除目标点C1之外,其他目标点的几何信息可以参照目标点C1的几何信息,此处不再赘述。具体的,终端21可根据C1,C2,C3,......,Cm中每个目标点的几何信息,将每个目标点对应的预设子模型转换为目标子模型。
根据所述多个目标点中每个目标点的几何信息,将每个目标点对应的预设子模型转换为目标子模型,包括:根据所述目标点相对于所述起始轨迹点的偏移量和所述目标点在所述拟合曲线上的切线方向,将所述目标点对应的预设子模型转换为目标子模型。
例如,根据目标点C1相对于起始轨迹点P1的偏移量T、以及目标点C1在拟合曲线上的切线方向R,可以将目标点C1对应的预设子模型转换为目标子模型。同理,根据其他目标点相对于起始轨迹点P1的偏移量和其他目标点在拟合曲线上的切线方向,可以将其他目标点对应的预设子模型转换为目标子模型。
可以理解的是,C1,C2,C3,......,Cm中不同目标点相对于起始轨迹点P1的偏移量可以不同。另外,C1,C2,C3,......,Cm中不同目标点在拟合曲线上的切线方向也有可能不同。因此,根据C1,C2,C3,......,Cm中不同的目标点相对于起始轨迹点P1的偏移量、以及不同的目标点在拟合曲线上的切线方向,可以将不同目标点对应的预设子模型转换为不同的目标子模型。
可选的,根据所述目标点相对于所述起始轨迹点的偏移量和所述目标点在所述拟合曲线上的切线方向,将所述目标点对应的预设子模型转换为目标子模型,包括:根据所述目标点相对于所述起始轨迹点的偏移量和所述目标点在所述拟合曲线上的切线方向,将所述目标点对应的预设子模型上的多个第一点转换为对应的多个第二点;根据所述多个第二点生成所述目标点对应的目标子模型。
例如,以目标点C1为例,C1对应的预设子模型为一个没有弧度的圆柱体,例如图8所示的圆柱体81。该圆柱体的上侧圆面、下侧圆面以及侧壁上的点均可以作为该圆柱体的顶点。根据目标点C1相对于起始轨迹点P1的偏移量T、以及目标点C1在拟合曲线上的切线方向R,可以将该圆柱体上的每个顶点坐标进行转换得到新的顶点坐标。具体的,转换之前的顶点可记为第一点,转换后的新的顶点可记为第二点。第一点和第二点一一对应。 进一步,根据新的顶点坐标,可以将新的顶点进行连接从而构成新的圆柱体。具体的,由于第一点和第二点一一对应,因此根据每个第一点之间的相对位置关系,可以确定出每个第二点之间的相对位置关系,进一步根据每个第二点之间的相对位置关系和每个第二点的坐标,可以将相邻的第二点进行连接,从而构成新的圆柱体。该新的圆柱体可以是有一定弧度的圆柱体。另外,该新的圆柱体可记为目标子模型。
可选的,根据所述目标点相对于所述起始轨迹点的偏移量和所述目标点在所述拟合曲线上的切线方向,将所述目标点对应的预设子模型上的多个第一点转换为对应的多个第二点,包括:将所述目标点相对于所述起始轨迹点的偏移量转换为三维偏移量;将所述目标点在所述拟合曲线上的切线方向转换为三维切线方向;根据所述三维偏移量和所述三维切线方向,将所述目标点对应的预设子模型上的多个第一点转换为对应的多个第二点。
例如,以目标点C1为例,C1对应的预设子模型为如图8所示的圆柱体81。该圆柱体的上侧圆面、下侧圆面以及侧壁上的点均可以作为该圆柱体的顶点,每个顶点在模型坐标系中的坐标记为V,该模型坐标系可以是一个三维的坐标系。因此,目标点C1对应的预设子模型上的每个顶点可以是一个三维点。由于目标点C1相对于起始轨迹点P1的偏移量T、以及目标点C1在拟合曲线上的切线方向R均为二维向量,因此,可以将偏移量T转换为三维偏移量,将切线方向R转换为三维切线方向。例如,将偏移量T转换成的三维偏移量记为T1,具体的,T1可以是将偏移量T转换到该模型坐标系下得到的三维偏移量,或者T1可以是在偏移量T的基础上直接增加一个第三维度值例如0后得到的三维偏移量。同理,将切线方向R转换成的三维切线方向记为R1,具体的,R1可以是将切线方向R转换到该模型坐标系下得到的三维切线方向,或者R1可以是在切线方向R的基础上直接增加一个第三维度值例如0后得到的三维切线方向。
进一步,根据T1和R1可以对目标点C1对应的预设子模型上的每个顶点的坐标V进行转换,转换后的坐标记为V1。V1、T1、R1、V之间的关系如下(1)所示:
V1=T1*R1*V      (1)
例如,目标点C1对应的预设子模型上的每个顶点记为第一点,此处,可以将第一点的坐标V进行转换后得到的坐标V1上的点记为第二点,也就是说,第一点和第二点一一对应。进一步,根据每个第一点对应的第二点可生成该预设子模型对应的目标子模型,例如,根据每个第一点的相邻点,可以确定出每个第二点的相邻点,进一步,将相邻的第二点进行连接从而构成该预设子模型对应的目标子模型。例如,该目标子模型可以是有一定弧度的圆柱体,如图8所示的圆柱体82。可以理解的是,如图8所示的转换只是一种示意性说明,并不作具体限定。
可选的,根据所述三维偏移量和所述三维切线方向,将所述目标点对应的预设子模型上的多个第一点转换为对应的多个第二点,包括:根据所述三维偏移量、所述三维切线方向、以及所述目标点对应的缩放值,将所述目标点对应的预设子模型上的多个第一点转换为对应的多个第二点。
例如,在一些实施例中,C1,C2,C3,......,Cm中不同目标点对应的预设子模型均为圆柱体,并且不同目标点对应的圆柱体的大小相同。在这种情况下,C1,C2,C3,......,Cm中不同 目标点还可以对应有不同的缩放值。例如,C1,C2,C3,......,Cm中每个目标点对应的预设子模型的缩放值依次增大,其中,缩放值越大,将预设子模型进行转换后得到的目标子模型越小。
例如,目标点C1对应的预设子模型的缩放值记为S1,V1、T1、R1、V、S1之间的关系如下(2)所示:
V1=T1*R1*V*S1      (2)
例如,目标点C1对应的预设子模型上的每个顶点记为第一点,此处,可以将第一点的坐标V进行转换后得到的坐标V1上的点记为第二点,也就是说,第一点和第二点一一对应。如图8所示,圆柱体82是对圆柱体81进行转换后得到的新的圆柱体。圆柱体82上的每个顶点记为第二点,圆柱体82上的每个顶点和圆柱体81上的每个顶点一一对应。另外,圆柱体82还可以是根据目标点C1对应的缩放值缩小后的圆柱体。
S604、根据所述每个目标点分别对应的目标子模型,生成与所述滑动轨迹对应的第一虚拟模型。
由于根据C1,C2,C3,......,Cm中不同的目标点相对于起始轨迹点P1的偏移量、以及不同的目标点在拟合曲线上的切线方向,可以将不同目标点对应的预设子模型转换为不同的目标子模型。因此,将C1,C2,C3,......,Cm中每个目标点对应的目标子模型进行连接后可以构成与用户在屏幕中的滑动轨迹对应的第一虚拟模型。具体的,将C1,C2,C3,......,Cm中每个目标点对应的目标子模型依次连接从而构成第一虚拟模型。例如,目标点C1对应的目标子模型的下侧圆面可作为第一虚拟模型的底面,目标点C1对应的目标子模型的上侧圆面可以与目标点C2对应的目标子模型的下侧圆面连接,目标点C2对应的目标子模型的上侧圆面可以与目标点C3对应的目标子模型的下侧圆面连接,以此类推,得到第一虚拟模型。也就是说,一个目标子模型上可以连接另一个目标子模型。
在其他实施例中,一个目标子模型上还可以连接有多个目标子模型。例如,一个较大的目标子模型上可以连接多个较小的目标子模型,每个较小的目标子模型上可以继续连接一个或多个更小的目标子模型,以此类推,从而使得第一虚拟模型可以出现分叉的情况。
可选的,根据所述每个目标点分别对应的目标子模型,生成与所述滑动轨迹对应的第一虚拟模型,包括:根据所述每个目标点的标识,将所述每个目标点分别对应的目标子模型进行连接,从而构成与所述滑动轨迹对应的第一虚拟模型;其中,所述目标点的标识用于确定所述目标点对应的目标子模型在所述第一虚拟模型中的位置。
如图9所示,目标子模型91可以是目标点C1对应的目标子模型,目标子模型92可以是目标点C2对应的目标子模型,以此类推。C1,C2,C3,......,Cm中每个目标点对应的目标子模型依次连接在一起,从而构成与用户在屏幕中的滑动轨迹对应的第一虚拟模型,该第一虚拟模型可以是如图9所示的90。在其他一些实施例中,C1,C2,C3,......,Cm中每个目标点对应的预设子模型经过上述方法进行转换后,每个目标点对应的目标子模型可以是已相互连接在一起的,从而可以节省额外的连接过程。
具体的,C1,C2,C3,......,Cm中的每个目标点可以对应有一个标识,例如,index。即,每个目标点可以对应有一个标识,并且每个目标点的标识可以是唯一的。具体的,每个目 标点的标识用于确定该目标点对应的目标子模型在第一虚拟模型90中的位置。可选的,每个目标子模型可以作为该第一虚拟模型90的一个元素。每个元素在该第一虚拟模型90中的位置可以记为该元素的顶点色(vertex color)。
本公开实施例提供的图像处理方法,通过用户在屏幕中输入的滑动轨迹,确定该滑动轨迹中的轨迹点,由于该滑动轨迹上每个轨迹点对应的滑动速度不均匀,因此,每个轨迹点在滑动轨迹上的分布可能不均匀。通过对每个轨迹点进行拟合计算,得到拟合曲线,进一步对拟合曲线进行采样,可使得采样点在该拟合曲线上均匀分布。进一步,根据拟合曲线上均匀分布的采样点,对每个采样点对应的预设子模型转换为目标子模型,并根据每个采样点对应的目标子模型,生成与滑动轨迹对应的第一虚拟模型,从而提高了第一虚拟模型和滑动轨迹的相似性,使得第一虚拟模型更加满足用户需求,提高了用户体验。
图10为本公开实施例中的另一种图像处理方法的流程图。本实施例在上述实施例的基础上,进一步对图像处理方法进行了具体说明。相应的,如图10所示,本实施例的方法应用于终端中,具体如下步骤:
S1001、获取用户在显示组件上输入的滑动轨迹。
具体的,S1001与上述实施例所述的获取用户在显示组件上的滑动轨迹的过程类似,此处不再赘述。
S1002、根据所述滑动轨迹,生成与所述滑动轨迹对应的第一虚拟模型。
具体的,S1002与上述实施例所述的根据所述滑动轨迹,生成与所述滑动轨迹对应的第一虚拟模型的过程类似,此处不再赘述。
S1003、根据所述滑动轨迹的滑动方向,调整所述第一虚拟模型的方向。
如图7所示,滑动轨迹的滑动方向是纵向的,例如,从上到下,或者从下到上。在其他一些实施例中,滑动轨迹的滑动方向还有可能是横向的,如图11所示,从左到右,或从右到左。在本实施例中,还可根据滑动轨迹的滑动方向,调整第一虚拟模型的方向。第一虚拟模型的方向具体可以是该第一虚拟模型所在的模型坐标系的Y轴方向。
另外,在上述实施例的基础上,根据滑动轨迹获取轨迹点P1,P2,P3,......,Pn时,可以按照滑动轨迹的滑动方向依次获取P1,P2,P3,......,Pn。此外,根据P1,P2,P3,......,Pn拟合出的拟合曲线的方向可以与滑动轨迹的滑动方向一致,对拟合曲线进行采样时,可以按照滑动轨迹的滑动方向依次采集目标点C1,C2,C3,......,Cm。
可选的,根据所述滑动轨迹的滑动方向,调整所述第一虚拟模型的方向,包括:确定所述滑动轨迹中起始轨迹点相对于所述滑动轨迹中其他轨迹点的方向;对所述滑动轨迹中起始轨迹点相对于所述滑动轨迹中其他轨迹点的方向进行聚合计算,得到聚合方向;根据所述聚合方向,调整所述第一虚拟模型的方向。
例如以图11所示的滑动轨迹为例,该滑动轨迹的滑动方向为从左到右。由于该滑动轨迹是横向的,因此,与该滑动轨迹对应的第一虚拟模型也是横向的,如图11所示的第一虚拟模型110。进一步,可以根据该滑动轨迹的滑动方向调整第一虚拟模型110的方向。
具体的,P1是该滑动轨迹中的起始轨迹点,P2是该滑动轨迹中的第二个轨迹点,以 此类推,Pn是该滑动轨迹中的第n个轨迹点。根据P1,P2,P3,......,Pn中每个轨迹点的坐标,可以确定出起始轨迹点P1相对于其他轨迹点的方向。其中,起始轨迹点P1相对于其他轨迹点的方向具体可以是起始轨迹点P1指向其他轨迹点的向量。例如,始轨迹点P1指向第二个轨迹点P2的向量记为L1,始轨迹点P1指向P3的向量记为L2,以此类推,始轨迹点P1指向Pn的向量记为L(n-1)。具体的,L1、L2、…、L(n-1)构成向量集合L,L={L1,L2,......,L(n-1)}。进一步,采用预设的聚类算法对向量集合L中的每个向量进行聚类计算,得到一个聚类后的向量,该聚类后的向量的方向记为主轴方向,该主轴方向记为聚合方向。其中,本实施例并不对该聚类算法进行具体限定。由于向量集合L中的每个向量为屏幕坐标系的二维向量,因此,聚类后的向量也是二维向量。进一步,可以将聚合方向转换到模型坐标系中得到一个三维向量。该三维向量记为K。进一步计算三维向量K与模型坐标系的Y轴之间的夹角,并将该夹角转换为三维矩阵。由于第一虚拟模型是由多个目标子模型构成的。每个目标子模型上的顶点坐标为上述实施例所述的V1,因此,第一虚拟模型上的顶点坐标为V1。将第一虚拟模型上的每个顶点坐标V1乘以该三维矩阵,从而实现对第一虚拟模型的旋转。例如,旋转后的第一虚拟模型可以是如图4或图5所示的第一虚拟模型23。
可以理解的是,当滑动轨迹为如图7所示的滑动轨迹时,根据该滑动轨迹的滑动方向可以调整第一虚拟模型的方向,使得第一虚拟模型可以旋转为图4或图5所示的第一虚拟模型23。也就是说,通过滑动轨迹的滑动方向调整第一虚拟模型的方向,可以使得第一虚拟模型在目标图像上呈现时总是正面向上,即第一虚拟模型23底面的中心点与人脸上的吸附点重合,该吸附点在三维空间中的朝向与第一虚拟模型23所在的模型坐标系的Y轴一致。
S1004、将所述第一虚拟模型显示在目标图像中的第一位置。
具体的,可以将方向调整后的第一虚拟模型显示在目标图像中的第一位置。图4或图5所示的第一虚拟模型23吸附在人脸第一位置22。此处,将方向调整后的第一虚拟模型显示在目标图像中的第一位置可以参照上述实施例所述的将第一虚拟模型显示在目标图像中的第一位置的过程,此处不再赘述。
可以理解的是,本实施例并不限定S1002-S1004的执行顺序,例如,在一些实施例中,S1003还可以在S1004之后执行,也就是说,根据所述滑动轨迹,生成与所述滑动轨迹对应的第一虚拟模型之后,先将该第一虚拟模型显示在目标图像中的第一位置,然后再对第一位置上的第一虚拟模型的方向进行调整。
可以理解的是,在本实施例的基础上,与第一位置对称的第二位置还可以显示有第二虚拟模型,如图5所示。调整第二虚拟模型的方向的方法可以类似于调整第一虚拟模型的方向的方法,此处不再赘述。在另一种可选的实现方式中,还可以先对第一虚拟模型的方向进行调整,得到调整后的第一虚拟模型。然后再确定与第一位置对称的第二位置,在该第二位置上显示第二虚拟模型,该第二虚拟模型与调整后的第一虚拟模型互为镜像。
本公开实施例提供的图像处理方法,通过滑动轨迹的滑动方向调整第一虚拟模型的方向,可以使得第一虚拟模型在目标图像上呈现时总是正面向上,从而避免滑动轨迹的滑动 方向对第一虚拟模型在目标图像上的呈现造成影响。
图12为本公开实施例中的另一种图像处理方法的流程图。本实施例在上述实施例的基础上,进一步对图像处理方法进行了具体说明。相应的,如图12所示,本实施例的方法应用于终端中,具体如下步骤:
S1201、获取用户在显示组件上输入的滑动轨迹。
具体的,S1201与S101的实现方式和具体原理一致,此处不再赘述。
S1202、根据所述滑动轨迹,生成与所述滑动轨迹对应的第一虚拟模型。
具体的,S1202可以参照如上所述的根据所述滑动轨迹,生成与所述滑动轨迹对应的第一虚拟模型的过程,此处不再赘述。
S1203、将所述第一虚拟模型显示在目标图像中的第一位置。
具体的,S1203可以参照如上所述的将所述第一虚拟模型显示在目标图像中的第一位置的过程,此处不再赘述。
S1204、调整所述第一虚拟模型的参数。
例如,当第一虚拟模型显示在目标图像中的第一位置之后,终端21还可以根据用户需求和/或音频信息对该第一虚拟模型的参数进行调整。该音频信息可以是终端21周围环境中的音频信息,或者也可以是终端21播放的音频信息。
在一种可能的实现方式中,调整所述第一虚拟模型的参数,包括:接收针对所述第一虚拟模型的参数调整指令;响应于所述参数调整指令,调整所述第一虚拟模型的参数。
例如,终端屏幕上可显示有用于调整虚拟模型参数的图标。当用户对该图标进行操作时,可以触发针对第一虚拟模型的参数调整指令。终端响应于该参数调整指令,调整第一虚拟模型的参数。具体的,第一虚拟模型的参数包括如下至少一个:大小、弧度、子模型个数、子模型材质、子模型的形状、子模型的旋转信息、子模型的角度等。具体的,用于调整虚拟模型参数的图标可以是如图13所示的多组箭头,其中,每一组箭头用于调整第一虚拟模型的一个参数,并且,不同的箭头方向表示不同的调整方向,例如,增大或者减小。本公开不对调整模型参数的图标形式或者触发调整的方式进行限制。
在另一种可能的实现方式中,调整所述第一虚拟模型的参数,包括:获取音频信息;根据所述音频信息的参数,调整所述第一虚拟模型的参数。
例如,终端21可以采集音频信息,并根据音频信息的参数,调整第一虚拟模型的参数。例如,音频信息的参数可以包括:音量、频谱、重拍、音调等。其中,音频信息的参数也可以称为音频信息的属性信息。第一虚拟模型的参数也可以称为第一虚拟模型的属性信息。其中,本实施例并不限定音频信息的参数与第一虚拟模型的参数之间的对应关系。例如,终端可以根据音频信息的音量调整第一虚拟模型的大小,根据音频信息的重拍调整第一虚拟模型的材质,根据音频信息的频谱调整第一虚拟模型的弧度。其中,第一虚拟模型的材质可以包括:发光材质、不发光材质等。
在一种可行的实现方式中,获取音频信息之前,所述方法还包括:接收音频信息播放指令;响应于所述音频信息播放指令,播放所述音频信息。
例如,图13所示的终端屏幕上还可以显示有音频开关按键130。当用户对音频开关按键130进行操作时可触发音频信息播放指令,进一步,终端21响应于该音频信息播放指令,播放音频信息。进一步,终端21可以采集该音频信息,并根据该音频信息的参数,调整第一虚拟模型的参数。
在另一种可行的实现方式中,获取音频信息,包括:采集周围环境中的音频信息。
例如,在其他一些实施例中,终端21可以不播放音频信息,而是采集周期环境中的音频信息,进一步,根据该音频信息的参数,调整第一虚拟模型的参数。
S1205、根据调整后的所述参数,更新所述第一虚拟模型。
例如,根据如上所述的方法调整第一虚拟模型的参数之后,终端21可以根据该调整后的参数,更新第一虚拟模型。进一步,终端21将更新后的第一虚拟模型显示在目标图像中的第一位置上。
可以理解的是,终端21调整第一虚拟模型的参数,并更新第一虚拟模型之后,还可以参照如图5所示的方法,在与第一位置对称的第二位置上显示与该更新后的第一虚拟模型互为镜像的第二虚拟模型。
或者,当目标图像中显示有多个虚拟模型,例如图5所示的第一虚拟模型23和第二虚拟模型25时,上述调整第一虚拟模型参数的方法,同样适用于调整第二虚拟模型的参数,第二虚拟模型的参数类似于如上所述的第一虚拟模型的参数,此处不再赘述。另外,目标图像中除第一虚拟模型和第二虚拟模型之外的其他虚拟模型的参数也可以参照如上所述的第一虚拟模型的参数。具体的,第一虚拟模型的参数和第二虚拟模型的参数可以同时被调整,例如,终端可以根据用户对某一图标的操作,同时调整第一虚拟模型和第二虚拟模型的与该图标对应的参数。或者,第一虚拟模型的参数和第二虚拟模型的参数也可以单独调整,例如,终端可以根据用户对某一图标的操作调整第一虚拟模型的与该图标对应的参数,根据用户对另一图标的操作调整第二虚拟模型的与该另一图标对应的参数。
本公开实施例提供的图像处理方法,通过将虚拟模型显示在目标图像之后,还可以根据用户触发的参数调整指令或音频信息的参数,调整虚拟模型的参数,使得虚拟模型可以在目标图像中实时变化,进一步提高了虚拟模型在目标图像中显示的灵活性。
下面以一个具体的实施例来介绍一下,虚拟模型的生成过程、以及虚拟模型参数的调整过程。如图14所示,在开始状态中,终端21可以通过摄像头采集人脸图像。该终端21的屏幕中可显示有音频开关按键130和开始建模按键131。终端21可以根据用户对音频开关按键130的操作播放音频信息或停止播放音频信息。终端21可以根据用户对开始建模按键131的操作显示轨迹绘画区域,本实施例并不限定该轨迹绘画区域的位置。例如,该轨迹绘画区域可以显示在屏幕的任一位置。另外,在显示该轨迹绘画区域的过程中,人脸图像可以保持显示在屏幕中,或者可以不在屏幕中显示。当人脸图像和轨迹绘画区域同时在屏幕中显示时,人脸图像和轨迹绘画区域可以位于相同图层,也可以分别位于不同图层,例如,该轨迹绘画区域的显示图层可以位于人脸图像的显示图层之上。进一步,用户在该轨迹绘画区域中输入轨迹。终端21根据用户对模型生成按键132的操作,结合轨迹和程序 算法生成虚拟模型。进一步,终端21将该虚拟模型显示在人脸中的第一位置。此时,虚拟模型的参数是可以实时调整的。例如,终端21根据用户对屏幕中箭头式图标的操作,调整虚拟模型的参数,使得虚拟模型可以转换成不同的样子或不同的材质。例如,增大虚拟模型。当用户完成对参数的调整时,终端21可以根据用户对完成调整按键133的操作,对人脸图像中的虚拟模型进行更新。进一步,终端21还可以根据用户对镜像按键134的操作,在人脸图像中生成互为镜像的虚拟模型,从而增加人脸图像中虚拟模型的个数。进一步,终端21还可以根据用户对返回控制按键135的操作返回到开始状态。
可以理解的是,虚拟模型是终端结合用户输入的轨迹和终端中的程序算法生成的。对于用户输入的同一个轨迹,当采用不同的程序算法时,终端可以构建出不同的虚拟模型。例如,对于同一个轨迹,当采用第一程序算法时,终端生成的虚拟模型可以是如上所述的类似于牛角的虚拟模型。当采用第二程序算法时,终端生成的虚拟模型可以是类似于鹿角的虚拟模型。
在一种可能的实现方式中,第一程序算法和第二程序算法采用的预设子模型不同。因此,第一程序算法和第二程序算法根据同一轨迹生成的虚拟模型不同。
在另一种可能的实现方式中,第一程序算法和第二程序算法在构建虚拟模型时,虚拟模型的生成方式不同。该生成方式可以是虚拟模型的多个元素之间的连接方式。例如,通过第一程序算法构建虚拟模型时,一个元素上可连接一个元素。例如,一个较大的圆柱体上连接一个较小的圆柱体。通过第二程序算法构建虚拟模型时,一个元素上可以连接多个元素。例如,一个较大的圆柱体上可连接多个较小的圆柱体,从而使得虚拟模型出现分叉的情况。
具体的,终端屏幕上可以显示有多种虚拟模型的标识或多种程序算法的标识,并根据用户选择的虚拟模型的标识或程序算法的标识,结合用户输入的轨迹生成与该标识对应的虚拟模型。从而使得虚拟模型更加符合用户需求,即根据用户需求实时生成虚拟模型,进一步提高了虚拟模型的灵活性。
可以理解的是,虚拟模型的形状并不限于牛角和鹿角,还可以有其他形状。构建虚拟模型的程序算法也不限于第一程序算法和第二程序算法,还可以有其他的程序算法。
图15为本公开实施例中的一种图像处理装置的结构示意图。本公开实施例所提供的图像处理装置可以配置于客户端中,或者可以配置于服务端中,该图像处理装置150具体包括:
获取模块151,用于获取用户在显示组件上输入的滑动轨迹;
生成模块152,用于根据所述滑动轨迹,生成与所述滑动轨迹对应的第一虚拟模型;
显示模块153,用于将所述第一虚拟模型显示在目标图像中的第一位置。
可选的,生成模块152包括:确定单元1521、转换单元1522和生成单元1523;
确定单元1521,用于根据所述滑动轨迹,确定与所述滑动轨迹相关的多个目标点;
获取模块151还用于:获取与所述多个目标点中每个目标点对应的预设子模型;
转换单元1522,用于根据所述多个目标点中每个目标点的几何信息,将每个目标点对 应的预设子模型转换为目标子模型;
生成单元1523,用于根据所述每个目标点分别对应的目标子模型,生成与所述滑动轨迹对应的第一虚拟模型。
可选的,确定单元1521根据所述滑动轨迹,确定与所述滑动轨迹相关的多个目标点时,具体用于:根据所述滑动轨迹,确定所述滑动轨迹中的多个轨迹点;对所述多个轨迹点进行拟合计算,得到拟合曲线;对所述拟合曲线进行采样,获得与所述滑动轨迹相关的多个目标点,所述目标点包括所述拟合曲线上的采样点。
可选的,所述目标点的几何信息包括如下至少一种:
所述目标点相对于所述多个轨迹点中起始轨迹点的偏移量;
所述目标点在所述拟合曲线上的切线方向。可选的,所述目标点的几何信息包括所述目标点相对于所述多个轨迹点中起始轨迹点的偏移量和所述目标点在所述拟合曲线上的切线方向。转换单元1522具体用于:根据所述目标点相对于所述起始轨迹点的偏移量和所述目标点在所述拟合曲线上的切线方向,将所述目标点对应的所述预设子模型上的多个第一点转换为对应的多个第二点;根据所述多个第二点生成所述目标点对应的目标子模型。
可选的,转换单元1522根据所述目标点相对于所述起始轨迹点的偏移量和所述目标点在所述拟合曲线上的切线方向,将所述目标点对应的预设子模型上的多个第一点转换为对应的多个第二点时,具体用于:将所述目标点相对于所述起始轨迹点的偏移量转换为三维偏移量;将所述目标点在所述拟合曲线上的切线方向转换为三维切线方向;根据所述三维偏移量和所述三维切线方向,将所述目标点对应的预设子模型上的多个第一点转换为对应的多个第二点。
可选的,转换单元1522根据所述三维偏移量和所述三维切线方向,将所述目标点对应的预设子模型上的多个第一点转换为对应的多个第二点时,具体用于:根据所述三维偏移量、所述三维切线方向、以及所述目标点对应的缩放值,将所述目标点对应的预设子模型上的多个第一点转换为对应的多个第二点。
可选的,生成单元1523根据所述每个目标点分别对应的目标子模型,生成与所述滑动轨迹对应的第一虚拟模型时,具体用于:根据所述每个目标点的标识,将所述每个目标点分别对应的目标子模型进行连接,得到与所述滑动轨迹对应的第一虚拟模型;其中,所述目标点的标识用于确定所述目标点对应的目标子模型在所述第一虚拟模型中的位置。
可选的,该图像处理装置150还包括:调整模块154,用于根据所述滑动轨迹的滑动方向,调整所述第一虚拟模型的方向。
可选的,调整模块154根据所述滑动轨迹的滑动方向,调整所述第一虚拟模型的方向时,具体用于:确定所述滑动轨迹中起始轨迹点相对于所述滑动轨迹中其他轨迹点的方向;对所述滑动轨迹中起始轨迹点相对于所述滑动轨迹中其他轨迹点的方向进行聚合计算,得到聚合方向;根据所述聚合方向,调整所述第一虚拟模型的方向。
可选的,显示模块153将所述第一虚拟模型显示在目标图像中的第一位置时,具体用于:将所述第一虚拟模型显示在目标图像中目标物体的第一位置。
可选的,该图像处理装置150还包括:确定模块155和接收模块156,接收模块156 用于显示模块153将所述第一虚拟模型显示在目标图像中目标物体的第一位置之后,接收镜像控制指令;确定模块155用于响应于所述镜像控制指令,确定所述目标物体上与所述第一位置对称的第二位置;显示模块153还用于:在所述第二位置上显示与所述第一虚拟模型互为镜像的第二虚拟模型。
可选的,调整模块154还用于:显示模块153将所述第一虚拟模型显示在目标图像中的第一位置之后,调整所述第一虚拟模型的参数;根据调整后的所述参数,更新所述第一虚拟模型。
可选的,调整模块154调整所述第一虚拟模型的参数时,具体用于:接收针对所述第一虚拟模型的参数调整指令;响应于所述参数调整指令,调整所述第一虚拟模型的参数。
可选的,获取模块151还用于:获取音频信息;调整模块154调整所述第一虚拟模型的参数时,具体用于:根据所述音频信息的参数,调整所述第一虚拟模型的参数。
可选的,该图像处理装置150还包括:音频播放模块157;获取模块151获取音频信息之前,接收模块156用于接收音频信息播放指令;音频播放模块157用于响应于所述音频信息播放指令,播放所述音频信息。
可选的,该图像处理装置150还包括:采集模块158;采集模块158用于采集周围环境中的音频信息。
本公开实施例提供的图像处理装置,可执行本公开方法实施例所提供的图像处理方法中客户端或服务端所执行的步骤,具备执行步骤和有益效果此处不再赘述。
图16为本公开实施例中的一种电子设备的结构示意图。下面具体参考图16,其示出了适于用来实现本公开实施例中的电子设备1600的结构示意图。本公开实施例中的电子设备1600可以包括但不限于诸如移动电话、笔记本电脑、数字广播接收器、PDA(个人数字助理)、PAD(平板电脑)、PMP(便携式多媒体播放器)、车载终端(例如车载导航终端)等等的移动终端以及诸如数字TV、台式计算机等等的固定终端。图16示出的电子设备仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。
如图16所示,电子设备1600可以包括处理装置(例如中央处理器、图形处理器等)1601,其可以根据存储在只读存储器(ROM)1602中的程序或者从存储装置1608加载到随机访问存储器(RAM)1603中的程序而执行各种适当的动作和处理。在RAM 1603中,还存储有电子设备1600操作所需的各种程序和数据。处理装置1601、ROM 1602以及RAM1603通过总线1604彼此相连。输入/输出(I/O)接口1605也连接至总线1604。
通常,以下装置可以连接至I/O接口1605:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置1606;包括例如液晶显示器(LCD)、扬声器、振动器等的输出装置1607;包括例如磁带、硬盘等的存储装置1608;以及通信装置1609。通信装置1609可以允许电子设备1600与其他设备进行无线或有线通信以交换数据。虽然图16示出了具有各种装置的电子设备1600,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件 程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在非暂态计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置1609从网络上被下载和安装,或者从存储装置1608被安装,或者从ROM 1602被安装。在该计算机程序被处理装置1601执行时,执行本公开实施例的方法中限定的上述功能。
需要说明的是,本公开上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。
在一些实施方式中,客户端、服务器可以利用诸如HTTP(HyperText Transfer Protocol,超文本传输协议)之类的任何当前已知或未来研发的网络协议进行通信,并且可以与任意形式或介质的数字数据通信(例如,通信网络)互连。通信网络的示例包括局域网(“LAN”),广域网(“WAN”),网际网(例如,互联网)以及端对端网络(例如,ad hoc端对端网络),以及任何当前已知或未来研发的网络。
上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。
上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备:
获取用户在显示组件上输入的滑动轨迹;
根据所述滑动轨迹,生成与所述滑动轨迹对应的第一虚拟模型;
将所述第一虚拟模型显示在目标图像中的第一位置。
另外,该电子设备还可以执行如上所述的图像处理方法中的其他步骤。
可以以一种或多种程序设计语言或其组合来编写用于执行本公开的操作的计算机程序代码,上述程序设计语言包括但不限于面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包 执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
描述于本公开实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。其中,单元的名称在某种情况下并不构成对该单元本身的限定。
本文中以上描述的功能可以至少部分地由一个或多个硬件逻辑部件来执行。例如,非限制性地,可以使用的示范类型的硬件逻辑部件包括:现场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、片上系统(SOC)、复杂可编程逻辑设备(CPLD)等等。
在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。
根据本公开的一个或多个实施例,本公开提供了一种图像处理方法,包括:
获取用户在显示组件上输入的滑动轨迹;
根据所述滑动轨迹,生成与所述滑动轨迹对应的第一虚拟模型;
将所述第一虚拟模型显示在目标图像中的第一位置。
根据本公开的一个或多个实施例,在本公开提供的图像处理方法中,根据所述滑动轨迹,生成与所述滑动轨迹对应的第一虚拟模型,包括:
根据所述滑动轨迹,确定与所述滑动轨迹相关的多个目标点;
获取与所述多个目标点中每个目标点对应的预设子模型;
根据所述多个目标点中每个目标点的几何信息,将每个目标点对应的预设子模型转换 为目标子模型;
根据所述每个目标点分别对应的目标子模型,生成与所述滑动轨迹对应的第一虚拟模型。
根据本公开的一个或多个实施例,在本公开提供的图像处理方法中,根据所述滑动轨迹,确定与所述滑动轨迹相关的多个目标点,包括:
根据所述滑动轨迹,确定所述滑动轨迹中的多个轨迹点;
对所述多个轨迹点进行拟合计算,得到拟合曲线;
对所述拟合曲线进行采样,将所述拟合曲线上的多个采样点作为与所述滑动轨迹相关的多个目标点。
根据本公开的一个或多个实施例,在本公开提供的图像处理方法中,所述目标点的几何信息包括如下至少一种:
所述目标点相对于所述多个轨迹点中起始轨迹点的偏移量;
所述目标点在所述拟合曲线上的切线方向;
根据所述多个目标点中每个目标点的几何信息,将每个目标点对应的预设子模型转换为目标子模型,包括:
根据所述目标点相对于所述起始轨迹点的偏移量和所述目标点在所述拟合曲线上的切线方向,将所述目标点对应的预设子模型转换为目标子模型。
根据本公开的一个或多个实施例,在本公开提供的图像处理方法中,根据所述目标点相对于所述起始轨迹点的偏移量和所述目标点在所述拟合曲线上的切线方向,将所述目标点对应的预设子模型转换为目标子模型,包括:
根据所述目标点相对于所述起始轨迹点的偏移量和所述目标点在所述拟合曲线上的切线方向,将所述目标点对应的预设子模型上的多个第一点转换为对应的多个第二点;
根据所述多个第二点生成所述目标点对应的目标子模型。
根据本公开的一个或多个实施例,在本公开提供的图像处理方法中,根据所述目标点相对于所述起始轨迹点的偏移量和所述目标点在所述拟合曲线上的切线方向,将所述目标点对应的预设子模型上的多个第一点转换为对应的多个第二点,包括:
将所述目标点相对于所述起始轨迹点的偏移量转换为三维偏移量;
将所述目标点在所述拟合曲线上的切线方向转换为三维切线方向;
根据所述三维偏移量和所述三维切线方向,将所述目标点对应的预设子模型上的多个第一点转换为对应的多个第二点。
根据本公开的一个或多个实施例,在本公开提供的图像处理方法中,根据所述三维偏移量和所述三维切线方向,将所述目标点对应的预设子模型上的多个第一点转换为对应的多个第二点,包括:
根据所述三维偏移量、所述三维切线方向、以及所述目标点对应的缩放值,将所述目标点对应的预设子模型上的多个第一点转换为对应的多个第二点。
根据本公开的一个或多个实施例,在本公开提供的图像处理方法中,根据所述每个目标点分别对应的目标子模型,生成与所述滑动轨迹对应的第一虚拟模型,包括:
根据所述每个目标点的标识,将所述每个目标点分别对应的目标子模型进行连接,得到与所述滑动轨迹对应的第一虚拟模型;
其中,所述目标点的标识用于确定所述目标点对应的目标子模型在所述第一虚拟模型中的位置。
根据本公开的一个或多个实施例,在本公开提供的图像处理方法中,所述方法还包括:
根据所述滑动轨迹的滑动方向,调整所述第一虚拟模型的方向。
根据本公开的一个或多个实施例,在本公开提供的图像处理方法中,根据所述滑动轨迹的滑动方向,调整所述第一虚拟模型的方向,包括:
确定所述滑动轨迹中起始轨迹点相对于所述滑动轨迹中其他轨迹点的方向;
对所述滑动轨迹中起始轨迹点相对于所述滑动轨迹中其他轨迹点的方向进行聚合计算,得到聚合方向;
根据所述聚合方向,调整所述第一虚拟模型的方向。
根据本公开的一个或多个实施例,在本公开提供的图像处理方法中,将所述第一虚拟模型显示在目标图像中的第一位置,包括:
将所述第一虚拟模型显示在目标图像中目标物体的第一位置。
根据本公开的一个或多个实施例,在本公开提供的图像处理方法中,将所述第一虚拟模型显示在目标图像中目标物体的第一位置之后,所述方法还包括:
接收镜像控制指令;
响应于所述镜像控制指令,确定所述目标物体上与所述第一位置对称的第二位置;
在所述第二位置上显示与所述第一虚拟模型互为镜像的第二虚拟模型。
根据本公开的一个或多个实施例,在本公开提供的图像处理方法中,将所述第一虚拟模型显示在目标图像中的第一位置之后,所述方法还包括:
调整所述第一虚拟模型的参数;
根据调整后的所述参数,更新所述第一虚拟模型。
根据本公开的一个或多个实施例,在本公开提供的图像处理方法中,调整所述第一虚拟模型的参数,包括:
接收针对所述第一虚拟模型的参数调整指令;
响应于所述参数调整指令,调整所述第一虚拟模型的参数。
根据本公开的一个或多个实施例,在本公开提供的图像处理方法中,调整所述第一虚拟模型的参数,包括:
获取音频信息;
根据所述音频信息的参数,调整所述第一虚拟模型的参数。
根据本公开的一个或多个实施例,在本公开提供的图像处理方法中,获取音频信息之前,所述方法还包括:
接收音频信息播放指令;
响应于所述音频信息播放指令,播放所述音频信息。
根据本公开的一个或多个实施例,在本公开提供的图像处理方法中,获取音频信息包 括:
采集周围环境中的音频信息。
根据本公开的一个或多个实施例,本公开提供了一种图像处理装置,包括:
获取模块,用于获取用户在显示组件上输入的滑动轨迹;
生成模块,用于根据所述滑动轨迹,生成与所述滑动轨迹对应的第一虚拟模型;
显示模块,用于将所述第一虚拟模型显示在目标图像中的第一位置。
根据本公开的一个或多个实施例,本公开提供了一种图像处理装置,生成模块包括:确定单元、转换单元和生成单元;
确定单元,用于根据所述滑动轨迹,确定与所述滑动轨迹相关的多个目标点;
获取模块还用于:获取与所述多个目标点中每个目标点对应的预设子模型;转换单元,用于根据所述多个目标点中每个目标点的几何信息,将每个目标点对应的预设子模型转换为目标子模型;
生成单元,用于根据所述每个目标点分别对应的目标子模型,生成与所述滑动轨迹对应的第一虚拟模型。
根据本公开的一个或多个实施例,本公开提供了一种图像处理装置,确定单元根据所述滑动轨迹,确定与所述滑动轨迹相关的多个目标点时,具体用于:根据所述滑动轨迹,确定所述滑动轨迹中的多个轨迹点;对所述多个轨迹点进行拟合计算,得到拟合曲线;对所述拟合曲线进行采样,将所述拟合曲线上的多个采样点作为与所述滑动轨迹相关的多个目标点。
根据本公开的一个或多个实施例,本公开提供了一种图像处理装置,所述目标点的几何信息包括如下至少一种:
所述目标点相对于所述多个轨迹点中起始轨迹点的偏移量;
所述目标点在所述拟合曲线上的切线方向。
根据本公开的一个或多个实施例,本公开提供了一种图像处理装置,转换单元具体用于:根据所述目标点相对于所述起始轨迹点的偏移量和所述目标点在所述拟合曲线上的切线方向,将所述目标点对应的所述预设子模型上的多个第一点转换为对应的多个第二点;根据所述多个第二点生成所述目标点对应的目标子模型。
根据本公开的一个或多个实施例,本公开提供了一种图像处理装置,转换单元具体用于:将所述目标点相对于所述起始轨迹点的偏移量转换为三维偏移量;将所述目标点在所述拟合曲线上的切线方向转换为三维切线方向;根据所述三维偏移量和所述三维切线方向,将所述目标点对应的预设子模型上的多个第一点转换为对应的多个第二点。
根据本公开的一个或多个实施例,本公开提供了一种图像处理装置,转换单元根据所述三维偏移量和所述三维切线方向,将所述目标点对应的预设子模型上的多个第一点转换为对应的多个第二点时,具体用于:根据所述三维偏移量、所述三维切线方向、以及所述目标点对应的缩放值,将所述目标点对应的预设子模型上的多个第一点转换为对应的多个第二点。
根据本公开的一个或多个实施例,本公开提供了一种图像处理装置,生成单元根据所 述每个目标点分别对应的目标子模型,生成与所述滑动轨迹对应的第一虚拟模型时,具体用于:根据所述每个目标点的标识,将所述每个目标点分别对应的目标子模型进行连接,得到与所述滑动轨迹对应的第一虚拟模型;其中,所述目标点的标识用于确定所述目标点对应的目标子模型在所述第一虚拟模型中的位置。
根据本公开的一个或多个实施例,本公开提供了一种图像处理装置,该图像处理装置还包括:调整模块,用于根据所述滑动轨迹的滑动方向,调整所述第一虚拟模型的方向。
根据本公开的一个或多个实施例,本公开提供了一种图像处理装置,调整模块根据所述滑动轨迹的滑动方向,调整所述第一虚拟模型的方向时,具体用于:确定所述滑动轨迹中起始轨迹点相对于所述滑动轨迹中其他轨迹点的方向;对所述滑动轨迹中起始轨迹点相对于所述滑动轨迹中其他轨迹点的方向进行聚合计算,得到聚合方向;根据所述聚合方向,调整所述第一虚拟模型的方向。
根据本公开的一个或多个实施例,本公开提供了一种图像处理装置,显示模块将所述第一虚拟模型显示在目标图像中的第一位置时,具体用于:将所述第一虚拟模型显示在目标图像中目标物体的第一位置。
根据本公开的一个或多个实施例,本公开提供了一种图像处理装置,该图像处理装置还包括:确定模块和接收模块,接收模块用于显示模块将所述第一虚拟模型显示在目标图像中目标物体的第一位置之后,接收镜像控制指令;确定模块用于响应于所述镜像控制指令,确定所述目标物体上与所述第一位置对称的第二位置;显示模块还用于:在所述第二位置上显示与所述第一虚拟模型互为镜像的第二虚拟模型。
根据本公开的一个或多个实施例,本公开提供了一种图像处理装置,调整模块还用于:显示模块将所述第一虚拟模型显示在目标图像中的第一位置之后,调整所述第一虚拟模型的参数;根据调整后的所述参数,更新所述第一虚拟模型。
根据本公开的一个或多个实施例,本公开提供了一种图像处理装置,调整模块调整所述第一虚拟模型的参数时,具体用于:接收针对所述第一虚拟模型的参数调整指令;响应于所述参数调整指令,调整所述第一虚拟模型的参数。
根据本公开的一个或多个实施例,本公开提供了一种图像处理装置,获取模块还用于:获取音频信息;调整模块调整所述第一虚拟模型的参数时,具体用于:根据所述音频信息的参数,调整所述第一虚拟模型的参数。
根据本公开的一个或多个实施例,本公开提供了一种图像处理装置,该图像处理装置还包括:音频播放模块;获取模块获取音频信息之前,接收模块用于接收音频信息播放指令;音频播放模块用于响应于所述音频信息播放指令,播放所述音频信息。
根据本公开的一个或多个实施例,本公开提供了一种图像处理装置,该图像处理装置还包括:采集模块;采集模块用于采集周围环境中的音频信息。
根据本公开的一个或多个实施例,本公开提供了一种电子设备,包括:
一个或多个处理器;
存储器,用于存储一个或多个程序;
当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如本公开提供的任一所述的图像处理方法。
根据本公开的一个或多个实施例,本公开提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如本公开提供的任一所述的图像处理方法。
以上描述仅为本公开的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本公开中所涉及的公开范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述公开构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本公开中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。
此外,虽然采用特定次序描绘了各操作,但是这不应当理解为要求这些操作以所示出的特定次序或以顺序次序执行来执行。在一定环境下,多任务和并行处理可能是有利的。同样地,虽然在上面论述中包含了若干具体实现细节,但是这些不应当被解释为对本公开的范围的限制。在单独的实施例的上下文中描述的某些特征还可以组合地实现在单个实施例中。相反地,在单个实施例的上下文中描述的各种特征也可以单独地或以任何合适的子组合的方式实现在多个实施例中。
尽管已经采用特定于结构特征和/或方法逻辑动作的语言描述了本主题,但是应当理解所附权利要求书中所限定的主题未必局限于上面描述的特定特征或动作。相反,上面所描述的特定特征和动作仅仅是实现权利要求书的示例形式。

Claims (20)

  1. 一种图像处理方法,其特征在于,所述方法包括:
    获取用户在显示组件上输入的滑动轨迹;
    根据所述滑动轨迹,生成与所述滑动轨迹对应的第一虚拟模型;
    将所述第一虚拟模型显示在目标图像中的第一位置。
  2. 根据权利要求1所述的方法,其特征在于,根据所述滑动轨迹,生成与所述滑动轨迹对应的第一虚拟模型,包括:
    根据所述滑动轨迹,确定与所述滑动轨迹相关的多个目标点;
    获取与所述多个目标点中每个目标点对应的预设子模型;
    根据所述多个目标点中每个目标点的几何信息,将每个目标点对应的预设子模型转换为目标子模型;
    根据所述每个目标点分别对应的目标子模型,生成与所述滑动轨迹对应的第一虚拟模型。
  3. 根据权利要求2所述的方法,其特征在于,根据所述滑动轨迹,确定与所述滑动轨迹相关的多个目标点,包括:
    根据所述滑动轨迹,确定所述滑动轨迹中的多个轨迹点;
    对所述多个轨迹点进行拟合计算,得到拟合曲线;
    对所述拟合曲线进行采样,获得与所述滑动轨迹相关的多个目标点,所述目标点包括所述拟合曲线上的采样点。
  4. 根据权利要求2所述的方法,其特征在于,所述目标点的几何信息包括如下至少一种:
    所述目标点相对于所述多个轨迹点中起始轨迹点的偏移量;
    所述目标点在所述拟合曲线上的切线方向。
  5. 根据权利要求4所述的方法,其特征在于,所述目标点的几何信息包括所述目标点相对于所述多个轨迹点中起始轨迹点的偏移量和所述目标点在所述拟合曲线上的切线方向,所述根据所述多个目标点中每个目标点的几何信息,将每个目标点对应的预设子模型转换为目标子模型,包括:
    根据所述目标点相对于所述起始轨迹点的偏移量和所述目标点在所述拟合曲线上的切线方向,将所述目标点对应的预设子模型上的多个第一点转换为对应的多个第二点;
    根据所述多个第二点生成所述目标点对应的目标子模型。
  6. 根据权利要求5所述的方法,其特征在于,所述根据所述目标点相对于所述起始轨迹点的偏移量和所述目标点在所述拟合曲线上的切线方向,将所述目标点对应的预设子模型上的多个第一点转换为对应的多个第二点,包括:
    将所述目标点相对于所述起始轨迹点的偏移量转换为三维偏移量;
    将所述目标点在所述拟合曲线上的切线方向转换为三维切线方向;
    根据所述三维偏移量和所述三维切线方向,将所述目标点对应的预设子模型上的多个第一点转换为对应的多个第二点。
  7. 根据权利要求6所述的方法,其特征在于,根据所述三维偏移量和所述三维切线方向,将所述目标点对应的预设子模型上的多个第一点转换为对应的多个第二点,包括:
    根据所述三维偏移量、所述三维切线方向以及所述目标点对应的缩放值,将所述目标点对应的预设子模型上的多个第一点转换为对应的多个第二点。
  8. 根据权利要求2所述的方法,其特征在于,根据所述每个目标点分别对应的目标子模型,生成与所述滑动轨迹对应的第一虚拟模型,包括:
    根据所述每个目标点的标识,将所述每个目标点分别对应的目标子模型进行连接,得到与所述滑动轨迹对应的第一虚拟模型;
    其中,所述目标点的标识用于确定所述目标点对应的目标子模型在所述第一虚拟模型中的位置。
  9. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    根据所述滑动轨迹的滑动方向,调整所述第一虚拟模型的方向。
  10. 根据权利要求9所述的方法,其特征在于,根据所述滑动轨迹的滑动方向,调整所述第一虚拟模型的方向,包括:
    确定所述滑动轨迹中起始轨迹点相对于所述滑动轨迹中其他轨迹点的方向;
    对所述滑动轨迹中起始轨迹点相对于所述滑动轨迹中其他轨迹点的方向进行聚合计算,得到聚合方向;
    根据所述聚合方向,调整所述第一虚拟模型的方向。
  11. 根据权利要求1所述的方法,其特征在于,将所述第一虚拟模型显示在目标图像中的第一位置,包括:
    将所述第一虚拟模型显示在目标图像中目标物体的第一位置。
  12. 根据权利要求11所述的方法,其特征在于,将所述第一虚拟模型显示在目标图像中目标物体的第一位置之后,所述方法还包括:
    接收镜像控制指令;
    响应于所述镜像控制指令,确定所述目标物体上与所述第一位置对称的第二位置;
    在所述第二位置上显示与所述第一虚拟模型互为镜像的第二虚拟模型。
  13. 根据权利要求1所述的方法,其特征在于,将所述第一虚拟模型显示在目标图像中的第一位置之后,所述方法还包括:
    调整所述第一虚拟模型的参数;
    根据调整后的所述参数,更新所述第一虚拟模型。
  14. 根据权利要求13所述的方法,其特征在于,调整所述第一虚拟模型的参数,包括:
    接收针对所述第一虚拟模型的参数调整指令;
    响应于所述参数调整指令,调整所述第一虚拟模型的参数。
  15. 根据权利要求13所述的方法,其特征在于,调整所述第一虚拟模型的参数,包括:
    获取音频信息;
    根据所述音频信息的参数,调整所述第一虚拟模型的参数。
  16. 根据权利要求15所述的方法,其特征在于,在获取音频信息之前,所述方法还包括:
    接收音频信息播放指令;
    响应于所述音频信息播放指令,播放所述音频信息。
  17. 根据权利要求15所述的方法,其特征在于,所述获取音频信息,包括:
    采集周围环境中的音频信息。
  18. 一种图像处理装置,其特征在于,包括:
    获取模块,用于获取用户在显示组件上输入的滑动轨迹;
    生成模块,用于根据所述滑动轨迹,生成与所述滑动轨迹对应的第一虚拟模型;
    显示模块,用于将所述第一虚拟模型显示在目标图像中的第一位置。
  19. 一种电子设备,其特征在于,所述电子设备包括:
    一个或多个处理器;
    存储装置,用于存储一个或多个程序;
    当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求1-17中任一所述的方法。
  20. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,该程序被处理器执行时实现如权利要求1-17中任一所述的方法。
PCT/CN2021/111737 2020-08-31 2021-08-10 一种图像处理方法、装置、电子设备和存储介质 Ceased WO2022042291A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
EP21860130.0A EP4163777A4 (en) 2020-08-31 2021-08-10 IMAGE PROCESSING METHOD AND APPARATUS, ELECTRONIC DEVICE AND STORAGE MEDIUM
JP2023507570A JP7540796B2 (ja) 2020-08-31 2021-08-10 画像処理方法、装置、電子デバイス及び記憶媒体
US18/060,466 US11776209B2 (en) 2020-08-31 2022-11-30 Image processing method and apparatus, electronic device, and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010901576.0A CN112035041B (zh) 2020-08-31 2020-08-31 一种图像处理方法、装置、电子设备和存储介质
CN202010901576.0 2020-08-31

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US18/060,466 Continuation US11776209B2 (en) 2020-08-31 2022-11-30 Image processing method and apparatus, electronic device, and storage medium

Publications (1)

Publication Number Publication Date
WO2022042291A1 true WO2022042291A1 (zh) 2022-03-03

Family

ID=73587033

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/111737 Ceased WO2022042291A1 (zh) 2020-08-31 2021-08-10 一种图像处理方法、装置、电子设备和存储介质

Country Status (5)

Country Link
US (1) US11776209B2 (zh)
EP (1) EP4163777A4 (zh)
JP (1) JP7540796B2 (zh)
CN (1) CN112035041B (zh)
WO (1) WO2022042291A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114816148A (zh) * 2022-04-18 2022-07-29 网易(杭州)网络有限公司 一种虚拟模型的控制方法、装置、电子设备及存储介质
CN115062695A (zh) * 2022-06-06 2022-09-16 北京字跳网络技术有限公司 一种作弊判断方法、装置、设备及介质
CN115331309A (zh) * 2022-08-19 2022-11-11 北京字跳网络技术有限公司 用于识别人体动作的方法、装置、设备和介质

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112035041B (zh) 2020-08-31 2022-05-31 北京字节跳动网络技术有限公司 一种图像处理方法、装置、电子设备和存储介质
CN113160031B (zh) * 2021-03-26 2024-05-14 北京达佳互联信息技术有限公司 图像处理方法、装置、电子设备及存储介质
CN113888724B (zh) * 2021-09-30 2024-07-23 北京字节跳动网络技术有限公司 一种动画显示方法、装置及设备
CN115965726A (zh) * 2021-10-13 2023-04-14 北京字节跳动网络技术有限公司 一种液体仿真方法、装置、设备及介质
CN114401443B (zh) * 2022-01-24 2023-09-01 脸萌有限公司 特效视频处理方法、装置、电子设备及存储介质
CN115937426A (zh) * 2022-12-19 2023-04-07 北京字跳网络技术有限公司 图像处理方法、装置、电子设备及存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120050281A1 (en) * 2010-08-31 2012-03-01 Canon Kabushiki Kaisha Information processing apparatus and information processing method
CN106303690A (zh) * 2015-05-27 2017-01-04 腾讯科技(深圳)有限公司 一种视频处理方法及装置
CN108447017A (zh) * 2018-05-31 2018-08-24 Oppo广东移动通信有限公司 人脸虚拟整容方法和装置
CN108520552A (zh) * 2018-03-26 2018-09-11 广东欧珀移动通信有限公司 图像处理方法、装置、存储介质及电子设备
CN110639204A (zh) * 2019-10-18 2020-01-03 网易(杭州)网络有限公司 游戏数据处理方法、装置以及终端设备
CN112035041A (zh) * 2020-08-31 2020-12-04 北京字节跳动网络技术有限公司 一种图像处理方法、装置、电子设备和存储介质

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007146069A2 (en) * 2006-06-07 2007-12-21 Carnegie Mellon University A sketch-based design system, apparatus, and method for the construction and modification of three-dimensional geometry
CN101162420B (zh) * 2007-11-29 2010-12-15 天津津科电子系统工程有限公司 基于触摸屏的旋转式连续变速浏览与检索方法
US10127722B2 (en) * 2015-06-30 2018-11-13 Matterport, Inc. Mobile capture visualization incorporating three-dimensional and two-dimensional imagery
CN106855778A (zh) * 2015-12-09 2017-06-16 阿里巴巴集团控股有限公司 界面操作的处理方法、装置和智能终端
US10671343B1 (en) * 2016-06-30 2020-06-02 Amazon Technologies, Inc. Graphical interface to preview functionality available for speech-enabled processing
CN107635130A (zh) * 2016-07-18 2018-01-26 中兴通讯股份有限公司 一种实现3d图像显示的方法及装置
US10515479B2 (en) * 2016-11-01 2019-12-24 Purdue Research Foundation Collaborative 3D modeling system
CN106779590A (zh) * 2016-12-01 2017-05-31 百望电子发票数据服务有限公司 一种电子印章的生成方法以及系统
CN109144376A (zh) * 2017-06-14 2019-01-04 中兴通讯股份有限公司 一种便捷操作方法和终端
US10510186B2 (en) * 2017-12-22 2019-12-17 Adobe Inc. Digital media environment for intuitive modifications of digital graphics
CN108665467A (zh) * 2018-05-15 2018-10-16 深圳市智绘睿图科技信息有限公司 一种实时交互式图像的几何图形的提取方法
CN109766069B (zh) * 2019-01-15 2023-05-12 高创(苏州)电子有限公司 辅助显示方法、装置、电子设备及计算机可读存储介质
CN110381210A (zh) * 2019-07-22 2019-10-25 深圳传音控股股份有限公司 一种虚拟现实交互方法及装置
CN112738623B (zh) * 2019-10-14 2022-11-01 北京字节跳动网络技术有限公司 视频文件的生成方法、装置、终端及存储介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120050281A1 (en) * 2010-08-31 2012-03-01 Canon Kabushiki Kaisha Information processing apparatus and information processing method
CN106303690A (zh) * 2015-05-27 2017-01-04 腾讯科技(深圳)有限公司 一种视频处理方法及装置
CN108520552A (zh) * 2018-03-26 2018-09-11 广东欧珀移动通信有限公司 图像处理方法、装置、存储介质及电子设备
CN108447017A (zh) * 2018-05-31 2018-08-24 Oppo广东移动通信有限公司 人脸虚拟整容方法和装置
CN110639204A (zh) * 2019-10-18 2020-01-03 网易(杭州)网络有限公司 游戏数据处理方法、装置以及终端设备
CN112035041A (zh) * 2020-08-31 2020-12-04 北京字节跳动网络技术有限公司 一种图像处理方法、装置、电子设备和存储介质

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP4163777A4

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114816148A (zh) * 2022-04-18 2022-07-29 网易(杭州)网络有限公司 一种虚拟模型的控制方法、装置、电子设备及存储介质
CN115062695A (zh) * 2022-06-06 2022-09-16 北京字跳网络技术有限公司 一种作弊判断方法、装置、设备及介质
CN115331309A (zh) * 2022-08-19 2022-11-11 北京字跳网络技术有限公司 用于识别人体动作的方法、装置、设备和介质

Also Published As

Publication number Publication date
US11776209B2 (en) 2023-10-03
CN112035041B (zh) 2022-05-31
EP4163777A1 (en) 2023-04-12
JP2023538257A (ja) 2023-09-07
JP7540796B2 (ja) 2024-08-27
EP4163777A4 (en) 2023-12-13
US20230091710A1 (en) 2023-03-23
CN112035041A (zh) 2020-12-04

Similar Documents

Publication Publication Date Title
WO2022042291A1 (zh) 一种图像处理方法、装置、电子设备和存储介质
JP7604669B2 (ja) 特殊効果展示方法、装置、機器および媒体
WO2023179346A1 (zh) 特效图像处理方法、装置、电子设备及存储介质
JP7674462B2 (ja) 拡張現実の画像処理方法、装置、電子機器及び記憶媒体
CN111833461B (zh) 一种图像特效的实现方法、装置、电子设备及存储介质
CN111833459B (zh) 一种图像处理方法、装置、电子设备及存储介质
WO2020007182A1 (zh) 个性化场景图像的处理方法、装置及存储介质
WO2021098361A1 (zh) 地形图编辑方法、装置、电子设备及计算机可读介质
CN114332323B (zh) 一种粒子效果渲染方法、装置、设备及介质
US12019669B2 (en) Method, apparatus, device, readable storage medium and product for media content processing
WO2022088928A1 (zh) 弹性对象的渲染方法、装置、设备及存储介质
WO2022042290A1 (zh) 一种虚拟模型处理方法、装置、电子设备和存储介质
WO2023075677A1 (zh) 视频处理方法、装置、设备及存储介质
CN116527993A (zh) 视频的处理方法、装置、电子设备、存储介质和程序产品
WO2023109564A1 (zh) 视频图像处理方法、装置、电子设备及存储介质
CN116360661A (zh) 特效处理方法、装置、电子设备及存储介质
WO2023103999A1 (zh) 3d目标点渲染方法、装置、设备及存储介质
CN110070617A (zh) 数据同步方法、装置、硬件装置
CN115619918A (zh) 图像渲染方法、装置、设备及存储介质
CN111862273B (zh) 动画处理方法、装置、电子设备及存储介质
WO2025113515A1 (zh) 一种增强现实方法、装置、电子设备及存储介质
CN113873156A (zh) 图像处理方法、装置和电子设备
WO2024108555A1 (zh) 人脸图像生成方法、装置、设备以及存储介质
CN111666451B (zh) 路书展示方法、装置、服务器、终端及存储介质
CN119027489A (zh) 位姿确定方法、装置和电子设备

Legal Events

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

Ref document number: 21860130

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2021860130

Country of ref document: EP

Effective date: 20230109

ENP Entry into the national phase

Ref document number: 2023507570

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE