Image processing method, apparatus, electronic device and storage medium
The image processing method dynamically generates virtual models based on user input, addressing the limitations of preconfigured models by enhancing user flexibility and customization in image processing applications.
Patent Information
- Application Number
- JP2023507570
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2020-08-31
- Filing Date
- 2021-08-10
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2041-08-10
AI Technical Summary
Conventional image processing methods limit user flexibility by providing preconfigured virtual models that are not customizable to individual user preferences.
An image processing method that generates virtual models in real-time based on user-input slide trajectories, allowing for dynamic creation and display of virtual models in target images.
Enhances user flexibility by enabling the creation of diverse virtual models tailored to user input, improving the aesthetic and interactive experience in image processing applications.
Smart Images

Figure 0007540796000002 
Figure 0007540796000005 
Figure 0007540796000007
Abstract
Description
[Technical field]
[0001] This application claims priority to a Chinese patent application bearing application number 202010901576.0 and entitled "Image processing method, apparatus, electronic device and storage medium" filed with the State Intellectual Property Office of the People's Republic of China on August 31, 2020, the entire contents of which are incorporated herein by reference.
[0002] The present disclosure relates to the field of information technology, and in particular to an image processing method, apparatus, electronic device and storage medium. [Background technology]
[0003] 2. Description of the Related Art With the development of smart terminals, more and more application programs (Applications, APPs) can be installed on smart terminals to provide corresponding services for users.
[0004] For example, application programs in the prior art can enhance the appeal of images by adding virtual models to a given image or images collected by a terminal device.
[0005] However, in conventional technologies, the virtual models added to a given image or images collected by a smart terminal are pre-set, for example, the virtual models may be pre-stored in an application program, a terminal device or a remote server, and the virtual models that a user can select are relatively limited, resulting in reduced flexibility when displaying the virtual models. Summary of the Invention [Means for solving the problem]
[0006] In order to solve or at least partially solve the above technical problems, embodiments of the present disclosure provide an image processing method, an apparatus, an electronic device, and a storage medium that can generate a virtual model that meets a user's needs in real time according to a slide trajectory input by a user, and can improve the flexibility of the virtual model.
[0007] An embodiment of the present disclosure is an image processing method, comprising: obtaining a slide trajectory input by a user on a display assembly; Creating a first virtual model corresponding to the slide trajectory according to the slide trajectory; displaying the first virtual model at a first location in a target image; The present invention provides a method comprising:
[0008] The embodiments of the present disclosure further comprise: an acquisition module for acquiring a slide trajectory input by a user on a display assembly; a creation module for creating a first virtual model corresponding to the slide trajectory according to the slide trajectory; a display module for displaying the first virtual model at a first position in a target image.
[0009] The embodiments of the present disclosure further comprise: one or more processors; a storage device for storing one or more programs; An electronic device comprising: There is also provided an electronic device which, when executed by the one or more processors, causes the one or more processors to implement the image processing method described above.
[0010] An embodiment of the present disclosure further provides a computer-readable storage medium having a computer program stored thereon, the computer-readable storage medium realizing the image processing method described above when the program is executed by a processor.
[0011] The technical solution according to the embodiment of the present disclosure has the following advantages over the prior art: That is, the image processing method according to the embodiment of the present disclosure obtains a slide trajectory input by a user on a display assembly, creates a virtual model corresponding to the slide trajectory, and displays the virtual model at a first position in a target image, so that different virtual models can be created according to different slide trajectories input by a user, for example, different shapes of the slide trajectory result in different shapes of the virtual model, so that the virtual model in the target image can change according to the change of the slide trajectory input by the user, that is, a virtual model that meets the needs of a user can be created in real time according to the slide trajectory input by a user, so that the flexibility of displaying the virtual model can be improved. [Brief description of the drawings]
[0012] The above and other features, advantages, and aspects of each embodiment of the present disclosure will become more apparent with reference to the following specific embodiments in conjunction with the accompanying drawings. Throughout the drawings, the same or similar drawing reference numerals refer to the same or similar elements. It should be understood that the drawings are schematic and that the components and elements are not necessarily drawn to scale. [Figure 1] 1 is a flowchart of an image processing method according to an embodiment of the present disclosure. [Diagram 2] FIG. 1 is a schematic diagram of a slide trajectory according to an embodiment of the present disclosure. [Diagram 3] FIG. 2 is a schematic diagram of a human face image according to an embodiment of the present disclosure. [Figure 4] FIG. 2 is a schematic diagram of a virtual model according to an embodiment of the present disclosure. [Diagram 5]1A-1C are schematic diagrams of virtual models in mirror image relationship to each other according to an embodiment of the present disclosure. [Figure 6] 13 is a flowchart of another image processing method according to an embodiment of the present disclosure. [Figure 7] FIG. 2 is a schematic diagram of trajectory points according to an embodiment of the present disclosure. [Figure 8] FIG. 1 is a schematic diagram of a preset sub-model and a target sub-model according to an embodiment of the present disclosure. [Figure 9] FIG. 2 is a schematic diagram of a virtual model according to an embodiment of the present disclosure. [Figure 10] 11 is a flowchart of another image processing method according to an embodiment of the present disclosure. [Figure 11] FIG. 1 is a schematic diagram of a slide trajectory and virtual model according to an embodiment of the present disclosure. [Figure 12] 13 is a flowchart of another image processing method according to an embodiment of the present disclosure. [Figure 13] FIG. 2 is a schematic diagram of a user interface according to an embodiment of the present disclosure. [Figure 14] 13 is a flowchart of another image processing method according to an embodiment of the present disclosure. [Figure 15] 1 is a schematic diagram illustrating a configuration of an image processing device according to an embodiment of the present disclosure. [Figure 16] FIG. 1 is a schematic diagram of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0013] Hereinafter, the embodiments of the present disclosure will be described in more detail with reference to the drawings. Although some embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be realized in various forms and should not be construed as being limited to the embodiments described herein, but rather that these embodiments are provided for a deeper and more complete understanding of the present disclosure. It should also be understood that the drawings and embodiments of the present disclosure are only given for illustrative purposes and are not intended to limit the scope of protection of the present disclosure.
[0014] It should be understood that the steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. Also, method embodiments may include additional steps and / or omit the performance of steps that are illustrated. The scope of the present disclosure is not limited in this respect.
[0015] As used herein, the term "comprising" and variations thereof mean an open-ended inclusion, i.e., including but not limited to. The term "based on" means "based at least in part on." The term "in one embodiment" means "at least one embodiment," the term "another embodiment" means "at least one other embodiment," and the term "some embodiments" means "at least some embodiments." Additionally, definitions relating to other terms are provided below.
[0016] It should be noted that concepts such as "first", "second" and the like referred to in this disclosure are used only to distinguish different devices, modules or units, and are not intended to limit the order or interdependence of functions performed by these devices, modules or units.
[0017] It should be noted that modifications such as "a" and "a plurality" referred to in the present disclosure are exemplary rather than limiting and should be interpreted as "one or more" unless the context clearly dictates otherwise, as would be understood by one of ordinary skill in the art.
[0018] The names of messages or information exchanged between devices according to embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of these messages or information.
[0019] 1 is a flowchart of an image processing method according to an embodiment of the present disclosure. This embodiment can be applied to a case where image processing is performed in a client terminal, and the method is executed by an image processing device, which is implemented in the form of software and / or hardware, and the device can be specifically installed in an electronic device such as a mobile terminal, including a mobile phone, a computer, or a tablet computer. Alternatively, this embodiment can be applied to a case where image processing is performed in a server terminal, and the method is executed by an image processing device, which is implemented in the form of software and / or hardware, and the device can be installed in an electronic device such as a server.
[0020] As shown in FIG. 1, the method specifically includes the following steps:
[0021] Step S101: Obtain a slide trajectory input by a user on a display assembly.
[0022] 2, the terminal 21 may be provided with a display assembly, which may specifically include a screen such as a touch screen. A slide path input by a user on the touch screen may be acquired from the terminal 21. Alternatively, the terminal 21 may be connected to an external display assembly such as a touch pad, and the terminal 21 acquires a slide path input by a user on the touch pad.
[0023] Specifically, the terminal 21 may be equipped with a camera. When a user turns on the camera button of the terminal 21, the camera can be used to capture an image such as a face image. Alternatively, the terminal 21 may install an image-based or video-based application program, and when the camera is called by the application program, the camera can be used to collect images, and the collected images can be previewed on the display assembly. In an embodiment of the present disclosure, the terminal 21 may add a virtual model to an image. For example, when a user needs to display a virtual model on an image, the user can slide on the display assembly, and the terminal 21 can obtain a slide trajectory by the user on the display assembly. Alternatively, a virtual model trigger button may be displayed on the display assembly of the terminal 21 or on the user interface of the application program, and the terminal 21 can detect and obtain a slide trajectory input by the user on the display assembly according to the user's operation on the virtual model trigger button. As shown in FIG. 2, the slide trajectory may be a continuous curve. In some possible implementations, the slide trajectory may be a straight line, and this embodiment is not limited thereto.
[0024] Step S102: According to the slide trajectory, a first virtual model corresponding to the slide trajectory is generated.
[0025] Furthermore, the terminal 21 can create a virtual model corresponding to the slide trajectory according to the slide trajectory, and the virtual model is defined as a first virtual model. The virtual model may be a three-dimensional model or a two-dimensional model. Since the first virtual model is created according to the slide trajectory by the user on the screen, the shape of the first virtual model resembles the shape of the slide trajectory. For example, taking the slide trajectory in FIG. 2 as an example, the first virtual model corresponding to the slide trajectory may be a virtual model like a cow horn.
[0026] Step S103: The first virtual model is displayed at a first position in a target image.
[0027] As shown in Fig. 3, a target image is displayed on the screen of the terminal 21, and the target image may include, for example, a human face image. Furthermore, taking the slide trajectory in Fig. 2 as an example, the terminal creates a first virtual model resembling a cow horn corresponding to the slide trajectory according to the slide trajectory. The terminal 21 can display the first virtual model resembling a cow horn at a first position in the face image, and the first position may be a preset position or a random position.
[0028] When the first position is a preset position, the preset position is determined by a user, for example, the preset position may be a position selected by a user in the display assembly or face image. Alternatively, the preset position may be a specific position in the display assembly or face image predetermined by the terminal 21. The present embodiment does not specifically limit the preset position. In the exemplary illustration of FIG. 3, the first position is a specific position of the forehead of the face in the face image, and the first position is (μ,ν). Here, (μ,ν) may represent the coordinates of the first position in the face coordinate system.
[0029] Specifically, the terminal 21 can adsorb a first virtual model 23, such as a cow horn, to the first position (μ,ν), and as shown in Fig. 4, 22 represents the first position (μ,ν) and 23 represents the first virtual model adsorbed to the first position (μ,ν). Here, the terminal 21 can place the first virtual model 23 at the first position (μ,ν) by a method such as mapping.
[0030] The image processing method according to the embodiment of the present disclosure can generate different virtual models according to different slide trajectories input by the user on the display assembly, generate a virtual model corresponding to the slide trajectory, and display the virtual model at a first position in the target image, for example, when the shape of the slide trajectory is different, the shape of the virtual model is also different. Thus, the virtual model in the target image can change according to the change of the slide trajectory input by the user, that is, a virtual model that meets the needs of the user can be generated in real time according to the slide trajectory input by the user, thereby improving the flexibility of displaying the virtual model.
[0031] Based on the above embodiment, displaying the first virtual model at a first position in the target image includes displaying the first virtual model at a first position of a target object in the target image.
[0032] As shown in FIG. 4, the terminal 21 can adsorb the first virtual model 23 to the first position 22 of the face. When the first virtual model 23 is adsorbed to the first position 22 of the face, the terminal 21 can specifically overlap the center point of the bottom surface of the first virtual model 23 with the first position 22 of the face. In one embodiment, the point on the first position 22 may specifically be an important point of the face in the face image. In addition, the orientation of the important point on the first position in the three-dimensional space coincides with the Y axis of the model coordinate system in which the first virtual model 23 is arranged. Here, the orientation of the important point in the three-dimensional space can be determined by a machine learning algorithm. The Y axis direction of the model coordinate system may be a direction that passes through the center point of the bottom surface of the first virtual model 23 and is perpendicular to the bottom surface.
[0033] Preferably, after displaying the first virtual model at a first position of the target object in the target image, the method further includes the steps of receiving a mirror control command, determining a second position on the target object that is symmetrical to the first position in response to the mirror control command, and displaying a second virtual model that is in a mirror image relationship with the first virtual model at the second position.
[0034] In one embodiment, the terminal 21 can receive a user's trigger operation, for example, a trigger of a "mirror" button on the screen, a voice trigger, a gesture trigger, a facial expression trigger, or the like, determine a second position symmetrical to the first position in the face image, and display a second virtual model in a mirror image relationship with the first virtual model at the second position. In another embodiment, the terminal 21 can further determine a second position symmetrical to the first position in the face immediately after displaying the first virtual model at the first position of the face in the target image, or after a predetermined time has elapsed, and display a second virtual model in a mirror image relationship with the first virtual model at the second position.
[0035] For example, as shown in FIG. 4, the mirror button 134 may be displayed on the display assembly of the terminal 21 or the user interface of the application program. After the terminal 21 has attached the first virtual model 23 to the first position 22 on the face, the user may perform a trigger operation on the mirror button 134, which may trigger the terminal 21 to generate a mirror image control command. In response to the mirror image control command, the terminal 21 may determine a second position on the face that is symmetrical to the first position (μ,ν), for example, the second position is (1-μ,ν). Here, (μ,ν) and (1-μ,ν) are both coordinates in the face coordinate system. In addition, the terminal 21 may display a second virtual model that is in a mirror image relationship with the first virtual model 23 at the second position (1-μ,ν). As shown in FIG. 5, 24 represents the second position (1-μ,ν), and 25 represents the second virtual model attached to (1-μ,ν).
[0036] Specifically, the terminal 21 may include several possible implementations to display a second virtual model that is a mirror image of the first virtual model 23 at the second position (1-μ,ν).
[0037] In one possible embodiment, based on FIG. 4 , the terminal 21 can first rotate the first virtual model 23 by 180 degrees to obtain a second virtual model 25, and then adsorb the second virtual model 25 onto the second position 24.
[0038] In another possible embodiment, based on FIG. 4 , the terminal 21 can first adsorb the first virtual model 23 to the second position 24, and then rotate the first virtual model 23 adsorbed to the second position 24 by 180 degrees to obtain the second virtual model 25.
[0039] In the image processing method according to the embodiment of the present disclosure, a second position in the target image that is symmetrical to a first position is determined, and a second virtual model that is in a mirror image relationship with the first virtual model is displayed at the second position, thereby achieving the effect of the first virtual model adsorbed to the first position and the second virtual model adsorbed to the second position forming a mirror image, which not only reduces the amount of calculation required to reconstruct the second virtual model, but also further improves the flexibility and aesthetics of the display of the virtual model in the target image.
[0040] In FIG. 4, a face image is taken as an example for illustrative purposes. In other embodiments, it should be understood by those skilled in the art that the target image is not limited to a human face image, and may be, for example, other object images. Also, the target object is not limited to a human face, and may be, for example, other objects, etc. The present disclosure does not limit this.
[0041] As shown in Fig. 2, when a user inputs a slide trajectory on the screen, the following takes the terminal 21 as an example to introduce a procedure in which the terminal 21 creates a first virtual model corresponding to the slide trajectory according to the slide trajectory. Based on the above embodiment, creating a first virtual model corresponding to the slide trajectory according to the slide trajectory includes the following steps, as shown in Fig. 6:
[0042] Step S601: According to the slide trajectory, determine a number of target points associated with the slide trajectory.
[0043] As shown in FIG. 2, after a user inputs a slide trajectory on the screen, the terminal 21 can determine a number of target points associated with the slide trajectory according to the slide trajectory.
[0044] In one possible embodiment, the multiple target points related to the slide trajectory may specifically be multiple trajectory points or multiple sampling points of the slide trajectory. As shown in FIG. 7, the slide trajectory may be composed of multiple trajectory points, and each trajectory point may be one target point. Alternatively, the terminal 21 may perform uniform sampling or non-uniform sampling on the slide trajectory to obtain multiple sampling points, and each sampling point may be one target point. For example, the target point 71 may be any one of the multiple target points.
[0045] In another possible embodiment, the step of determining a plurality of target points associated with the slide trajectory according to the slide trajectory includes the steps of: determining a plurality of trajectory points in the slide trajectory according to the slide trajectory; performing a fit calculation on the plurality of trajectory points to obtain a fit curve; and performing sampling on the fit curve to obtain a plurality of target points associated with the slide trajectory, wherein the target points include sampling points on the fit curve.
[0046] After the user inputs a slide trajectory on the screen, the terminal 21 can obtain trajectory points on the slide trajectory according to the slide trajectory, and the trajectory points may be one or more. In this embodiment, a plurality of trajectory points are taken as an example for illustrative purposes. It is assumed that the plurality of points shown in FIG. 7 may be a plurality of trajectory points on the slide trajectory. The plurality of trajectory points may constitute a point set denoted as P, where P={P1, P2, P3,..., Pn}. Here, P={P1, P2, P3,..., Pn} respectively represent trajectory points. For example, the point set P includes n trajectory points. Here, the specific value of n is not limited. Specifically, P1, P2, P3,..., Pn are respectively two-dimensional points, that is, the point set P may be a two-dimensional point set. For example, P1, P2, P3,..., Pn may be two-dimensional points in a screen coordinate system, and the coordinate origin of the screen coordinate system may be the lower right corner of the screen.
[0047] Since the slide speed corresponding to each trajectory point of the slide trajectory is not uniform during the process of generating the slide trajectory, the distribution of P1, P2, P3, ..., Pn on the slide trajectory may be uneven. In this embodiment, a fitting calculation is performed on P1, P2, P3, ..., Pn using a preset fitting algorithm, and a fitting curve can be obtained. Here, this embodiment does not specifically limit the fitting algorithm, and for example, the fitted fitting curve may be a cubic spline fitting curve. The fitting curve is expressed as y=ax 3 +bx 2 +cx+d, where x represents the coordinate of an arbitrary point on the fitted curve in the X-axis of the screen coordinate system, y represents the coordinate of an arbitrary point on the fitted curve in the Y-axis of the screen coordinate system, and a, b, c, and d represent fitting coefficients, respectively.
[0048] Furthermore, the terminal 21 may perform sampling, such as uniform sampling or non-uniform sampling, on the fitted curve to obtain sampling points on the fitted curve, and the sampling points may be one or more. Specifically, a description will be given of a plurality of sampling points as an example. For example, the plurality of sampling points are represented as C1, C2, C3, ..., Cm, that is, there are m sampling points, and here, the specific value of m is not limited, and the magnitude relationship between n and m is not limited. Furthermore, the terminal 21 may set the sampling points C1, C2, C3, ..., Cm as a plurality of target points related to the slide trajectory. Each sampling point may be one target point. Similarly, C1, C2, C3, ..., Cm may be two-dimensional points in the screen coordinate system.
[0049] Step S602: Obtain a preset sub-model corresponding to each of the plurality of target points.
[0050] For example, C1, C2, C3, ..., Cm are multiple target points related to the slide trajectory, and each target point may correspond to one preset sub-model. Here, the preset sub-models corresponding to different target points may be the same or different. In addition, this embodiment does not limit the shape of the preset sub-model corresponding to each target point, and may be, for example, a regular or irregular body, or a regular or irregular plane figure.
[0051] Specifically, after determining a plurality of target points associated with the slide trajectory, the terminal 21 may also obtain preset sub-models corresponding to each of the plurality of target points.
[0052] Step S603: Transform a preset sub-model corresponding to each target point into a target sub-model according to the geometric information of each of the plurality of target points.
[0053] Specifically, the shapes of the preset sub-models corresponding to different target points among C1, C2, C3, ..., Cm may be different. For example, the preset sub-model corresponding to the target point C1 is a cylinder, and the preset sub-model corresponding to the target point C2 is a cone.
[0054] Alternatively, the shapes of the preset sub-models corresponding to different target points among C1, C2, C3, ..., Cm may be the same, for example, all cylinders, where the cylinders corresponding to different target points may be the same size or different sizes.
[0055] In this embodiment, the preset sub-models corresponding to different target points among C1, C2, C3, ..., Cm are all cylinders, and the sizes of the cylinders corresponding to different target points are different. For example, the sizes of the cylinders corresponding to each target point among C1, C2, C3, ..., Cm are successively smaller.
[0056] Furthermore, the preset sub-model corresponding to the target point is converted into the target sub-model. For example, taking the target point C1 as an example, the preset sub-model corresponding to C1 may be a cylinder without radians, and the target sub-model obtained by converting the preset sub-model may be a cylinder with radians.
[0057] Preferably, the geometric information of the target point includes at least one of an offset amount of the target point relative to a starting trajectory point in the plurality of trajectory points, and a tangent direction of the target point on the fit curve.
[0058] For example, the multiple points shown in FIG. 7 may be multiple trajectory points on the slide trajectory. Among P1, P2, P3, ..., Pn, the trajectory point P1 may be the start trajectory point on the slide trajectory. P1, P2, P3, ..., Pn and C1, C2, C3, ..., Cm are all two-dimensional points in the screen coordinate system, that is, P1, P2, P3, ..., Pn and C1, C2, C3, ..., Cm are located in the same coordinate system. Therefore, based on the coordinates of the target point C1 in the screen coordinate system and the coordinates of the start trajectory point P1 in the screen coordinate system, the offset amount of the target point C1 with respect to the start trajectory point P1 can be obtained, and the offset amount is defined as T. In addition, the tangent direction of the target point C1 on the fit curve can also be determined, and the tangent direction is defined as R. Here, the offset amount of the target point C1 with respect to the start trajectory point P1 and / or the tangent direction of the target point C1 on the fit curve can be the geometric information of the target point C1. It should be understood that the geometric information of the target point C1 is not limited to this and may further include other geometric information. Furthermore, for the geometric information of the target points other than the target point C1, the geometric information of the target point C1 may be referred to, and therefore will not be repeated here. Specifically, the terminal 21 can convert the preset sub-model corresponding to each target point into a target sub-model based on the geometric information of each target point among C1, C2, C3, ..., Cm.
[0059] The step of converting a preset sub-model corresponding to each target point into a target sub-model based on the geometric information of each of the plurality of target points includes converting a preset sub-model corresponding to the target point into a target sub-model based on an offset amount of the target point relative to the starting trajectory point and a tangent direction of the target point on the fit curve.
[0060] For example, the preset sub-model corresponding to the target point C1 can be converted into the target sub-model based on the offset amount T of the target point C1 from the starting trajectory point P1 and the tangent direction R of the target point C1 on the fit curve. Similarly, the preset sub-models corresponding to other target points can be converted into the target sub-models based on the offset amounts of the other target points from the starting trajectory point P1 and the tangent directions of the other target points on the fit curve.
[0061] Here, it should be understood that the offset amounts of different target points among C1, C2, C3, ..., Cm with respect to the starting trajectory point P1 may be different, and the tangent directions of different target points among C1, C2, C3, ..., Cm on the fitting curve may also be different. Therefore, the preset sub-models corresponding to different target points can be converted into different target sub-models according to the offset amounts of different target points among C1, C2, C3, ..., Cm with respect to the starting trajectory point P1 and the tangent directions of different target points on the fitting curve.
[0062] Preferably, the step of converting a preset sub-model corresponding to the target point into a target sub-model based on an offset amount of the target point relative to the starting trajectory point and a tangent direction of the target point on the fit curve includes the steps of converting a plurality of first points on a preset sub-model corresponding to the target point into a corresponding plurality of second points based on an offset amount of the target point relative to the starting trajectory point and a tangent direction of the target point on the fit curve, and creating a target sub-model corresponding to the target point based on the plurality of second points.
[0063] For example, taking the target point C1 as an example, the preset sub-model corresponding to C1 is a cylinder without radians, for example, the cylinder 81 shown in FIG. 8. The points on the upper circular surface, the lower circular surface and the side wall of this cylinder can all be the vertices of the cylinder. Based on the offset amount T of the target point C1 with respect to the starting trajectory point P1 and the tangent direction R of the target point C1 on the fit curve, the coordinates of each vertex on the cylinder can be transformed into the coordinates of a new vertex. Specifically, the vertex before transformation is the first point, and the vertex after transformation is the second point. The first point and the second point have a one-to-one correspondence. Furthermore, based on the coordinates of the new vertices, the new vertices can be connected to form a new cylinder. Specifically, since the first points and the second points correspond one-to-one, the relative positional relationship between the second points can be determined based on the relative positional relationship between the first points, and further, the adjacent second points can be connected to form a new cylinder based on the relative positional relationship between the second points and the coordinates of the second points. The new cylinder can be a cylinder with a certain radian. Also, the new cylinder can be a target sub-model.
[0064] Preferably, the step of converting a plurality of first points on a preset sub-model corresponding to the target point into a corresponding plurality of second points based on an offset amount of the target point relative to the start trajectory point and a tangent direction of the target point on the fit curve includes the steps of converting the offset amount of the target point relative to the start trajectory point into a three-dimensional offset amount, converting the tangent direction of the target point on the fit curve into a three-dimensional tangent direction, and converting a plurality of first points on a preset sub-model corresponding to the target point into a corresponding plurality of second points based on the three-dimensional offset amount and the three-dimensional tangent direction.
[0065] For example, taking the target point C1 as an example, the preset sub-model corresponding to C1 is a cylinder 81 shown in FIG. 8. The points on the upper circular surface, the lower circular surface and the side wall of this cylinder can all be vertices of the cylinder. The coordinates of each vertex in the model coordinate system are V, and the model coordinate system may be a three-dimensional coordinate system. Therefore, each vertex on the preset sub-model corresponding to the target point C1 may be a three-dimensional point. Since the offset amount T of the target point C1 with respect to the start trajectory point P1 and the tangent direction R of the target point C1 on the fit curve are both two-dimensional vectors, the offset amount T can be converted into a three-dimensional offset amount, and the tangent direction R can be converted into a three-dimensional tangent direction. For example, the three-dimensional offset amount converted from the offset amount T is set to T1, and specifically, T1 may be a three-dimensional offset amount obtained by converting the offset amount T into the model coordinate system, or a three-dimensional offset amount obtained by directly adding a three-dimensional value such as 0 based on the offset amount T. Similarly, the three-dimensional tangent direction transformed from the tangent direction R is denoted as R1, and R1 may be a three-dimensional tangent direction obtained by transforming the tangent direction R into the model coordinate system, or a three-dimensional tangent direction obtained by directly adding a three-dimensional value such as 0 to the tangent direction R as a basis.
[0066] Furthermore, the coordinate V of each vertex on the preset sub-model corresponding to the target point C1 can be transformed based on T1 and R1, and the transformed coordinate is V1, where the relationship between V1, T1, R1, and V is as shown in the following formula (1). V1=T1*R1*V (1)
[0067] For example, each vertex on the preset sub-model corresponding to the target point C1 can be set as a first point, and a point on the coordinate V1 obtained by converting the coordinate V of the first point can be set as a second point, that is, the first point and the second point correspond one-to-one. Furthermore, a target sub-model corresponding to the preset sub-model can be created based on the second point corresponding to each first point, for example, the adjacent points of each second point can be determined based on the adjacent points of each first point, and the adjacent second points can be connected to configure the target sub-model corresponding to the preset sub-model. For example, the target sub-model can be a cylinder with a certain radian, for example, a cylinder 82 as shown in FIG. 8. Here, it should be understood that the transformation shown in FIG. 8 is merely an exemplary explanation and is not particularly limited.
[0068] Preferably, the step of converting a plurality of first points on a preset sub-model corresponding to the target point into a corresponding plurality of second points based on the three-dimensional offset amount and the three-dimensional tangent direction includes the step of converting a plurality of first points on a preset sub-model corresponding to the target point into a corresponding plurality of second points based on the three-dimensional offset amount, the three-dimensional tangent direction, and a scaling value corresponding to the target point.
[0069] For example, in some embodiments, the preset sub-models corresponding to different target points among C1, C2, C3, ..., Cm are all cylinders, and the cylinders corresponding to different target points have the same size. In this situation, different target points among C1, C2, C3, ..., Cm may correspond to different scaling values. For example, the scaling values of the preset sub-models corresponding to each target point among C1, C2, C3, ..., Cm are successively larger. Here, the larger the scaling value, the smaller the target sub-model obtained by converting the preset sub-model.
[0070] For example, if the scaling value of the preset sub-model corresponding to the target point C1 is S1, the relationship between V1, T1, R1, V, and S1 is expressed by the following formula (2). V1=T1*R1*V*S1 (2)
[0071] For example, each vertex on the preset sub-model corresponding to the target point C1 can be set as a first point, and a point on the coordinate V1 obtained by converting the coordinate V of the first point can be set as a second point, that is, the first point and the second point have one-to-one correspondence. As shown in FIG. 8, a cylinder 82 is a new cylinder obtained by converting a cylinder 81. Each vertex on the cylinder 82 is set as a second point, and each vertex on the cylinder 82 and each vertex on the cylinder 81 have one-to-one correspondence. Also, the cylinder 82 may be a cylinder that is scaled down based on a scaling value corresponding to the target point C1.
[0072] Step S604: Create a first virtual model corresponding to the slide trajectory based on the target sub-models corresponding to each of the target points.
[0073] Based on the offset amount of different target points from C1, C2, C3, ..., Cm with respect to the starting trajectory point P1 and the tangent direction of different target points on the fit curve, the preset sub-models corresponding to different target points can be converted into different target sub-models. Therefore, by connecting the target sub-models corresponding to each target point from C1, C2, C3, ..., Cm, a first virtual model corresponding to the slide trajectory of the user on the screen can be constructed. Specifically, the target sub-models corresponding to each target point from C1, C2, C3, ..., Cm are sequentially connected to form the first virtual model. For example, the lower circular surface of the target sub-model corresponding to the target point C1 is set as the bottom surface of the first virtual model, the upper circular surface of the target sub-model corresponding to the target point C1 is connected to the lower circular surface of the target sub-model corresponding to the target point C2, the upper circular surface of the target sub-model corresponding to the target point C2 is connected to the lower circular surface of the target sub-model corresponding to the target point C3, and so on to obtain the first virtual model by analogy. That is, one target sub-model can be connected to another target sub-model.
[0074] In other embodiments, multiple target sub-models can be connected onto one target sub-model, for example, multiple smaller target sub-models can be connected to one larger target sub-model, and each smaller target sub-model can in turn be connected to one or more smaller target sub-models, and so on, resulting in branching of the first virtual model.
[0075] Preferably, the step of creating a first virtual model corresponding to the slide trajectory based on a target sub-model corresponding to each of the target points includes a step of combining target sub-models corresponding to each of the target points based on an identifier of each of the target points to obtain a first virtual model corresponding to the slide trajectory, wherein the identifier of the target point is used to determine a position in the first virtual model of a target sub-model corresponding to the target point.
[0076] As shown in Fig. 9, target sub-model 91 is a target sub-model corresponding to target point C1, target sub-model 92 is a target sub-model corresponding to target point C2, and so on. By sequentially connecting the target sub-models corresponding to each target point among C1, C2, C3, ..., Cm, a first virtual model corresponding to the user's sliding trajectory on the screen can be constructed, and the first virtual model can be 90 shown in Fig. 9. In some other embodiments, after the preset sub-models corresponding to each target point among C1, C2, C3, ..., Cm are transformed by the method, the target sub-models corresponding to each target point can still be connected to each other, so that an additional coupling process can be saved.
[0077] Specifically, each target point among C1, C2, C3, ..., Cm is associated with an identifier, for example, an index. That is, for each target point, an identifier corresponds, and the identifier of each target point is unique. Specifically, the identifier of each target point is used to determine the position of a target sub-model corresponding to the target point in the first virtual model 90. Optionally, each target sub-model may be used as an element of the first virtual model 90. The position of each element in the first virtual model 90 is determined by the vertex color (vertex It can be written as color.
[0078] In the image processing method according to the embodiment of the present disclosure, a trajectory point on the slide trajectory is determined according to the slide trajectory input by the user on the screen. Since the slide speed corresponding to each trajectory point on the slide trajectory is not uniform, the distribution of each trajectory point on the slide trajectory may not be uniform. By performing a fitting calculation for each trajectory point, obtaining a fitting curve, and further performing sampling on the fitting curve, the distribution of the sampling points on the fitting curve can be made uniform. Furthermore, based on the sampling points uniformly distributed on the fitting curve, the preset sub-model corresponding to each sampling point can be converted into a target sub-model, and a first virtual model corresponding to the slide trajectory can be created based on the target sub-model corresponding to each sampling point, so that the similarity between the first virtual model and the slide trajectory is enhanced, and as a result, the first virtual model can further meet the needs of the user and improve the user experience.
[0079] Figure 10 is a flow chart of another image processing method according to an embodiment of the present invention. In addition to the above embodiment, this embodiment further describes an image processing method in detail. Correspondingly, as shown in Figure 10, the method of this embodiment is applied to a terminal, and specifically includes the following steps:
[0080] Step S1001: A slide trajectory input by the user on the display assembly is obtained.
[0081] Specifically, S1001 is similar to the process of acquiring the slide trajectory by the user in the display assembly described in the above embodiment, so the description will be omitted here.
[0082] Step S1002: According to the slide trajectory, a first virtual model corresponding to the slide trajectory is created.
[0083] Specifically, S1002 is similar to the process of generating a first virtual model corresponding to the slide trajectory according to the slide trajectory described in the above embodiment, and therefore the description thereof will be omitted here.
[0084] Step S1003: Adjust the orientation of the first virtual model according to the sliding trajectory.
[0085] As shown in FIG. 7, the sliding direction of the sliding trajectory is, for example, a vertical direction from top to bottom or bottom to top. In some other embodiments, the sliding direction of the sliding trajectory may be a horizontal direction from left to right or right to left as shown in FIG. 11. In this embodiment, the direction of the first virtual model can be further adjusted based on the sliding direction of the sliding trajectory. The direction of the first virtual model may specifically be the Y-axis direction of the model coordinate system in which the first virtual model is located.
[0086] Furthermore, based on the above embodiment, when acquiring trajectory points P1, P2, P3, ..., Pn according to the slide trajectory, P1, P2, P3, ..., Pn may be acquired sequentially along the slide direction of the slide trajectory. Also, the direction of the fitted curve fitted based on P1, P2, P3, ..., Pn may be made to coincide with the slide direction of the slide trajectory, and by sampling the fitted curve, target points C1, C2, C3, ..., Cm can be collected sequentially along the slide direction of the slide trajectory.
[0087] Optionally, adjusting the orientation of the first virtual model based on a slide direction of the slide trajectory includes determining a direction of a starting trajectory point relative to other trajectory points in the slide trajectory; performing an aggregation calculation on the direction of the starting trajectory point relative to other trajectory points in the slide trajectory to obtain an aggregation direction; and adjusting the orientation of the first virtual model based on the aggregation direction.
[0088] For example, in the case of the slide trajectory shown in Fig. 11, the slide direction of the slide trajectory is from left to right. Since the slide trajectory is in the horizontal direction, the first virtual model corresponding to the slide trajectory is also in the horizontal direction, as in the first virtual model 110 shown in Fig. 11. Furthermore, the direction of the first virtual model 110 can be adjusted according to the slide direction of the slide trajectory.
[0089] Specifically, P1 is a start trajectory point in the slide trajectory, P2 is a second trajectory point in the slide trajectory, and so on, Pn is the n-th trajectory point in the slide trajectory. From the coordinates of each trajectory point P1, P2, P3, ..., Pn, the direction of the start trajectory point P1 relative to the other trajectory points can be determined. Here, the direction of the start trajectory point P1 relative to the other trajectory points may specifically be a vector from the start trajectory point P1 to the other trajectory points. For example, the vector from the start trajectory point P1 to the second trajectory point P2 is L1, the vector from the start trajectory point P1 to P3 is L2, and so on, the vector from the start trajectory point P1 to Pn is L(n-1). Specifically, L1, L2, ..., L(n-1) constitute a vector set L, L={L1, L2, ..., L(n-1)}. Furthermore, a clustering calculation is performed on each vector in the vector set L using a preset clustering algorithm to obtain a clustered vector, and the direction of the clustered vector is set as the main axis direction, and the main axis direction is set as the aggregation direction. Among them, this embodiment does not specifically limit the clustering algorithm. Since each vector in the vector set L is a two-dimensional vector in the screen coordinate system, the clustered vector is also a two-dimensional vector. Furthermore, a three-dimensional vector can be obtained by converting the aggregation direction into the model coordinate system. This three-dimensional vector is K. Furthermore, the angle between the three-dimensional vector K and the Y axis of the model coordinate system is calculated, and the angle is converted into a three-dimensional matrix. The first virtual model is composed of a plurality of target sub-models, and the vertex coordinates on each target sub-model are V1 described in the above embodiment, so that the vertex coordinates on the first virtual model are V1. The rotation of the first virtual model is realized by multiplying this three-dimensional matrix by each vertex coordinate V1 on the first virtual model. For example, the rotated first virtual model may be the first virtual model 23 shown in FIG. 4 or FIG. 5.
[0090] As can be understood, when the slide trajectory is the slide trajectory shown in Fig. 7, the orientation of the first virtual model can be adjusted based on the slide direction of the slide trajectory, so that the first virtual model can rotate to the first virtual model 23 shown in Fig. 4 or Fig. 5. That is, by adjusting the orientation of the first virtual model according to the slide direction of the slide trajectory, the first virtual model can always face up when it appears on the target image, that is, the center point of the bottom surface of the first virtual model 23 can overlap with the attraction point on the human face, and the orientation of the attraction point in the three-dimensional space can be made to coincide with the Y-axis of the model coordinate system in which the first virtual model 23 is located.
[0091] Step S1004: The first virtual model is displayed at a first position in a target image.
[0092] Specifically, the first virtual model whose orientation has been adjusted can be displayed at a first position in the target image. The first virtual model 23 shown in Fig. 4 or Fig. 5 is adsorbed to a first position 22 of a human face. Here, the display of the first virtual model whose orientation has been adjusted at the first position in the target image can refer to the process of displaying the first virtual model at the first position in the target image described in the above embodiment, and the description will be omitted here.
[0093] As should be understood, the present embodiment does not limit the execution order of S1002 to S1004, for example, in some embodiments, S1003 can be executed after S1004. That is, after creating a first virtual model corresponding to the slide trajectory according to the slide trajectory, the first virtual model is first displayed at a first position in the target image, and then the orientation of the first virtual model at the first position is adjusted.
[0094] It can be understood that, based on this embodiment, a second virtual model may be displayed at a second position symmetrical to the first position, as shown in FIG. 5. The method of adjusting the orientation of the second virtual model may be similar to the method of adjusting the orientation of the first virtual model, and thus the description is omitted here. In another alternative implementation manner, the orientation of the first virtual model is adjusted first, and an adjusted first virtual model is obtained. Then, a second position symmetrical to the first position may be determined, and the second virtual model may be displayed at the second position, and the second virtual model and the adjusted first virtual model are mirror images of each other.
[0095] An image processing method according to an embodiment of the present disclosure adjusts the orientation of the first virtual model depending on the sliding direction of the slide path, thereby enabling the first virtual model to always face upwards when displayed in the target image, thereby preventing the sliding direction of the slide path from affecting the display of the first virtual model in the target image.
[0096] 12 is a flow chart of another image processing method according to an embodiment of the present invention. In addition to the above embodiment, this embodiment further describes an image processing method in detail. Correspondingly, as shown in FIG. 12, the method of this embodiment is applied to a terminal, and specifically includes the following steps:
[0097] Step S1201: A slide trajectory input by the user on the display assembly is obtained.
[0098] Specifically, the implementation methods and specific principles of S1201 and S101 are the same, so the description will be omitted here.
[0099] Step S1202: According to the slide trajectory, a first virtual model corresponding to the slide trajectory is generated.
[0100] Specifically, S1202 can refer to the process of generating a first virtual model corresponding to the slide trajectory according to the slide trajectory described above, and therefore the description thereof will be omitted here.
[0101] Step S1203: The first virtual model is displayed at a first position in a target image.
[0102] Specifically, S1203 can refer to the above-mentioned process of displaying the first virtual model at the first position in the target image, and therefore the description thereof will be omitted here.
[0103] Step S1204: Adjust the parameters of the first virtual model.
[0104] For example, after a first virtual model is displayed at a first position in the target image, the terminal 21 can further adjust parameters of the first virtual model based on a user request and / or audio information, which may be audio information in the surrounding environment of the terminal 21 or audio information played by the terminal 21.
[0105] In one possible embodiment, the step of adjusting a parameter of the first virtual model includes the steps of receiving a parameter adjustment command for the first virtual model and adjusting a parameter of the first virtual model in response to the parameter adjustment command.
[0106] For example, an icon for adjusting virtual model parameters may be displayed on the screen of the terminal. When the user operates the icon, a parameter adjustment command for the first virtual model may be triggered. In response to the parameter adjustment command, the terminal adjusts the parameters of the first virtual model. Specifically, the parameters of the first virtual model include at least one of the following: size, radian, number of submodels, material of the submodel, shape of the submodel, rotation information of the submodel, angle of the submodel, etc. Specifically, the icon for adjusting the parameters of the virtual model may be a set of multiple arrows as shown in FIG. 13, where each set of arrows is used to adjust one parameter in the first virtual model, and different arrow directions indicate different adjustment directions, for example, increase or decrease. The present disclosure does not limit the form of the icon for adjusting the model parameters or the manner of triggering adjustment.
[0107] In another possible embodiment, the step of adjusting parameters of the first virtual model includes a step of acquiring audio information and a step of adjusting parameters of the first virtual model based on parameters of the audio information.
[0108] For example, the terminal 21 can collect audio information and adjust parameters of the first virtual model based on parameters of the audio information. For example, the parameters of the audio information can include volume, frequency spectrum, strong beat, tone, etc. The parameters of the audio information can also be called attribute information of the audio information. The parameters of the first virtual model can also be called attribute information of the first virtual model. Here, the present embodiment does not limit the correspondence between the parameters of the audio information and the parameters of the first virtual model. For example, the terminal can adjust the size of the first virtual model based on the volume of the audio information, adjust the material of the first virtual model based on the strong beat of the audio information, and adjust the radian of the first virtual model based on the frequency spectrum of the audio information. Here, the material of the first virtual model can include a luminous material, a non-luminous material, etc.
[0109] In one possible implementation, before obtaining the audio information, the method further includes receiving an audio information play command, and playing the audio information in response to the audio information play command.
[0110] For example, a voice switch key 130 may be displayed on the terminal screen shown in Fig. 13. When a user operates the voice switch key 130, a command to play audio information can be triggered, and the terminal 21 plays the audio information in response to the command to play the audio information. Furthermore, the terminal 21 can collect the audio information and adjust parameters of the first virtual model based on parameters of the audio information.
[0111] In another possible implementation, obtaining audio information includes collecting audio information in a surrounding environment.
[0112] For example, in some other embodiments, the terminal 21 may not play audio information, but may collect audio information in the surrounding environment, and then adjust parameters of the first virtual model based on parameters of the audio information.
[0113] Step S1205: Update the first virtual model based on the adjusted parameters.
[0114] For example, the terminal 21 can adjust parameters of the first virtual model by the above-mentioned method, and then update the first virtual model based on the adjusted parameters, and then display the updated first virtual model at a first position in the target image.
[0115] As will be understood, after adjusting the parameters of the first virtual model and updating the first virtual model, the terminal 21 can further refer to the method shown in FIG. 5 to display a second virtual model that is a mirror image of the updated first virtual model at a second position symmetrical to the first position.
[0116] Alternatively, when a plurality of virtual models, for example, the first virtual model 23 and the second virtual model 25 shown in FIG. 5, are displayed in the target image, the method of adjusting the parameters of the first virtual model described above can be applied to adjust the parameters of the second virtual model in the same manner, and the parameters of the second virtual model are similar to the parameters of the first virtual model described above, so that the description is omitted here. In addition, the parameters of other virtual models other than the first virtual model and the second virtual model in the target image can also refer to the parameters of the first virtual model described above. Specifically, the parameters of the first virtual model and the parameters of the second virtual model can be adjusted simultaneously, and for example, the terminal can adjust the parameters of the first virtual model and the second virtual model corresponding to an icon in response to a user's operation on the icon simultaneously. Alternatively, the parameters of the first virtual model and the parameters of the second virtual model may be adjusted separately, and for example, the terminal can adjust the parameters of the first virtual model corresponding to an icon in response to a user's operation on the icon, and adjust the parameters of the second virtual model corresponding to the other icon in response to a user's operation on the other icon.
[0117] The image processing method according to an embodiment of the present disclosure, after displaying a virtual model in a target image, can further adjust parameters of the virtual model based on a parameter adjustment command triggered by a user or parameters of audio information, thereby allowing the virtual model to be changed in real time in the target image, and further improving the flexibility when displaying the virtual model in the target image.
[0118] The process of creating a virtual model and the process of adjusting virtual model parameters will be described below using a specific example. As shown in FIG. 14, in the start state, the terminal 21 can collect human face images by a camera. A voice switch key 130 and a modeling start key 131 are displayed on the screen of the terminal 21. The terminal 21 can play audio information or stop playing audio information in response to the user's operation of the voice switch key 130. The terminal 21 can display a trajectory drawing area in response to the user's operation of the modeling start button 131, and this embodiment does not limit the position of the trajectory drawing area. The trajectory drawing area can be displayed, for example, at any position on the screen. In addition, while the trajectory drawing area is displayed, the face image may remain displayed on the screen or may not be displayed. When the face image and the trajectory drawing area are displayed on the screen at the same time, the face image and the trajectory drawing area may be located on the same layer or on different layers, for example, the display layer of the trajectory drawing area may be located above the display layer of the face image. Furthermore, the user inputs a trajectory in the trajectory drawing area. The terminal 21 creates a virtual model by combining the trajectory and the program algorithm in response to the user's operation of the model creation button 132. Furthermore, the terminal 21 displays the virtual model at a first position in the face image. At this time, the parameters of the virtual model can be adjusted in real time. For example, the terminal 21 adjusts the parameters of the virtual model in response to the user's operation of an arrow-type icon on the screen so that the virtual model can be transformed into a different appearance or different material. For example, the virtual model is enlarged. When the user completes the parameter adjustment, the terminal 21 can update the virtual model in the face image in response to the user's operation of the adjustment completion button 133. Furthermore, the terminal 21 may create virtual models that are in a mirror image relationship with each other in the face image in response to the user's operation of the mirroring button 134, thereby increasing the number of virtual models in the face image. Furthermore, the terminal 21 can also return to the start-up state in response to the user's operation of the return control button 135.
[0119] As can be understood, the virtual model is created by the terminal combining the trajectory input by the user and the program algorithm in the terminal. When different program algorithms are adopted for the same trajectory input by the user, the terminal can construct different virtual models. For example, when a first program algorithm is adopted for the same trajectory, the virtual model created by the terminal may be a virtual model like a cow horn as described above. On the other hand, when a second program algorithm is adopted, the virtual model created by the terminal may be a virtual model like a deer antler.
[0120] In one possible embodiment, the preset sub-models employed in the first program algorithm and the second program algorithm are different, so that the virtual models generated from the same trajectory are different for the first program algorithm and the second program algorithm.
[0121] In another possible embodiment, the first program algorithm and the second program algorithm have different creation methods for the virtual model when constructing the virtual model. This creation method may be a connection form between multiple elements of the virtual model. For example, when constructing a virtual model by the first program algorithm, one element can be connected to one element, for example, one small cylinder can be connected to one large cylinder. On the other hand, when constructing a virtual model by the second program algorithm, multiple elements can be connected to one element, for example, multiple small cylinders can be connected to one large cylinder, thereby branching the virtual model.
[0122] Specifically, the terminal screen can display a plurality of virtual model identifiers or a plurality of program algorithm identifiers, and the trajectory input by the user can be combined to create a virtual model corresponding to the identifier based on the virtual model identifier or program algorithm identifier selected by the user, thereby making the virtual model more suited to the needs of the user, i.e., the virtual model can be created in real time according to the needs of the user, and the flexibility of the virtual model can be further improved.
[0123] As can be understood, the shape of the virtual model is not limited to cow horns and deer antlers, and may be other shapes. The program algorithm for constructing the virtual model is also not limited to the first program algorithm and the second program algorithm, and may be other program algorithms.
[0124] FIG. 15 is a schematic diagram of the configuration of an image processing device according to an embodiment of the present disclosure. The image processing device provided by the embodiment of the present disclosure may be disposed in a client terminal or a server. Specifically, the image processing device 150: an acquisition module 151 for acquiring a slide trajectory input by a user on a display assembly; A creation module 152 for creating a first virtual model corresponding to the slide trajectory according to the slide trajectory; A display module 153 for displaying the first virtual model at a first position in a target image.
[0125] Preferably, the creating module 152 includes a determining unit 1521 , a converting unit 1522 and a creating unit 1523 . The determining unit 1521 determines, according to the slide trajectory, a number of target points associated with the slide trajectory; The acquisition module 151 further acquires preset sub-models corresponding to each of the plurality of target points; The transformation unit 1522 transforms a preset sub-model corresponding to each target point into a target sub-model according to the geometric information of each of the plurality of target points; A creation unit 1523 creates a first virtual model corresponding to the slide trajectory based on a target sub-model corresponding to each of the target points.
[0126] Preferably, when determining a plurality of target points related to the slide trajectory according to the slide trajectory, the determining unit 1521 is specifically configured to determine a plurality of trajectory points in the slide trajectory according to the slide trajectory, perform fitting calculation on the plurality of trajectory points to obtain a fitting curve, and perform sampling on the fitting curve to obtain a plurality of target points related to the slide trajectory, where the target points include sampling points on the fitting curve.
[0127] Preferably, the geometric information of the target point includes: an offset amount of the target point with respect to a start trajectory point in the plurality of trajectory points; and a tangent direction of the target point on the fit curve. Preferably, the geometric information of the target point includes an offset amount of the target point with respect to a starting trajectory point in the plurality of trajectory points, and a tangent direction of the target point on the fit curve. The conversion unit 1522 is configured to convert a plurality of first points on a preset sub-model corresponding to the target point into a plurality of corresponding second points based on the offset amount of the target point with respect to the starting trajectory point and the tangent direction of the target point on the fit curve, and create a target sub-model corresponding to the target point based on the plurality of second points.
[0128] Preferably, when converting a plurality of first points on a preset sub-model corresponding to the target point into a corresponding plurality of second points based on an offset amount of the target point relative to the starting trajectory point and a tangent direction of the target point on the fit curve, the conversion unit 1522 is specifically configured to convert the offset amount of the target point relative to the starting trajectory point into a three-dimensional offset amount, convert the tangent direction of the target point on the fit curve into a three-dimensional tangent direction, and convert the plurality of first points on a preset sub-model corresponding to the target point into a corresponding plurality of second points based on the three-dimensional offset amount and the three-dimensional tangent direction.
[0129] Preferably, when converting a plurality of first points on a preset sub-model corresponding to the target point into a corresponding plurality of second points based on the three-dimensional offset amount and the three-dimensional tangent direction, the conversion unit 1522 is specifically configured to convert a plurality of first points on a preset sub-model corresponding to the target point into a corresponding plurality of second points based on the three-dimensional offset amount, the three-dimensional tangent direction, and a scaling value corresponding to the target point.
[0130] Preferably, when creating a first virtual model corresponding to the slide trajectory based on the target sub-models corresponding to each of the target points, the creating unit 1523 is specifically configured to connect the target sub-models corresponding to each of the target points based on the identifiers of the target points to obtain a first virtual model corresponding to the slide trajectory, where the identifiers of the target points are used to determine the positions of the target sub-models corresponding to the target points in the first virtual model.
[0131] Preferably, the image processing device 150 further includes an adjustment module 154 for adjusting an orientation of the first virtual model based on a sliding direction of the sliding trajectory.
[0132] Preferably, when adjusting the orientation of the first virtual model based on the sliding direction of the slide trajectory, the adjustment module 154 is specifically configured to determine a direction of a start trajectory point in the slide trajectory relative to other trajectory points in the slide trajectory, perform an aggregation calculation on the direction of the start trajectory point in the slide trajectory relative to other trajectory points in the slide trajectory, obtain an aggregation direction, and adjust the orientation of the first virtual model based on the aggregation direction.
[0133] Preferably, the display module 153 is configured, when displaying the first virtual model at a first position in the target image, to specifically display the first virtual model at a first position of the target object in the target image.
[0134] Preferably, the image processing device 150 further includes a determination module 155 and a receiving module 156. The receiving module 156 is further configured to receive a mirror control command after the display module 153 displays the first virtual model at a first position of the target object in the target image, the determination module 155 is configured to determine a second position symmetrical to the first position on the target object in response to the mirror control command, and the display module 153 is further configured to display a second virtual model in a mirror image relationship with the first virtual model at the second position.
[0135] Preferably, the adjustment module 154 is configured to further adjust parameters of the first virtual model and update the first virtual model based on the adjusted parameters after the display module 153 displays the first virtual model at the first position of the target object in the target image.
[0136] Preferably, when adjusting a parameter of the first virtual model, the adjustment module 154 is specifically configured to receive a parameter adjustment command for the first virtual model and adjust a parameter of the first virtual model in response to the parameter adjustment command.
[0137] Preferably, the acquisition module 151 is further configured to acquire audio information, and the adjustment module 154, when adjusting parameters of the first virtual model, is specifically configured to adjust parameters of the first virtual model based on parameters of the audio information.
[0138] Preferably, the image processing device 150 further includes an audio playback module 157, and before the acquisition module 151 acquires the audio information, the receiving module 156 is configured to receive an audio information playback command, and the audio playback module 157 is configured to play the audio information in response to the audio information playback command.
[0139] Preferably, the image processing device 150 further includes a collection module 158 configured to collect audio information in the surrounding environment.
[0140] The image processing device provided by the embodiments of the present disclosure can perform steps performed by a client terminal or a server in the image processing method according to the method embodiments of the present disclosure, and the specific execution steps and beneficial effects will not be repeated here.
[0141] FIG. 16 is a schematic diagram of an electronic device according to an embodiment of the present disclosure. Referring specifically to FIG. 16 below, a schematic diagram of an electronic device 1600 suitable for implementing the embodiment of the present disclosure is shown. The electronic device 1600 according to the embodiment of the present disclosure may include, but is not limited to, a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a mobile terminal such as an in-car terminal (e.g., a car navigation terminal), a stationary terminal such as a digital TV or a desktop computer, etc. The electronic device shown in FIG. 16 is merely an example and should not impose any limitations on the function and scope of use of the embodiment of the present disclosure.
[0142] As shown in Fig. 16, the electronic device 1600 may include a processing unit (e.g., CPU, graphic processor, etc.) 1601, which can perform various appropriate operations and processes according to a program stored in a read only memory (ROM) 1602 or loaded from a storage unit 1608 into a random access memory (RAM) 1603. The RAM 1603 also stores various programs and data necessary to operate the electronic device 1600. The processing unit 1601, the ROM 1602, and the RAM 1603 are connected to each other via a bus 1604. An input / output (I / O) interface 1605 is also connected to the bus 1604.
[0143] Typically, the I / O interface 1605 may be connected to input devices 1606 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc., output devices 1607 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc., storage devices 706 including, for example, a magnetic tape, hard disk, etc., and communication devices 1609. The communication unit 1609 allows the electronic device 1600 to communicate and exchange data with other devices wirelessly or via wires. Although FIG. 16 illustrates the electronic device 1600 having various devices, it should be understood that it is not necessary to implement or include all of the devices shown. Alternatively, more or fewer devices may be implemented or included.
[0144] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowcharts may be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product including a computer program executing on a non-transitory computer-readable medium, the computer program including program code for executing the method shown in the flowchart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication device 1609, or may be installed from the storage device 1608, or the ROM 1602. When the computer program is executed by the processing device 1610, the above-mentioned functions defined in the method according to the embodiment of the present disclosure are performed.
[0145] It should be noted that the above computer readable medium mentioned in this disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the above two. The computer readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared or semiconductor system, apparatus or device, or any combination of the above. More specific examples of computer readable storage medium may include, but are not limited to, an electrical connection having one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read only memory (ROM), an erasable programmable read only memory (EPROM or flash memory), an optical fiber, a portable compact disk read only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this disclosure, the computer readable storage medium may be any tangible medium that contains or stores a program that can be used by or in combination with a command execution system, apparatus, or device. However, in this disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, the data signal carrying a computer-readable program code. Such a propagated data signal may take various forms, including, but not limited to, an electromagnetic signal, an optical signal, or any suitable combination of the foregoing. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may transmit, propagate, or transmit a program for use by or in combination with a command execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including, but not limited to, wire, fiber optic cable, RF (radio frequency), or any suitable combination of the foregoing.
[0146] In some embodiments, the client terminals and servers may communicate using any network protocol now known or later developed, such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communications network). Examples of communications networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (such as the Internet), and an end-to-end network (e.g., an ad-hoc end-to-end network), and any network now known or later developed.
[0147] The computer-readable medium may be included in the electronic device or may exist independently without being incorporated in the electronic device.
[0148] The computer-readable medium has one or more programs stored therein. When the one or more programs are executed by an electronic device, the electronic device: obtaining a slide trajectory input by a user on a display assembly; Creating a first virtual model corresponding to the slide trajectory according to the slide trajectory; displaying the first virtual model at a first position in a target image.
[0149] The electronic device may also be configured to perform other steps in the image processing method described above.
[0150] Also, the computer program code for carrying out the operations of the present disclosure can be written in one or more programming languages or combinations thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and further including, but not limited to, conventional procedural programming languages such as "C" or similar programming languages. The program code can be executed completely on the user's computer, partially on the user's computer, as a single stand-alone software package, partially on the user's computer and partially on a remote computer, or completely on a remote computer or server. When a remote computer is involved, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., connecting through the Internet using an Internet service provider).
[0151] The flowcharts and block diagrams in the drawings illustrate the system architecture, functions, and operations that can be realized by the system, method, and computer program product according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, program segment, or part of code that includes one or more executable commands for implementing a certain logical function. It should be noted that in some alternative implementations, the functions shown in the blocks may occur in a different order from the order shown. For example, two blocks shown in succession may actually be executed substantially in parallel, or may be executed according to the reverse order, depending on the related functions. It should be noted that each block in the block diagram and / or flowchart diagram, and combinations of blocks in the block diagram and / or flowchart diagram may be realized in a system with dedicated hardware for executing a certain function or operation, or in a combination of dedicated hardware and computer commands.
[0152] The units described in the embodiments of the present disclosure may be realized by software or hardware, and the names of the units, if any, are not intended to be limitations on the units themselves.
[0153] The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that may be used include, but are not limited to, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), etc.
[0154] In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain or store a program for use by or in combination with an instruction execution system, apparatus, or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the above. More specific examples of a machine-readable storage medium may include an electrical connection by one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a compact disk read-only memory (CD-ROM), optical storage, magnetic storage, or any suitable combination of the above.
[0155] According to one or more embodiments of the present disclosure, the present disclosure provides a method for producing a cellular membrane comprising: obtaining a slide trajectory input by a user on a display assembly; Creating a first virtual model corresponding to the slide trajectory according to the slide trajectory; displaying the first virtual model at a first position in a target image; The present invention provides an image processing method including the steps of:
[0156] According to one or more embodiments of the present disclosure, in the image processing method according to the present disclosure, the step of creating a first virtual model corresponding to the slide trajectory according to the slide trajectory includes: determining a plurality of target points associated with the slide trajectory according to the slide trajectory; obtaining a preset sub-model corresponding to each of the plurality of target points; transforming a preset sub-model corresponding to each target point into a target sub-model based on the geometric information of each of the plurality of target points; and generating a first virtual model corresponding to the slide trajectory based on target sub-models corresponding to each of the target points.
[0157] According to one or more embodiments of the present disclosure, in the image processing method according to the present disclosure, the step of determining a plurality of target points associated with the slide trajectory according to the slide trajectory includes: determining a plurality of trajectory points within the slide trajectory according to the slide trajectory; performing a fitting calculation on the plurality of trajectory points to obtain a fitting curve; Sampling the fit curve to obtain a number of target points associated with the slide trajectory, the target points including sampling points on the fit curve.
[0158] According to one or more embodiments of the present disclosure, in the image processing method according to the present disclosure, the geometric information of the target points includes: an offset amount of the target point with respect to a start trajectory point in the plurality of trajectory points; a tangent direction of the target point on the fit curve; The step of transforming a preset sub-model corresponding to each target point into a target sub-model based on the geometric information of each of the plurality of target points includes: The method includes converting a preset sub-model corresponding to the target point into a target sub-model based on an offset amount of the target point relative to the starting trajectory point and a tangent direction of the target point on the fit curve.
[0159] According to one or more embodiments of the present disclosure, in the image processing method according to the present disclosure, the step of converting a preset sub-model corresponding to the target point into a target sub-model based on an offset amount of the target point relative to the starting trajectory point and a tangent direction of the target point on the fit curve includes: converting a plurality of first points on a preset sub-model corresponding to the target point into a plurality of corresponding second points based on an offset amount of the target point relative to the starting trajectory point and a tangent direction of the target point on the fit curve; and generating a target sub-model corresponding to the target point based on the plurality of second points.
[0160] According to one or more embodiments of the present disclosure, in the image processing method according to the present disclosure, the step of converting a plurality of first points on a preset sub-model corresponding to the target point into a plurality of corresponding second points based on an offset amount of the target point relative to the starting trajectory point and a tangent direction of the target point on the fit curve includes: converting an offset amount of the target point relative to the starting trajectory point into a three-dimensional offset amount; transforming the tangent directions of the target points on the fit curve into three-dimensional tangent directions; and transforming a plurality of first points on a preset sub-model corresponding to the target point into a corresponding plurality of second points based on the three-dimensional offset amount and the three-dimensional tangent direction.
[0161] According to one or more embodiments of the present disclosure, in the image processing method according to the present disclosure, the step of converting a plurality of first points on a preset sub-model corresponding to the target point into a plurality of corresponding second points based on the three-dimensional offset amount and the three-dimensional tangent direction includes: and transforming a plurality of first points on a preset sub-model corresponding to the target point into a corresponding plurality of second points based on the three-dimensional offset amount, the three-dimensional tangent direction, and a scaling value corresponding to the target point.
[0162] According to one or more embodiments of the present disclosure, in the image processing method according to the present disclosure, the step of creating a first virtual model corresponding to the slide trajectory based on a target sub-model corresponding to each of the target points includes: According to an identifier of each of the target points, combining target sub-models corresponding to each of the target points to obtain a first virtual model corresponding to the slide trajectory; The identifier of the target point is used to determine a location in the first virtual model of a target sub-model that corresponds to the target point.
[0163] According to one or more embodiments of the present disclosure, the image processing method according to the present disclosure further includes a step of adjusting an orientation of the first virtual model based on a slide direction of the slide trajectory.
[0164] According to one or more embodiments of the present disclosure, in the image processing method according to the present disclosure, the step of adjusting the orientation of the first virtual model based on the slide direction of the slide trajectory includes: determining an orientation of a starting trajectory point in the slide trajectory relative to other trajectory points in the slide trajectory; performing an aggregation calculation on a direction of a starting trajectory point in the slide trajectory relative to other trajectory points in the slide trajectory to obtain an aggregate direction; and adjusting an orientation of the first virtual model based on the aggregation orientation.
[0165] According to one or more embodiments of the present disclosure, in the image processing method according to the present disclosure, the step of displaying the first virtual model at a first position in a target image includes: Displaying the first virtual model at a first location of the target object in a target image.
[0166] According to one or more embodiments of the present disclosure, in the image processing method according to the present disclosure, after displaying the first virtual model at a first position of the target object in the target image, further comprising: receiving a mirror image control command; determining a second position on the target object that is symmetrical to the first position in response to the mirror control command; and displaying a second virtual model at the second location, the second virtual model being a mirror image of the first virtual model.
[0167] According to one or more embodiments of the present disclosure, in the image processing method according to the present disclosure, after displaying the first virtual model at a first position in a target image, further comprising: adjusting parameters of the first virtual model; and updating the first virtual model based on the adjusted parameters.
[0168] According to one or more embodiments of the present disclosure, in the image processing method according to the present disclosure, the step of adjusting a parameter of the first virtual model includes: receiving a parameter adjustment command for the first virtual model; and adjusting a parameter of the first virtual model in response to the parameter adjustment command.
[0169] According to one or more embodiments of the present disclosure, in the image processing method according to the present disclosure, the step of adjusting a parameter of the first virtual model includes: obtaining audio information; and adjusting parameters of the first virtual model based on parameters of the audio information.
[0170] According to one or more embodiments of the present disclosure, the image processing method according to the present disclosure further comprises, before acquiring the audio information, receiving a command to play audio information; and playing the audio information in response to the audio information play command.
[0171] According to one or more embodiments of the present disclosure, in the image processing method according to the present disclosure, the step of obtaining audio information comprises: Collecting audio information in the surrounding environment is included.
[0172] According to one or more embodiments of the present disclosure, the present disclosure provides a method for producing a cellular membrane comprising: an acquisition module for acquiring a slide trajectory input by a user on a display assembly; a creation module for creating a first virtual model corresponding to the slide trajectory according to the slide trajectory; a display module for displaying the first virtual model at a first location in a target image; The present invention provides an image processing device including:
[0173] According to one or more embodiments of the present disclosure, in an image processing device according to the present disclosure, the generation module includes a determination unit, a conversion unit and a creation unit; A determination unit determines, according to the slide trajectory, a plurality of target points associated with the slide trajectory; The acquisition module is further configured to acquire a preset sub-model corresponding to each of the plurality of target points, and a conversion unit converts the preset sub-model corresponding to each target point into a target sub-model according to the geometric information of each of the plurality of target points; A creation unit creates a first virtual model corresponding to the slide trajectory based on a target sub-model corresponding to each of the target points.
[0174] According to one or more embodiments of the present disclosure, in the image processing device according to the present disclosure, when determining a plurality of target points associated with the slide trajectory according to the slide trajectory, the determination unit is specifically configured to determine a plurality of trajectory points in the slide trajectory according to the slide trajectory, perform a fit calculation on the plurality of trajectory points to obtain a fit curve, and perform sampling on the fit curve to obtain a plurality of target points associated with the slide trajectory, where the target points include sampling points on the fit curve.
[0175] According to one or more embodiments of the present disclosure, in the image processing device according to the present disclosure, the geometric information of the target point includes: At least one of an offset of the target point relative to a starting trajectory point in the plurality of trajectory points and a tangent direction of the target point on the fit curve is included.
[0176] According to one or more embodiments of the present disclosure, in the image processing device according to the present disclosure, the conversion unit is specifically configured to convert a plurality of first points on a preset sub-model corresponding to the target point into a corresponding plurality of second points based on an offset amount of the target point relative to the starting trajectory point and a tangent direction of the target point on the fit curve, and create a target sub-model corresponding to the target point based on the plurality of second points.
[0177] According to one or more embodiments of the present disclosure, in the image processing device of the present disclosure, the conversion unit is specifically configured to convert an offset amount of the target point relative to the starting trajectory point into a three-dimensional offset amount, convert a tangent direction of the target point on the fit curve into a three-dimensional tangent direction, and convert a plurality of first points on a preset sub-model corresponding to the target point into a corresponding plurality of second points based on the three-dimensional offset amount and the three-dimensional tangent direction.
[0178] According to one or more embodiments of the present disclosure, in the image processing device according to the present disclosure, when converting a plurality of first points on a preset sub-model corresponding to the target point into a corresponding plurality of second points based on the three-dimensional offset amount and the three-dimensional tangent direction, the conversion unit is specifically configured to convert a plurality of first points on a preset sub-model corresponding to the target point into a corresponding plurality of second points based on the three-dimensional offset amount, the three-dimensional tangent direction, and a scaling value corresponding to the target point.
[0179] According to one or more embodiments of the present disclosure, in the image processing device according to the present disclosure, when creating a first virtual model corresponding to the slide trajectory based on a target sub-model corresponding to each of the target points, the creation unit is specifically configured to combine the target sub-models corresponding to each of the target points based on an identifier of each of the target points to obtain a first virtual model corresponding to the slide trajectory, where the identifier of the target point is used to determine a position of the target sub-model corresponding to the target point in the first virtual model.
[0180] According to one or more embodiments of the present disclosure, the image processing device according to the present disclosure further includes an adjustment module for adjusting a direction of the first virtual model based on a slide direction of the slide trajectory.
[0181] According to one or more embodiments of the present disclosure, in the image processing device according to the present disclosure, when adjusting the orientation of the first virtual model based on the slide direction of the slide trajectory, the adjustment module is specifically configured to determine a direction of a starting trajectory point in the slide trajectory relative to other trajectory points in the slide trajectory, perform an aggregation calculation on the direction of the starting trajectory point in the slide trajectory relative to other trajectory points in the slide trajectory to obtain an aggregation direction, and adjust the orientation of the first virtual model based on the aggregation direction.
[0182] According to one or more embodiments of the present disclosure, in an image processing device according to the present disclosure, when displaying the first virtual model at a first position in the target image, the display module is specifically configured to display the first virtual model at a first position of the target object in the target image.
[0183] According to one or more embodiments of the present disclosure, the present disclosure provides an image processing device further including a determination module and a receiving module, wherein the receiving module is configured to receive a mirror control command after the display module displays the first virtual model at a first position of a target object in a target image, the determination module is configured to determine a second position symmetrical to the first position on the target object in response to the mirror control command, and the display module is further configured to display a second virtual model in a mirror image relationship with the first virtual model at the second position.
[0184] According to one or more embodiments of the present disclosure, in an image processing device according to the present disclosure, the adjustment module is further configured to adjust parameters of the first virtual model and update the first virtual model based on the adjusted parameters after the display module displays the first virtual model at a first position in the target image.
[0185] According to one or more embodiments of the present disclosure, in an image processing device according to the present disclosure, when adjusting parameters of the first virtual model, the adjustment module is specifically configured to receive a parameter adjustment command for the first virtual model and adjust the parameters of the first virtual model in response to the parameter adjustment command.
[0186] According to one or more embodiments of the present disclosure, in an image processing device according to the present disclosure, the acquisition module is further configured to acquire audio information, and the adjustment module, when adjusting parameters of the first virtual model, is specifically configured to adjust parameters of the first virtual model based on parameters of the audio information.
[0187] According to one or more embodiments of the present disclosure, the present disclosure provides an image processing device, further including an audio playback module, wherein before the acquisition module acquires the audio information, the receiving module is further configured to receive an audio information playback command, and the audio playback module is configured to play the audio information in response to the audio information playback command.
[0188] According to one or more embodiments of the present disclosure, the present disclosure provides an image processing device, further comprising a collection module configured to collect audio information in a surrounding environment.
[0189] According to one or more embodiments of the present disclosure, the present disclosure provides a method for producing a cellular membrane comprising: one or more processors; a storage device for storing one or more programs; An electronic device comprising: An electronic device is provided which, when the one or more programs are executed by the one or more processors, causes the one or more processors to implement the image processing method according to any one of the present disclosure.
[0190] According to one or more embodiments of the present disclosure, the present disclosure provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the image processing method according to any one of the aspects of the present disclosure.
[0191] The above description merely describes the preferred embodiments of the present disclosure and the technical principles utilized. It should be understood by those skilled in the art that the scope of the disclosure of the present disclosure is not limited to the technical solutions formed by the specific combination of the above technical features, and should also include other technical solutions formed by any combination of the above technical features or equivalent features, such as replacing the above features with technical features having similar functions (but not limited to) disclosed in the present disclosure, without departing from the concept of the above disclosure.
[0192] Also, although operations are described in a particular order, this should not be construed as requiring that these operations be performed in the particular order or sequence shown. In certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although the above description includes some specific implementation steps, these should not be construed as limitations on the scope of the disclosure. Certain features described in the context of a single embodiment may also be implemented in combination in a single embodiment. On the other hand, various features described in the context of a single embodiment may also be implemented alone or in any suitable subcombination in multiple embodiments.
[0193] Although the present subject matter has been described in language that is bound to structural features and / or logical operations of a method, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features and operations described above, but rather the specific features and operations described above are merely example forms for implementing the claims.
Claims
1. obtaining a slide trajectory input by a user on a display assembly; Creating a first virtual model corresponding to the slide trajectory according to the slide trajectory; displaying the first virtual model at a first location in a target image; adjusting a direction of the first virtual model based on a slide direction of the slide trajectory; 13. An image processing method comprising:
2. The step of creating a first virtual model corresponding to the slide trajectory according to the slide trajectory includes: determining a plurality of target points associated with the slide trajectory according to the slide trajectory; obtaining a preset sub-model corresponding to each of the plurality of target points; transforming a preset sub-model corresponding to each target point into a target sub-model based on the geometric information of each of the plurality of target points; generating a first virtual model corresponding to the slide trajectory based on target sub-models corresponding to each of the target points; 2. The method of claim 1, comprising:
3. The step of determining a plurality of target points associated with the slide trajectory according to the slide trajectory includes: determining a plurality of trajectory points within the slide trajectory according to the slide trajectory; performing a fitting calculation on the plurality of trajectory points to obtain a fitting curve; sampling the fit curve to obtain a plurality of target points associated with the slide trajectory, the target points including sampling points on the fit curve; 3. The method of claim 2, comprising:
4. The geometric information of the target point includes: an offset amount of the target point relative to a start trajectory point among a plurality of trajectory points; and a tangent direction of the target point on the fit curve.
3. The method of claim 2 .
5. The step of generating a first virtual model corresponding to the slide trajectory based on a target sub-model corresponding to each of the target points includes: combining target sub-models corresponding to each of the target points based on an identifier of each of the target points to obtain a first virtual model corresponding to the slide trajectory; the identifier of the target point is used to determine a location of a target sub-model corresponding to the target point in the first virtual model; 3. The method of claim 2 .
6. The step of adjusting the direction of the first virtual model based on the slide direction of the slide trajectory includes: determining an orientation of a starting trajectory point in the slide trajectory relative to other trajectory points in the slide trajectory; performing an aggregation calculation on a direction of a starting trajectory point in the slide trajectory relative to other trajectory points in the slide trajectory to obtain an aggregation direction; adjusting an orientation of the first virtual model based on the aggregation orientation; 2. The method of claim 1, comprising:
7. The step of displaying the first virtual model at a first position in the target image includes: displaying the first virtual model at a first location of a target object in a target image; 2. The method of claim 1 .
8. After displaying the first virtual model at a first location of the target object in the target image, the method further comprises: receiving a mirror image control command; determining a second position on the target object symmetrical to the first position in response to the mirror control command; displaying a second virtual model at the second location, the second virtual model being a mirror image of the first virtual model; 8. The method of claim 7, comprising:
9. displaying the first virtual model at a first position in a target image, and adjusting parameters of the first virtual model; updating the first virtual model based on the adjusted parameters; 2. The method of claim 1, comprising:
10. The step of adjusting a parameter of the first virtual model includes: receiving a parameter adjustment command for the first virtual model; adjusting a parameter of the first virtual model in response to the parameter adjustment command; 10. The method of claim 9, comprising:
11. The step of adjusting a parameter of the first virtual model includes: obtaining audio information; adjusting parameters of the first virtual model based on parameters of the audio information; 10. The method of claim 9, comprising:
12. an acquisition module for acquiring a slide trajectory input by a user on a display assembly; a creation module that creates a first virtual model corresponding to the slide trajectory according to the slide trajectory, and adjusts a direction of the first virtual model based on a slide direction of the slide trajectory; a display module for displaying the first virtual model at a first location in a target image; 13. An image processing device comprising:
13. one or more processors; a storage device for storing one or more programs; An electronic device comprising:
12. An electronic device, characterized in that said one or more programs, when executed by said one or more processors, cause said one or more processors to implement the method of any one of claims 1 to 11.
14. A computer-readable storage medium having a computer program stored thereon, the computer program implementing the method according to any one of claims 1 to 11 when executed by a processor.
Citation Information
Patent Citations
Game data processing method, game data processing device and terminal equipment
CN110639204A
Information processor and information processing method
JP2012053631A
Collaborative 3D modeling system
US20180122138A1
