WO2019071562A1 - Data processing method and terminal - Google Patents

Data processing method and terminal Download PDF

Info

Publication number
WO2019071562A1
WO2019071562A1 PCT/CN2017/106014 CN2017106014W WO2019071562A1 WO 2019071562 A1 WO2019071562 A1 WO 2019071562A1 CN 2017106014 W CN2017106014 W CN 2017106014W WO 2019071562 A1 WO2019071562 A1 WO 2019071562A1
Authority
WO
WIPO (PCT)
Prior art keywords
point cloud
cloud information
sticker
terminal
portrait
Prior art date
Application number
PCT/CN2017/106014
Other languages
French (fr)
Chinese (zh)
Inventor
吴清亮
陈绍君
陈晓晨
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to CN201780083034.3A priority Critical patent/CN110168599B/en
Priority to PCT/CN2017/106014 priority patent/WO2019071562A1/en
Publication of WO2019071562A1 publication Critical patent/WO2019071562A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting

Definitions

  • the present application relates to the field of terminal technologies, and in particular, to a data processing method and a terminal.
  • the coordinates are set based on the display resolution of the terminal to arbitrarily define the initial display position of the sticker in the terminal.
  • the terminal detects the face during the shooting process, the user can select the sticker, and then the user can select the sticker.
  • the terminal combines the sticker with the face.
  • the sticker is a pair of rabbit ears.
  • the initial display position of the terminal is near the mouth of the face, and then the terminal adjusts the rabbit ear to the top position of the face to complete the stitching.
  • the initial display position of the arbitrarily defined sticker in the terminal is often far from the actual display position of the sticker in the actual scene relative to the face, so that the terminal often needs to spend more time to adjust the position of the sticker, resulting in poor user experience. .
  • the embodiment of the present application provides a data processing method and a terminal, which are used to improve user experience.
  • the first aspect of the embodiments of the present application provides a data processing method, including:
  • the terminal acquires the first point cloud information of the standard portrait
  • the point cloud information refers to a set of vectors in a three-dimensional coordinate system. These vectors are usually expressed in the form of X, Y, Z three-dimensional coordinates, and are generally used to represent the outer surface shape of an object. It can be understood that the first point cloud information can indicate the shape and display of the standard portrait displayed on the terminal. position;
  • the terminal can also obtain the second point cloud information of the sticker based on the obtained first point cloud information.
  • the sticker refers to the picture that the user can add to the terminal interface when using the shooting function, and the second point cloud information is the first point. At least a part of the information in the cloud information, it can be understood that the second point cloud information can indicate the position of the sticker on the terminal relative to the standard portrait.
  • the second point cloud information is artificially formulated according to the actual content of the sticker, for example,
  • the sticker content is a pair of glasses, then the sticker is designed near the eyes of the standard portrait. If the sticker content is a hat, the sticker is designed near the top of the standard portrait;
  • the terminal when the terminal detects the portrait in the shooting preview state, the terminal generates third point cloud information, and the third point cloud information may indicate the shape and the displayed position of the portrait displayed by the terminal in the shooting preview state in real time. It can be understood that the third point cloud information is not fixed like the first point cloud information, and the third point cloud information will change according to the change of the portrait in the lens.
  • the terminal displays the sticker according to the second point cloud information.
  • the terminal can determine whether the portrait is currently detected according to a certain rule. , that is, it will judge whether the third point cloud information matches the first point cloud information, and if it matches, the display shape of the current portrait is displayed. And the display position is similar to the standard portrait, the terminal can recognize that the portrait is detected, so the sticker selected by the user can be displayed on the terminal according to the second point cloud information.
  • the terminal may obtain the first point cloud information of the standard portrait and the second point cloud information of the sticker, and the second point cloud information is used to indicate the position of the sticker relative to the standard portrait, when the terminal detects the portrait
  • the third point cloud information of the portrait may be generated. Further, if the third point cloud information matches the first point cloud information and the user selects the sticker, the terminal displays the sticker according to the second point cloud information, because the second point cloud of the sticker
  • the information is artificially based on the content of the sticker. For example, the sticker content is a pair of glasses, then the sticker is near the eye of the standard portrait.
  • the sticker content is a hat
  • the sticker is near the top of the standard portrait, so when the third point cloud information matches the first point cloud information, the second point cloud information of the sticker is that the initial display position of the sticker and the actual display position of the sticker in the actual scene relative to the portrait are smaller. The time for the subsequent terminal to adjust the position of the sticker is saved, and the user experience is improved.
  • the method further includes:
  • the terminal selects a target SDK from a set of software development kits (SDKs), and all SDKs in the SDK set have a unified SDK interface.
  • SDKs software development kits
  • the SDKs in the SDK set include third-party development.
  • the camera stitching algorithm, the portrait beauty algorithm, the filter shooting algorithm and the portrait detection algorithm and the like, the camera APP can implement the above various camera functions by calling a third-party SDK.
  • the terminal selects the target SDK from the SDK set, including:
  • the terminal can select the target SDK from the integrated SDK set by means of intelligent selection.
  • each SDK has a corresponding SDK parameter, which includes parameters of the user skin level, parameters of the preview algorithm processing rate, and stickers.
  • the three parameters can be brought into the following formula to calculate the calculation result, and the calculation result with the largest value is selected from the set of calculation results, and the SDK corresponding to the calculation result is determined as the target SDK.
  • the formula includes:
  • R is the calculation result
  • B is the parameter of the user's skin level
  • P is the parameter of the preview algorithm processing rate
  • F is the parameter of the sticker followability rate
  • ⁇ , ⁇ , and ⁇ are preset weight coefficients.
  • the preset weight coefficient can be different in different shooting modes. For example, in the camera mode, the requirement for skin color is higher, then the value of ⁇ can be adjusted correspondingly, and the sticker followability rate requirement in the recording mode is required. If the value is higher, the value of ⁇ can be adjusted accordingly.
  • the values of ⁇ , ⁇ , and ⁇ are not limited herein.
  • the unified SDK interface definition includes:
  • the method further includes:
  • the terminal selects the target shooting algorithm from the set of shooting algorithms. It can be understood that the terminal can also integrate multiple shooting algorithms, that is, the developer of the shooting algorithm discloses the shooting algorithm. In this scenario, the SDK is no longer needed. By directly selecting a certain shooting algorithm, various shooting functions such as portrait beauty, portrait detection, filter shooting, and sticker stitching can be realized.
  • the selection of the target shooting algorithm can be selected by the terminal intelligently, or can be selected by the user according to preferences. This is not limited here.
  • the target shooting algorithm includes:
  • a second aspect of the embodiment of the present application provides a terminal, including:
  • a first acquiring unit configured to acquire first point cloud information of the standard portrait, where the first point cloud information is used to indicate coordinates of the standard portrait on the display screen of the terminal;
  • a second acquiring unit configured to acquire second point cloud information of the sticker, where the second point cloud information is at least a part of information in the first point cloud information, and the second point cloud information is used to indicate a position of the sticker relative to the standard portrait,
  • the two-point cloud information is artificially formulated, and the sticker is a pattern that can be displayed in the display screen;
  • a generating unit configured to generate a third point cloud information when the terminal detects the portrait in the shooting preview state, where the third point cloud information is used to indicate the coordinates of the portrait on the display screen in the shooting preview state;
  • a display unit configured to display the sticker according to the second point cloud information when the third point cloud information matches the first point cloud information and the user selects the sticker.
  • the terminal further includes:
  • the first selection unit is configured to select a target SDK from the SDK set, and all the SDKs in the SDK set have a unified SDK interface, and the target SDK is used to implement the flattening of the portrait and the sticker.
  • the first selecting unit includes:
  • An obtaining module configured to obtain an SDK parameter set corresponding to the SDK set, where the SDK parameter set includes a parameter set of the user skin level, a parameter set of a preview algorithm processing rate, and a parameter set of a sticker followability rate;
  • a calculation module configured to substitute the SDK parameter set into a formula to obtain a calculation result set
  • a first determining module configured to determine a target calculation result from the set of calculation results, where the target calculation result is a calculation result with the largest value in the calculation result set;
  • the second determining module is configured to determine a target SDK corresponding to the target calculation result.
  • the terminal further includes:
  • a second selecting unit configured to select a target shooting algorithm from the set of shooting algorithms, where the target shooting algorithm is used to implement the stitching of the portrait and the sticker.
  • a third aspect of the embodiment of the present application provides a terminal, including:
  • a processor a memory, a bus, and an input and output interface
  • a program code is stored in the memory
  • the first point cloud information is used to indicate the coordinates of the standard portrait on the display screen of the terminal;
  • the second point cloud information is at least part of the information in the first point cloud information, the second point cloud information is used to indicate the position of the sticker relative to the standard portrait, and the second point cloud information is artificially drawn
  • the sticker is a pattern that can be displayed in the display screen;
  • the third point cloud information is generated, and the third point cloud information is used to indicate the coordinates of the portrait on the display screen when the terminal is in the preview state;
  • the sticker is displayed according to the second point cloud information.
  • a fourth aspect of the embodiments of the present application provides a computer readable storage medium having instructions stored in a computer to cause a computer to execute the flow in the data processing method of the first aspect described above when running on a computer.
  • a fifth aspect of the embodiments of the present application provides a computer program product, which, when run on a computer, causes the computer to execute the flow in the data processing method of the first aspect described above.
  • the embodiments of the present application have the following advantages:
  • the terminal may obtain the first point cloud information of the standard portrait and the second point cloud information of the sticker, and the second point cloud information is used to indicate the position of the sticker relative to the standard portrait, when the terminal When the portrait is detected, the third point cloud information of the portrait may be generated. Further, if the third point cloud information matches the first point cloud information and the user selects the sticker, the terminal displays the sticker according to the second point cloud information, due to the sticker The second point cloud information is artificially based on the content of the sticker. For example, the sticker content is a pair of glasses, then the sticker is near the eye of the standard portrait. If the sticker content is a hat, the sticker is on the top of the standard portrait.
  • the second point cloud information of the sticker is the initial display position of the sticker and the actual display position of the sticker relative to the portrait in the actual scene.
  • the error is small, which saves the time for the subsequent terminal to adjust the position of the sticker, thereby improving the user experience.
  • FIG. 1 is a schematic diagram of an application scenario of a data processing method according to an embodiment of the present application
  • FIG. 2 is a schematic diagram of an embodiment of a data processing method in an embodiment of the present application.
  • 3(a) is a schematic diagram showing a standard portrait displayed on a terminal in the embodiment of the present application.
  • FIG. 3(b) is a schematic diagram showing a sticker displayed on a terminal in an embodiment of the present application.
  • FIG. 3(c) is a schematic diagram of a scene applied to a portrait and a sticker in the embodiment of the present application;
  • FIG. 3( d ) is a schematic diagram of another scene applied to the combination of a portrait and a sticker in the embodiment of the present application;
  • FIG. 3( e ) is a schematic diagram of another scene applied to a portrait and a sticker in the embodiment of the present application;
  • FIG. 3(f) is a schematic diagram of another scene applied to a portrait and a sticker in the embodiment of the present application;
  • FIG. 4 is a schematic diagram of another embodiment of a data processing method according to an embodiment of the present application.
  • FIG. 5 is a schematic diagram of another application scenario of a data processing method according to an embodiment of the present application.
  • FIG. 6 is a schematic diagram of a scenario applied to a user operating terminal to download a sticker according to an embodiment of the present application
  • FIG. 7 is a schematic diagram of an embodiment of a terminal in an embodiment of the present application.
  • FIG. 8 is a schematic diagram of another embodiment of a terminal according to an embodiment of the present application.
  • FIG. 9 is a schematic structural diagram of a terminal in an embodiment of the present application.
  • the embodiment of the present application provides a data processing method and a terminal, between the initial display position of the sticker and the final actual display position when the user selects the sticker by pre-defining the initial display position of the sticker in the terminal.
  • the error is small, which saves the time for the subsequent terminal to adjust the position of the sticker and improves the user experience.
  • the embodiment can be applied to the application scenario shown in FIG. 1.
  • the terminal can communicate with a third-party server, and the third-party server stores a sticker material designed by a third party, and the camera application (application, APP) in the terminal starts.
  • the third-party SDK integrated in the camera APP can download the third-party sticker material from the third-party server and register the downloaded third-party sticker material into the sticker management module of the camera APP for the user to select, in addition, the camera will
  • the captured image data is sent to the camera APP, combined with the sticker material selected by the user, and the third party SDK performs portrait recognition and the sticker and the portrait are combined to finally realize the shooting preview and the image saving.
  • the third-party SDK includes a third-party developed sticker flattening algorithm, a portrait beauty algorithm, a filter shooting algorithm, and a portrait detection algorithm
  • the camera APP can be implemented by calling a third-party SDK.
  • the camera APP is executed in the application processor of the terminal, and the application processor can perform data interaction with the camera through its external interface.
  • the image data format output by the camera may be a YUV format, or may be Other formats, such as the RGB format, are not limited herein.
  • the terminal in the embodiment of the present application may be a mobile phone, a tablet computer, a wearable device, an augmented reality (AR), a virtual reality (VR) device, a notebook computer, a super mobile personal computer (ultra-mobile).
  • the personal computer (UMPC), the netbook, the personal digital assistant (PDA), and the like have a shooting function, and the embodiment of the present application does not impose any limitation.
  • an embodiment of the data processing method in the embodiment of the present application includes:
  • the terminal acquires the first point cloud information of the standard portrait.
  • the terminal may acquire the first point cloud information of the standard portrait, where the point cloud information refers to a set of vectors in a three-dimensional coordinate system. These vectors are usually represented in the form of X, Y, Z three-dimensional coordinates, and are generally used primarily to represent the outer surface shape of an object. Most point cloud information is generated by 3D scanning devices, such as lidar (2D/3D), stereo camera, time-of-flight camera, These devices measure information on a large number of points on the surface of the object in an automated manner, and then output point cloud information using a data file.
  • 3D scanning devices such as lidar (2D/3D), stereo camera, time-of-flight camera
  • the standard portrait is an artificially defined 3D portrait model. It can be understood that the first point cloud information of the standard portrait can be used to reflect the outer surface shape of the standard portrait and its display position at the terminal.
  • the standard portrait can refer to the standard.
  • the model of the human head can also refer to a model including a standard human head and a standard human torso, which is not limited herein.
  • This embodiment describes the standard portrait as a standard human head, as shown in FIG. 3(a), and the terminal is a mobile phone. For example, the figure shows the display position and display shape of the standard portrait based on the first point cloud information on the terminal interface.
  • FIG. 3( a ) is only an example.
  • the standard portrait does not have to be displayed on the interface of the terminal according to the first point cloud information, and the first point cloud information of the standard portrait is in three-dimensional coordinates.
  • the form can be expressed as shown in Table 1 below.
  • Table 1 below is a part of the three-dimensional coordinates of the first point cloud information of the standard portrait.
  • the number and value of the specific coordinates in the table may vary. Make a limit.
  • the terminal acquires a second point cloud information of the sticker.
  • the terminal acquires the second point cloud information of the sticker, where the second point cloud information is at least a part of the information of the first point cloud information.
  • the cloud information is selected as the second point cloud information, that is, the position of the sticker relative to the standard portrait is defined.
  • the sticker picture is a pair of sunglasses, then the first point can be selected.
  • the three-dimensional coordinates in the vicinity of the standard portrait eyes in the cloud information are used as the second point cloud information, and the figure is the display position of the sticker according to the second point cloud information at the terminal.
  • the second point cloud information of the sticker is artificially formulated according to the actual content of the sticker.
  • the sticker is a hat
  • the three-dimensional coordinates near the top of the standard portrait image in the first point cloud information can be selected as the first Two points of cloud information, so in actual applications, different stickers can correspond to the same point cloud information, and can also correspond to different point cloud information, which is not limited herein.
  • a complete set of sticker material includes a picture of the sticker and a second point cloud information of the sticker, wherein the image format of the sticker may be a bitmap file (bitmap, bmp), or other formats.
  • bitmap bitmap, bmp
  • png portable network image
  • the terminal When the terminal detects the portrait in the shooting preview state, the terminal generates third point cloud information.
  • the user opens the camera APP to enter the shooting preview state
  • the camera can acquire image information, and display a preview image on the terminal display screen
  • the terminal can detect the image acquired by the camera in real time, and the portrait appears in the shooting range of the camera.
  • the terminal generates the third point cloud information of the portrait.
  • the third point cloud information is also represented in the form of three-dimensional coordinates, and is used to indicate that the portrait currently acquired by the camera is in the state of the preview preview.
  • the actual display shape and the actual display position of the terminal, the third point cloud information is generated according to the portrait detection algorithm of the third party SDK, and the third point cloud information changes in real time as the portrait image acquired by the camera moves.
  • the terminal displays the sticker according to the second point cloud information.
  • the user may select a sticker on the interface of the terminal, and the terminal displays the sticker according to the second point cloud information, so that the preview is simultaneously displayed on the display screen of the terminal.
  • Portraits and stickers to achieve the combination of portraits and stickers, it can be understood that the display of stickers is based on the third-party SDK's sticker flattening algorithm, as shown in Figure 3 (c), the terminal determines the third point cloud information and When a little cloud information matches, the user can select a sticker from the list of sticker materials on the terminal interface, and the terminal will display the sticker on the terminal interface according to the second point cloud information of the sticker.
  • the third point cloud information of the actual portrait is not completely coincident with the first point cloud information of the standard portrait. Therefore, according to the different situations of the portrait on the terminal display screen, the terminal will scale or shift the sticker by the sticker flatning algorithm. The stitching of the sticker and the portrait is realized, and the display scenes of the specific portrait and the sticker are separately described below.
  • the terminal may determine, according to the coincidence ratio of the third point cloud information and the first point cloud information, whether the third point cloud information matches the first point cloud information, specifically, the terminal compares the third point cloud information with the third point.
  • the terminal determines that the third point cloud information matches the first point cloud information.
  • the threshold value may be other values, for example, 95%, which is not limited herein.
  • the third point cloud information may not be the same.
  • the terminal may also determine that the third point cloud information matches the first point cloud information, Specifically, the scaling may be 30% or 20%, which is not limited herein.
  • the second point cloud information according to the sticker flattening algorithm sticker is also scaled according to the first point cloud information. To zoom, the terminal will display the sticker according to the point cloud information obtained by scaling the second point cloud information to realize the flattening of the sticker and the portrait.
  • the description is the same as the above description, and details are not described herein. .
  • the position of the portrait captured by the terminal has a significant displacement change relative to the position of the standard portrait, if the current third point cloud information and the first point cloud information are changed by corresponding displacements.
  • the point cloud information is matched or the third point cloud information is matched with the point cloud information obtained after the first point cloud information is scaled and the corresponding displacement is changed, it can also be understood that the third point cloud information matches the first point cloud information.
  • the point cloud information according to the sticker flattening algorithm sticker will also change according to the change of the first point cloud information, and the terminal will display the sticker according to the point cloud information obtained after the second point cloud information changes. Achieve the combination of stickers and portraits.
  • the terminal simultaneously captures two portraits, a portrait a and a portrait b, and the terminal generates a point cloud information and b point cloud information corresponding to the two portraits respectively.
  • the terminal Will determine whether the point cloud information matches the first point cloud information and whether the point b cloud information matches the first point cloud information.
  • the specific judgment method is as shown in Figure 3(c), 3(d) or 3(e). The judgment manners described in the corresponding embodiments are similar, and are not described herein again. Therefore, when the a point cloud information and the b point cloud information are matched with the first point cloud information, the terminal also has the corresponding positions of the portrait a and the portrait b.
  • the terminal displays the sticker in the corresponding position of the portrait a. If only the b point cloud information matches the first point cloud information, Then, the terminal displays the sticker only in the corresponding position of the portrait b.
  • the number of the images captured by the terminal is not limited to the two examples. The actual application scenario is preferred, and is not limited herein.
  • the terminal may obtain the first point cloud information of the standard portrait and the second point cloud information of the sticker, and the second point cloud information is used to indicate the position of the sticker relative to the standard portrait, when the terminal When the portrait is detected, the third point cloud information of the portrait may be generated. Further, if the third point cloud information matches the first point cloud information and the user selects the sticker, the terminal displays the sticker according to the second point cloud information, due to the sticker The second point cloud information is artificially based on the content of the sticker. For example, the sticker content is a pair of glasses, then the sticker is near the eye of the standard portrait. If the sticker content is a hat, the sticker is on the top of the standard portrait.
  • the second point cloud information of the sticker is the initial display position of the sticker and the actual display position of the sticker relative to the portrait in the actual scene.
  • the error is small, which saves the time for the subsequent terminal to adjust the position of the sticker, thereby improving the user experience.
  • FIG. 4 another embodiment of the data processing method in the embodiment of the present application includes:
  • the user operates the terminal to open the camera APP, and correspondingly, the camera of the terminal is turned on, and the camera sends the acquired image data to the camera APP.
  • the camera APP can integrate multiple SDKs including a sticker shooting algorithm, and the SDK integrated by the camera APP has a unified SDK interface. It can be understood that developers who need to provide these SDKs develop corresponding rules according to uniform rules. Shoot the algorithm and package the SDK.
  • the unified SDK interface may include a process of downloading and registering a sticker, initializing a shooting interface, performing a sticker preview, processing shooting data, and ending a process. It can be understood that the SDK interface described herein is only an example. The specific SDK interface in the actual application may be changed, and is not limited herein.
  • the SDK integrated by all camera APPs is a sticker material defined according to the first point cloud information of the standard portrait, that is to say, the sticker material provided by the third party needs to be defined according to the first point cloud information, and correspondingly, The developer is required to develop a sticker flattening algorithm based on the definition of the sticker.
  • the specific manner is similar to that described in the embodiment shown in FIG. 2, and details are not described herein again.
  • the terminal can select the target SDK from the SDK set integrated by the camera APP by means of intelligent selection.
  • each SDK has a corresponding SDK parameter, and the parameter includes a parameter of the user skin level and a parameter of the preview algorithm processing rate.
  • the parameters of the sticker followability rate, and then the three parameters can be brought into the following formula to calculate the calculation result, and the calculation result with the largest value is selected from the set of calculation results, and the SDK corresponding to the calculation result is determined as the target. SDK.
  • the parameters of the sticker followability rate, ⁇ , ⁇ , and ⁇ are preset weight coefficients. It should be noted that the preset weight coefficient can be different in different shooting modes. For example, in the camera mode, the requirement for skin color is higher, then the value of ⁇ can be increased accordingly, and the sticker followability rate in the recording mode. If the requirement is high, the value of ⁇ can be increased accordingly.
  • the values of ⁇ , ⁇ , and ⁇ are not limited here.
  • the terminal can be built and the corresponding algorithm can be set and adjusted according to actual needs.
  • the camera APP can integrate multiple shooting algorithms in addition to multiple SDKs, that is, a shooting algorithm developed and disclosed by a developer of the shooting algorithm.
  • the camera The APP no longer needs to call the SDK and can directly select a certain shooting algorithm to achieve various shooting functions such as portrait beauty, portrait detection, filter shooting and sticker flattening.
  • the selection of the shooting algorithm can be selected by the terminal intelligently, or The user chooses it according to his or her preference, which is not limited here.
  • step 403. Determine whether the sticker selected by the user has been downloaded. If yes, execute step 406. If no, perform step 404.
  • the terminal needs to determine whether the sticker selected by the user has been downloaded and registered to the sticker management module in the camera APP.
  • the camera APP can download the sticker selected by the user by accessing the server.
  • the server may be a third-party server corresponding to the third-party SDK shown in FIG. 1 .
  • the camera APP currently uses an SDK developed by Company A, then the camera app can download stickers from A company's private server.
  • the server may also be a public server.
  • the camera APP may also download other third-party designed stickers from the public server.
  • the camera APP integrated SDK has a unified interface, and the SDK is a sticker material defined according to the first point cloud information of the standard portrait, so that the third-party sticker material on the public server is also the first point cloud according to the standard portrait.
  • the information is defined, then any kind of SDK used by the current camera APP can present the sticker on the public server in the interface of the terminal.
  • the camera APP currently uses the SDK developed by the company A, and the A sticker, the B sticker, and the C sticker in the sticker material list are all designed and announced by the company A, and the current SDK can be Download new stickers and update the sticker material list from company A's private server according to user needs.
  • users can also To download the sticker material published by the company, such as company A, company B or company C, from the public server by clicking the "+" button on the interface, and add it to the sticker list of the camera app for use.
  • the camera APP registers the sticker downloaded from the server to the local sticker management module for saving.
  • the user opens the camera APP for the next time to shoot, there is no need to repeatedly download the sticker material that has been used before.
  • step 406. Determine whether a portrait is detected. If yes, execute step 407. If no, repeat step 406.
  • the camera app will continue to perform the portrait detection until it is determined that the portrait has been detected, wherein the description of the portrait detection with respect to the camera APP and the steps in the embodiment shown in FIG.
  • the descriptions of 203 and 204 are similar, and details are not described herein again.
  • the second point cloud information of the sticker may be displayed on the interface of the terminal, wherein the description of the sticker according to the second point cloud information is shown in FIG. 2
  • the description of step 204 in the embodiment is similar, and details are not described herein again.
  • the camera APP can adjust the display position or display size of the sticker according to the integrated SDK or sticker flattening algorithm, and finally complete the flattening of the sticker and the portrait.
  • the terminal may obtain the first point cloud information of the standard portrait and the second point cloud information of the sticker, and the second point cloud information is used to indicate the position of the sticker relative to the standard portrait, when the terminal When the portrait is detected, the third point cloud information of the portrait may be generated. Further, if the third point cloud information matches the first point cloud information and the user selects the sticker, the terminal displays the sticker according to the second point cloud information, due to the sticker The second point cloud information is artificially based on the content of the sticker. For example, the sticker content is a pair of glasses, then the sticker is near the eye of the standard portrait. If the sticker content is a hat, the sticker is on the top of the standard portrait.
  • the second point cloud information of the sticker is the initial display position of the sticker and the actual display position of the sticker relative to the portrait in the actual scene.
  • the error is small, which saves the time for the subsequent terminal to adjust the position of the sticker, thereby improving the user experience.
  • the camera APP can integrate multiple SDKs or shooting algorithms, and all of the SDKs have a unified SDK interface, and are all defined according to the first point cloud information of the standard portrait, so as long as the public server
  • the third-party sticker material is also defined according to the first point cloud information of the standard portrait.
  • any SDK used by the current camera APP can present the sticker on the public server on the interface of the terminal, and the user is no longer limited to only Users can download stickers from a third-party private server, and users can download any published stickers from the public server, which makes the user's choice of stickers more rich and enhances the user experience.
  • an embodiment of a terminal in this embodiment of the present application includes:
  • a first acquiring unit 701 configured to acquire first point cloud information of a standard portrait, where the first point cloud information is used to indicate coordinates of the standard portrait on a display screen of the terminal;
  • a second acquiring unit 702 configured to acquire second point cloud information of the sticker, the second point cloud information is at least a part of the first point cloud information, and the second point cloud information is used to indicate the Sticker relative to the standard portrait Position, the second point cloud information is artificially formulated, and the sticker is a pattern that can be displayed in the display screen;
  • the generating unit 703 is configured to generate third point cloud information when the terminal detects the portrait in the shooting preview state, where the third point cloud information is used to indicate that the terminal is in the shooting preview state The coordinates on the screen;
  • the display unit 704 is configured to display the sticker according to the second point cloud information when the third point cloud information matches the first point cloud information and the user selects the sticker.
  • the first acquiring unit 701 may obtain the first point cloud information of the standard portrait
  • the second acquiring unit 702 may obtain the second point cloud information
  • the second point cloud information is used to indicate that the sticker is opposite to the sticker.
  • the generating unit 703 may generate the third point cloud information of the portrait, and further if the third point cloud information matches the first point cloud information and the user selects the sticker, the display unit 704 The sticker will be displayed according to the second point cloud information.
  • the sticker content is a pair of glasses
  • the sticker is near the eye of the standard portrait
  • the sticker content If it is a hat, then the sticker is near the top of the standard portrait, so when the third point cloud information matches the first point cloud information, the second point cloud information of the sticker is the initial display position of the sticker and the sticker.
  • the error between the actual display position and the portrait is small, which saves the time for the subsequent terminal to adjust the position of the sticker. The user experience.
  • FIG. 8 another embodiment of the terminal in this embodiment of the present application includes:
  • a first acquiring unit 801 configured to acquire first point cloud information of a standard portrait, where the first point cloud information is used to indicate coordinates of the standard portrait on a display screen of the terminal;
  • a second acquiring unit 802 configured to acquire second point cloud information of the sticker, where the second point cloud information is at least a part of the first point cloud information, where the second point cloud information is used to indicate the
  • the second point cloud information is artificially defined by the position of the sticker relative to the standard portrait, and the sticker is a pattern that can be displayed in the display screen;
  • the generating unit 803 is configured to generate third point cloud information when the terminal detects the portrait in the shooting preview state, where the third point cloud information is used to indicate that the terminal is in the shooting preview state The coordinates on the screen;
  • the display unit 804 is configured to display the sticker according to the second point cloud information when the third point cloud information matches the first point cloud information and the user selects the sticker.
  • the first selection unit 805 is configured to select a target SDK from the SDK set, and all the SDKs in the SDK set have a unified SDK interface, and the target SDK is used to implement the stitching of the portrait and the sticker.
  • the second selecting unit 806 is configured to select a target shooting algorithm from the set of shooting algorithms, and the target shooting algorithm is used to implement the stitching of the portrait and the sticker.
  • the first selection unit 805 in the embodiment of the present application further includes:
  • the obtaining module 8051 is configured to obtain an SDK parameter set corresponding to the SDK set, where the SDK parameter set includes a parameter set of a user skin level, a parameter set of a preview algorithm processing rate, or a parameter set of a sticker followability rate;
  • a calculation module 8052 configured to substitute the SDK parameter set into a formula to obtain a calculation result set
  • a first determining module 8053 configured to determine, from the set of calculation results, a target calculation result, where the target calculation result is a calculation result having the largest value in the calculation result set;
  • the second determining module 8054 is configured to determine the target SDK corresponding to the target calculation result.
  • the terminal in the embodiment of the present application is described above from the perspective of a modular functional entity, and is processed from hardware below.
  • the terminal in the embodiment of the present application is described.
  • another embodiment of the terminal in this embodiment of the present application includes:
  • the embodiment of the present application further provides another terminal.
  • FIG. 9 for the convenience of description, only the part related to the embodiment of the present application is shown. If the specific technical details are not disclosed, please refer to the method part of the embodiment of the present application.
  • the terminal can be any terminal including a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a POS (Point of Sales), a vehicle-mounted computer, and the terminal is a mobile phone as an example:
  • FIG. 9 is a block diagram showing a partial structure of a mobile phone related to a terminal provided by an embodiment of the present application.
  • the mobile phone includes: a radio frequency (RF) circuit 910, a memory 920, an input unit 930, a display unit 940, a sensor 950, an audio circuit 960, a wireless fidelity (WiFi) module 970, and a processor 980.
  • RF radio frequency
  • the structure of the handset shown in FIG. 9 does not constitute a limitation to the handset, and may include more or less components than those illustrated, or some components may be combined, or different components may be arranged.
  • the RF circuit 910 can be used for receiving and transmitting signals during the transmission or reception of information or during a call. Specifically, after receiving the downlink information of the base station, it is processed by the processor 980. In addition, the uplink data is designed to be sent to the base station. Generally, RF circuit 910 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, RF circuitry 910 can also communicate with the network and other devices via wireless communication. The above wireless communication may use any communication standard or protocol, including but not limited to Global System of Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (Code Division). Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), E-mail, Short Messaging Service (SMS), and the like.
  • GSM Global System of Mobile communication
  • GPRS General Packet Radio Service
  • the memory 920 can be used to store software programs and modules, and the processor 980 executes various functional applications and data processing of the mobile phone by running software programs and modules stored in the memory 920.
  • the memory 920 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may be stored according to Data created by the use of the mobile phone (such as audio data, phone book, etc.).
  • memory 920 can include high speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
  • the input unit 930 can be configured to receive input numeric or character information and to generate key signal inputs related to user settings and function controls of the handset.
  • the input unit 930 may include a touch panel 931 and other input devices 932.
  • the touch panel 931 also referred to as a touch screen, can collect touch operations on or near the user (such as a user using a finger, a stylus, or the like on the touch panel 931 or near the touch panel 931. Operation), and drive the corresponding connecting device according to a preset program.
  • the touch panel 931 can include two parts: a touch detection device and a touch controller.
  • the touch detection device detects the touch orientation of the user, and detects a signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts the touch information into contact coordinates, and sends the touch information.
  • the processor 980 is provided and can receive commands from the processor 980 and execute them.
  • the touch panel 931 can be implemented in various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave.
  • the input unit 930 may also include other input devices 932.
  • other input devices 932 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), trackballs, mice, joysticks, and the like.
  • the display unit 940 can be used to display information input by the user or information provided to the user as well as various menus of the mobile phone.
  • the display unit 940 can include a display panel 941.
  • the display panel 941 can be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
  • the touch panel 931 can cover the display panel 941. When the touch panel 931 detects a touch operation on or near it, the touch panel 931 transmits to the processor 980 to determine the type of the touch event, and then the processor 980 according to the touch event. The type provides a corresponding visual output on display panel 941.
  • touch panel 931 and the display panel 941 are used as two independent components to implement the input and input functions of the mobile phone in FIG. 9, in some embodiments, the touch panel 931 and the display panel 941 may be integrated. Realize the input and output functions of the phone.
  • the handset may also include at least one type of sensor 950, such as a light sensor, motion sensor, and other sensors.
  • the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 941 according to the brightness of the ambient light, and the proximity sensor may close the display panel 941 and/or when the mobile phone moves to the ear. Or backlight.
  • the accelerometer sensor can detect the magnitude of acceleration in all directions (usually three axes). When it is stationary, it can detect the magnitude and direction of gravity.
  • the mobile phone can be used to identify the gesture of the mobile phone (such as horizontal and vertical screen switching, related Game, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for the mobile phone can also be configured with gyroscopes, barometers, hygrometers, thermometers, infrared sensors and other sensors, no longer Narration.
  • the gesture of the mobile phone such as horizontal and vertical screen switching, related Game, magnetometer attitude calibration
  • vibration recognition related functions such as pedometer, tapping
  • the mobile phone can also be configured with gyroscopes, barometers, hygrometers, thermometers, infrared sensors and other sensors, no longer Narration.
  • An audio circuit 960, a speaker 961, and a microphone 962 can provide an audio interface between the user and the handset.
  • the audio circuit 960 can transmit the converted electrical data of the received audio data to the speaker 961, and convert it into a sound signal output by the speaker 961.
  • the microphone 962 converts the collected sound signal into an electrical signal, and the audio circuit 960 After receiving, it is converted into audio data, and then processed by the audio data output processor 980, sent to the other mobile phone via the RF circuit 910, or outputted to the memory 920 for further processing.
  • WiFi is a short-range wireless transmission technology
  • the mobile phone can help users to send and receive emails, browse web pages, and access streaming media through the WiFi module 970, which provides users with wireless broadband Internet access.
  • FIG. 9 shows the WiFi module 970, it can be understood that it does not belong to the essential configuration of the mobile phone, and can be omitted as needed within the scope of not changing the essence of the application.
  • the processor 980 is the control center of the handset, which connects various portions of the entire handset using various interfaces and lines, by executing or executing software programs and/or modules stored in the memory 920, and invoking data stored in the memory 920, executing The phone's various functions and processing data, so that the overall monitoring of the phone.
  • the processor 980 may include one or more processing units; preferably, the processor 980 may integrate an application processor and a modem processor, where the application processor mainly processes an operating system, a user interface, an application, and the like.
  • the modem processor primarily handles wireless communications. It will be appreciated that the above described modem processor may also not be integrated into the processor 980.
  • the handset also includes a power source 990 (such as a battery) that powers the various components.
  • a power source can be logically coupled to the processor 980 via a power management system to manage charging, discharging, and power management through the power management system. And other functions.
  • the mobile phone may further include a camera, a Bluetooth module, and the like, and details are not described herein again.
  • the processor 980 included in the terminal further has the following functions:
  • the first point cloud information is used to indicate the coordinates of the standard portrait on the display screen of the terminal;
  • the second point cloud information is at least part of the information in the first point cloud information, the second point cloud information is used to indicate the position of the sticker relative to the standard portrait, and the second point cloud information is artificially drawn
  • the sticker is a pattern that can be displayed in the display screen;
  • the third point cloud information is generated, and the third point cloud information is used to indicate the coordinates of the portrait on the display screen when the terminal is in the preview state;
  • the sticker is displayed according to the second point cloud information.
  • the disclosed system, apparatus, and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
  • a computer readable storage medium A number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present application.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like, which can store program code. .

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • User Interface Of Digital Computer (AREA)
  • Processing Or Creating Images (AREA)

Abstract

Disclosed by the embodiments of the present application is a data processing method, used to enhance the image capturing experience of a user and comprising: a terminal obtaining first point cloud information of a standard portrait, the first point cloud information being used to indicate coordinates of the standard portrait on a display screen of a terminal; the terminal obtaining second point cloud information of a sticker, the second point cloud information being at least part of the first point cloud information, the second point cloud information being used to indicate a location of the sticker relative to the standard portrait, the second point cloud information being artificially formulated, and the sticker being a pattern that may be displayed in the display screen; when the terminal detects a portrait in an image capturing preview state, the terminal generating third point cloud information, the third point cloud information being used to indicate the coordinates of the portrait on the display screen of the terminal in the image capturing preview state; when the third point cloud information matches the first point cloud information and the user selects the sticker, the terminal displaying the sticker according to the second point cloud information. Also provided by the embodiments of the present application is a terminal, which is used for improving the image capturing experience of a user.

Description

一种数据处理方法及终端Data processing method and terminal 技术领域Technical field
本申请涉及终端技术领域,尤其涉及一种数据处理方法及终端。The present application relates to the field of terminal technologies, and in particular, to a data processing method and a terminal.
背景技术Background technique
如今,随着科技的不断进步,带有拍摄功能的终端越来越普及,为了满足拍摄的个性化需求及提升拍摄的趣味性,用户可以在拍摄的过程中选择个性化的贴纸,最终拍出人脸与贴纸拼合而成的照片。Nowadays, with the continuous advancement of technology, terminals with shooting functions are becoming more and more popular. In order to meet the individual needs of shooting and to enhance the fun of shooting, users can select personalized stickers during the shooting process and finally shoot them. A photo of a face and a sticker.
现有技术中,贴纸的图片设计完成后以终端的显示分辨率为基础建立坐标任意定义该贴纸在终端的初始显示位置,当终端在拍摄过程中检测到人脸时,用户可以选择贴纸,进而终端将贴纸与人脸进行拼合,例如,贴纸是一对兔子耳朵,按照该贴纸在终端的初始显示位置在人脸的嘴巴附近,随后终端将兔子耳朵调整到人脸的头顶位置完成拼合。In the prior art, after the picture design of the sticker is completed, the coordinates are set based on the display resolution of the terminal to arbitrarily define the initial display position of the sticker in the terminal. When the terminal detects the face during the shooting process, the user can select the sticker, and then the user can select the sticker. The terminal combines the sticker with the face. For example, the sticker is a pair of rabbit ears. According to the sticker, the initial display position of the terminal is near the mouth of the face, and then the terminal adjusts the rabbit ear to the top position of the face to complete the stitching.
然而任意定义贴纸在终端的初始显示位置,往往与贴纸在实际场景中相对于人脸的实际显示位置相差较远,这样就经常需要终端花费较多时间进行贴纸位置的调整,导致用户体验较差。However, the initial display position of the arbitrarily defined sticker in the terminal is often far from the actual display position of the sticker in the actual scene relative to the face, so that the terminal often needs to spend more time to adjust the position of the sticker, resulting in poor user experience. .
发明内容Summary of the invention
本申请实施例提供了一种数据处理方法及终端,用于提升用户体验。The embodiment of the present application provides a data processing method and a terminal, which are used to improve user experience.
有鉴于此,本申请实施例的第一方面提供一种数据处理方法,包括:In view of this, the first aspect of the embodiments of the present application provides a data processing method, including:
终端获取标准人像的第一点云信息,点云信息是指在一个三维坐标系统中的一组向量的集合。这些向量通常以X,Y,Z三维坐标的形式表示,而且一般主要用来代表一个物体的外表面形状,可以理解的是,第一点云信息可以指示标准人像在终端显示的形状及显示的位置;The terminal acquires the first point cloud information of the standard portrait, and the point cloud information refers to a set of vectors in a three-dimensional coordinate system. These vectors are usually expressed in the form of X, Y, Z three-dimensional coordinates, and are generally used to represent the outer surface shape of an object. It can be understood that the first point cloud information can indicate the shape and display of the standard portrait displayed on the terminal. position;
终端基于获取到的第一点云信息还可以获取贴纸的第二点云信息,贴纸是指用户在使用拍摄功能时可以添加到终端界面上进行显示的图片,第二点云信息是第一点云信息中的至少一部分信息,可以理解的是,第二点云信息可以指示在终端上贴纸相对于标准人像的位置,此外,第二点云信息是由人为根据贴纸的实际内容拟定的,例如,贴纸内容是一副眼镜,那么该贴纸就设计在标准人像的眼睛附近,贴纸内容若是一顶帽子,那么该贴纸就设计在标准人像的头顶附近;The terminal can also obtain the second point cloud information of the sticker based on the obtained first point cloud information. The sticker refers to the picture that the user can add to the terminal interface when using the shooting function, and the second point cloud information is the first point. At least a part of the information in the cloud information, it can be understood that the second point cloud information can indicate the position of the sticker on the terminal relative to the standard portrait. In addition, the second point cloud information is artificially formulated according to the actual content of the sticker, for example, The sticker content is a pair of glasses, then the sticker is designed near the eyes of the standard portrait. If the sticker content is a hat, the sticker is designed near the top of the standard portrait;
进一步,当终端在拍摄预览状态下检测到人像时,终端会生成第三点云信息,第三点云信息可以指示终端在拍摄预览状态实时检测到的人像在终端显示的形状及显示的位置,可以理解的是,第三点云信息并不像第一点云信息一样是固定的,第三点云信息会根据人像在镜头中的变化而跟着改变。Further, when the terminal detects the portrait in the shooting preview state, the terminal generates third point cloud information, and the third point cloud information may indicate the shape and the displayed position of the portrait displayed by the terminal in the shooting preview state in real time. It can be understood that the third point cloud information is not fixed like the first point cloud information, and the third point cloud information will change according to the change of the portrait in the lens.
接下来,当第三点云信息与第一点云信息匹配且用户选择贴纸时,终端根据第二点云信息显示该贴纸,可以理解的是,终端可以根据一定的规则判断当前是否检测到人像,也就是会判断第三点云信息是否与第一点云信息匹配,如果匹配就说明当前人像的显示形状 及显示位置与标准人像相近,终端可以认定检测到了人像,所以此时用户选择的贴纸就可以按照第二点云信息在终端上显示。Next, when the third point cloud information matches the first point cloud information and the user selects the sticker, the terminal displays the sticker according to the second point cloud information. It can be understood that the terminal can determine whether the portrait is currently detected according to a certain rule. , that is, it will judge whether the third point cloud information matches the first point cloud information, and if it matches, the display shape of the current portrait is displayed. And the display position is similar to the standard portrait, the terminal can recognize that the portrait is detected, so the sticker selected by the user can be displayed on the terminal according to the second point cloud information.
本申请实施例中,终端可以获取标准人像的第一点云信息及贴纸的第二点云信息,第二点云信息用于指示贴纸相对于标准人像所处的位置,当终端检测到人像时可以生成人像的第三点云信息,进一步若第三点云信息与第一点云信息匹配且用户选择该贴纸时,终端会根据第二点云信息显示该贴纸,由于贴纸的第二点云信息是根据贴纸的内容人为拟定的,例如,贴纸内容是一副眼镜,那么该贴纸就在标准人像的眼睛附近,贴纸内容若是一顶帽子,那么该贴纸就在标准人像的头顶附近,所以当第三点云信息与第一点云信息匹配时,该贴纸的第二点云信息即该贴纸的初始显示位置与该贴纸在实际场景中相对于人像的实际显示位置之间的误差较小,节省了后续终端对该贴纸位置进行调整的时间,提升了用户体验。In the embodiment of the present application, the terminal may obtain the first point cloud information of the standard portrait and the second point cloud information of the sticker, and the second point cloud information is used to indicate the position of the sticker relative to the standard portrait, when the terminal detects the portrait The third point cloud information of the portrait may be generated. Further, if the third point cloud information matches the first point cloud information and the user selects the sticker, the terminal displays the sticker according to the second point cloud information, because the second point cloud of the sticker The information is artificially based on the content of the sticker. For example, the sticker content is a pair of glasses, then the sticker is near the eye of the standard portrait. If the sticker content is a hat, the sticker is near the top of the standard portrait, so when When the third point cloud information matches the first point cloud information, the second point cloud information of the sticker is that the initial display position of the sticker and the actual display position of the sticker in the actual scene relative to the portrait are smaller. The time for the subsequent terminal to adjust the position of the sticker is saved, and the user experience is improved.
结合本申请实施例的第一方面,在本申请实施例的第一方面的第一种实现方式中,方法还包括:With reference to the first aspect of the embodiments of the present application, in a first implementation manner of the first aspect of the embodiments, the method further includes:
终端从软件开发工具包(software development kit,SDK)集合中选择目标SDK,该SDK集合中的所有SDK都具有统一的SDK接口,可以理解的是,SDK集合中的这些SDK包括有第三方开发的贴纸拼合算法、人像美颜算法、滤镜拍摄算法及人像检测算法等拍摄算法,相机APP可以通过调用第三方SDK实现以上多种拍照功能。The terminal selects a target SDK from a set of software development kits (SDKs), and all SDKs in the SDK set have a unified SDK interface. It can be understood that the SDKs in the SDK set include third-party development. The camera stitching algorithm, the portrait beauty algorithm, the filter shooting algorithm and the portrait detection algorithm and the like, the camera APP can implement the above various camera functions by calling a third-party SDK.
结合本申请实施例的第一方面的第一种实现方式,本申请实施例的第一方面的第二种实现方式中,终端从SDK集合中选择目标SDK包括:With reference to the first implementation manner of the first aspect of the embodiment of the present application, in the second implementation manner of the first aspect of the application, the terminal selects the target SDK from the SDK set, including:
终端可以通过智能选择的方式从集成的SDK集合中选择目标SDK,具体地,每个SDK都有与之对应的SDK参数,该参数包括用户美肤等级的参数、预览算法处理速率的参数及贴纸跟随性速率的参数,随后可以将这三个参数带入下述公式中计算得到计算结果,从计算结果的集合中选择值最大的计算结果,并确定该计算结果所对应的SDK为目标SDK。The terminal can select the target SDK from the integrated SDK set by means of intelligent selection. Specifically, each SDK has a corresponding SDK parameter, which includes parameters of the user skin level, parameters of the preview algorithm processing rate, and stickers. Following the parameters of the rate, the three parameters can be brought into the following formula to calculate the calculation result, and the calculation result with the largest value is selected from the set of calculation results, and the SDK corresponding to the calculation result is determined as the target SDK.
结合本申请实施例的第一方面的第二种实施方式,本申请实施例的第一方面的第三种实时方式中,该公式包括:With reference to the second embodiment of the first aspect of the embodiment of the present application, in the third real-time mode of the first aspect of the embodiment of the present application, the formula includes:
R=α*B+γ*P+β*F;R=α*B+γ*P+β*F;
其中R为计算结果,B为所述用户美肤等级的参数,P为所述预览算法处理速率的参数,F为所述贴纸跟随性速率的参数,α、β、γ为预置的权重系数。Where R is the calculation result, B is the parameter of the user's skin level, P is the parameter of the preview algorithm processing rate, F is the parameter of the sticker followability rate, and α, β, and γ are preset weight coefficients. .
需要说明的是,预置的权重系数在不同拍摄模式下可以不同,例如,在拍照模式下对美肤的要求更高,那么可以相应调整α的值,在录像模式下对贴纸跟随性速率要求较高,就可以相应调整β的值,α、β、γ的值具体此处不做限定。It should be noted that the preset weight coefficient can be different in different shooting modes. For example, in the camera mode, the requirement for skin color is higher, then the value of α can be adjusted correspondingly, and the sticker followability rate requirement in the recording mode is required. If the value is higher, the value of β can be adjusted accordingly. The values of α, β, and γ are not limited herein.
结合本申请实施例的第一方面的第一种实施方式至本申请实施例的第一方面的第三种实施方式中的任意一种实施方式,本申请实施例的第一方面的第四种实施方式中,统一的SDK接口定义包括:With reference to any one of the first embodiment of the first aspect of the embodiment of the present application to the third embodiment of the first aspect of the present application, the fourth aspect of the first aspect of the embodiment of the present application In an embodiment, the unified SDK interface definition includes:
下载并注册贴纸、拍摄界面初始化、进行贴纸预览、处理拍摄数据及结束进程。Download and register stickers, capture interface initialization, perform sticker previews, process shooting data, and end the process.
结合本申请实施例的第一方面,在本申请实施例的第一方面的第五种实现方式中,方法还包括: With reference to the first aspect of the embodiments of the present application, in a fifth implementation manner of the first aspect of the embodiments, the method further includes:
终端从拍摄算法集合中选择目标拍摄算法,可以理解的是,终端还可以集成多个拍摄算法,也就是拍摄算法的开发者公开其拍摄算法,在这种情景下,就不再需要调用SDK而通过直接选择某一拍摄算法就可以实现诸如人像美颜、人像检测、滤镜拍摄及贴纸拼合等多种拍摄功能,目标拍摄算法的选择可以由终端智能选择,也可以由用户根据喜好自行选择,具体此处不做限定。The terminal selects the target shooting algorithm from the set of shooting algorithms. It can be understood that the terminal can also integrate multiple shooting algorithms, that is, the developer of the shooting algorithm discloses the shooting algorithm. In this scenario, the SDK is no longer needed. By directly selecting a certain shooting algorithm, various shooting functions such as portrait beauty, portrait detection, filter shooting, and sticker stitching can be realized. The selection of the target shooting algorithm can be selected by the terminal intelligently, or can be selected by the user according to preferences. This is not limited here.
结合本申请实施例的第一方面的第五种实现方式,本申请实施例中第一方面的第六种实现方式中,目标拍摄算法包括:With reference to the fifth implementation manner of the first aspect of the embodiment of the present application, in the sixth implementation manner of the first aspect of the application, the target shooting algorithm includes:
人像美颜算法、人像检测算法、滤镜拍摄算法和/或贴纸拼合算法。Portrait beauty algorithm, portrait detection algorithm, filter shooting algorithm and/or sticker flattening algorithm.
本申请实施例第二方面提供了一种终端,包括:A second aspect of the embodiment of the present application provides a terminal, including:
第一获取单元,用于获取标准人像的第一点云信息,第一点云信息用于指示标准人像在终端的显示屏上的坐标;a first acquiring unit, configured to acquire first point cloud information of the standard portrait, where the first point cloud information is used to indicate coordinates of the standard portrait on the display screen of the terminal;
第二获取单元,用于获取贴纸的第二点云信息,第二点云信息为第一点云信息中的至少一部分信息,第二点云信息用于指示贴纸相对于标准人像的位置,第二点云信息由人为拟定,所述贴纸为可以显示在所述显示屏中的图案;a second acquiring unit, configured to acquire second point cloud information of the sticker, where the second point cloud information is at least a part of information in the first point cloud information, and the second point cloud information is used to indicate a position of the sticker relative to the standard portrait, The two-point cloud information is artificially formulated, and the sticker is a pattern that can be displayed in the display screen;
生成单元,用于当终端在拍摄预览状态下检测到人像时,生成第三点云信息,第三点云信息用于指示终端在拍摄预览状态下人像在所述显示屏上的坐标;a generating unit, configured to generate a third point cloud information when the terminal detects the portrait in the shooting preview state, where the third point cloud information is used to indicate the coordinates of the portrait on the display screen in the shooting preview state;
显示单元,用于当第三点云信息与第一点云信息匹配且用户选择贴纸时,根据第二点云信息显示贴纸。And a display unit, configured to display the sticker according to the second point cloud information when the third point cloud information matches the first point cloud information and the user selects the sticker.
结合本申请实施例的第二方面,本申请实施例的第二方面的第一种实现方式中,终端还包括:With reference to the second aspect of the embodiments of the present application, in the first implementation manner of the second aspect of the embodiment, the terminal further includes:
第一选择单元,用于从SDK集合中选择目标SDK,SDK集合中的所有SDK具有统一的SDK接口,目标SDK用于实现所述人像与所述贴纸的拼合。The first selection unit is configured to select a target SDK from the SDK set, and all the SDKs in the SDK set have a unified SDK interface, and the target SDK is used to implement the flattening of the portrait and the sticker.
结合本申请实施例的第二方面的第一种实现方式,本申请实施例的第二方面的第二种实现方式中,第一选择单元包括:With reference to the first implementation manner of the second aspect of the embodiment of the present application, in the second implementation manner of the second aspect of the embodiment of the present application, the first selecting unit includes:
获取模块,用于获取与SDK集合对应的SDK参数集合,SDK参数集合包括用户美肤等级的参数集合、预览算法处理速率的参数集合及贴纸跟随性速率的参数集合;An obtaining module, configured to obtain an SDK parameter set corresponding to the SDK set, where the SDK parameter set includes a parameter set of the user skin level, a parameter set of a preview algorithm processing rate, and a parameter set of a sticker followability rate;
计算模块,用于将SDK参数集合代入公式计算得到计算结果集合;a calculation module, configured to substitute the SDK parameter set into a formula to obtain a calculation result set;
第一确定模块,用于从计算结果集合中确定目标计算结果,目标计算结果为计算结果集合中值最大的计算结果;a first determining module, configured to determine a target calculation result from the set of calculation results, where the target calculation result is a calculation result with the largest value in the calculation result set;
第二确定模块,用于确定与目标计算结果对应的目标SDK。The second determining module is configured to determine a target SDK corresponding to the target calculation result.
结合本申请实施例的第二方面,本申请实施例的第二方面的第三种实现方式中,终端还包括:With reference to the second aspect of the embodiments of the present application, in a third implementation manner of the second aspect of the embodiments, the terminal further includes:
第二选择单元,用于从拍摄算法集合中选择目标拍摄算法,目标拍摄算法用于实现所述人像与所述贴纸的拼合。And a second selecting unit, configured to select a target shooting algorithm from the set of shooting algorithms, where the target shooting algorithm is used to implement the stitching of the portrait and the sticker.
本申请实施例第三方面提供了一种终端,包括:A third aspect of the embodiment of the present application provides a terminal, including:
处理器、存储器、总线以及输入输出接口;a processor, a memory, a bus, and an input and output interface;
存储器中存储有程序代码; A program code is stored in the memory;
处理器调用存储器中的程序代码时执行如下操作:When the processor calls the program code in the memory, the following operations are performed:
获取标准人像的第一点云信息,第一点云信息用于指示标准人像在终端的显示屏上的坐标;Obtaining the first point cloud information of the standard portrait, the first point cloud information is used to indicate the coordinates of the standard portrait on the display screen of the terminal;
获取贴纸的第二点云信息,第二点云信息为第一点云信息中的至少一部分信息,第二点云信息用于指示贴纸相对于标准人像的位置,第二点云信息由人为拟定,所述贴纸为可以显示在所述显示屏中的图案;Obtaining a second point cloud information of the sticker, the second point cloud information is at least part of the information in the first point cloud information, the second point cloud information is used to indicate the position of the sticker relative to the standard portrait, and the second point cloud information is artificially drawn The sticker is a pattern that can be displayed in the display screen;
当终端在拍摄预览状态下检测到人像时,生成第三点云信息,第三点云信息用于指示终端在拍摄预览状态下人像在显示屏上的坐标;When the terminal detects the portrait in the shooting preview state, the third point cloud information is generated, and the third point cloud information is used to indicate the coordinates of the portrait on the display screen when the terminal is in the preview state;
当第三点云信息与第一点云信息匹配且用户选择贴纸时,根据第二点云信息显示贴纸。When the third point cloud information matches the first point cloud information and the user selects the sticker, the sticker is displayed according to the second point cloud information.
本申请实施例第四方面提供了一种计算机可读存储介质,计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述第一方面数据处理方法中的流程。A fourth aspect of the embodiments of the present application provides a computer readable storage medium having instructions stored in a computer to cause a computer to execute the flow in the data processing method of the first aspect described above when running on a computer.
本申请实施例第五方面提供了一种计算机程序产品,当其在计算机上运行时,使得计算机执行上述第一方面数据处理方法中的流程。A fifth aspect of the embodiments of the present application provides a computer program product, which, when run on a computer, causes the computer to execute the flow in the data processing method of the first aspect described above.
从以上技术方案可以看出,本申请实施例具有以下优点:As can be seen from the above technical solutions, the embodiments of the present application have the following advantages:
本申请实施例提供的技术方案中,终端可以获取标准人像的第一点云信息及贴纸的第二点云信息,第二点云信息用于指示贴纸相对于标准人像所处的位置,当终端检测到人像时可以生成人像的第三点云信息,进一步若第三点云信息与第一点云信息匹配且用户选择该贴纸时,终端会根据第二点云信息显示该贴纸,由于贴纸的第二点云信息是根据贴纸的内容人为拟定的,例如,贴纸内容是一副眼镜,那么该贴纸就在标准人像的眼睛附近,贴纸内容若是一顶帽子,那么该贴纸就在标准人像的头顶附近,所以当第三点云信息与第一点云信息匹配时,该贴纸的第二点云信息即该贴纸的初始显示位置与该贴纸在实际场景中相对于人像的实际显示位置之间的误差较小,节省了后续终端对该贴纸位置进行调整的时间,提升了用户体验。In the technical solution provided by the embodiment of the present application, the terminal may obtain the first point cloud information of the standard portrait and the second point cloud information of the sticker, and the second point cloud information is used to indicate the position of the sticker relative to the standard portrait, when the terminal When the portrait is detected, the third point cloud information of the portrait may be generated. Further, if the third point cloud information matches the first point cloud information and the user selects the sticker, the terminal displays the sticker according to the second point cloud information, due to the sticker The second point cloud information is artificially based on the content of the sticker. For example, the sticker content is a pair of glasses, then the sticker is near the eye of the standard portrait. If the sticker content is a hat, the sticker is on the top of the standard portrait. Nearby, so when the third point cloud information matches the first point cloud information, the second point cloud information of the sticker is the initial display position of the sticker and the actual display position of the sticker relative to the portrait in the actual scene. The error is small, which saves the time for the subsequent terminal to adjust the position of the sticker, thereby improving the user experience.
附图说明DRAWINGS
图1为本申请实施例中数据处理方法的一个应用场景示意图;FIG. 1 is a schematic diagram of an application scenario of a data processing method according to an embodiment of the present application;
图2为本申请实施例中数据处理方法一个实施例的示意图;2 is a schematic diagram of an embodiment of a data processing method in an embodiment of the present application;
图3(a)为本申请实施例中标准人像在终端显示的示意图;3(a) is a schematic diagram showing a standard portrait displayed on a terminal in the embodiment of the present application;
图3(b)为本申请实施例中贴纸在终端显示的示意图;FIG. 3(b) is a schematic diagram showing a sticker displayed on a terminal in an embodiment of the present application;
图3(c)为本申请实施例中一种应用于人像与贴纸进行拼合的场景示意图;FIG. 3(c) is a schematic diagram of a scene applied to a portrait and a sticker in the embodiment of the present application;
图3(d)为本申请实施例中另一种应用于人像与贴纸进行拼合的场景示意图;FIG. 3( d ) is a schematic diagram of another scene applied to the combination of a portrait and a sticker in the embodiment of the present application;
图3(e)为本申请实施例中另一种应用于人像与贴纸进行拼合的场景示意图;FIG. 3( e ) is a schematic diagram of another scene applied to a portrait and a sticker in the embodiment of the present application;
图3(f)为本申请实施例中另一种应用于人像与贴纸进行拼合的场景示意图;FIG. 3(f) is a schematic diagram of another scene applied to a portrait and a sticker in the embodiment of the present application;
图4为本申请实施例中数据处理方法另一实施例的示意图;4 is a schematic diagram of another embodiment of a data processing method according to an embodiment of the present application;
图5为本申请实施例中数据处理方法的另一应用场景示意图;FIG. 5 is a schematic diagram of another application scenario of a data processing method according to an embodiment of the present application;
图6为本申请实施例中一种应用于用户操作终端下载贴纸的场景示意图;FIG. 6 is a schematic diagram of a scenario applied to a user operating terminal to download a sticker according to an embodiment of the present application;
图7为本申请实施例中终端的一个实施例示意图; FIG. 7 is a schematic diagram of an embodiment of a terminal in an embodiment of the present application;
图8为本申请实施例中终端的另一实施例示意图;FIG. 8 is a schematic diagram of another embodiment of a terminal according to an embodiment of the present application;
图9为本申请实施例中终端的一个结构示意图。FIG. 9 is a schematic structural diagram of a terminal in an embodiment of the present application.
具体实施方式Detailed ways
本申请实施例提供一种数据处理方法及终端,用于通过预先定义贴纸在终端的初始显示位置的方式,在用户选择贴纸进行拍摄时,贴纸的初始显示位置与其最终的实际显示位置之间的误差较小,节省了后续终端对该贴纸位置进行调整的时间,提升用户体验。The embodiment of the present application provides a data processing method and a terminal, between the initial display position of the sticker and the final actual display position when the user selects the sticker by pre-defining the initial display position of the sticker in the terminal. The error is small, which saves the time for the subsequent terminal to adjust the position of the sticker and improves the user experience.
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”、“第四”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。The terms "first", "second", "third", "fourth", etc. (if present) in the specification and claims of the present application and the above figures are used to distinguish similar objects without having to use To describe a specific order or order. It is to be understood that the data so used may be interchanged where appropriate so that the embodiments described herein can be implemented in a sequence other than what is illustrated or described herein. In addition, the terms "comprises" and "comprises" and "the" and "the" are intended to cover a non-exclusive inclusion, for example, a process, method, system, product, or device that comprises a series of steps or units is not necessarily limited to Those steps or units may include other steps or units not explicitly listed or inherent to such processes, methods, products or devices.
本实施例可应用于如图1所示的应用场景中,终端可以与第三方服务器进行通信,第三方服务器存储有第三方设计的贴纸素材,当终端中的相机应用程序(application,APP)启动时,集成在相机APP中的第三方SDK可以从第三方服务器下载第三方贴纸素材并将下载得到的第三方贴纸素材注册到相机APP本地的贴纸管理模块中,以供用户选择,此外,摄像头会将拍摄到的图像数据发送至相机APP,结合用户选择的贴纸素材,由第三方SDK进行人像识别及贴纸与人像拼合,最终实现拍摄预览及图片保存。The embodiment can be applied to the application scenario shown in FIG. 1. The terminal can communicate with a third-party server, and the third-party server stores a sticker material designed by a third party, and the camera application (application, APP) in the terminal starts. The third-party SDK integrated in the camera APP can download the third-party sticker material from the third-party server and register the downloaded third-party sticker material into the sticker management module of the camera APP for the user to select, in addition, the camera will The captured image data is sent to the camera APP, combined with the sticker material selected by the user, and the third party SDK performs portrait recognition and the sticker and the portrait are combined to finally realize the shooting preview and the image saving.
可以理解的是,在本实施例中,第三方SDK包括有第三方开发的贴纸拼合算法、人像美颜算法、滤镜拍摄算法及人像检测算法等拍摄算法,相机APP可以通过调用第三方SDK实现以上多种拍照功能。It can be understood that, in this embodiment, the third-party SDK includes a third-party developed sticker flattening algorithm, a portrait beauty algorithm, a filter shooting algorithm, and a portrait detection algorithm, and the camera APP can be implemented by calling a third-party SDK. A variety of camera functions above.
需要说明的是,相机APP在终端的应用处理器中执行,应用处理器可以通过自身的外部接口与摄像头进行数据交互,可以理解的是,摄像头输出的图像数据格式可以是YUV格式,也可以是其他格式,例如RGB格式,具体此处不做限定。It should be noted that the camera APP is executed in the application processor of the terminal, and the application processor can perform data interaction with the camera through its external interface. It can be understood that the image data format output by the camera may be a YUV format, or may be Other formats, such as the RGB format, are not limited herein.
此外,本申请实施例中的终端可以是手机、平板电脑、可穿戴设备、增强现实(augmented reality,AR)\虚拟现实(virtual reality,VR)设备、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本、个人数字助理(personal digital assistant,PDA)等具有拍摄功能的用户设备,本申请实施例对此不作任何限制。In addition, the terminal in the embodiment of the present application may be a mobile phone, a tablet computer, a wearable device, an augmented reality (AR), a virtual reality (VR) device, a notebook computer, a super mobile personal computer (ultra-mobile). The personal computer (UMPC), the netbook, the personal digital assistant (PDA), and the like have a shooting function, and the embodiment of the present application does not impose any limitation.
下面对本申请实施例中的数据处理方法进行详细描述,请参阅图2,本申请实施例数据处理方法的一个实施例包括:The following is a detailed description of the data processing method in the embodiment of the present application. Referring to FIG. 2, an embodiment of the data processing method in the embodiment of the present application includes:
201、终端获取标准人像的第一点云信息。201. The terminal acquires the first point cloud information of the standard portrait.
本实施例中,终端可以获取到标准人像的第一点云信息,其中,点云信息是指在一个三维坐标系统中的一组向量的集合。这些向量通常以X,Y,Z三维坐标的形式表示,而且一般主要用来代表一个物体的外表面形状。大多数点云信息是由3D扫描设备产生的,例如激光雷达(2D/3D),立体摄像头(stereo camera),越渡时间相机(time-of-flight camera), 这些设备用自动化的方式测量在物体表面的大量的点的信息,然后用某种数据文件输出点云信息。In this embodiment, the terminal may acquire the first point cloud information of the standard portrait, where the point cloud information refers to a set of vectors in a three-dimensional coordinate system. These vectors are usually represented in the form of X, Y, Z three-dimensional coordinates, and are generally used primarily to represent the outer surface shape of an object. Most point cloud information is generated by 3D scanning devices, such as lidar (2D/3D), stereo camera, time-of-flight camera, These devices measure information on a large number of points on the surface of the object in an automated manner, and then output point cloud information using a data file.
标准人像是一个人为定义的三维人像模型,可以理解的是,标准人像的第一点云信息可以用来体现出标准人像的外表面形状及其在终端的显示位置,其中,标准人像可以指标准人头的模型,也可以指包括标准人头及标准人体躯干的模型,具体此处不做限定,本实施例以标准人像定义为标准人头进行描述,如图3(a)所示,以终端是手机为例,图中为依据第一点云信息的标准人像在终端界面的显示位置及显示形状。The standard portrait is an artificially defined 3D portrait model. It can be understood that the first point cloud information of the standard portrait can be used to reflect the outer surface shape of the standard portrait and its display position at the terminal. The standard portrait can refer to the standard. The model of the human head can also refer to a model including a standard human head and a standard human torso, which is not limited herein. This embodiment describes the standard portrait as a standard human head, as shown in FIG. 3(a), and the terminal is a mobile phone. For example, the figure shows the display position and display shape of the standard portrait based on the first point cloud information on the terminal interface.
可以理解的是,图3(a)仅是一个示例,实际应用中标准人像并不一定要根据第一点云信息在终端的界面显示,并且标准人像的第一点云信息是以三维坐标的形式表示的,具体可以如下表1所示,下表1为标准人像的第一点云信息中的一部分三维坐标,实际应用中,表中的具体坐标数量及数值可以有变化,具体此处不做限定。It can be understood that FIG. 3( a ) is only an example. In actual application, the standard portrait does not have to be displayed on the interface of the terminal according to the first point cloud information, and the first point cloud information of the standard portrait is in three-dimensional coordinates. The form can be expressed as shown in Table 1 below. Table 1 below is a part of the three-dimensional coordinates of the first point cloud information of the standard portrait. In actual application, the number and value of the specific coordinates in the table may vary. Make a limit.
表1Table 1
X坐标X coordinate Y坐标Y coordinate Z坐标Z coordinate
-3.560004-3.560004 58.36919458.369194 0.2845710.284571
-2.719511-2.719511 58.20719558.207195 1.0344741.034474
-1.569996-1.569996 58.04937058.049370 1.7265451.726545
-4.797817-4.797817 58.37485558.374855 -0.640903-0.640903
-0.730695-0.730695 57.88474757.884747 2.0665512.066551
-0.000000-0.000000 57.82104557.821045 2.1392352.139235
-0.658006-0.658006 57.52378557.523785 2.2902492.290249
-1.431864-1.431864 57.71991057.719910 2.0496032.049603
0.0002200.000220 57.45122957.451229 2.3339962.333996
-2.444017-2.444017 60.43586760.435867 0.1357460.135746
-2.659698-2.659698 60.94844160.948441 -0.729706-0.729706
-4.007832-4.007832 58.66256358.662563 -0.737348-0.737348
... ... ...
0.0000000.000000 66.14638566.146385 4.6425034.642503
202、终端获取贴纸的第二点云信息。202. The terminal acquires a second point cloud information of the sticker.
本实施例中,终端获取贴纸的第二点云信息,其中,第二点云信息为第一点云信息的至少一部分信息,可以理解的是,贴纸的图片设计完成后,需要从第一点云信息中选取适量的三维坐标作为第二点云信息,也就是定义贴纸相对于标准人像的位置,如图3(b)所示,该贴纸图片是一副墨镜,那么就可以选取第一点云信息中标准人像眼睛附近的三维坐标作为第二点云信息,图中即是该贴纸依据第二点云信息在终端的显示位置。In this embodiment, the terminal acquires the second point cloud information of the sticker, where the second point cloud information is at least a part of the information of the first point cloud information. It can be understood that after the picture design of the sticker is completed, the first point is needed. The cloud information is selected as the second point cloud information, that is, the position of the sticker relative to the standard portrait is defined. As shown in FIG. 3(b), the sticker picture is a pair of sunglasses, then the first point can be selected. The three-dimensional coordinates in the vicinity of the standard portrait eyes in the cloud information are used as the second point cloud information, and the figure is the display position of the sticker according to the second point cloud information at the terminal.
可以理解的是,贴纸的第二点云信息是人为根据贴纸的实际内容拟定的,例如,若贴纸是一顶帽子,那么就可以选取第一点云信息中标准人像头顶附近的三维坐标作为第二点云信息,所以在实际应用中,不同的贴纸可以对应相同的点云信息,也可以分别对应不同的点云信息,具体此处不做限定。 It can be understood that the second point cloud information of the sticker is artificially formulated according to the actual content of the sticker. For example, if the sticker is a hat, then the three-dimensional coordinates near the top of the standard portrait image in the first point cloud information can be selected as the first Two points of cloud information, so in actual applications, different stickers can correspond to the same point cloud information, and can also correspond to different point cloud information, which is not limited herein.
需要说明的是,一套完整的贴纸素材包括贴纸的图片以及贴纸的第二点云信息,其中贴纸的图片格式可以是位图文件(bitmap,bmp),除此之外,也可以是其他格式,例如,也可以是便携式网络图像(portable network graphics,png),具体此处不做限定。It should be noted that a complete set of sticker material includes a picture of the sticker and a second point cloud information of the sticker, wherein the image format of the sticker may be a bitmap file (bitmap, bmp), or other formats. For example, it may be a portable network image (png), which is not limited herein.
203、当终端在拍摄预览状态下检测到人像时,终端生成第三点云信息。203. When the terminal detects the portrait in the shooting preview state, the terminal generates third point cloud information.
本实施例中,用户打开相机APP进入拍摄预览状态,摄像头可以获取图像信息,并在终端显示屏上显示预览图像,终端可以对摄像头获取的图像进行实时检测,当在摄像头的拍摄范围内出现人像时,终端会生成该人像的第三点云信息,可以理解的是,第三点云信息同样是以三维坐标的形式表示的,用于表示在拍摄预览的状态下摄像头当前获取到的人像在终端的实际显示形状及实际显示位置,第三点云信息的生成是根据第三方SDK的人像检测算法实现的,并且随着摄像头获取到的人像的移动,第三点云信息也会实时变化。In this embodiment, the user opens the camera APP to enter the shooting preview state, the camera can acquire image information, and display a preview image on the terminal display screen, and the terminal can detect the image acquired by the camera in real time, and the portrait appears in the shooting range of the camera. The terminal generates the third point cloud information of the portrait. It can be understood that the third point cloud information is also represented in the form of three-dimensional coordinates, and is used to indicate that the portrait currently acquired by the camera is in the state of the preview preview. The actual display shape and the actual display position of the terminal, the third point cloud information is generated according to the portrait detection algorithm of the third party SDK, and the third point cloud information changes in real time as the portrait image acquired by the camera moves.
204、当第三点云信息与第一点云信息匹配且用户选择贴纸时,终端根据第二点云信息显示贴纸。204. When the third point cloud information matches the first point cloud information and the user selects the sticker, the terminal displays the sticker according to the second point cloud information.
本实施例中,当第三点云信息与第一点云信息匹配时,用户可以在终端的界面选择贴纸,终端将根据第二点云信息显示贴纸,从而在终端的显示屏上同时显示预览的人像与贴纸,实现人像与贴纸的拼合,可以理解的是,贴纸的显示是根据第三方SDK的贴纸拼合算法实现的,如图3(c)所示,终端判定第三点云信息与第一点云信息匹配时,用户可以从终端界面上的贴纸素材列表中选择一个贴纸,终端将按照该贴纸的第二点云信息在终端界面上显示该贴纸,可以理解的是,在实际应用中,实际人像的第三点云信息往往并不是与标准人像的第一点云信息完全重合,所以根据人像在终端显示屏上的不同情况,终端会通过贴纸拼合算法对贴纸进行缩放或位移调整以实现贴纸与人像的拼合,具体的人像与贴纸拼合的显示场景下面会分别进行描述。In this embodiment, when the third point cloud information matches the first point cloud information, the user may select a sticker on the interface of the terminal, and the terminal displays the sticker according to the second point cloud information, so that the preview is simultaneously displayed on the display screen of the terminal. Portraits and stickers, to achieve the combination of portraits and stickers, it can be understood that the display of stickers is based on the third-party SDK's sticker flattening algorithm, as shown in Figure 3 (c), the terminal determines the third point cloud information and When a little cloud information matches, the user can select a sticker from the list of sticker materials on the terminal interface, and the terminal will display the sticker on the terminal interface according to the second point cloud information of the sticker. It can be understood that in practical applications The third point cloud information of the actual portrait is not completely coincident with the first point cloud information of the standard portrait. Therefore, according to the different situations of the portrait on the terminal display screen, the terminal will scale or shift the sticker by the sticker flatning algorithm. The stitching of the sticker and the portrait is realized, and the display scenes of the specific portrait and the sticker are separately described below.
需要说明的是,终端可以根据第三点云信息与第一点云信息的重合比例来判断第三点云信息是否与第一点云信息匹配,具体地,终端对比第三点云信息的三维坐标集合与第一点云信息的三维坐标集合,并设定了一个阈值,例如90%,当第三点云信息与第一点云信息中重合的三维坐标数达到第一点云信息中三维坐标总数的90%时,终端即认定第三点云信息与第一点云信息匹配,可以理解的是,该阈值也可以是其他数值,例如95%,具体此处不做限定。It should be noted that the terminal may determine, according to the coincidence ratio of the third point cloud information and the first point cloud information, whether the third point cloud information matches the first point cloud information, specifically, the terminal compares the third point cloud information with the third point. The set of coordinates and the three-dimensional coordinate set of the first point cloud information, and set a threshold value, for example, 90%, when the third point cloud information and the first point cloud information coincide in the three-dimensional coordinate number reaches the first point cloud information in three-dimensional When the total number of coordinates is 90%, the terminal determines that the third point cloud information matches the first point cloud information. It can be understood that the threshold value may be other values, for example, 95%, which is not limited herein.
需要说明的是,基于上述判定第三点云信息与第一点云信息是否匹配的方式,还有多种场景终端也可以认定第三点云信息与第一点云信息匹配,以下分别进行描述:It should be noted that, based on the manner of determining whether the third point cloud information matches the first point cloud information, there are also multiple scene terminals that can also determine that the third point cloud information matches the first point cloud information, and are respectively described below. :
可选地,如3(d)所示,摄像头与人像距离拉远时,该人像在终端界面上显示的形状也会相应地成比例缩小,此时的第三点云信息可能就无法与第一点云信息匹配,但是如果当前的第三点云信息与第一点云信息按一定比例缩放得到的点云信息匹配时,终端也可以认定第三点云信息与第一点云信息匹配,具体地,这个缩放比例可以是30%,也可以是20%,此处不做限定,可以理解的是,根据贴纸拼合算法贴纸的第二点云信息也会按照第一点云信息的缩放比例进行缩放,终端会按照第二点云信息缩放后得到的点云信息显示该贴纸以实现贴纸与人像的拼合,此外,摄像头与人像距离拉近时与上述描述同理,具体此处不再赘述。 Optionally, as shown in FIG. 3(d), when the distance between the camera and the portrait is extended, the shape displayed by the portrait on the terminal interface is proportionally reduced, and the third point cloud information may not be the same. A little cloud information matches, but if the current third point cloud information matches the point cloud information obtained by scaling the first point cloud information by a certain degree, the terminal may also determine that the third point cloud information matches the first point cloud information, Specifically, the scaling may be 30% or 20%, which is not limited herein. It can be understood that the second point cloud information according to the sticker flattening algorithm sticker is also scaled according to the first point cloud information. To zoom, the terminal will display the sticker according to the point cloud information obtained by scaling the second point cloud information to realize the flattening of the sticker and the portrait. In addition, when the camera and the portrait are close, the description is the same as the above description, and details are not described herein. .
可选地,如3(e)所示,终端拍摄到的人像相对于标准人像的位置有明显的位移变化,如果当前的第三点云信息与第一点云信息经过相应位移变化后得到的点云信息匹配或者第三点云信息与第一点云信息经过缩放及相应位移变化后得到的点云信息匹配时,也可以理解为第三点云信息与第一点云信息匹配,此时,可以理解的是,根据贴纸拼合算法贴纸的点云信息也会按照第一点云信息变化的方式进行相应的变化,终端会按照第二点云信息变化后得到的点云信息显示该贴纸以实现贴纸与人像的拼合。Optionally, as shown in FIG. 3(e), the position of the portrait captured by the terminal has a significant displacement change relative to the position of the standard portrait, if the current third point cloud information and the first point cloud information are changed by corresponding displacements. When the point cloud information is matched or the third point cloud information is matched with the point cloud information obtained after the first point cloud information is scaled and the corresponding displacement is changed, it can also be understood that the third point cloud information matches the first point cloud information. It can be understood that the point cloud information according to the sticker flattening algorithm sticker will also change according to the change of the first point cloud information, and the terminal will display the sticker according to the point cloud information obtained after the second point cloud information changes. Achieve the combination of stickers and portraits.
可选地,如图3(f)所示,终端同时拍摄到两个人像,人像a与人像b,终端生成分别与两个人像对应的a点云信息及b点云信息,此时,终端会分别去判断a点云信息是否与第一点云信息匹配及b点云信息是否与第一点云信息匹配,具体的判断方式与图3(c)、3(d)或3(e)对应的实施例中描述的判断方式类似,此处不再赘述,所以当a点云信息及b点云信息都与第一点云信息匹配时,终端也会在人像a与人像b的相应位置显示贴纸,可以理解的是,若只有a点云信息与第一点云信息匹配时,那么终端只在人像a的相应位置显示贴纸,若只有b点云信息与第一点云信息匹配时,那么终端只在人像b的相应位置显示贴纸,此外,终端同时拍摄到的人像数量并不限于此处举例的两个,具体以实际应用场景为准,此处不做限定。Optionally, as shown in FIG. 3(f), the terminal simultaneously captures two portraits, a portrait a and a portrait b, and the terminal generates a point cloud information and b point cloud information corresponding to the two portraits respectively. At this time, the terminal Will determine whether the point cloud information matches the first point cloud information and whether the point b cloud information matches the first point cloud information. The specific judgment method is as shown in Figure 3(c), 3(d) or 3(e). The judgment manners described in the corresponding embodiments are similar, and are not described herein again. Therefore, when the a point cloud information and the b point cloud information are matched with the first point cloud information, the terminal also has the corresponding positions of the portrait a and the portrait b. Displaying the sticker, it can be understood that if only the point cloud information matches the first point cloud information, then the terminal only displays the sticker in the corresponding position of the portrait a. If only the b point cloud information matches the first point cloud information, Then, the terminal displays the sticker only in the corresponding position of the portrait b. In addition, the number of the images captured by the terminal is not limited to the two examples. The actual application scenario is preferred, and is not limited herein.
本申请实施例提供的技术方案中,终端可以获取标准人像的第一点云信息及贴纸的第二点云信息,第二点云信息用于指示贴纸相对于标准人像所处的位置,当终端检测到人像时可以生成人像的第三点云信息,进一步若第三点云信息与第一点云信息匹配且用户选择该贴纸时,终端会根据第二点云信息显示该贴纸,由于贴纸的第二点云信息是根据贴纸的内容人为拟定的,例如,贴纸内容是一副眼镜,那么该贴纸就在标准人像的眼睛附近,贴纸内容若是一顶帽子,那么该贴纸就在标准人像的头顶附近,所以当第三点云信息与第一点云信息匹配时,该贴纸的第二点云信息即该贴纸的初始显示位置与该贴纸在实际场景中相对于人像的实际显示位置之间的误差较小,节省了后续终端对该贴纸位置进行调整的时间,提升了用户体验。In the technical solution provided by the embodiment of the present application, the terminal may obtain the first point cloud information of the standard portrait and the second point cloud information of the sticker, and the second point cloud information is used to indicate the position of the sticker relative to the standard portrait, when the terminal When the portrait is detected, the third point cloud information of the portrait may be generated. Further, if the third point cloud information matches the first point cloud information and the user selects the sticker, the terminal displays the sticker according to the second point cloud information, due to the sticker The second point cloud information is artificially based on the content of the sticker. For example, the sticker content is a pair of glasses, then the sticker is near the eye of the standard portrait. If the sticker content is a hat, the sticker is on the top of the standard portrait. Nearby, so when the third point cloud information matches the first point cloud information, the second point cloud information of the sticker is the initial display position of the sticker and the actual display position of the sticker relative to the portrait in the actual scene. The error is small, which saves the time for the subsequent terminal to adjust the position of the sticker, thereby improving the user experience.
以上对定义贴纸在终端的显示方式进行了描述,下面结合实际应用中终端具体的拍摄流程对本申请的数据处理方法进行详细描述。The above describes the display manner of the definition sticker in the terminal. The data processing method of the present application is described in detail below in conjunction with the specific shooting process of the terminal in the actual application.
请参阅图4,本申请实施例数据处理方法的另一实施例包括:Referring to FIG. 4, another embodiment of the data processing method in the embodiment of the present application includes:
401、启动相机APP。401. Start the camera app.
本实施例中,用户操作终端打开相机APP,相应的,终端的摄像头开启,摄像头将获取到的图像数据发送至相机APP。In this embodiment, the user operates the terminal to open the camera APP, and correspondingly, the camera of the terminal is turned on, and the camera sends the acquired image data to the camera APP.
402、从SDK集合中选择目标SDK。402. Select a target SDK from the SDK set.
本实施例中,相机APP可以集成多个包含贴纸拍摄算法的SDK,相机APP所集成的SDK都具有统一的SDK接口,可以理解的是,需要提供这些SDK的开发者按照统一的规则开发相应的拍摄算法并封装SDK。In this embodiment, the camera APP can integrate multiple SDKs including a sticker shooting algorithm, and the SDK integrated by the camera APP has a unified SDK interface. It can be understood that developers who need to provide these SDKs develop corresponding rules according to uniform rules. Shoot the algorithm and package the SDK.
需要说明的是,该统一的SDK接口可以包括下载并注册贴纸、拍摄界面初始化、进行贴纸预览、处理拍摄数据以及结束进程等流程,可以理解的是,此处描述的SDK接口只是一种举例,实际应用中具体的SDK接口可以有改变,此处不做限定。 It should be noted that the unified SDK interface may include a process of downloading and registering a sticker, initializing a shooting interface, performing a sticker preview, processing shooting data, and ending a process. It can be understood that the SDK interface described herein is only an example. The specific SDK interface in the actual application may be changed, and is not limited herein.
需要说明的是,所有相机APP集成的SDK都是依照标准人像的第一点云信息定义的贴纸素材,也就是说第三方提供的贴纸素材需要按照第一点云信息来定义,相应的,也需要开发者在此贴纸定义的基础上开发贴纸拼合算法,具体方式与图2所示实施例中描述的方式类似,此处不再赘述。It should be noted that the SDK integrated by all camera APPs is a sticker material defined according to the first point cloud information of the standard portrait, that is to say, the sticker material provided by the third party needs to be defined according to the first point cloud information, and correspondingly, The developer is required to develop a sticker flattening algorithm based on the definition of the sticker. The specific manner is similar to that described in the embodiment shown in FIG. 2, and details are not described herein again.
终端可以通过智能选择的方式从相机APP集成的SDK集合中选择目标SDK,具体地,每个SDK都有与之对应的SDK参数,该参数包括用户美肤等级的参数、预览算法处理速率的参数及贴纸跟随性速率的参数,随后可以将这三个参数带入下述公式中计算得到计算结果,从计算结果的集合中选择值最大的计算结果,并确定该计算结果所对应的SDK为目标SDK。The terminal can select the target SDK from the SDK set integrated by the camera APP by means of intelligent selection. Specifically, each SDK has a corresponding SDK parameter, and the parameter includes a parameter of the user skin level and a parameter of the preview algorithm processing rate. And the parameters of the sticker followability rate, and then the three parameters can be brought into the following formula to calculate the calculation result, and the calculation result with the largest value is selected from the set of calculation results, and the SDK corresponding to the calculation result is determined as the target. SDK.
所述公式为R=α*B+γ*P+β*F,其中R为结算结果,B为所述用户美肤等级的参数,P为所述预览算法处理速率的参数,F为所述贴纸跟随性速率的参数,α、β、γ为预置的权重系数。需要说明的是,预置的权重系数在不同拍摄模式下可以不同,例如,在拍照模式下对美肤的要求更高,那么可以相应调高α的值,在录像模式下对贴纸跟随性速率要求较高,就可以相应调高β的值,α、β、γ的值具体此处不做限定,终端可以内置相应算法根据实际需要进行设定和调整。The formula is R=α*B+γ*P+β*F, where R is the settlement result, B is the parameter of the user skin level, P is the parameter of the preview algorithm processing rate, and F is the The parameters of the sticker followability rate, α, β, and γ are preset weight coefficients. It should be noted that the preset weight coefficient can be different in different shooting modes. For example, in the camera mode, the requirement for skin color is higher, then the value of α can be increased accordingly, and the sticker followability rate in the recording mode. If the requirement is high, the value of β can be increased accordingly. The values of α, β, and γ are not limited here. The terminal can be built and the corresponding algorithm can be set and adjusted according to actual needs.
需要说明的是,本实施例中,相机APP除了可以集成多个SDK之外,还可以集成多个拍摄算法,也就是拍摄算法的开发者开发并公开的拍摄算法,在这种情景下,相机APP就不再需要调用SDK而通过直接选择某一拍摄算法就可以实现诸如人像美颜、人像检测、滤镜拍摄及贴纸拼合等多种拍摄功能,拍摄算法的选择可以由终端智能选择,也可以由用户根据喜好自行选择,具体此处不做限定。It should be noted that, in this embodiment, the camera APP can integrate multiple shooting algorithms in addition to multiple SDKs, that is, a shooting algorithm developed and disclosed by a developer of the shooting algorithm. In this scenario, the camera The APP no longer needs to call the SDK and can directly select a certain shooting algorithm to achieve various shooting functions such as portrait beauty, portrait detection, filter shooting and sticker flattening. The selection of the shooting algorithm can be selected by the terminal intelligently, or The user chooses it according to his or her preference, which is not limited here.
403、判断用户选择的贴纸是否已下载,若是,则执行步骤406、若否,则执行步骤404。403. Determine whether the sticker selected by the user has been downloaded. If yes, execute step 406. If no, perform step 404.
本实施例中,终端需要判断用户选择的贴纸是否已经下载并注册到相机APP中的贴纸管理模块。In this embodiment, the terminal needs to determine whether the sticker selected by the user has been downloaded and registered to the sticker management module in the camera APP.
404、从服务器下载贴纸。404. Download the sticker from the server.
本实施例中,如果用户选择的贴纸还未下载,相机APP可以通过访问服务器下载用户选择的贴纸,可以理解的是,该服务器可以是如图1所示的第三方SDK对应的第三方服务器,例如,相机APP当前使用A公司开发的SDK,那么相机APP可以从A公司的私有服务器上下载贴纸。In this embodiment, if the sticker selected by the user has not been downloaded, the camera APP can download the sticker selected by the user by accessing the server. It can be understood that the server may be a third-party server corresponding to the third-party SDK shown in FIG. 1 . For example, if the camera APP currently uses an SDK developed by Company A, then the camera app can download stickers from A company's private server.
需要说明的是,本实施例中,服务器还可以是公共服务器,如图5所示,相机APP除了可以从第三方服务器下载贴纸外,还可以从公共服务器上下载其他第三方设计的贴纸,由于相机APP集成的SDK都具有统一的接口,并且所述SDK都是依照标准人像的第一点云信息定义的贴纸素材,所以只要公共服务器上的第三方贴纸素材也是根据标准人像的第一点云信息进行定义的,那么当前相机APP使用的任意一种SDK都可以将公共服务器上的贴纸在终端的界面呈现。It should be noted that, in this embodiment, the server may also be a public server. As shown in FIG. 5, in addition to downloading the sticker from the third-party server, the camera APP may also download other third-party designed stickers from the public server. The camera APP integrated SDK has a unified interface, and the SDK is a sticker material defined according to the first point cloud information of the standard portrait, so that the third-party sticker material on the public server is also the first point cloud according to the standard portrait. The information is defined, then any kind of SDK used by the current camera APP can present the sticker on the public server in the interface of the terminal.
实际应用中的具体场景可以参照图6,例如,相机APP当前使用A公司开发的SDK,贴纸素材列表中的A贴纸、B贴纸及C贴纸都是A公司设计并公布的贴纸,当前的SDK可以根据用户需要从A公司的私有服务器下载新的贴纸并更新贴纸素材列表,此外,用户还可 以通过点击界面上的“+”按键选择从公共服务器下载诸如甲公司、乙公司或丙公司所公布的贴纸素材,并可以添加到相机APP的贴纸素材列表中以供使用。For the specific scenario in the actual application, refer to FIG. 6. For example, the camera APP currently uses the SDK developed by the company A, and the A sticker, the B sticker, and the C sticker in the sticker material list are all designed and announced by the company A, and the current SDK can be Download new stickers and update the sticker material list from company A's private server according to user needs. In addition, users can also To download the sticker material published by the company, such as company A, company B or company C, from the public server by clicking the "+" button on the interface, and add it to the sticker list of the camera app for use.
405、将贴纸注册至贴纸管理模块。405. Register the sticker to the sticker management module.
本实施例中,相机APP会将从服务器下载的贴纸注册到本地的贴纸管理模块进行保存,当用户下次打开相机APP进行拍摄时就无需再重复下载之前已经使用过的贴纸素材。In this embodiment, the camera APP registers the sticker downloaded from the server to the local sticker management module for saving. When the user opens the camera APP for the next time to shoot, there is no need to repeatedly download the sticker material that has been used before.
406、判断是否检测到人像,若是,则执行步骤407,若否,则重复执行步骤406。406. Determine whether a portrait is detected. If yes, execute step 407. If no, repeat step 406.
本实施例中,如果用户选择的贴纸已经下载,进一步相机APP会不断进行人像检测,直到认定当前已经检测到人像,其中,关于相机APP进行人像检测的描述与图2所示的实施例中步骤203及步骤204的描述类似,具体此处不再赘述。In this embodiment, if the sticker selected by the user has been downloaded, the camera app will continue to perform the portrait detection until it is determined that the portrait has been detected, wherein the description of the portrait detection with respect to the camera APP and the steps in the embodiment shown in FIG. The descriptions of 203 and 204 are similar, and details are not described herein again.
407、显示用户选择的贴纸。407. Display a sticker selected by the user.
本实施例中,当相机APP判断检测到人像时,就可以根据贴纸的第二点云信息在终端的界面上显示,其中,关于贴纸根据第二点云信息显示的描述与图2所示的实施例中步骤204的描述类似,此处不再赘述。In this embodiment, when the camera APP determines that the portrait is detected, the second point cloud information of the sticker may be displayed on the interface of the terminal, wherein the description of the sticker according to the second point cloud information is shown in FIG. 2 The description of step 204 in the embodiment is similar, and details are not described herein again.
408、进行人像与贴纸的拼合。408. Perform a combination of portraits and stickers.
本实施例中,相机APP可以根据集成的SDK或贴纸拼合算法对贴纸的显示位置或显示大小进行调整最终完成贴纸与人像的拼合。In this embodiment, the camera APP can adjust the display position or display size of the sticker according to the integrated SDK or sticker flattening algorithm, and finally complete the flattening of the sticker and the portrait.
本申请实施例提供的技术方案中,终端可以获取标准人像的第一点云信息及贴纸的第二点云信息,第二点云信息用于指示贴纸相对于标准人像所处的位置,当终端检测到人像时可以生成人像的第三点云信息,进一步若第三点云信息与第一点云信息匹配且用户选择该贴纸时,终端会根据第二点云信息显示该贴纸,由于贴纸的第二点云信息是根据贴纸的内容人为拟定的,例如,贴纸内容是一副眼镜,那么该贴纸就在标准人像的眼睛附近,贴纸内容若是一顶帽子,那么该贴纸就在标准人像的头顶附近,所以当第三点云信息与第一点云信息匹配时,该贴纸的第二点云信息即该贴纸的初始显示位置与该贴纸在实际场景中相对于人像的实际显示位置之间的误差较小,节省了后续终端对该贴纸位置进行调整的时间,提升了用户体验。In the technical solution provided by the embodiment of the present application, the terminal may obtain the first point cloud information of the standard portrait and the second point cloud information of the sticker, and the second point cloud information is used to indicate the position of the sticker relative to the standard portrait, when the terminal When the portrait is detected, the third point cloud information of the portrait may be generated. Further, if the third point cloud information matches the first point cloud information and the user selects the sticker, the terminal displays the sticker according to the second point cloud information, due to the sticker The second point cloud information is artificially based on the content of the sticker. For example, the sticker content is a pair of glasses, then the sticker is near the eye of the standard portrait. If the sticker content is a hat, the sticker is on the top of the standard portrait. Nearby, so when the third point cloud information matches the first point cloud information, the second point cloud information of the sticker is the initial display position of the sticker and the actual display position of the sticker relative to the portrait in the actual scene. The error is small, which saves the time for the subsequent terminal to adjust the position of the sticker, thereby improving the user experience.
其次,本申请实施例中,相机APP可以集成多个SDK或者拍摄算法,这些SDK都具有统一的SDK接口,并且都是依照标准人像的第一点云信息定义的贴纸素材,所以只要公共服务器上的第三方贴纸素材也是根据标准人像的第一点云信息进行定义的,那么当前相机APP使用的任意一种SDK都可以将公共服务器上的贴纸在终端的界面呈现,用户不再被限制为只能从某一个第三方的私有服务器下载贴纸,用户可以从公共服务器下载任意已公布的贴纸,使用户可选择的贴纸素材更丰富,提升了用户体验。Secondly, in the embodiment of the present application, the camera APP can integrate multiple SDKs or shooting algorithms, and all of the SDKs have a unified SDK interface, and are all defined according to the first point cloud information of the standard portrait, so as long as the public server The third-party sticker material is also defined according to the first point cloud information of the standard portrait. Then, any SDK used by the current camera APP can present the sticker on the public server on the interface of the terminal, and the user is no longer limited to only Users can download stickers from a third-party private server, and users can download any published stickers from the public server, which makes the user's choice of stickers more rich and enhances the user experience.
下面对本申请实施例中的终端进行描述:The following describes the terminal in the embodiment of the present application:
请参阅图7,本申请实施例中终端的一个实施例包括:Referring to FIG. 7, an embodiment of a terminal in this embodiment of the present application includes:
第一获取单元701、用于获取标准人像的第一点云信息,所述第一点云信息用于指示所述标准人像在所述终端的显示屏上的坐标;a first acquiring unit 701, configured to acquire first point cloud information of a standard portrait, where the first point cloud information is used to indicate coordinates of the standard portrait on a display screen of the terminal;
第二获取单元702、用于获取贴纸的第二点云信息,所述第二点云信息为所述第一点云信息中的至少一部分信息,所述第二点云信息用于指示所述贴纸相对于所述标准人像的 位置,所述第二点云信息由人为拟定,所述贴纸为可以显示在所述显示屏中的图案;a second acquiring unit 702, configured to acquire second point cloud information of the sticker, the second point cloud information is at least a part of the first point cloud information, and the second point cloud information is used to indicate the Sticker relative to the standard portrait Position, the second point cloud information is artificially formulated, and the sticker is a pattern that can be displayed in the display screen;
生成单元703、用于当所述终端在拍摄预览状态下检测到人像时,生成第三点云信息,所述第三点云信息用于指示所述终端在拍摄预览状态下所述人像在显示屏上的坐标;The generating unit 703 is configured to generate third point cloud information when the terminal detects the portrait in the shooting preview state, where the third point cloud information is used to indicate that the terminal is in the shooting preview state The coordinates on the screen;
显示单元704、用于当所述第三点云信息与所述第一点云信息匹配且用户选择所述贴纸时,根据所述第二点云信息显示所述贴纸。The display unit 704 is configured to display the sticker according to the second point cloud information when the third point cloud information matches the first point cloud information and the user selects the sticker.
本申请实施例提供的技术方案中,第一获取单元701可以获取标准人像的第一点云信息,第二获取单元702可以获取第二点云信息,第二点云信息用于指示贴纸相对于标准人像所处的位置,当检测到人像时,生成单元703可以生成人像的第三点云信息,进一步若第三点云信息与第一点云信息匹配且用户选择该贴纸时,显示单元704会根据第二点云信息显示该贴纸,由于贴纸的第二点云信息是根据贴纸的内容人为拟定的,例如,贴纸内容是一副眼镜,那么该贴纸就在标准人像的眼睛附近,贴纸内容若是一顶帽子,那么该贴纸就在标准人像的头顶附近,所以当第三点云信息与第一点云信息匹配时,该贴纸的第二点云信息即该贴纸的初始显示位置与该贴纸在实际场景中相对于人像的实际显示位置之间的误差较小,节省了后续终端对该贴纸位置进行调整的时间,提升了用户体验。In the technical solution provided by the embodiment of the present application, the first acquiring unit 701 may obtain the first point cloud information of the standard portrait, the second acquiring unit 702 may obtain the second point cloud information, and the second point cloud information is used to indicate that the sticker is opposite to the sticker. When the standard portrait is located, when the portrait is detected, the generating unit 703 may generate the third point cloud information of the portrait, and further if the third point cloud information matches the first point cloud information and the user selects the sticker, the display unit 704 The sticker will be displayed according to the second point cloud information. Since the second point cloud information of the sticker is artificially determined according to the content of the sticker, for example, the sticker content is a pair of glasses, then the sticker is near the eye of the standard portrait, and the sticker content If it is a hat, then the sticker is near the top of the standard portrait, so when the third point cloud information matches the first point cloud information, the second point cloud information of the sticker is the initial display position of the sticker and the sticker. In the actual scene, the error between the actual display position and the portrait is small, which saves the time for the subsequent terminal to adjust the position of the sticker. The user experience.
为便于理解,下面对本申请实施例中的终端进行详细介绍,请参阅图8,本申请实施例终端的另一实施例包括:For the sake of understanding, the terminal in the embodiment of the present application is described in detail below. Referring to FIG. 8 , another embodiment of the terminal in this embodiment of the present application includes:
第一获取单元801、用于获取标准人像的第一点云信息,所述第一点云信息用于指示所述标准人像在所述终端的显示屏上的坐标;a first acquiring unit 801, configured to acquire first point cloud information of a standard portrait, where the first point cloud information is used to indicate coordinates of the standard portrait on a display screen of the terminal;
第二获取单元802、用于获取贴纸的第二点云信息,所述第二点云信息为所述第一点云信息中的至少一部分信息,所述第二点云信息用于指示所述贴纸相对于所述标准人像的位置,所述第二点云信息由人为拟定,所述贴纸为可以显示在所述显示屏中的图案;a second acquiring unit 802, configured to acquire second point cloud information of the sticker, where the second point cloud information is at least a part of the first point cloud information, where the second point cloud information is used to indicate the The second point cloud information is artificially defined by the position of the sticker relative to the standard portrait, and the sticker is a pattern that can be displayed in the display screen;
生成单元803、用于当所述终端在拍摄预览状态下检测到人像时,生成第三点云信息,所述第三点云信息用于指示所述终端在拍摄预览状态下所述人像在显示屏上的坐标;The generating unit 803 is configured to generate third point cloud information when the terminal detects the portrait in the shooting preview state, where the third point cloud information is used to indicate that the terminal is in the shooting preview state The coordinates on the screen;
显示单元804、用于当所述第三点云信息与所述第一点云信息匹配且用户选择所述贴纸时,根据所述第二点云信息显示所述贴纸。The display unit 804 is configured to display the sticker according to the second point cloud information when the third point cloud information matches the first point cloud information and the user selects the sticker.
第一选择单元805、用于从SDK集合中选择目标SDK,所述SDK集合中的所有SDK具有统一的SDK接口,所述目标SDK用于实现所述人像与所述贴纸的拼合。The first selection unit 805 is configured to select a target SDK from the SDK set, and all the SDKs in the SDK set have a unified SDK interface, and the target SDK is used to implement the stitching of the portrait and the sticker.
第二选择单元806、用于从拍摄算法集合中选择目标拍摄算法,所述目标拍摄算法用于实现所述人像与所述贴纸的拼合。The second selecting unit 806 is configured to select a target shooting algorithm from the set of shooting algorithms, and the target shooting algorithm is used to implement the stitching of the portrait and the sticker.
本申请实施例中的第一选择单元805进一步包括:The first selection unit 805 in the embodiment of the present application further includes:
获取模块8051、用于获取与所述SDK集合对应的SDK参数集合,所述SDK参数集合包括用户美肤等级的参数集合、预览算法处理速率的参数集合或贴纸跟随性速率的参数集合;The obtaining module 8051 is configured to obtain an SDK parameter set corresponding to the SDK set, where the SDK parameter set includes a parameter set of a user skin level, a parameter set of a preview algorithm processing rate, or a parameter set of a sticker followability rate;
计算模块8052、用于将所述SDK参数集合代入公式计算得到计算结果集合;a calculation module 8052, configured to substitute the SDK parameter set into a formula to obtain a calculation result set;
第一确定模块8053、用于从所述计算结果集合中确定目标计算结果,所述目标计算结果为所述计算结果集合中值最大的计算结果;a first determining module 8053, configured to determine, from the set of calculation results, a target calculation result, where the target calculation result is a calculation result having the largest value in the calculation result set;
第二确定模块8054、用于确定与所述目标计算结果对应的所述目标SDK。The second determining module 8054 is configured to determine the target SDK corresponding to the target calculation result.
上面从模块化功能实体的角度对本申请实施例中的终端进行描述,下面从硬件处理的 角度对本申请实施例中的终端进行描述,请参阅图9,本申请实施例中的终端另一实施例包括:The terminal in the embodiment of the present application is described above from the perspective of a modular functional entity, and is processed from hardware below. The terminal in the embodiment of the present application is described. Referring to FIG. 9, another embodiment of the terminal in this embodiment of the present application includes:
本申请实施例还提供了另一种终端,如图9所示,为了便于说明,仅示出了与本申请实施例相关的部分,具体技术细节未揭示的,请参照本申请实施例方法部分。该终端可以为包括手机、平板电脑、PDA(Personal Digital Assistant,个人数字助理)、POS(Point of Sales,销售终端)、车载电脑等任意终端,以终端为手机为例:The embodiment of the present application further provides another terminal. As shown in FIG. 9 , for the convenience of description, only the part related to the embodiment of the present application is shown. If the specific technical details are not disclosed, please refer to the method part of the embodiment of the present application. . The terminal can be any terminal including a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a POS (Point of Sales), a vehicle-mounted computer, and the terminal is a mobile phone as an example:
图9示出的是与本申请实施例提供的终端相关的手机的部分结构的框图。参考图9,手机包括:射频(Radio Frequency,RF)电路910、存储器920、输入单元930、显示单元940、传感器950、音频电路960、无线保真(wireless fidelity,WiFi)模块970、处理器980、以及电源990等部件。本领域技术人员可以理解,图9中示出的手机结构并不构成对手机的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。FIG. 9 is a block diagram showing a partial structure of a mobile phone related to a terminal provided by an embodiment of the present application. Referring to FIG. 9, the mobile phone includes: a radio frequency (RF) circuit 910, a memory 920, an input unit 930, a display unit 940, a sensor 950, an audio circuit 960, a wireless fidelity (WiFi) module 970, and a processor 980. And power supply 990 and other components. It will be understood by those skilled in the art that the structure of the handset shown in FIG. 9 does not constitute a limitation to the handset, and may include more or less components than those illustrated, or some components may be combined, or different components may be arranged.
下面结合图9对手机的各个构成部件进行具体的介绍:The following describes the components of the mobile phone in detail with reference to FIG. 9:
RF电路910可用于收发信息或通话过程中,信号的接收和发送,特别地,将基站的下行信息接收后,给处理器980处理;另外,将设计上行的数据发送给基站。通常,RF电路910包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器(Low Noise Amplifier,LNA)、双工器等。此外,RF电路910还可以通过无线通信与网络和其他设备通信。上述无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯系统(Global System of Mobile communication,GSM)、通用分组无线服务(General Packet Radio Service,GPRS)、码分多址(Code Division Multiple Access,CDMA)、宽带码分多址(Wideband Code Division Multiple Access,WCDMA)、长期演进(Long Term Evolution,LTE)、电子邮件、短消息服务(Short Messaging Service,SMS)等。The RF circuit 910 can be used for receiving and transmitting signals during the transmission or reception of information or during a call. Specifically, after receiving the downlink information of the base station, it is processed by the processor 980. In addition, the uplink data is designed to be sent to the base station. Generally, RF circuit 910 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, RF circuitry 910 can also communicate with the network and other devices via wireless communication. The above wireless communication may use any communication standard or protocol, including but not limited to Global System of Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (Code Division). Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), E-mail, Short Messaging Service (SMS), and the like.
存储器920可用于存储软件程序以及模块,处理器980通过运行存储在存储器920的软件程序以及模块,从而执行手机的各种功能应用以及数据处理。存储器920可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据手机的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器920可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The memory 920 can be used to store software programs and modules, and the processor 980 executes various functional applications and data processing of the mobile phone by running software programs and modules stored in the memory 920. The memory 920 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may be stored according to Data created by the use of the mobile phone (such as audio data, phone book, etc.). Moreover, memory 920 can include high speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
输入单元930可用于接收输入的数字或字符信息,以及产生与手机的用户设置以及功能控制有关的键信号输入。具体地,输入单元930可包括触控面板931以及其他输入设备932。触控面板931,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板931上或在触控面板931附近的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触控面板931可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器980,并能接收处理器980发来的命令并加以执行。此外, 可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板931。除了触控面板931,输入单元930还可以包括其他输入设备932。具体地,其他输入设备932可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。The input unit 930 can be configured to receive input numeric or character information and to generate key signal inputs related to user settings and function controls of the handset. Specifically, the input unit 930 may include a touch panel 931 and other input devices 932. The touch panel 931, also referred to as a touch screen, can collect touch operations on or near the user (such as a user using a finger, a stylus, or the like on the touch panel 931 or near the touch panel 931. Operation), and drive the corresponding connecting device according to a preset program. Optionally, the touch panel 931 can include two parts: a touch detection device and a touch controller. Wherein, the touch detection device detects the touch orientation of the user, and detects a signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts the touch information into contact coordinates, and sends the touch information. The processor 980 is provided and can receive commands from the processor 980 and execute them. In addition, The touch panel 931 can be implemented in various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 931, the input unit 930 may also include other input devices 932. Specifically, other input devices 932 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), trackballs, mice, joysticks, and the like.
显示单元940可用于显示由用户输入的信息或提供给用户的信息以及手机的各种菜单。显示单元940可包括显示面板941,可选的,可以采用液晶显示器(Liquid Crystal Display,LCD)、有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板941。进一步的,触控面板931可覆盖显示面板941,当触控面板931检测到在其上或附近的触摸操作后,传送给处理器980以确定触摸事件的类型,随后处理器980根据触摸事件的类型在显示面板941上提供相应的视觉输出。虽然在图9中,触控面板931与显示面板941是作为两个独立的部件来实现手机的输入和输入功能,但是在某些实施例中,可以将触控面板931与显示面板941集成而实现手机的输入和输出功能。The display unit 940 can be used to display information input by the user or information provided to the user as well as various menus of the mobile phone. The display unit 940 can include a display panel 941. Alternatively, the display panel 941 can be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like. Further, the touch panel 931 can cover the display panel 941. When the touch panel 931 detects a touch operation on or near it, the touch panel 931 transmits to the processor 980 to determine the type of the touch event, and then the processor 980 according to the touch event. The type provides a corresponding visual output on display panel 941. Although the touch panel 931 and the display panel 941 are used as two independent components to implement the input and input functions of the mobile phone in FIG. 9, in some embodiments, the touch panel 931 and the display panel 941 may be integrated. Realize the input and output functions of the phone.
手机还可包括至少一种传感器950,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板941的亮度,接近传感器可在手机移动到耳边时,关闭显示面板941和/或背光。作为运动传感器的一种,加速计传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;至于手机还可配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。The handset may also include at least one type of sensor 950, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 941 according to the brightness of the ambient light, and the proximity sensor may close the display panel 941 and/or when the mobile phone moves to the ear. Or backlight. As a kind of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (usually three axes). When it is stationary, it can detect the magnitude and direction of gravity. It can be used to identify the gesture of the mobile phone (such as horizontal and vertical screen switching, related Game, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for the mobile phone can also be configured with gyroscopes, barometers, hygrometers, thermometers, infrared sensors and other sensors, no longer Narration.
音频电路960、扬声器961,传声器962可提供用户与手机之间的音频接口。音频电路960可将接收到的音频数据转换后的电信号,传输到扬声器961,由扬声器961转换为声音信号输出;另一方面,传声器962将收集的声音信号转换为电信号,由音频电路960接收后转换为音频数据,再将音频数据输出处理器980处理后,经RF电路910以发送给比如另一手机,或者将音频数据输出至存储器920以便进一步处理。An audio circuit 960, a speaker 961, and a microphone 962 can provide an audio interface between the user and the handset. The audio circuit 960 can transmit the converted electrical data of the received audio data to the speaker 961, and convert it into a sound signal output by the speaker 961. On the other hand, the microphone 962 converts the collected sound signal into an electrical signal, and the audio circuit 960 After receiving, it is converted into audio data, and then processed by the audio data output processor 980, sent to the other mobile phone via the RF circuit 910, or outputted to the memory 920 for further processing.
WiFi属于短距离无线传输技术,手机通过WiFi模块970可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图9示出了WiFi模块970,但是可以理解的是,其并不属于手机的必须构成,完全可以根据需要在不改变申请的本质的范围内而省略。WiFi is a short-range wireless transmission technology, and the mobile phone can help users to send and receive emails, browse web pages, and access streaming media through the WiFi module 970, which provides users with wireless broadband Internet access. Although FIG. 9 shows the WiFi module 970, it can be understood that it does not belong to the essential configuration of the mobile phone, and can be omitted as needed within the scope of not changing the essence of the application.
处理器980是手机的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在存储器920内的软件程序和/或模块,以及调用存储在存储器920内的数据,执行手机的各种功能和处理数据,从而对手机进行整体监控。可选的,处理器980可包括一个或多个处理单元;优选的,处理器980可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器980中。The processor 980 is the control center of the handset, which connects various portions of the entire handset using various interfaces and lines, by executing or executing software programs and/or modules stored in the memory 920, and invoking data stored in the memory 920, executing The phone's various functions and processing data, so that the overall monitoring of the phone. Optionally, the processor 980 may include one or more processing units; preferably, the processor 980 may integrate an application processor and a modem processor, where the application processor mainly processes an operating system, a user interface, an application, and the like. The modem processor primarily handles wireless communications. It will be appreciated that the above described modem processor may also not be integrated into the processor 980.
手机还包括给各个部件供电的电源990(比如电池),优选的,电源可以通过电源管理系统与处理器980逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理 等功能。The handset also includes a power source 990 (such as a battery) that powers the various components. Preferably, the power source can be logically coupled to the processor 980 via a power management system to manage charging, discharging, and power management through the power management system. And other functions.
尽管未示出,手机还可以包括摄像头、蓝牙模块等,在此不再赘述。Although not shown, the mobile phone may further include a camera, a Bluetooth module, and the like, and details are not described herein again.
在本申请实施例中,该终端所包括的处理器980还具有以下功能:In the embodiment of the present application, the processor 980 included in the terminal further has the following functions:
获取标准人像的第一点云信息,第一点云信息用于指示标准人像在终端的显示屏上的坐标;Obtaining the first point cloud information of the standard portrait, the first point cloud information is used to indicate the coordinates of the standard portrait on the display screen of the terminal;
获取贴纸的第二点云信息,第二点云信息为第一点云信息中的至少一部分信息,第二点云信息用于指示贴纸相对于标准人像的位置,第二点云信息由人为拟定,所述贴纸为可以显示在所述显示屏中的图案;Obtaining a second point cloud information of the sticker, the second point cloud information is at least part of the information in the first point cloud information, the second point cloud information is used to indicate the position of the sticker relative to the standard portrait, and the second point cloud information is artificially drawn The sticker is a pattern that can be displayed in the display screen;
当终端在拍摄预览状态下检测到人像时,生成第三点云信息,第三点云信息用于指示终端在拍摄预览状态下人像在显示屏上的坐标;When the terminal detects the portrait in the shooting preview state, the third point cloud information is generated, and the third point cloud information is used to indicate the coordinates of the portrait on the display screen when the terminal is in the preview state;
当第三点云信息与第一点云信息匹配且用户选择贴纸时,根据第二点云信息显示贴纸。When the third point cloud information matches the first point cloud information and the user selects the sticker, the sticker is displayed according to the second point cloud information.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。A person skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working process of the system, the device and the unit described above can refer to the corresponding process in the foregoing method embodiment, and details are not described herein again.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided by the present application, it should be understood that the disclosed system, apparatus, and method may be implemented in other manners. For example, the device embodiments described above are merely illustrative. For example, the division of the unit is only a logical function division. In actual implementation, there may be another division manner, for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,read-only memory)、随机存取存储器(RAM,random access memory)、磁碟或者光盘等各种可以存储程序代码的介质。The integrated unit, if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application, in essence or the contribution to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium. A number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like, which can store program code. .
以上所述,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。 The above embodiments are only used to explain the technical solutions of the present application, and are not limited thereto; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still The technical solutions described in the embodiments are modified, or the equivalents of the technical features are replaced by the equivalents. The modifications and substitutions of the embodiments do not depart from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims (14)

  1. 一种数据处理方法,其特征在于,包括:A data processing method, comprising:
    终端获取标准人像的第一点云信息,所述第一点云信息用于指示所述标准人像在所述终端的显示屏上的坐标;The terminal acquires first point cloud information of the standard portrait, where the first point cloud information is used to indicate coordinates of the standard portrait on a display screen of the terminal;
    所述终端获取贴纸的第二点云信息,所述第二点云信息为所述第一点云信息中的至少一部分信息,所述第二点云信息用于指示所述贴纸相对于所述标准人像的位置,所述第二点云信息由人为拟定,所述贴纸为可以显示在所述显示屏中的图案;The terminal acquires second point cloud information of the sticker, the second point cloud information is at least a part of the first point cloud information, and the second point cloud information is used to indicate the sticker relative to the a position of the standard portrait, the second point cloud information is artificially formulated, and the sticker is a pattern that can be displayed in the display screen;
    当所述终端在拍摄预览状态下检测到人像时,所述终端生成第三点云信息,所述第三点云信息用于指示所述终端在拍摄预览状态下所述人像在所述显示屏上的坐标;When the terminal detects a portrait in a shooting preview state, the terminal generates third point cloud information, where the third point cloud information is used to indicate that the terminal is in the display screen in a shooting preview state. Coordinate on
    当所述第三点云信息与所述第一点云信息匹配且用户选择所述贴纸时,所述终端根据所述第二点云信息显示所述贴纸。When the third point cloud information matches the first point cloud information and the user selects the sticker, the terminal displays the sticker according to the second point cloud information.
  2. 根据权利要求1所述的方法,其特征在于,所述终端生成所述第三点云信息之前,所述方法还包括:The method according to claim 1, wherein before the generating, by the terminal, the third point cloud information, the method further comprises:
    所述终端从软件开发工具包SDK集合中选择目标SDK,所述SDK集合中的所有SDK具有统一的SDK接口,所述目标SDK用于实现所述人像与所述贴纸的拼合。The terminal selects a target SDK from the software development kit SDK set, and all the SDKs in the SDK set have a unified SDK interface, and the target SDK is used to implement the flattening of the portrait and the sticker.
  3. 根据权利要求2所述的方法,其特征在于,所述终端从SDK集合中选择目标SDK包括:The method according to claim 2, wherein the selecting, by the terminal, the target SDK from the set of SDKs comprises:
    所述终端获取所述SDK集合中的SDK参数集合,所述SDK参数集合包括用户美肤等级的参数集合、预览算法处理速率的参数集合及贴纸跟随性速率的参数集合;The terminal acquires an SDK parameter set in the SDK set, where the SDK parameter set includes a parameter set of a user skin level, a parameter set of a preview algorithm processing rate, and a parameter set of a sticker followability rate;
    所述终端根据所述SDK参数集合获得计算结果集合;The terminal obtains a calculation result set according to the SDK parameter set;
    所述终端从所述计算结果集合中确定目标计算结果,所述目标计算结果为所述计算结果集合中值最大的计算结果;Determining, by the terminal, a target calculation result from the set of calculation results, where the target calculation result is a calculation result having the largest value in the calculation result set;
    所述终端确定与所述目标计算结果对应的所述目标SDK。The terminal determines the target SDK corresponding to the target calculation result.
  4. 根据权利要求3所述的方法,其特征在于,所述终端根据所述SDK参数集合获得计算结果集合,包括:The method according to claim 3, wherein the terminal obtains a set of calculation results according to the set of SDK parameters, including:
    所述终端将所述SDK参数集合带入下述公式计算得到计算结果集合,所述公式为:The terminal calculates the calculation result set by bringing the SDK parameter set into the following formula, and the formula is:
    R=α*B+γ*P+β*F;R=α*B+γ*P+β*F;
    所述R为结算结果;The R is a settlement result;
    所述α、β、γ为预置的权重系数;The α, β, and γ are preset weight coefficients;
    所述B为所述用户美肤等级的参数;The B is a parameter of the user's skin level;
    所述P为所述预览算法处理速率的参数;The P is a parameter of a processing rate of the preview algorithm;
    所述F为所述贴纸跟随性速率的参数。The F is a parameter of the sticker followability rate.
  5. 根据权利要求2至4中任一项所述的方法,其特征在于,所述统一的SDK接口包括:The method according to any one of claims 2 to 4, wherein the unified SDK interface comprises:
    下载并注册贴纸、拍摄界面初始化、进行贴纸预览、处理拍摄数据及结束进程。Download and register stickers, capture interface initialization, perform sticker previews, process shooting data, and end the process.
  6. 根据权利要求1所述的方法,其特征在于,所述终端生成所述第三点云信息之前,所述方法还包括:The method according to claim 1, wherein before the generating, by the terminal, the third point cloud information, the method further comprises:
    所述终端从拍摄算法集合中选择目标拍摄算法,所述目标拍摄算法用于实现所述人像 与所述贴纸的拼合。The terminal selects a target shooting algorithm from a set of shooting algorithms, and the target shooting algorithm is used to implement the portrait The combination with the sticker.
  7. 根据权利要求6所述的方法,其特征在于,所述目标拍摄算法包括:The method according to claim 6, wherein the target shooting algorithm comprises:
    人像美颜算法、人像检测算法、滤镜拍摄算法和/或贴纸拼合算法。Portrait beauty algorithm, portrait detection algorithm, filter shooting algorithm and/or sticker flattening algorithm.
  8. 一种终端,其特征在于,包括:A terminal, comprising:
    第一获取单元,用于获取标准人像的第一点云信息,所述第一点云信息用于指示所述标准人像在所述终端的的显示屏上的坐标;a first acquiring unit, configured to acquire first point cloud information of a standard portrait, where the first point cloud information is used to indicate coordinates of the standard portrait on a display screen of the terminal;
    第二获取单元,用于获取贴纸的第二点云信息,所述第二点云信息为所述第一点云信息中的至少一部分信息,所述第二点云信息用于指示所述贴纸相对于所述标准人像的位置,所述第二点云信息由人为拟定,所述贴纸为可以显示在所述显示屏中的图案;a second acquiring unit, configured to acquire second point cloud information of the sticker, where the second point cloud information is at least a part of the first point cloud information, and the second point cloud information is used to indicate the sticker The second point cloud information is artificially formulated relative to the location of the standard portrait, and the sticker is a pattern that can be displayed in the display screen;
    生成单元,用于当所述终端在拍摄预览状态下检测到人像时,生成第三点云信息,所述第三点云信息用于指示所述终端在拍摄预览状态下所述人像在所述显示屏上的坐标;a generating unit, configured to generate third point cloud information when the terminal detects a portrait in a shooting preview state, where the third point cloud information is used to indicate that the terminal is in the shooting preview state The coordinates on the display;
    显示单元,用于当所述第三点云信息与所述第一点云信息匹配且用户选择所述贴纸时,根据所述第二点云信息显示所述贴纸。a display unit, configured to display the sticker according to the second point cloud information when the third point cloud information matches the first point cloud information and the user selects the sticker.
  9. 根据权利要求8所述的终端,其特征在于,所述终端还包括:The terminal according to claim 8, wherein the terminal further comprises:
    第一选择单元,用于从SDK集合中选择目标SDK,所述SDK集合中的所有SDK具有统一的SDK接口,所述目标SDK用于实现所述人像与所述贴纸的拼合。And a first selection unit, configured to select a target SDK from the SDK set, all SDKs in the SDK set have a unified SDK interface, and the target SDK is used to implement the stitching of the portrait and the sticker.
  10. 根据权利要求9所述的终端,其特征在于,所述第一选择单元包括:The terminal according to claim 9, wherein the first selection unit comprises:
    获取模块,用于获取与所述SDK集合对应的SDK参数集合,所述SDK参数集合包括用户美肤等级的参数集合、预览算法处理速率的参数集合及贴纸跟随性速率的参数集合;An acquiring module, configured to acquire an SDK parameter set corresponding to the SDK set, where the SDK parameter set includes a parameter set of a user skin level, a parameter set of a preview algorithm processing rate, and a parameter set of a sticker followability rate;
    计算模块,用于将所述SDK参数集合代入公式计算得到计算结果集合;a calculation module, configured to substitute the SDK parameter set into a formula to calculate a calculation result set;
    第一确定模块,用于从所述计算结果集合中确定目标计算结果,所述目标计算结果为所述计算结果集合中值最大的计算结果;a first determining module, configured to determine a target calculation result from the set of calculation results, where the target calculation result is a calculation result with the largest value in the calculation result set;
    第二确定模块,用于确定与所述目标计算结果对应的所述目标SDK。And a second determining module, configured to determine the target SDK corresponding to the target calculation result.
  11. 根据权利要求8所述的终端,其特征在于,所述终端还包括:The terminal according to claim 8, wherein the terminal further comprises:
    第二选择单元,用于从拍摄算法集合中选择目标拍摄算法,所述目标拍摄算法用于实现所述人像与所述贴纸的拼合。And a second selecting unit, configured to select a target shooting algorithm from the set of shooting algorithms, where the target shooting algorithm is used to implement the stitching of the portrait and the sticker.
  12. 一种终端,其特征在于,包括:A terminal, comprising:
    处理器、存储器、总线以及输入输出接口;a processor, a memory, a bus, and an input and output interface;
    所述存储器中存储有程序代码;Program code is stored in the memory;
    所述处理器调用所述存储器中的程序代码时执行如下操作:The processor performs the following operations when calling the program code in the memory:
    获取标准人像的第一点云信息,所述第一点云信息用于指示所述标准人像在所述终端的显示屏上的坐标;Obtaining first point cloud information of the standard portrait, the first point cloud information is used to indicate coordinates of the standard portrait on a display screen of the terminal;
    获取贴纸的第二点云信息,所述第二点云信息为所述第一点云信息中的至少一部分信息,所述第二点云信息用于指示所述贴纸相对于所述标准人像的位置,所述第二点云信息由人为拟定,所述贴纸为可以显示在所述显示屏中的图案;Obtaining a second point cloud information of the sticker, the second point cloud information is at least a part of the first point cloud information, and the second point cloud information is used to indicate that the sticker is relative to the standard portrait Position, the second point cloud information is artificially formulated, and the sticker is a pattern that can be displayed in the display screen;
    当所述终端在拍摄预览状态下检测到人像时,生成第三点云信息,所述第三点云信息用于指示所述终端在拍摄预览状态下所述人像在所述显示屏上的坐标; When the terminal detects a portrait in the shooting preview state, generating third point cloud information, the third point cloud information is used to indicate coordinates of the portrait on the display screen in the shooting preview state of the terminal ;
    当所述第三点云信息与所述第一点云信息匹配且用户选择所述贴纸时,根据所述第二点云信息显示所述贴纸。When the third point cloud information matches the first point cloud information and the user selects the sticker, the sticker is displayed according to the second point cloud information.
  13. 一种计算机可读存储介质,包括指令,当所述指令在计算机上运行时,使得计算机执行如权利要求1至7中任意一项所述的方法。A computer readable storage medium comprising instructions which, when executed on a computer, cause the computer to perform the method of any one of claims 1 to 7.
  14. 一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行如权利要求1至7中任意一项所述的方法。 A computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of any one of claims 1 to 7.
PCT/CN2017/106014 2017-10-13 2017-10-13 Data processing method and terminal WO2019071562A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201780083034.3A CN110168599B (en) 2017-10-13 2017-10-13 Data processing method and terminal
PCT/CN2017/106014 WO2019071562A1 (en) 2017-10-13 2017-10-13 Data processing method and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/106014 WO2019071562A1 (en) 2017-10-13 2017-10-13 Data processing method and terminal

Publications (1)

Publication Number Publication Date
WO2019071562A1 true WO2019071562A1 (en) 2019-04-18

Family

ID=66101123

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/106014 WO2019071562A1 (en) 2017-10-13 2017-10-13 Data processing method and terminal

Country Status (2)

Country Link
CN (1) CN110168599B (en)
WO (1) WO2019071562A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113936269B (en) * 2021-11-17 2022-07-01 深圳市镭神智能系统有限公司 Method for identifying staying object and method for controlling motor vehicle
CN114501079A (en) * 2022-01-29 2022-05-13 京东方科技集团股份有限公司 Method for processing multimedia data and related device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104778712A (en) * 2015-04-27 2015-07-15 厦门美图之家科技有限公司 Method and system for pasting image to human face based on affine transformation
US20150206310A1 (en) * 2013-12-20 2015-07-23 Furyu Corporation Image generating apparatus and image generating method
CN105096246A (en) * 2014-05-08 2015-11-25 腾讯科技(深圳)有限公司 Image synthesis method and system
CN105551070A (en) * 2015-12-09 2016-05-04 广州市久邦数码科技有限公司 Camera system capable of loading map elements in real time
US20160142580A1 (en) * 2014-11-14 2016-05-19 Furyu Corporation Photograph sticker creating apparatus, and a method of generating photograph sticker
CN106339201A (en) * 2016-09-14 2017-01-18 北京金山安全软件有限公司 Map processing method and device and electronic equipment

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20150039049A (en) * 2013-10-01 2015-04-09 삼성전자주식회사 Method and Apparatus For Providing A User Interface According to Size of Template Edit Frame
CN103632136B (en) * 2013-11-11 2017-03-29 北京天诚盛业科技有限公司 Human-eye positioning method and device
CN105469018B (en) * 2014-08-07 2020-03-13 中兴通讯股份有限公司 Method and equipment for positioning human eyes
CN105678686B (en) * 2015-12-30 2019-06-14 北京金山安全软件有限公司 Picture processing method and device
CN106952221B (en) * 2017-03-15 2019-12-31 中山大学 Three-dimensional Beijing opera facial makeup automatic making-up method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150206310A1 (en) * 2013-12-20 2015-07-23 Furyu Corporation Image generating apparatus and image generating method
CN105096246A (en) * 2014-05-08 2015-11-25 腾讯科技(深圳)有限公司 Image synthesis method and system
US20160142580A1 (en) * 2014-11-14 2016-05-19 Furyu Corporation Photograph sticker creating apparatus, and a method of generating photograph sticker
CN104778712A (en) * 2015-04-27 2015-07-15 厦门美图之家科技有限公司 Method and system for pasting image to human face based on affine transformation
CN105551070A (en) * 2015-12-09 2016-05-04 广州市久邦数码科技有限公司 Camera system capable of loading map elements in real time
CN106339201A (en) * 2016-09-14 2017-01-18 北京金山安全软件有限公司 Map processing method and device and electronic equipment

Also Published As

Publication number Publication date
CN110168599B (en) 2021-01-29
CN110168599A (en) 2019-08-23

Similar Documents

Publication Publication Date Title
JP7206388B2 (en) Virtual character face display method, apparatus, computer device, and computer program
CN108184050B (en) Photographing method and mobile terminal
WO2019184889A1 (en) Method and apparatus for adjusting augmented reality model, storage medium, and electronic device
CN109361865B (en) Shooting method and terminal
WO2020192465A1 (en) Three-dimensional object reconstruction method and device
WO2019034142A1 (en) Three-dimensional image display method and device, terminal, and storage medium
WO2019174628A1 (en) Photographing method and mobile terminal
WO2017071219A1 (en) Method for detecting skin region and device for detecting skin region
CN109361867B (en) Filter processing method and mobile terminal
CN108924412B (en) Shooting method and terminal equipment
CN109685915B (en) Image processing method and device and mobile terminal
CN108307106B (en) Image processing method and device and mobile terminal
CN108683850B (en) Shooting prompting method and mobile terminal
CN107730460B (en) Image processing method and mobile terminal
WO2020233403A1 (en) Personalized face display method and apparatus for three-dimensional character, and device and storage medium
CN109495616B (en) Photographing method and terminal equipment
CN107741814B (en) Display control method and mobile terminal
WO2022062808A1 (en) Portrait generation method and device
CN109978996B (en) Method, device, terminal and storage medium for generating expression three-dimensional model
CN109448069B (en) Template generation method and mobile terminal
CN109246351B (en) Composition method and terminal equipment
CN110796083B (en) Image display method, device, terminal and storage medium
CN111932604A (en) Method and device for measuring human ear characteristic distance
CN110555815B (en) Image processing method and electronic equipment
CN109639981B (en) Image shooting method and mobile terminal

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: 17928495

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17928495

Country of ref document: EP

Kind code of ref document: A1