Image processing method, device, electronic device and computer storage medium

By constructing and processing textured images, the problem of converting static images into dynamic videos is solved, the vivid effect of the image is achieved, and the user's aesthetic needs for recording life moments is met.

CN113744124BActive Publication Date: 2024-11-26BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
View PDF 18 Cites 0 Cited by

Patent Information

Application Number
CN202010473395.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-05-29
Publication Date
2024-11-26
Estimated Expiration
2040-05-29

AI Technical Summary

Technical Problem

The prior art is difficult to convert static images into vivid dynamic videos, especially the processing capabilities of static images that have been photographed in history, which cannot meet users' needs to record the aesthetics of life moments.

Method used

By constructing two texture images of the same size as the static image and processing them based on preset texture coordinate transformation rules, multiple frame images are generated, thereby achieving the dynamic effect of the static image. The specific steps include building a texture coordinate sequence, performing texture mapping, and adjusting transparency and color values ​​to form a dynamic image.

Benefits of technology

The effect of converting static images into dynamic videos is realized, making the images more vivid and lively and meeting users' aesthetic needs for recording life moments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113744124B_ABST
    Figure CN113744124B_ABST
Patent Text Reader

Abstract

The present disclosure provides an image processing method, device, electronic device and computer storage medium, including: using a static image as a texture original image, respectively constructing texture coordinate sequences corresponding to two empty textures of the same size as the static image; forming a sequence pair with two texture coordinate sequences, and processing the sequence pair based on a preset texture coordinate transformation rule to obtain at least one new sequence pair; for each sequence pair, using a first texture coordinate sequence to perform texture mapping on a first empty texture to obtain a first texture, and using a second texture coordinate sequence to perform texture mapping on the second empty texture to obtain a second texture; drawing the first texture and the second texture of the same sequence pair to a cache area at the same time to obtain a frame of image; according to a frame of image corresponding to each sequence pair, obtaining a dynamic image of the static image composed of each frame of image. The method realizes the effect of converting a static image into a dynamic image, making the image effect more vivid.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] With the popularity of mobile phones and mobile devices, more and more people like to use photography to record their lives. However, photos are often a bit monotonous and not vivid, and too much information in photography cannot preserve the beauty of the moment, so simple photos are increasingly unable to meet the needs. In related technologies, in response to this problem, the iPhone launched the live photo function, which combines pictures with videos. However, this method is too direct, and it obtains dynamic videos by direct recording, and cannot process static images that have been taken in the past. Summary of the invention

[0003] The present disclosure provides an image processing method, device, electronic device and computer storage medium, which are used to achieve the effect of processing a static image into a dynamic video, thereby improving the vividness of the image.

[0004] According to a first aspect of an embodiment of the present disclosure, there is provided an image processing method, including:

[0005] Construct a first empty texture and a second empty texture of the same size as the static image;

[0006] Taking the static image as the texture original image, constructing a first texture coordinate sequence of the first empty texture and a second texture coordinate sequence of the second empty texture respectively;

[0007] The first texture coordinate sequence and the second texture coordinate sequence form a sequence pair, and the sequence pair is processed based on a preset texture coordinate transformation rule to obtain at least one new sequence pair;

[0008] For each sequence pair, texture mapping is performed on the first empty texture using the first texture coordinate sequence to obtain a first texture, and texture mapping is performed on the second empty texture using the second texture coordinate sequence to obtain a second texture;

[0009] The first texture and the second texture of the same sequence pair are simultaneously drawn to the buffer area to obtain a frame of image;

[0010] According to a frame image corresponding to each sequence pair, a dynamic image of the static image composed of each frame image is obtained.

[0011] In a possible embodiment, using the static image as a texture map to construct a first texture coordinate sequence of the first empty texture and a second texture coordinate sequence of the second empty texture respectively include:

[0012] In response to an input instruction for reference information, determining reference information for generating the dynamic graph; wherein the reference information includes an anchor point and vector start points and vector end points of a plurality of vectors;

[0013] Normalizing the anchor point and each of the vector starting points to obtain the first texture coordinate sequence;

[0014] The anchor point and each of the vector endpoints are normalized to obtain the second texture coordinate sequence.

[0015] In a possible embodiment, the processing the sequence pair based on a preset texture coordinate transformation rule to obtain at least one new sequence pair includes:

[0016] For each sequence pair, execute:

[0017] Moving each texture coordinate in the first texture coordinate sequence in the sequence pair in a preset direction to obtain a new first texture coordinate sequence;

[0018] Moving each texture coordinate in the second texture coordinate sequence in the sequence pair in a direction opposite to the preset direction to obtain a new second texture coordinate sequence;

[0019] A new sequence pair of the sequence pairs is constructed by using the new first texture coordinate sequence and the new second texture coordinate sequence.

[0020] In a possible embodiment, before constructing the first empty texture and the second empty texture having the same size as the static image, the method further includes:

[0021] Constructing a plurality of non-overlapping triangular facets according to the anchor point, the vector starting point and the vector end point of each vector;

[0022] Constructing a vertex sequence from the vertices of the plurality of triangular facets; wherein each vertex in the vertex sequence corresponds to a texture coordinate in the first texture coordinate sequence and the second texture coordinate sequence;

[0023] For each sequence pair, using the first texture coordinate sequence to perform texture mapping on the first empty texture to obtain a first texture, and using the second texture coordinate sequence to perform texture mapping on the second empty texture to obtain a second texture, comprises:

[0024] Texture mapping is performed according to the texture coordinates in the first texture coordinate sequence and the second texture coordinate sequence corresponding to the vertices in the vertex sequence, respectively, to obtain the first texture and the second texture.

[0025] In a possible embodiment, the step of simultaneously drawing the first texture and the second texture of the same sequence pair to the buffer area to obtain a frame of image includes:

[0026] According to a preset parameter determination rule, respectively determining adjustment parameters of the first texture and the second texture; the adjustment parameters are used to determine transparency and / or color value;

[0027] Adjust the first texture and the second texture respectively according to respective adjustment parameters;

[0028] In the order that the layer of the first texture is above the layer of the second texture, the first texture and the second texture are overlaid and drawn to the buffer area to synthesize a frame of image.

[0029] In a possible embodiment, if the adjustment parameter includes a transparency adjustment factor and a color value adjustment factor, determining the adjustment parameters of the first texture and the second texture respectively according to a preset parameter determination rule includes:

[0030] Obtaining respective transparency adjustment factors and color value adjustment factors of the first texture and the second texture when synthesizing a previous frame of image;

[0031] The transparency adjustment factor and the color value adjustment factor of the first texture are respectively reduced by a specified step size; and,

[0032] Increase the transparency adjustment factor and the color value adjustment factor of the second texture by the specified step size respectively;

[0033] The transparency adjustment factor is inversely proportional to the transparency, and the color value adjustment factor is proportional to the color value.

[0034] In a possible embodiment, each time the texture coordinates are moved, the texture coordinates corresponding to the same vertex in the first texture coordinate sequence and the second texture coordinate sequence are moved by the same distance.

[0035] In a possible embodiment, the ratio of the specified step size to the adjustment range of the adjustment parameter is a first ratio; the ratio of the distance the texture coordinate moves each time to the variation range of the texture coordinate is a second ratio; and the first ratio is the same as the second ratio.

[0036] According to a second aspect of an embodiment of the present disclosure, there is provided an image processing apparatus, including:

[0037] A first construction module is configured to execute construction of a first empty texture and a second empty texture having the same size as the static image;

[0038] A second construction module is configured to execute, using the static image as a texture original image, respectively constructing a first texture coordinate sequence of the first empty texture and a second texture coordinate sequence of the second empty texture;

[0039] a processing module configured to form a sequence pair using the first texture coordinate sequence and the second texture coordinate sequence, and process the sequence pair based on a preset texture coordinate transformation rule to obtain at least one new sequence pair;

[0040] a texture mapping module configured to perform, for each sequence pair, texture mapping on the first empty texture using the first texture coordinate sequence to obtain a first texture, and texture mapping on the second empty texture using the second texture coordinate sequence to obtain a second texture;

[0041] A drawing module is configured to execute drawing of the first texture and the second texture of the same sequence pair to the buffer area simultaneously to obtain a frame of image;

[0042] The composition module is configured to execute a frame image corresponding to each sequence pair to obtain a dynamic image of the static image composed of each frame image.

[0043] In a possible embodiment, the second construction module is configured to execute, using the static image as a texture map, respectively constructing a first texture coordinate sequence of the first empty texture and a second texture coordinate sequence of the second empty texture, specifically performing:

[0044] In response to an input instruction for reference information, determining reference information for generating the dynamic graph; wherein the reference information includes an anchor point and vector start points and vector end points of a plurality of vectors;

[0045] Normalizing the anchor point and each of the vector starting points to obtain the first texture coordinate sequence;

[0046] The anchor point and each of the vector endpoints are normalized to obtain the second texture coordinate sequence.

[0047] In a possible embodiment, the processing module is configured to process the sequence pair based on a preset texture coordinate transformation rule to obtain at least one new sequence pair, specifically performing:

[0048] For each sequence pair, execute:

[0049] Moving each texture coordinate in the first texture coordinate sequence in the sequence pair in a preset direction to obtain a new first texture coordinate sequence;

[0050] Moving each texture coordinate in the second texture coordinate sequence in the sequence pair in a direction opposite to the preset direction to obtain a new second texture coordinate sequence;

[0051] A new sequence pair of the sequence pairs is constructed by using the new first texture coordinate sequence and the new second texture coordinate sequence.

[0052] In a possible embodiment, the first construction module is configured to execute, before constructing the first empty texture and the second empty texture having the same size as the static image, the first construction module is further configured to execute:

[0053] Constructing a plurality of non-overlapping triangular facets according to the anchor point, the vector starting point and the vector end point of each vector;

[0054] Constructing a vertex sequence from the vertices of the plurality of triangular facets; wherein each vertex in the vertex sequence corresponds to a texture coordinate in the first texture coordinate sequence and the second texture coordinate sequence;

[0055] The texture mapping module is configured to perform, for each sequence pair, texture mapping on the first empty texture using the first texture coordinate sequence to obtain a first texture, and texture mapping on the second empty texture using the second texture coordinate sequence to obtain a second texture, specifically performing:

[0056] Texture mapping is performed according to the texture coordinates in the first texture coordinate sequence and the second texture coordinate sequence corresponding to the vertices in the vertex sequence, respectively, to obtain the first texture and the second texture.

[0057] In a possible embodiment, the drawing module is configured to draw the first texture and the second texture of the same sequence pair to the buffer area at the same time to obtain a frame of image, specifically performing:

[0058] According to a preset parameter determination rule, respectively determining adjustment parameters of the first texture and the second texture; the adjustment parameters are used to determine transparency and / or color value;

[0059] Adjust the first texture and the second texture respectively according to respective adjustment parameters;

[0060] In the order that the layer of the first texture is above the layer of the second texture, the first texture and the second texture are overlaid and drawn to the buffer area to synthesize a frame of image.

[0061] In a possible embodiment, if the adjustment parameter includes a transparency adjustment factor and a color value adjustment factor, the drawing module is configured to determine the adjustment parameters of the first texture and the second texture according to a preset parameter determination rule, and specifically performs:

[0062] Obtaining respective transparency adjustment factors and color value adjustment factors of the first texture and the second texture when synthesizing a previous frame of image;

[0063] The transparency adjustment factor and the color value adjustment factor of the first texture are respectively reduced by a specified step size; and,

[0064] Increase the transparency adjustment factor and the color value adjustment factor of the second texture by the specified step size respectively;

[0065] The transparency adjustment factor is inversely proportional to the transparency, and the color value adjustment factor is proportional to the color value.

[0066] In a possible embodiment, each time the texture coordinates are moved, the texture coordinates corresponding to the same vertex in the first texture coordinate sequence and the second texture coordinate sequence are moved by the same distance.

[0067] In a possible embodiment, the ratio of the specified step size to the adjustment range of the adjustment parameter is a first ratio; the ratio of the distance the texture coordinate moves each time to the variation range of the texture coordinate is a second ratio; and the first ratio is the same as the second ratio.

[0068] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method described in the first aspect.

[0069] According to a fourth aspect of an embodiment of the present disclosure, a computer storage medium is provided, wherein the computer storage medium stores a computer program, and the computer program is used to execute the method as described in the first aspect.

[0070] The technical solution provided by the embodiments of the present disclosure brings at least the following beneficial effects:

[0071] The present invention provides an image processing method, device, electronic device and computer storage medium, which relates to the field of image processing technology. The method includes: constructing two texture images of the same size as the original static image, and performing texture coordinate transformation based on certain rules, thereby obtaining an image with two textures output simultaneously; and then constructing a dynamic image corresponding to the static image from multiple frames of images obtained based on the texture coordinate transformation rules. This method realizes the effect of converting a static image into a dynamic image, making the image effect more vivid.

[0072] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0073] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.

[0074] Figure 1 A schematic diagram of an application scenario of an image processing method provided by an embodiment of the present disclosure;

[0075] Figure 2 A flowchart of an image processing method provided by an embodiment of the present disclosure;

[0076] Figure 3 A schematic diagram of constructing a triangular facet provided in an embodiment of the present disclosure;

[0077] Figure 4 An effect diagram of an image processing method provided by an embodiment of the present disclosure;

[0078] Figure 5 A schematic diagram of the structure of an image processing device provided by an embodiment of the present disclosure;

[0079] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0080] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.

[0081] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that such descriptions can be interchanged where appropriate so that the embodiments of the present disclosure can be implemented in an order other than that illustrated or described in the present disclosure. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0082] With the popularity of mobile phones and mobile devices, more and more people like to use photography to record their lives. However, photos are often a bit monotonous and not vivid, and too much information in photography cannot preserve the beauty of the moment, so simple photos are increasingly unable to meet the needs. In related technologies, in response to this problem, the iPhone launched the live photo function, which combines pictures with videos. However, this method is too direct, and it obtains dynamic videos by direct recording, and cannot process static images that have been taken in the past.

[0083] In view of this, the present disclosure provides an image processing method, referring to Figure 1 , is a schematic diagram of an application scenario of an image processing method provided by an embodiment of the present disclosure, and the scenario includes a user 10, a terminal device 11, and a background server 12. The user 10 performs a user operation through the terminal device 11, and after the background server 12 responds to the user operation, a first empty texture and a second empty texture of the same size as the static image are constructed; the static image is used as the texture original image, and a first texture coordinate sequence of the first empty texture and a second texture coordinate sequence of the second empty texture are respectively constructed; the first texture coordinate sequence and the second texture coordinate sequence constitute a sequence pair, and the sequence pair is processed based on a preset texture coordinate transformation rule to obtain at least one new sequence pair; for each sequence pair, the first texture coordinate sequence is used to perform texture mapping on the first empty texture to obtain a first texture, and the second texture coordinate sequence is used to perform texture mapping on the second empty texture to obtain a second texture; the first texture and the second texture of the same sequence pair are simultaneously drawn to the cache area to obtain a frame of image; according to the frame of image corresponding to each sequence pair, a dynamic image of the static image composed of each frame of image is obtained.

[0084] The terminal device 11 and the backend server 12 may be communicatively connected via a communication network, which may be a local area network, a wide area network, or the like.

[0085] The terminal device 11 may also be referred to as user equipment (UE). The user equipment may be a smart phone, a tablet computer, various wearable devices, a vehicle-mounted device, etc. Various applications may be installed in the user equipment, such as a camera, a browser, etc. The backend server 12 may be any server device that can support corresponding database processing.

[0086] The following is a clear and complete description of an image processing method provided by an embodiment of the present disclosure in conjunction with the accompanying drawings. Obviously, the described embodiment is only a part of the embodiments of the present disclosure, but not all of the embodiments. Figure 2 , is a flow chart of an image processing method provided by an embodiment of the present disclosure, comprising the following steps:

[0087] Step 201: Construct a first empty texture and a second empty texture with the same size as the static image.

[0088] Among them, by constructing two empty textures, the texture image after texture mapping of the static image is obtained later, and it is convenient to realize the transformation of texture coordinates based on texture coordinate transformation rules, so as to obtain a dynamic image.

[0089] Step 202: Using the static image as the texture original image, construct a first texture coordinate transformation rule of the first empty texture and a second texture coordinate sequence of the second empty texture.

[0090] During implementation, in response to an input instruction for reference information, reference information for generating the dynamic image is determined; wherein the reference information includes an anchor point and a vector starting point and a vector end point of multiple vectors; the anchor point and each of the vector starting points are normalized to obtain the first texture coordinate sequence; the anchor point and each of the vector end points are normalized to obtain the second texture coordinate sequence.

[0091] In one embodiment, in response to an input instruction for reference information, the user operates to input multiple anchor points and vectors, for example, referring to Figure 3 , where the independent black dots can be regarded as the input reference information as anchor points, and the line segments with arrow directions can be regarded as the input reference information as vectors, and the points in the direction pointed by the arrows (such as Figure 3 The white dot in the figure is regarded as the end point of the vector, then the other end of the same vector takes you (such as Figure 3 The black dot in the figure is considered as the starting point of the vector.

[0092] When implementing, the user first selects the reference information type to be input. If the input type is determined to be an anchor point, Figure 1 The coordinates determined by the terminal device 11 through a mouse click are determined as anchor points, or the coordinates determined by a finger pressing on the touch screen are determined as anchor points; it should be noted that the four vertices of the static image are default and required anchor points.

[0093] If the input type is determined to be a vector, you need to get the vector start point and vector end point. It is optional to use the point where the mouse button is pressed as the vector start point, and the point where the mouse button is released as the vector end point. In addition, if the position coordinates of the input vector start point and vector end point are the same, the vector can be regarded as an anchor point.

[0094] In addition, the implementation also includes, first, constructing a plurality of non-overlapping triangular facets according to the anchor point, the vector starting point and the vector end point of each vector. Figure 3 , is a schematic diagram of constructing a triangular facet provided by an embodiment of the present disclosure, Figure 3The figure is a schematic diagram of constructing multiple triangular facets using the anchor point and the vector starting point as a vertex sequence, wherein the multiple triangular facets do not overlap. Secondly, a vertex sequence is constructed from the vertices of the multiple triangular facets; wherein each vertex in the vertex sequence corresponds to a texture coordinate in the first texture coordinate series and the second texture coordinate sequence. By constructing a vertex sequence, the texture coordinates corresponding to the vertex sequence after the texture coordinate transformation can be realized, thereby realizing a transformed texture image based on a static image.

[0095] In the above embodiment, the implementation method of constructing non-overlapping triangular facets can be optionally determined by a triangulation algorithm. The triangulation algorithm first determines the index of each vertex coordinate in the vertex sequence for constructing the triangular facet, and then passes the index of each vertex coordinate into OpenGL (Open Graphics Library). OpenGL then selects three indexes in turn according to the index of the vertex coordinate to determine the triangular facet, until the static image is finally constructed as multiple triangular facets.

[0096] The static image is divided into a plurality of triangular patches by using the anchor point and the vector starting point as the triangle vertices, and the texture coordinates corresponding to the vertices of the triangular patches can be determined, thereby determining the texture determined for the triangle.

[0097] Step 203: forming a sequence pair with the first texture coordinate sequence and the second texture coordinate sequence, and processing the sequence pair based on a preset texture coordinate transformation rule to obtain at least one new sequence pair.

[0098] During implementation, the texture coordinates of the anchor point, the vector start point, and the vector end point must first be initialized; that is, the position coordinates of the anchor point, the vector start point, and the vector end point in the static image are normalized to obtain an initial first texture coordinate sequence and a second texture coordinate sequence, that is, an initial sequence pair. For example, assuming that the position coordinates of the reference information in the static image are [-1, -1], then the corresponding initialized texture coordinates are [0, 0]; wherein the position coordinate range of the static image is [-1, 1], and the corresponding range of the texture coordinates is [0, 1].

[0099] Next, perform the following steps for each sequence pair:

[0100] Step A1: moving each texture coordinate in the first texture coordinate sequence in the sequence pair in a preset direction to obtain a new first texture coordinate sequence.

[0101] Step A2: moving each texture coordinate in the second texture coordinate sequence in the sequence pair in a direction opposite to the preset direction to obtain a new second texture coordinate sequence.

[0102] It should be noted that the execution order of step A1 and step A2 is not limited.

[0103] Step A3: constructing a new sequence pair of the sequence pairs using the new first texture coordinate sequence and the new second texture coordinate sequence.

[0104] In one possible implementation, the texture coordinates of the vector starting point in the vector are translated multiple times in a direction toward the vector end point in the vector, and after each translation operation, the texture coordinates of the anchor point and the texture coordinates of the vector starting point after the translation operation are used as a first texture coordinate sequence for the multiple triangular facets; and, the texture coordinates of the vector end point in the vector are translated multiple times in a direction toward the vector starting point in the vector, and after each translation operation, the texture coordinates of the anchor point and the texture coordinates of the vector end point after the translation operation are used as a second texture coordinate sequence for the multiple triangular facets.

[0105] For example, during implementation, the position coordinates of the vector starting point are [-1, -1], and the corresponding vector end point of the vector is [1, 1]; then the texture coordinates of the corresponding vector starting point are [0, 0], and the texture coordinates of the corresponding vector end point are [1, 1]. If the texture coordinates of the vector starting point are adjusted once every 0.1 seconds, then, referring to Table 1, an example of the texture coordinates of the vector starting point after each movement is as follows:

[0106] Table 1

[0107]

[0108]

[0109] Correspondingly, if the texture coordinates of the vector endpoint are adjusted once every 0.1 seconds, then, referring to Table 2, an example of the texture coordinates of the vector endpoint after each movement is as follows:

[0110] Table 2

[0111] Adjust the time The location coordinates of the static image Texture coordinates after movement initialization [-1,-1] [(1-0)*1,(1-0)*1] 0.1 second [-1,-1] [(1-0)*0.9,(1-0)*0.9] 0.2 seconds [-1,-1] [(1-0)*0.8,(1-0)*0.8] 0.3 seconds [-1,-1] [(1-0)*0.7,(1-0)*0.7] … [-1,-1] …

[0112] It should be noted that, in a preferred embodiment, each time the texture coordinates are moved, the texture coordinates corresponding to the same vertex in the first texture coordinate sequence and the second texture coordinate sequence are moved by the same distance. That is, for each translation operation of each coordinate point in the first texture coordinate sequence and each translation operation of each coordinate point in the second texture coordinate sequence, the translation step length of the vector starting point and the translation step length of the vector end point are the same, so that when the vector starting point is translated to the vector end point, the vector end point is simultaneously translated to the vector starting point, so that the first texture coordinate sequence and the second texture coordinate sequence obtained have regular corresponding changes.

[0113] Step 204: For each sequence pair, use the first texture coordinate sequence to perform texture mapping on the first empty texture to obtain a first texture, and use the second texture coordinate sequence to perform texture mapping on the second empty texture to obtain a second texture.

[0114] During implementation, texture mapping is performed according to the texture coordinates in the first texture coordinate sequence and the second texture coordinate sequence corresponding to the vertices in the vertex sequence, respectively, to obtain the first texture and the second texture.

[0115] Step 205: Draw the first texture and the second texture of the same sequence pair to the buffer area simultaneously to obtain a frame of image.

[0116] During implementation, in order to better obtain dynamic images, when drawing and outputting, it also includes: determining the adjustment parameters of the first texture and the second texture respectively according to preset parameter determination rules; the adjustment parameters are used to determine transparency and / or color values; adjusting the first texture and the second texture respectively according to their respective adjustment parameters; then, in the order of the layers of the first texture on the layers of the second texture, superimposing the first texture and the second texture on the cache area to synthesize a frame of image.

[0117] In a preferred implementation manner, if the adjustment parameters include a transparency adjustment factor and a color value adjustment factor, determining the adjustment parameters of the first texture and the second texture respectively according to a preset parameter determination rule includes:

[0118] Step B1: Obtaining the transparency adjustment factor and color value adjustment factor of the first texture and the second texture respectively when synthesizing the previous frame image.

[0119] Step B2: reducing the transparency adjustment factor and the color value adjustment factor of the first texture by specified step sizes respectively.

[0120] Step B3: increasing the transparency adjustment factor and the color value adjustment factor of the second texture by the specified step size respectively; wherein the transparency adjustment factor is inversely proportional to the transparency, and the color value adjustment factor is proportional to the color value.

[0121] For example, if the first texture coordinate sequence is a texture coordinate group corresponding to the sequence of vertices of each triangle patch of the static image at the time of initialization, the color adjustment factor of the first texture coordinate sequence is set to a preset value of 1.0, and with each translation adjustment of the texture coordinates, the preset value of the color adjustment factor is adjusted according to the specified step size. During implementation, the specified step size can be optionally 0.1 times, and with the translation adjustment of the texture coordinate group, the color adjustment factor is reduced by 0.1 times from the preset value 1.0 each time until it is reduced to 0.0 times.

[0122] After determining the color adjustment factor, the first texture is adjusted according to the adjustment value corresponding to the first texture in the color adjustment factor; and the second texture is adjusted according to the adjustment value corresponding to the second texture in the color adjustment factor; a frame of image corresponding to the texture coordinate group is obtained by summing the color values ​​of the adjusted first texture and the adjusted second texture. For example, at the time of initialization, the color adjustment factor of the first texture is 1.0 times, and the color adjustment factor of the second texture is 0.0 times, then the color values ​​of the first texture and the second texture are summed to determine that the color values ​​of the frame image are all the color values ​​of the first texture; after the first adjustment, the color adjustment factor of the first texture becomes 0.9 times, and the color adjustment factor of the second texture becomes 0.1 times, then the color value of the frame image is determined by the first texture and the second texture. The adjustment of transparency is similar to the adjustment of color value, which will not be repeated here.

[0123] By adjusting the color values ​​of the first texture and the second texture along with the translation operation of the texture coordinates, it is possible to achieve a looming effect while making a static image move and change in a direction determined by a preset vector.

[0124] In addition, during implementation, it can also be implemented as follows: when the vector starting point moves the position of the vector end point, the vector starting point is redefined as the vector end point; and the vector end point is redefined as the vector starting point, and the step of adjusting the texture coordinates of the vector starting point and the vector end point in the vector for multiple times is performed. And, when the color adjustment factor is reduced from 1.0 times to 0.0 times, it becomes an operation of increasing from 0.0 times to 1.0.

[0125] Furthermore, in order to ensure that the output dynamic image is more orderly and beautiful, in a preferred embodiment, the ratio of the specified step length to the adjustment range of the adjustment parameter is a first ratio; the ratio of the distance of each movement of the texture coordinates to the change range of the texture coordinates is a second ratio; and the first ratio is the same as the second ratio. That is, the change rate of the specified step length of the color adjustment factor is set to be the same ratio as the change rate of each translation of the texture coordinate translation operation; so that when the vector starting point moves to the vector end point, the color adjustment factor changes from 1.0 times to 0.0 times; then, when the vector starting point is redefined as the vector end point, the color adjustment factor changes from reducing the specified step length to increasing the specified step length.

[0126] Step 206: According to a frame of image corresponding to each sequence pair, a dynamic image of the static image composed of each frame of image is obtained.

[0127] Through the embodiments described above, it is possible to obtain the texture coordinates corresponding to the reference information and adjust the texture coordinates of the reference information multiple times to obtain images at the time of multiple frame adjustments. Since the texture coordinates of each corresponding frame image are different, the expression form of each frame image obtained is different; for example, if the vertices of a triangular patch include vectors, the movement of the vector will make the image of the triangular area appear to be stretched and deformed. Through multiple adjustments, the effect of the triangular vertices flowing in the direction of movement of the preset rule can be obtained. It can be understood that since the texture coordinates of the anchor point do not change, if the three vertices of the triangular patch are all anchor points, the triangular patch will not change.

[0128] In order to more clearly understand the effects obtained by the method provided by the present disclosure, refer to Figure 4 , is a rendering of an image processing method provided by an embodiment of the present disclosure. For example, if you want to achieve Figure 4 To achieve the effect of the ship moving on the water, anchor points are added around the hull so that the triangles in the area where the hull is located are fixed values; a backward moving vector is added behind the hull so that the water behind the hull can achieve a flowing effect.

[0129] The present disclosure provides an image processing method, which obtains multiple texture coordinate groups through texture coordinates and translation adjustment of texture coordinates, wherein each texture coordinate group corresponds to a frame of image, and a video can be generated by outputting multiple frames of image in sequence, thereby achieving the effect of converting a static image into a video, and making the image more vivid and lively.

[0130] Based on the same idea, see Figure 5, is a schematic diagram of the structure of an image processing device in an embodiment of the present disclosure, the device includes: a first construction module 501, a second construction module 502, a processing module 503, a texture mapping module 504, a drawing module 505 and a composition module 506.

[0131] A first construction module 501 is configured to execute construction of a first empty texture and a second empty texture having the same size as the static image;

[0132] The second construction module 502 is configured to execute the construction of a first texture coordinate sequence of the first empty texture and a second texture coordinate sequence of the second empty texture respectively using the static image as the texture original image;

[0133] The processing module 503 is configured to execute forming a sequence pair with the first texture coordinate sequence and the second texture coordinate sequence, and processing the sequence pair based on a preset texture coordinate transformation rule to obtain at least one new sequence pair;

[0134] The texture mapping module 504 is configured to perform, for each sequence pair, texture mapping on the first empty texture using the first texture coordinate sequence to obtain a first texture, and texture mapping on the second empty texture using the second texture coordinate sequence to obtain a second texture;

[0135] A drawing module 505 is configured to execute drawing of the first texture and the second texture of the same sequence pair to the buffer area simultaneously to obtain a frame of image;

[0136] The composition module 506 is configured to execute, according to a frame image corresponding to each sequence pair, to obtain a dynamic image of the static image composed of each frame image.

[0137] In a possible embodiment, the second construction module 502 is configured to execute, using the static image as a texture map, respectively constructing a first texture coordinate sequence of the first empty texture and a second texture coordinate sequence of the second empty texture, specifically performing:

[0138] In response to an input instruction for reference information, determining reference information for generating the dynamic graph; wherein the reference information includes an anchor point and vector start points and vector end points of a plurality of vectors;

[0139] Normalizing the anchor point and each of the vector starting points to obtain the first texture coordinate sequence;

[0140] The anchor point and each of the vector endpoints are normalized to obtain the second texture coordinate sequence.

[0141] In a possible embodiment, the processing module 503 is configured to process the sequence pair based on a preset texture coordinate transformation rule to obtain at least one new sequence pair by specifically performing:

[0142] For each sequence pair, execute:

[0143] Moving each texture coordinate in the first texture coordinate sequence in the sequence pair in a preset direction to obtain a new first texture coordinate sequence;

[0144] Moving each texture coordinate in the second texture coordinate sequence in the sequence pair in a direction opposite to the preset direction to obtain a new second texture coordinate sequence;

[0145] A new sequence pair of the sequence pairs is constructed by using the new first texture coordinate sequence and the new second texture coordinate sequence.

[0146] In a possible embodiment, the first construction module 501 is configured to execute, before constructing the first empty texture and the second empty texture having the same size as the static image, the first construction module 501 is further configured to execute:

[0147] Constructing a plurality of non-overlapping triangular facets according to the anchor point, the vector starting point and the vector end point of each vector;

[0148] Constructing a vertex sequence from the vertices of the plurality of triangular facets; wherein each vertex in the vertex sequence corresponds to a texture coordinate in the first texture coordinate sequence and the second texture coordinate sequence;

[0149] The texture mapping module 504 is configured to perform, for each sequence pair, texture mapping on the first empty texture using the first texture coordinate sequence to obtain a first texture, and texture mapping on the second empty texture using the second texture coordinate sequence to obtain a second texture, specifically performing:

[0150] Texture mapping is performed according to the texture coordinates in the first texture coordinate sequence and the second texture coordinate sequence corresponding to the vertices in the vertex sequence, respectively, to obtain the first texture and the second texture.

[0151] In a possible embodiment, the drawing module 505 is configured to draw the first texture and the second texture of the same sequence pair to the buffer area at the same time to obtain a frame of image, specifically performing:

[0152] According to a preset parameter determination rule, respectively determining adjustment parameters of the first texture and the second texture; the adjustment parameters are used to determine transparency and / or color value;

[0153] Adjust the first texture and the second texture respectively according to respective adjustment parameters;

[0154] In the order that the layer of the first texture is above the layer of the second texture, the first texture and the second texture are overlaid and drawn to the buffer area to synthesize a frame of image.

[0155] In a possible embodiment, if the adjustment parameters include a transparency adjustment factor and a color value adjustment factor, the drawing module 505 is configured to determine the adjustment parameters of the first texture and the second texture according to a preset parameter determination rule, and specifically performs:

[0156] Obtaining respective transparency adjustment factors and color value adjustment factors of the first texture and the second texture when synthesizing a previous frame of image;

[0157] The transparency adjustment factor and the color value adjustment factor of the first texture are respectively reduced by a specified step size; and,

[0158] Increase the transparency adjustment factor and the color value adjustment factor of the second texture by the specified step size respectively;

[0159] The transparency adjustment factor is inversely proportional to the transparency, and the color value adjustment factor is proportional to the color value.

[0160] In a possible embodiment, each time the texture coordinates are moved, the texture coordinates corresponding to the same vertex in the first texture coordinate sequence and the second texture coordinate sequence are moved by the same distance.

[0161] In a possible embodiment, the ratio of the specified step size to the adjustment range of the adjustment parameter is a first ratio; the ratio of the distance the texture coordinate moves each time to the variation range of the texture coordinate is a second ratio; and the first ratio is the same as the second ratio.

[0162] After introducing the image processing method and apparatus according to the exemplary embodiment of the present disclosure, next, an electronic device according to another exemplary embodiment of the present disclosure is introduced.

[0163] Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as "circuits", "modules" or "systems".

[0164] In some possible implementations, the electronic device according to the present disclosure may include at least one processor and at least one memory. The memory stores program code, and when the program code is executed by the processor, the processor executes the steps of the image processing method according to various exemplary implementations of the present disclosure described above in this specification. For example, the processor may execute the following steps: Figure 2 Steps 201 to 206 are shown in FIG.

[0165] Refer to the following Figure 6 The electronic device 130 according to this embodiment of the present disclosure is described. Figure 6 The electronic device 130 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0166] like Figure 6 As shown, the electronic device 130 is in the form of a general computing device. The components of the electronic device 130 may include but are not limited to: at least one processor 131, at least one memory 132, and a bus 133 connecting different system components (including the memory 132 and the processor 131).

[0167] Bus 133 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a processor, or a local bus using any of a variety of bus architectures.

[0168] The memory 132 may include a readable medium in the form of a volatile memory, such as a random access memory (RAM) 1321 and / or a cache memory 1322 , and may further include a read-only memory (ROM) 1323 .

[0169] The memory 132 may also include a program / utility 1325 having a set (at least one) of program modules 1324, such program modules 1324 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0170] The electronic device 130 may also communicate with one or more external devices 134 (e.g., keyboards, pointing devices, etc.), may also communicate with one or more devices that enable a target object to interact with the electronic device 130, and / or may communicate with any device that enables the electronic device 130 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 135. In addition, the computing device 130 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 136. As shown, the network adapter 136 communicates with other modules for the electronic device 130 via a bus 133. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 130, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0171] In some possible implementations, various aspects of the image processing method provided by the present disclosure may also be implemented in the form of a program product, which includes a program code. When the program product is run on a computer device, the program code is used to enable the computer device to execute the steps of the image processing method according to various exemplary embodiments of the present disclosure described above in this specification. For example, the computer device may execute the following steps: Figure 2 Steps 201 to 206 are shown in FIG.

[0172] The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable 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 thereof.

[0173] The program product for image processing of the embodiment of the present disclosure may adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a computing device. However, the program product of the present disclosure is not limited thereto, and in this document, a readable storage medium may be any tangible medium containing or storing a program, and the program may be used by or in combination with an instruction execution system, an apparatus or a device.

[0174] A readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, wherein readable program code is carried. Such propagated data signals may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium other than a readable storage medium, which may transmit, propagate, or transfer a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0175] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0176] Program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the target object computing device, partially on the target object device, as a separate software package, partially on the target object computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the target object electronic device via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external electronic device (e.g., via the Internet using an Internet service provider).

[0177] It should be noted that although several units or subunits of the device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more units described above can be embodied in one unit. Conversely, the features and functions of one unit described above can be further divided into multiple units to be embodied.

[0178] In addition, although the operations of the disclosed method are described in a specific order in the drawings, this does not require or imply that these operations must be performed in the specific order described, or that all the operations shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.

[0179] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, systems, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0180] The present disclosure is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present disclosure. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0181] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, wherein the instruction device is implemented in the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0182] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0183] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0184] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. An image processing method, It is characterized in that The method comprises: Construct a first empty texture and a second empty texture of the same size as the static image; Taking the static image as the texture original image, constructing a first texture coordinate sequence of the first empty texture and a second texture coordinate sequence of the second empty texture respectively; The first texture coordinate sequence and the second texture coordinate sequence form a sequence pair, and the sequence pair is processed based on a preset texture coordinate transformation rule to obtain at least one new sequence pair; For each sequence pair, texture mapping is performed on the first empty texture using the first texture coordinate sequence to obtain a first texture, and texture mapping is performed on the second empty texture using the second texture coordinate sequence to obtain a second texture; The first texture and the second texture of the same sequence pair are simultaneously drawn to the buffer area to obtain a frame of image; According to a frame of image corresponding to each sequence pair, a dynamic image of the static image composed of each frame of image is obtained; The step of using the static image as a texture map to construct a first texture coordinate sequence of the first empty texture and a second texture coordinate sequence of the second empty texture respectively includes: In response to an input instruction for reference information, determining reference information for generating the dynamic graph; wherein the reference information includes an anchor point and vector start points and vector end points of a plurality of vectors; Normalizing the anchor point and each of the vector starting points to obtain the first texture coordinate sequence; Normalizing the anchor point and each of the vector endpoints to obtain the second texture coordinate sequence; The anchor point is added to the first target position corresponding to each of the first empty texture and the second empty texture, and the vector start point and the vector end point of the preset direction are added to the second target position corresponding to each of the first empty texture and the second empty texture.

2. The method according to claim 1, It is characterized in that The processing of the sequence pair based on a preset texture coordinate transformation rule to obtain at least one new sequence pair includes: For each sequence pair, execute: Moving each texture coordinate in the first texture coordinate sequence in the sequence pair in a preset direction to obtain a new first texture coordinate sequence; Moving each texture coordinate in the second texture coordinate sequence in the sequence pair in a direction opposite to the preset direction to obtain a new second texture coordinate sequence; A new sequence pair of the sequence pairs is constructed by using the new first texture coordinate sequence and the new second texture coordinate sequence.

3. The method according to claim 1, It is characterized in that Before constructing the first empty texture and the second empty texture having the same size as the static image, the method further includes: Constructing a plurality of non-overlapping triangular facets according to the anchor point, the vector starting point and the vector end point of each vector; Constructing a vertex sequence from the vertices of the plurality of triangular facets; wherein each vertex in the vertex sequence corresponds to a texture coordinate in the first texture coordinate sequence and the second texture coordinate sequence; For each sequence pair, using the first texture coordinate sequence to perform texture mapping on the first empty texture to obtain a first texture, and using the second texture coordinate sequence to perform texture mapping on the second empty texture to obtain a second texture, comprises: Texture mapping is performed according to the texture coordinates in the first texture coordinate sequence and the second texture coordinate sequence corresponding to the vertices in the vertex sequence, respectively, to obtain the first texture and the second texture.

4. The method according to claim 1, It is characterized in that The step of simultaneously drawing the first texture and the second texture of the same sequence pair to the buffer area to obtain a frame of image comprises: According to a preset parameter determination rule, respectively determining adjustment parameters of the first texture and the second texture; the adjustment parameters are used to determine transparency and / or color value; Adjust the first texture and the second texture respectively according to respective adjustment parameters; In the order that the layer of the first texture is above the layer of the second texture, the first texture and the second texture are overlaid and drawn to the buffer area to synthesize a frame of image.

5. The method according to claim 4, It is characterized in that If the adjustment parameters include a transparency adjustment factor and a color value adjustment factor, determining the adjustment parameters of the first texture and the second texture respectively according to a preset parameter determination rule includes: Obtaining respective transparency adjustment factors and color value adjustment factors of the first texture and the second texture when synthesizing a previous frame of image; The transparency adjustment factor and the color value adjustment factor of the first texture are respectively reduced by a specified step size; and, Increase the transparency adjustment factor and the color value adjustment factor of the second texture by the specified step size respectively; The transparency adjustment factor is inversely proportional to the transparency, and the color value adjustment factor is proportional to the color value.

6. The method according to claim 5, It is characterized in that Each time the texture coordinates are moved, the texture coordinates corresponding to the same vertex in the first texture coordinate sequence and the second texture coordinate sequence are moved by the same distance.

7. The method according to claim 6, It is characterized in that The ratio of the specified step length to the adjustment range of the adjustment parameter is a first ratio; the ratio of the distance the texture coordinate moves each time to the variation range of the texture coordinate is a second ratio; and the first ratio is the same as the second ratio.

8. An image processing device, It is characterized in that The device comprises: A first construction module is configured to execute construction of a first empty texture and a second empty texture having the same size as the static image; A second construction module is configured to execute, using the static image as a texture original image, respectively constructing a first texture coordinate sequence of the first empty texture and a second texture coordinate sequence of the second empty texture; a processing module configured to form a sequence pair using the first texture coordinate sequence and the second texture coordinate sequence, and process the sequence pair based on a preset texture coordinate transformation rule to obtain at least one new sequence pair; a texture mapping module configured to perform, for each sequence pair, texture mapping on the first empty texture using the first texture coordinate sequence to obtain a first texture, and texture mapping on the second empty texture using the second texture coordinate sequence to obtain a second texture; A drawing module is configured to execute drawing of the first texture and the second texture of the same sequence pair to the buffer area simultaneously to obtain a frame of image; A composition module is configured to execute, according to a frame of image corresponding to each sequence pair, to obtain a dynamic image of the static image composed of each frame of image; The second construction module is configured to execute, using the static image as a texture map, respectively constructing a first texture coordinate sequence of the first empty texture and a second texture coordinate sequence of the second empty texture, specifically performing: In response to an input instruction for reference information, determining reference information for generating the dynamic graph; wherein the reference information includes an anchor point and vector start points and vector end points of a plurality of vectors; Normalizing the anchor point and each of the vector starting points to obtain the first texture coordinate sequence; Normalizing the anchor point and each of the vector endpoints to obtain the second texture coordinate sequence; The anchor point is added to the first target position corresponding to each of the first empty texture and the second empty texture, and the vector start point and the vector end point of the preset direction are added to the second target position corresponding to each of the first empty texture and the second empty texture.

9. The device according to claim 8, It is characterized in that The processing module is configured to process the sequence pair based on a preset texture coordinate transformation rule to obtain at least one new sequence pair, specifically performing: For each sequence pair, execute: Moving each texture coordinate in the first texture coordinate sequence in the sequence pair in a preset direction to obtain a new first texture coordinate sequence; Moving each texture coordinate in the second texture coordinate sequence in the sequence pair in a direction opposite to the preset direction to obtain a new second texture coordinate sequence; A new sequence pair of the sequence pairs is constructed by using the new first texture coordinate sequence and the new second texture coordinate sequence.

10. The device according to claim 8, It is characterized in that The first construction module is configured to execute, before constructing the first empty texture and the second empty texture having the same size as the static image, the first construction module is further configured to execute: Constructing a plurality of non-overlapping triangular facets according to the anchor point, the vector starting point and the vector end point of each vector; Constructing a vertex sequence from the vertices of the plurality of triangular facets; wherein each vertex in the vertex sequence corresponds to a texture coordinate in the first texture coordinate sequence and the second texture coordinate sequence; The texture mapping module is configured to perform, for each sequence pair, texture mapping on the first empty texture using the first texture coordinate sequence to obtain a first texture, and texture mapping on the second empty texture using the second texture coordinate sequence to obtain a second texture, specifically performing: Texture mapping is performed according to the texture coordinates in the first texture coordinate sequence and the second texture coordinate sequence corresponding to the vertices in the vertex sequence, respectively, to obtain the first texture and the second texture.

11. The device according to claim 8, It is characterized in that The drawing module is configured to draw the first texture and the second texture of the same sequence pair to the buffer area at the same time to obtain a frame of image, specifically performing: According to a preset parameter determination rule, respectively determining adjustment parameters of the first texture and the second texture; the adjustment parameters are used to determine transparency and / or color value; Adjust the first texture and the second texture respectively according to respective adjustment parameters; In the order that the layer of the first texture is above the layer of the second texture, the first texture and the second texture are overlaid and drawn to the buffer area to synthesize a frame of image.

12. The device according to claim 11, It is characterized in that If the adjustment parameters include a transparency adjustment factor and a color value adjustment factor, the drawing module is configured to determine the adjustment parameters of the first texture and the second texture according to a preset parameter determination rule, specifically performing: Obtaining respective transparency adjustment factors and color value adjustment factors of the first texture and the second texture when synthesizing a previous frame of image; The transparency adjustment factor and the color value adjustment factor of the first texture are respectively reduced by a specified step size; and, Increase the transparency adjustment factor and the color value adjustment factor of the second texture by the specified step size respectively; The transparency adjustment factor is inversely proportional to the transparency, and the color value adjustment factor is proportional to the color value.

13. The device according to claim 12, It is characterized in that Each time the texture coordinates are moved, the texture coordinates corresponding to the same vertex in the first texture coordinate sequence and the second texture coordinate sequence are moved by the same distance.

14. The device according to claim 13, It is characterized in that The ratio of the specified step length to the adjustment range of the adjustment parameter is a first ratio; the ratio of the distance the texture coordinate moves each time to the variation range of the texture coordinate is a second ratio; and the first ratio is the same as the second ratio.

15. An electronic device, It is characterized in that include: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor so that the at least one processor can execute the method as claimed in any one of claims 1 to 7.

16. A computer storage medium storing a computer program, It is characterized in that The computer program is used to execute the method according to any one of claims 1-7.

Citation Information

Patent Citations

  • Image processing device and image processing method

    CN101958003A

  • Three-dimensional dynamic graphical generating method, device and mobile terminal

    CN103247064A

  • Method and device for generating special effect

    CN106126229A

  • Face contour adjustment method and mobile terminal

    CN107527034A

  • Three-dimensional model texture map conversion method and device

    CN108062784A