CN110910512B - Virtual object self-adaptive adjustment method, device, computer equipment and storage medium - Google Patents

Virtual object self-adaptive adjustment method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN110910512B
CN110910512B CN201911201523.1A CN201911201523A CN110910512B CN 110910512 B CN110910512 B CN 110910512B CN 201911201523 A CN201911201523 A CN 201911201523A CN 110910512 B CN110910512 B CN 110910512B
Authority
CN
China
Prior art keywords
key point
target
information
virtual object
target object
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911201523.1A
Other languages
Chinese (zh)
Other versions
CN110910512A (en
Inventor
曹占魁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information 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 Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN201911201523.1A priority Critical patent/CN110910512B/en
Publication of CN110910512A publication Critical patent/CN110910512A/en
Application granted granted Critical
Publication of CN110910512B publication Critical patent/CN110910512B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • G06T19/006Mixed reality
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • G06T19/20Editing of 3D images, e.g. changing shapes or colours, aligning objects or positioning parts
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/2016Rotation, translation, scaling

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Graphics (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Architecture (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The disclosure relates to a virtual object adaptive adjustment method, a device, a computer device and a storage medium, wherein the method comprises the following steps: identifying a video frame containing a target object to obtain key point information, scaling information and contour information of the target object, generating a virtual object according to the contour information, obtaining key point information of a standard object corresponding to the target object, obtaining a target multiplying power for self-adaptive adjustment according to the virtual object, the key point information of the target object and the key point information of the standard object, and adjusting the position and the size of the virtual object on the target object according to the target multiplying power and the scaling information. By utilizing the method, the position and the size of the virtual object on the target object can be adjusted according to the target multiplying power and the scaling information, so that the virtual object is attached to the photographed image.

Description

Virtual object self-adaptive adjustment method, device, computer equipment and storage medium
Technical Field
The disclosure relates to the technical field of image processing, and in particular relates to a virtual object self-adaptive adjustment method, device, computer equipment and storage medium.
Background
In recent years, with the development of AR technology, many scenes require adding a virtual object to a real shot image, for example, adding a virtual ornament to a face, and generally, the implementation method is to obtain scaling information of the face by using a face recognition algorithm, and render the virtual ornament to the real shot image according to the same size. However, the method can cause the situation that the virtual ornaments are not attached to the real human faces, particularly, the situation that the virtual ornaments are far away from the human face center, and the virtual ornaments are too close to the human face center or far away from the human face center due to the fact that the human faces are too fat or too long, so that effects are not truly matched, and the virtual objects are not attached to the real shot images.
Accordingly, the related art has a problem that the virtual object and the photographed image are not attached to each other in the AR scene.
Disclosure of Invention
The disclosure provides a virtual object self-adaptive adjustment method, a device, computer equipment and a storage medium, so as to at least solve the problem that in an AR scene in the related art, a virtual object and a real shot image are not attached.
The technical scheme of the present disclosure is as follows:
according to a first aspect of an embodiment of the present disclosure, there is provided a virtual object adaptive adjustment method, including:
identifying a video frame containing a target object to obtain key point information, scaling information and contour information of the target object;
generating a virtual object according to the contour information;
Acquiring key point information of a standard object corresponding to the target object;
obtaining a target multiplying power for self-adaptive adjustment according to the virtual object, the key point information of the target object and the key point information of the standard object;
and adjusting the position and the size of the virtual object on the target object according to the target multiplying power and the scaling information.
According to a second aspect of embodiments of the present disclosure, there is provided a virtual object adaptive adjustment apparatus, including:
The identification module is used for identifying the video frame containing the target object to obtain key point information, scaling information and contour information of the target object;
The generating module is used for generating a virtual object according to the contour information;
the key point acquisition module is used for acquiring key point information of a standard object corresponding to the target object;
The multiplying power acquisition module is used for acquiring target multiplying power for self-adaptive adjustment according to the virtual object, the key point information of the target object and the key point information of the standard object;
And the adjusting module is used for adjusting the position and the size of the virtual object on the target object according to the target multiplying power and the scaling information.
According to a third aspect of embodiments of the present disclosure, there is provided a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method of the first aspect when executing the computer program.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer readable storage medium having stored thereon a computer program, characterized in that the computer program when executed by a processor implements the steps of the method according to the first aspect.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
Identifying a video frame containing a target object to obtain key point information, scaling information and contour information of the target object, generating a virtual object according to the contour information, obtaining key point information of a standard object corresponding to the target object, obtaining a target multiplying power for self-adaptive adjustment according to the virtual object, the key point information of the target object and the key point information of the standard object, and adjusting the position and the size of the virtual object on the target object according to the target multiplying power and the scaling information. By utilizing the method, the position and the size of the virtual object on the target object can be adjusted according to the target multiplying power and the scaling information, so that the virtual object is attached to the photographed image.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure and do not constitute an undue limitation on the disclosure.
Fig. 1 is an application environment diagram illustrating a virtual object adaptive adjustment method according to an exemplary embodiment.
Fig. 2 is a flow chart illustrating a method of adaptive adjustment of a virtual object according to an exemplary embodiment.
Fig. 3 is a flowchart of refinement steps according to step S24 in an exemplary embodiment.
Fig. 4 is a flowchart of refinement steps according to step S243 in an exemplary embodiment.
Fig. 5 is a flow chart illustrating a method of adaptive adjustment of a virtual object according to an exemplary embodiment.
Fig. 6 is a block diagram illustrating a virtual object adaptive adjustment apparatus according to an exemplary embodiment.
Fig. 7 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
In order to enable those skilled in the art to better understand the technical solutions of the present disclosure, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the foregoing figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the disclosure described herein may be capable of operation in sequences other than those illustrated or described herein. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims.
The virtual object self-adaptive adjustment method provided by the disclosure can be applied to an application environment as shown in fig. 1. The virtual object self-adaptive adjustment device comprises an image acquisition device 11 and a computer device 12 which are connected. The image capturing device 11 and the computer device 12 may be configured as an integrated terminal, and the integrated terminal may include, but is not limited to, various personal computers, notebook computers, smart phones, and tablet computers. The image capturing device 11 and the computer device 12 may also be an image capturing device 11 (for example, a camera) and a server which are separately provided, and the image capturing device 11 is communicatively connected to the server through a network, and the server may be implemented by a separate server or a server cluster formed by a plurality of servers.
Alternatively, the image capturing device 11 captures an image or video (i.e., a video frame containing a target object), which may be an image captured by the image capturing device 11 from a network or other image capturing device 11, or an image captured by the image capturing device 11 from a video frame, or the like. Wherein, the image acquisition device 11 transmits the video frame containing the target object to the computer device 12 after acquiring the video frame containing the target object. Optionally, the computer device 12 comprises at least one processor 121 and a memory 122. Alternatively, the processor 121 may be a CPU (Central Processing Unit, central processor), GPU (Graphics Processing Unit, graphics processor), or the like, and the processor 121 may be a multi-core processor, such as a multi-core GPU.
The memory 122 in the computer device 12 stores a virtual object adaptive adjustment algorithm, the processor 121 may invoke and run the virtual object adaptive adjustment algorithm in the memory 122, identify a video frame including a target object, obtain key point information, scaling information and profile information of the target object, generate a virtual object according to the profile information, obtain key point information of a standard object corresponding to the target object, obtain a target magnification for adaptive adjustment according to the virtual object, the key point information of the target object, and the key point information of the standard object, and adjust a position and a size of the virtual object on the target object according to the target magnification and the scaling information.
Fig. 2 is a flowchart illustrating a virtual object adaptive adjustment method according to an exemplary embodiment, and as shown in fig. 2, a virtual object adaptive adjustment method is used in fig. 1, and includes the following steps:
In step S21, a video frame including the target object is identified, and key point information, scaling information, and contour information of the target object are obtained.
The target object may be a person, an animal or the like with mobility, or may be a stationary object such as a table or a cabinet.
The key point information is a set of information including the key point position of the target object, and the like, and the key point information may include eyes, eyebrows, nose, mouth, cheek, face center point, and the like, assuming that the target object is a human face.
Wherein the scaling information is information of a scaling factor determined from pixel information in the video frame.
Wherein the contour information refers to line features constituting the outer edge of the target object.
In the embodiment of the present disclosure, identifying a video frame containing a target object to obtain key point information, scaling information and contour information of the target object belongs to the prior art, and is not described herein.
In step S22, a virtual object is generated from the contour information.
Wherein, the virtual object can be a two-dimensional plane object or a three-dimensional stereo object.
In the embodiment of the disclosure, the virtual object is drawn according to the contour information.
In step S23, key point information of a standard object corresponding to the target object is acquired.
In the embodiment of the disclosure, a plurality of standard objects are pre-stored, and the standard objects are pre-set and stored objects playing a role in comparison. Standard objects include people, animals, tables, cabinets and the like, and each standard object also has respective key point information. The standard object will also be a person, assuming that the target object is a person, and a table, assuming that the target object is a table.
In step S24, a target magnification for adaptive adjustment is obtained according to the virtual object, the key point information of the target object, and the key point information of the standard object.
The target magnification represents one parameter for adjusting the size and position of the virtual object on the target object.
In step S25, the position and the size of the virtual object on the target object are adjusted according to the target magnification and the scaling information.
The virtual object self-adaptive adjustment method comprises the steps of identifying a video frame containing a target object to obtain key point information, scaling information and contour information of the target object, generating a virtual object according to the contour information, obtaining key point information of a standard object corresponding to the target object, obtaining a target multiplying power for self-adaptive adjustment according to the virtual object, the key point information of the target object and the key point information of the standard object, and adjusting the position and the size of the virtual object on the target object according to the target multiplying power and the scaling information. By utilizing the method, the position and the size of the virtual object on the target object can be adjusted according to the target multiplying power and the scaling information, so that the virtual object is attached to the photographed image.
Referring to fig. 3, a flowchart of a refinement step of step S24 is shown, and step S24 obtains a target magnification for adaptive adjustment according to the virtual object, the key point information of the target object, and the key point information of the standard object, which specifically includes:
In step S241, a first key point closest to the virtual object is acquired from the key point information of the target object.
In the embodiment of the present disclosure, it is assumed that the target object is a human face and the virtual object is a left ear earring. The key point information of the target object may include key points of eyes, eyebrows, nose, mouth, cheeks, face center points, and the like. A first keypoint (cheek keypoint) closest to the left earring is acquired.
In step S242, a second key point corresponding to the first key point is acquired from the key point information of the standard object.
In the embodiment of the present disclosure, when the first key point obtained in step S241 is a cheek key point, the key point corresponding to the first key point (cheek key point) in the key point information of the standard object is also a cheek key point, and the cheek key point in the key point information of the standard object is referred to as a second key point.
In step S243, the target magnification is obtained according to the first keypoint, the first central point in the keypoint information of the target object, the second keypoint, and the second central point in the keypoint information of the standard object.
In the embodiment of the present disclosure, the first center point is a point located at the center position of the target object, and the second center point is a point located at the center position of the standard object.
The virtual object self-adaptive adjustment method comprises the steps of identifying a video frame containing a target object to obtain key point information, scaling information and contour information of the target object, generating a virtual object according to the contour information, obtaining key point information of a standard object corresponding to the target object, obtaining a first key point closest to the virtual object from the key point information of the target object, obtaining a second key point corresponding to the first key point from the key point information of the standard object, obtaining a target multiplying power according to the first key point, a first center point in the key point information of the target object, the second key point and a second center point in the key point information of the standard object, and adjusting the position and the size of the virtual object on the target object according to the target multiplying power and the scaling information. By utilizing the method, the position and the size of the virtual object on the target object can be adjusted according to the target multiplying power and the scaling information, so that the virtual object is attached to the photographed image.
Referring to fig. 4, a flowchart of the refinement step of step S243 is shown, and step S243 obtains the target magnification according to the first key point, the first center point in the key point information of the target object, the second key point, and the second center point in the key point information of the standard object, specifically including:
in step S2431, a first distance between the first keypoint and the first central point is calculated.
In step S2432, a second distance between the second keypoint and the second center point is calculated.
In the embodiment of the present disclosure, calculating the distance between two points belongs to the prior art, and will not be described herein.
In step S2433, the target magnification is obtained from the first distance and the second distance.
In the embodiment of the present disclosure, the ratio of the first distance d1 to the second distance d2 is taken as the target magnification s.
Fig. 5 is a flowchart illustrating a virtual object adaptive adjustment method according to an exemplary embodiment, and as shown in fig. 5, a virtual object adaptive adjustment method is used in fig. 1, and includes the following steps:
In step S51, a video frame including the target object is identified, and key point information, scaling information, and contour information of the target object are obtained.
In step S52, a virtual object is generated from the profile information.
In step S53, key point information of a standard object corresponding to the target object is acquired.
In step S54, a target magnification for adaptive adjustment is obtained according to the virtual object, the key point information of the target object, and the key point information of the standard object.
The descriptions of step S51 to step S54 in the embodiment of the present disclosure are identical to those of step S21 to step S24 in the above embodiment, and are not described in detail herein.
In step S55, a third distance between the virtual object and the first center point in the key point information of the target object is enlarged to enlarge the target magnification.
In step S56, the size of the virtual object is scaled to the target magnification of the scaling information.
In the embodiment of the present disclosure, assuming that the target object is a human face, the virtual object is a left ear earring, the first key point is a cheek key point, the scaling information is a magnification s0, a first distance d1 between the first key point and the first center point is obtained, a second distance d2 between the second key point and the second center point is obtained, and the target magnification s=d1/d 2. A third distance d3 between the virtual object (left earring) and the first center point is calculated, the third distance d3 is expanded by s times, and the size of the virtual object is scaled by s times s 0.
The virtual object self-adaptive adjustment method comprises the steps of identifying a video frame containing a target object to obtain key point information, scaling information and profile information of the target object, generating a virtual object according to the profile information, obtaining key point information of a standard object corresponding to the target object, obtaining a target multiplying power for self-adaptive adjustment according to the virtual object, the key point information of the target object and the key point information of the standard object, expanding the target multiplying power, and scaling the size of the virtual object to the target multiplying power of the scaling information. By utilizing the method, the position and the size of the virtual object on the target object can be adjusted according to the target multiplying power and the scaling information, so that the virtual object is attached to the photographed image.
In an exemplary embodiment, the identifying the video frame containing the target object further includes:
and carrying out smoothing processing on the video frames according to a time domain smoothing algorithm.
In the embodiment of the disclosure, for a scene such as a video, where continuous frame images need to be processed, a smoothing process (such as a moving average filtering) may be performed on the video frame, so as to improve jitter. Then, the video frame containing the target object is identified, so that key point information, scaling information, contour information and the like can be obtained more accurately, and the virtual object is adjusted in a more accurate and self-adaptive mode.
Fig. 6 is a block diagram illustrating a virtual object adaptive adjustment apparatus according to an exemplary embodiment. Referring to fig. 6, the virtual object adaptive adjustment apparatus includes an identification module 61, a generation module 62, a key point acquisition module 63, a magnification acquisition module 64, and an adjustment module 65, wherein:
The identifying module 61 is configured to identify a video frame containing a target object, so as to obtain key point information, scaling information and contour information of the target object;
a generating module 62, configured to generate a virtual object according to the profile information;
A key point obtaining module 63, configured to obtain key point information of a standard object corresponding to the target object;
The multiplying power obtaining module 64 is configured to obtain a target multiplying power for adaptive adjustment according to the virtual object, the key point information of the target object, and the key point information of the standard object;
and the adjusting module 65 is configured to adjust the position and the size of the virtual object on the target object according to the target magnification and the scaling information.
In an exemplary embodiment, the magnification acquisition module 64 is configured to perform acquiring a first keypoint closest to the virtual object from the keypoint information of the target object; acquiring a second key point corresponding to the first key point from the key point information of the standard object; and obtaining the target multiplying power according to the first key point, the first central point in the key point information of the target object, the second key point and the second central point in the key point information of the standard object.
In an exemplary embodiment, the magnification acquisition module 64 is configured to perform calculating a first distance between the first keypoint and the first center point; calculating a second distance between the second key point and the second center point; and obtaining the target multiplying power according to the first distance and the second distance.
In an exemplary embodiment, the magnification acquisition module 64 is configured to perform a ratio of the first distance to the second distance as the target magnification.
In an exemplary embodiment, the adjustment module 65 is configured to perform expanding the target magnification by performing a third distance between the virtual object and the first center point in the key point information of the target object; and scaling the size of the virtual object to the target multiplying power of the scaling information.
In an exemplary embodiment, the virtual object adaptive adjustment apparatus further comprises a smoothing module configured to perform smoothing of the video frames according to a temporal smoothing algorithm.
For specific limitations of the virtual object adaptive adjustment device, reference may be made to the above limitation of the virtual object adaptive adjustment method, which is not described herein. The modules in the virtual object adaptive adjustment device can be all or partially realized by software, hardware and a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a terminal, and the internal structure of which may be as shown in fig. 7. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a method of adaptive adjustment of a virtual object. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, can also be keys, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structure shown in FIG. 7 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In one embodiment, a computer device is provided comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the steps of when executing the computer program:
identifying a video frame containing a target object to obtain key point information, scaling information and contour information of the target object;
generating a virtual object according to the contour information;
Acquiring key point information of a standard object corresponding to the target object;
obtaining a target multiplying power for self-adaptive adjustment according to the virtual object, the key point information of the target object and the key point information of the standard object;
and adjusting the position and the size of the virtual object on the target object according to the target multiplying power and the scaling information.
In one embodiment, the processor when executing the computer program further performs the steps of:
acquiring a first key point closest to the virtual object from the key point information of the target object;
Acquiring a second key point corresponding to the first key point from the key point information of the standard object;
And obtaining the target multiplying power according to the first key point, the first central point in the key point information of the target object, the second key point and the second central point in the key point information of the standard object.
In one embodiment, the processor when executing the computer program further performs the steps of:
Calculating a first distance between the first key point and the first center point;
Calculating a second distance between the second key point and the second center point;
and obtaining the target multiplying power according to the first distance and the second distance.
In one embodiment, the processor when executing the computer program further performs the steps of:
and taking the ratio of the first distance to the second distance as the target multiplying power.
In one embodiment, the processor when executing the computer program further performs the steps of:
expanding the target multiplying power by a third distance between the virtual object and a first center point in the key point information of the target object;
And scaling the size of the virtual object to the target multiplying power of the scaling information.
In one embodiment, the processor when executing the computer program further performs the steps of:
and carrying out smoothing processing on the video frames according to a time domain smoothing algorithm.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of:
identifying a video frame containing a target object to obtain key point information, scaling information and contour information of the target object;
generating a virtual object according to the contour information;
Acquiring key point information of a standard object corresponding to the target object;
obtaining a target multiplying power for self-adaptive adjustment according to the virtual object, the key point information of the target object and the key point information of the standard object;
and adjusting the position and the size of the virtual object on the target object according to the target multiplying power and the scaling information.
In one embodiment, the computer program when executed by the processor further performs the steps of:
acquiring a first key point closest to the virtual object from the key point information of the target object;
Acquiring a second key point corresponding to the first key point from the key point information of the standard object;
And obtaining the target multiplying power according to the first key point, the first central point in the key point information of the target object, the second key point and the second central point in the key point information of the standard object.
In one embodiment, the computer program when executed by the processor further performs the steps of:
Calculating a first distance between the first key point and the first center point;
Calculating a second distance between the second key point and the second center point;
and obtaining the target multiplying power according to the first distance and the second distance.
In one embodiment, the computer program when executed by the processor further performs the steps of:
and taking the ratio of the first distance to the second distance as the target multiplying power.
In one embodiment, the computer program when executed by the processor further performs the steps of:
expanding the target multiplying power by a third distance between the virtual object and a first center point in the key point information of the target object;
And scaling the size of the virtual object to the target multiplying power of the scaling information.
In one embodiment, the computer program when executed by the processor further performs the steps of:
and carrying out smoothing processing on the video frames according to a time domain smoothing algorithm.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (SYNCHLINK) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples illustrate only a few embodiments of the application, which are described in detail and are not to be construed as limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of protection of the present application is to be determined by the appended claims.

Claims (12)

1. A method for adaptively adjusting a virtual object, the method comprising:
identifying a video frame containing a target object to obtain key point information, scaling information and contour information of the target object;
generating a virtual object according to the contour information;
Acquiring key point information of a standard object corresponding to the target object, wherein the standard object is a preset and stored object with a comparison function;
acquiring a first key point closest to the virtual object from the key point information of the target object;
Acquiring a second key point corresponding to the first key point from the key point information of the standard object;
Obtaining a target multiplying power according to the first key point, a first central point in key point information of the target object, the second key point and a second central point in key point information of the standard object, wherein the first central point is a point positioned at the central position of the target object, and the second central point is a point positioned at the central position of the standard object;
and adjusting the position and the size of the virtual object on the target object according to the target multiplying power and the scaling information.
2. The method according to claim 1, wherein the obtaining the target magnification according to the first keypoint, the first center point in the keypoint information of the target object, the second keypoint, and the second center point in the keypoint information of the standard object includes:
Calculating a first distance between the first key point and the first center point;
Calculating a second distance between the second key point and the second center point;
and obtaining the target multiplying power according to the first distance and the second distance.
3. The method of claim 2, wherein the deriving the target magnification from the first distance and the second distance comprises:
and taking the ratio of the first distance to the second distance as the target multiplying power.
4. A method according to any one of claims 1 to 3, wherein said adjusting the position and size of the virtual object on the target object according to the target magnification and the scaling information comprises:
expanding the target multiplying power by a third distance between the virtual object and a first center point in the key point information of the target object;
And scaling the size of the virtual object to the target multiplying power of the scaling information.
5. A method according to any one of claims 1 to 3, wherein the identifying of the video frame containing the target object further comprises:
and carrying out smoothing processing on the video frames according to a time domain smoothing algorithm.
6. A virtual object adaptive adjustment apparatus, the apparatus comprising:
The identification module is used for identifying the video frame containing the target object to obtain key point information, scaling information and contour information of the target object;
The generating module is used for generating a virtual object according to the contour information;
the key point acquisition module is used for acquiring key point information of a standard object corresponding to the target object, wherein the standard object is a preset and stored object with a comparison function;
the multiplying power acquisition module is used for acquiring a first key point closest to the virtual object from the key point information of the target object;
Acquiring a second key point corresponding to the first key point from the key point information of the standard object;
Obtaining a target multiplying power according to the first key point, a first central point in key point information of the target object, the second key point and a second central point in key point information of the standard object, wherein the first central point is a point positioned at the central position of the target object, and the second central point is a point positioned at the central position of the standard object;
And the adjusting module is used for adjusting the position and the size of the virtual object on the target object according to the target multiplying power and the scaling information.
7. The apparatus of claim 6, wherein the adjustment module is specifically configured to:
expanding the target multiplying power by a third distance between the virtual object and a first center point in the key point information of the target object;
And scaling the size of the virtual object to the target multiplying power of the scaling information.
8. The apparatus of claim 7, wherein the magnification acquisition module is specifically configured to:
Calculating a first distance between the first key point and the first center point;
Calculating a second distance between the second key point and the second center point;
and obtaining the target multiplying power according to the first distance and the second distance.
9. The apparatus of claim 8, wherein the magnification acquisition module is specifically configured to:
and taking the ratio of the first distance to the second distance as the target multiplying power.
10. The apparatus according to any one of claims 6-9, wherein the virtual object adaptive adjustment apparatus further comprises a smoothing module; the smoothing module is specifically configured to:
and carrying out smoothing processing on the video frames according to a time domain smoothing algorithm.
11. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any one of claims 1 to 5 when the computer program is executed by the processor.
12. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 5.
CN201911201523.1A 2019-11-29 2019-11-29 Virtual object self-adaptive adjustment method, device, computer equipment and storage medium Active CN110910512B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911201523.1A CN110910512B (en) 2019-11-29 2019-11-29 Virtual object self-adaptive adjustment method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911201523.1A CN110910512B (en) 2019-11-29 2019-11-29 Virtual object self-adaptive adjustment method, device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110910512A CN110910512A (en) 2020-03-24
CN110910512B true CN110910512B (en) 2024-04-30

Family

ID=69820819

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911201523.1A Active CN110910512B (en) 2019-11-29 2019-11-29 Virtual object self-adaptive adjustment method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110910512B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111462337B (en) * 2020-03-27 2023-08-18 咪咕文化科技有限公司 Image processing method, device and computer readable storage medium
CN111640196A (en) * 2020-06-08 2020-09-08 浙江商汤科技开发有限公司 Space capsule special effect generation method and device, electronic equipment and storage medium
CN114997941A (en) * 2022-04-26 2022-09-02 北京达佳互联信息技术有限公司 Virtual article display method and device, electronic equipment and storage medium
CN115048001A (en) * 2022-06-16 2022-09-13 亮风台(云南)人工智能有限公司 Virtual object display method and device, electronic equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103631370A (en) * 2012-08-28 2014-03-12 腾讯科技(深圳)有限公司 Method and device for controlling virtual image
US9129404B1 (en) * 2012-09-13 2015-09-08 Amazon Technologies, Inc. Measuring physical objects and presenting virtual articles
CN109063539A (en) * 2018-06-08 2018-12-21 平安科技(深圳)有限公司 The virtual usual method of glasses, device, computer equipment and storage medium
US20190221041A1 (en) * 2018-01-12 2019-07-18 Beijing Xiaomi Mobile Software Co., Ltd. Method and apparatus for synthesizing virtual and real objects
CN110058685A (en) * 2019-03-20 2019-07-26 北京字节跳动网络技术有限公司 Display methods, device, electronic equipment and the computer readable storage medium of virtual objects
CN110069125A (en) * 2018-09-21 2019-07-30 北京微播视界科技有限公司 The control method and device of virtual objects
CN110069126A (en) * 2018-11-16 2019-07-30 北京微播视界科技有限公司 The control method and device of virtual objects
CN110070481A (en) * 2019-03-13 2019-07-30 北京达佳互联信息技术有限公司 Image generating method, device, terminal and the storage medium of virtual objects for face

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103631370A (en) * 2012-08-28 2014-03-12 腾讯科技(深圳)有限公司 Method and device for controlling virtual image
US9129404B1 (en) * 2012-09-13 2015-09-08 Amazon Technologies, Inc. Measuring physical objects and presenting virtual articles
US20190221041A1 (en) * 2018-01-12 2019-07-18 Beijing Xiaomi Mobile Software Co., Ltd. Method and apparatus for synthesizing virtual and real objects
CN109063539A (en) * 2018-06-08 2018-12-21 平安科技(深圳)有限公司 The virtual usual method of glasses, device, computer equipment and storage medium
CN110069125A (en) * 2018-09-21 2019-07-30 北京微播视界科技有限公司 The control method and device of virtual objects
CN110069126A (en) * 2018-11-16 2019-07-30 北京微播视界科技有限公司 The control method and device of virtual objects
CN110070481A (en) * 2019-03-13 2019-07-30 北京达佳互联信息技术有限公司 Image generating method, device, terminal and the storage medium of virtual objects for face
CN110058685A (en) * 2019-03-20 2019-07-26 北京字节跳动网络技术有限公司 Display methods, device, electronic equipment and the computer readable storage medium of virtual objects

Also Published As

Publication number Publication date
CN110910512A (en) 2020-03-24

Similar Documents

Publication Publication Date Title
CN110910512B (en) Virtual object self-adaptive adjustment method, device, computer equipment and storage medium
US11861936B2 (en) Face reenactment
KR102279813B1 (en) Method and device for image transformation
WO2020103647A1 (en) Object key point positioning method and apparatus, image processing method and apparatus, and storage medium
US10559062B2 (en) Method for automatic facial impression transformation, recording medium and device for performing the method
WO2022078041A1 (en) Occlusion detection model training method and facial image beautification method
CN113313085B (en) Image processing method and device, electronic equipment and storage medium
CN107564080B (en) Face image replacement system
CN109376671B (en) Image processing method, electronic device, and computer-readable medium
KR101308946B1 (en) Method for reconstructing three dimensional facial shape
CN105989326B (en) Method and device for determining three-dimensional position information of human eyes
CN111008935B (en) Face image enhancement method, device, system and storage medium
CN111754415A (en) Face image processing method and device, image equipment and storage medium
CN109063628B (en) Face recognition method, device, computer equipment and storage medium
CN112417985A (en) Face feature point tracking method, system, electronic equipment and storage medium
CN115239861A (en) Face data enhancement method and device, computer equipment and storage medium
CN112001285B (en) Method, device, terminal and medium for processing beauty images
US20160110909A1 (en) Method and apparatus for creating texture map and method of creating database
CN109087240B (en) Image processing method, image processing apparatus, and storage medium
CN111476741B (en) Image denoising method, image denoising device, electronic equipment and computer readable medium
CN112669244B (en) Face image enhancement method, device, computer equipment and readable storage medium
CN112714337A (en) Video processing method and device, electronic equipment and storage medium
US20240013358A1 (en) Method and device for processing portrait image, electronic equipment, and storage medium
CN105631938B (en) Image processing method and electronic equipment
CN115665361A (en) Video fusion method in virtual environment and online video conference communication method

Legal Events

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