[go: up one dir, main page]

CN110942500A - Method and device for converting static graph into dynamic graph - Google Patents

Method and device for converting static graph into dynamic graph Download PDF

Info

Publication number
CN110942500A
CN110942500A CN201911204041.1A CN201911204041A CN110942500A CN 110942500 A CN110942500 A CN 110942500A CN 201911204041 A CN201911204041 A CN 201911204041A CN 110942500 A CN110942500 A CN 110942500A
Authority
CN
China
Prior art keywords
picture
layer
graph
selecting
deformed
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201911204041.1A
Other languages
Chinese (zh)
Other versions
CN110942500B (en
Inventor
邓裕强
邓昌敏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Jiubang Century Science And Technology Co Ltd
Original Assignee
Guangzhou Jiubang Century Science And Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Jiubang Century Science And Technology Co Ltd filed Critical Guangzhou Jiubang Century Science And Technology Co Ltd
Priority to CN201911204041.1A priority Critical patent/CN110942500B/en
Publication of CN110942500A publication Critical patent/CN110942500A/en
Application granted granted Critical
Publication of CN110942500B publication Critical patent/CN110942500B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/60Editing figures and text; Combining figures or text
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/04Context-preserving transformations, e.g. by using an importance map

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Processing Or Creating Images (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses a method and a device for converting a static image into a dynamic image, which can generate a dynamic image aiming at a user-defined local area. The method comprises the steps of obtaining a static picture to be processed, carrying out integral to local splitting deformation by setting track points, and recording coordinates of each vertex after each splitting. And selecting a target region split deformed picture at the current time point as a first picture layer, selecting a deformed picture of the first picture layer after the time N as a second picture layer, selecting an original picture of the target region as a third picture layer, and performing a wrong cutting operation on the deformed picture of the picture layers. And selecting the time N as playing time, and generating a dynamic graph by using the recorded coordinate points.

Description

Method and device for converting static graph into dynamic graph
Technical Field
The invention relates to the field of computer technology picture identification processing, in particular to a method and a device for converting a static graph into a dynamic graph.
Background
In the prior art, for example, based on a cartoon image deformation algorithm (Moving Least Squares), image deformation is realized by using a Moving Least square method, and different transparent processing is performed on a deformed image by changing the degree of deformation through practice, so as to realize conversion from a static image to a dynamic image. However, the algorithm can only process the whole picture, and cannot realize local dynamic graph operation, and as for the method for generating the GIF picture, the algorithm has great limitation, which results in poor user experience.
Disclosure of Invention
The present invention is directed to a method and apparatus for converting a static graph into a dynamic graph, so as to solve the problems mentioned in the background art.
In order to achieve the above object, the present invention provides the following technical solution, a method for converting a static graph into a dynamic graph, comprising the following steps:
step S100: and acquiring a static picture to be processed, carrying out integral to local splitting deformation by setting track points, and recording the coordinates of each vertex after each splitting.
Step S200: and selecting a target region split deformed picture at the current time point as a first picture layer, selecting a deformed picture of the first picture layer after the time N as a second picture layer, selecting an original picture of the target region as a third picture layer, and performing a wrong cutting operation on the deformed picture of the picture layers.
Step S300: and selecting the time N as playing time, and generating a dynamic graph by using the recorded coordinate points.
Preferably, the step S100 includes the following sub-steps: step S110: adding a track point into the static picture to be processed, and performing triangulation deformation; obtaining four deformed triangles; step S120: adding a track point by a vector cross multiplication method, triangulating the area where the track point is located, keeping other areas still and generating a plurality of new deformed triangles; step S130: continuously repeating the step S120 to perform splitting deformation processing; step S140: and recording the coordinates of the vertexes of the triangles after the splitting and the deformation, and recording and sequencing according to the sequence of the same area.
Preferably, the step S200 includes the following sub-steps: step S210: selecting a target area after the triangulation deformation in the step S100; step S220: and in the time N when the first graph is deformed to the second graph layer, selecting a certain time when the target area is deformed in the step S140 as a playing time point, calculating the moving distance of each vertex of the triangle, and performing a cross-cut operation on all deformed pictures in the time period through Matrix.
Preferably, the step S300 includes the following sub-steps: step S310: adjusting the transparency and other pixels of the first layer, the second layer and the third layer according to the playing time point; step S320: and selecting the picture subjected to the cross-cut operation in the step S220, keeping the picture as a video, and generating a dynamic picture according to the layer.
In order to achieve the above object, the present invention further provides an apparatus for converting a static graph into a dynamic graph, which includes:
a cyclic graph-taking module: and acquiring a static picture to be processed, carrying out integral to local splitting deformation by setting track points, and recording the coordinates of each vertex after each splitting.
A target area processing module: and selecting a target region split deformed picture at the current time point as a first picture layer, selecting a deformed picture of the first picture layer after the time N as a second picture layer, selecting an original picture of the target region as a third picture layer, and performing a wrong cutting operation on the deformed picture of the picture layers.
A GIF generation module: and selecting the time N as playing time, and generating a dynamic graph by utilizing the recorded coordinate point sequence.
The cyclic graph fetching module comprises a triangulation submodule, a vector cross multiplication submodule, a cyclic submodule and a recording submodule, wherein the triangulation submodule performs triangulation deformation by adding a track point into the static picture to be processed; obtaining four deformed triangles; the vector cross multiplication submodule is used for adding new track points, triangulating the area where the track points are located, keeping other areas still and generating a plurality of new deformed triangles; the circulation submodule is used for repeating the steps of the circulation triangulation submodule and the vector cross multiplication submodule; and the recording submodule records the coordinates of the vertexes of the triangles after the splitting and the deformation and records and sorts the vertexes according to the sequence of the same area.
The target area processing module comprises a mark selection sub-module and a miscut processing sub-module, wherein the mark selection sub-module is used for selecting a deformed target area from the cyclic image taking module; and the miscut processing submodule is used for selecting and recording a certain time of the target area deformation of the submodule as a playing time point from the time N from the first graph deformation to the second graph layer, calculating the moving distance of each vertex of the triangle, and carrying out the miscut operation on all the deformed pictures in the time period through Matrix.
The GIF generation module comprises an image processing submodule and a dynamic graph generation submodule, wherein the image processing submodule is used for adjusting the pixels such as the transparencies of the first graph layer, the second graph layer and the third graph layer; and the dynamic graph generating submodule is used for selecting each picture of the miscut processing submodule, keeping the video with the generation time of N, and generating the dynamic graph according to the layer.
According to the method and the device, any selected target area in the user image can be selected to generate the dynamic image through user-defined selection, and the dynamic image is not limited to materials provided by a terminal, so that the method and the device can adapt to more scenes, and are favorable for user-defined setting of the personalized dynamic image and various images.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
FIG. 1 illustrates a flow chart of a method of converting a static graph into a dynamic graph in accordance with the present invention;
FIG. 2 is a flow diagram illustrating the substeps of step S100 of a method of converting a static map into a dynamic map according to the present invention;
FIG. 3 is a flow diagram illustrating the substeps of step S200 of a method of converting a static map into a dynamic map according to the present invention;
FIG. 4 is a flow diagram illustrating the substeps of step S300 of a method of converting a static map into a dynamic map according to the present invention;
FIG. 5 shows a flow chart of an apparatus for converting a static graph into a dynamic graph according to the present invention.
Detailed Description
In order to make the purpose, technical solution and advantages of the present invention more clear, the present invention is further explained below with reference to the accompanying drawings. It should be apparent that the described embodiments are part of the embodiments of the present invention, and not all embodiments, and all other embodiments obtained by those of ordinary skill in the art without any inventive work based on the embodiments in the embodiments of the present invention belong to the scope of the embodiments of the present invention.
The invention provides the following technical scheme, and a method for converting a static graph into a dynamic graph comprises the following steps:
step S100: and acquiring a static picture to be processed, carrying out integral to local splitting deformation by setting track points, and recording the coordinates of each vertex after each splitting. The method comprises the following substeps: step S110: adding a track point into the static picture to be processed, and performing triangulation deformation; obtaining four deformed triangles; step S120: adding a track point by a vector cross multiplication method, triangulating the area where the track point is located, keeping other areas still and generating a plurality of new deformed triangles; step S130: continuously repeating the step S120 to perform splitting deformation processing; step S140: and recording the coordinates of the vertexes of the triangles after the splitting and the deformation, and recording and sequencing according to the sequence of the same area.
Step S200: and selecting a target region split deformed picture at the current time point as a first picture layer, selecting a deformed picture of the first picture layer after the time N as a second picture layer, selecting an original picture of the target region as a third picture layer, and performing a wrong cutting operation on the deformed picture of the picture layers. The method comprises the following substeps: step S210: selecting a target area after the triangulation deformation in the step S100; step S220: and in the time N when the first graph is deformed to the second graph layer, selecting a certain time when the target area is deformed in the step S140 as a playing time point, calculating the moving distance of each vertex of the triangle, and performing a cross-cut operation on all deformed pictures in the time period through Matrix.
Step S300: and selecting the time N as playing time, and generating a dynamic graph by using the recorded coordinate points. The method comprises the following substeps: step S310: adjusting the transparency and other pixels of the first layer, the second layer and the third layer according to the playing time point; step S320: and selecting the picture subjected to the miscut operation in the step S220, keeping the picture as a video, and generating a dynamic picture by highlighting according to the layer.
As shown in fig. 5, an apparatus for converting a static map into a dynamic map includes:
a cyclic graph-taking module: and acquiring a static picture to be processed, carrying out integral to local splitting deformation by setting track points, and recording the coordinates of each vertex after each splitting. The method comprises a triangulation submodule, a vector cross multiplication submodule, a circulation submodule and a recording submodule, wherein the triangulation submodule carries out triangulation deformation by adding a track point into the static picture to be processed; obtaining four deformed triangles; the vector cross multiplication submodule is used for adding new track points, triangulating the area where the track points are located, keeping other areas still and generating a plurality of new deformed triangles; the circulation submodule is used for repeating the steps of the circulation triangulation submodule and the vector cross multiplication submodule; and the recording submodule records the coordinates of the vertexes of the triangles after the splitting and the deformation and records and sorts the vertexes according to the sequence of the same area.
A target area processing module: and selecting a target region split deformed picture at the current time point as a first picture layer, selecting a deformed picture of the first picture layer after the time N as a second picture layer, selecting an original picture of the target region as a third picture layer, and performing a wrong cutting operation on the deformed picture of the picture layers. The system comprises a mark selection sub-module and a miscut processing sub-module, wherein the mark selection sub-module is used for selecting a deformed target area from a cyclic image-taking module; and the miscut processing submodule is used for selecting and recording a certain time of the target area deformation of the submodule as a playing time point from the time N from the first graph deformation to the second graph layer, calculating the moving distance of each vertex of the triangle, and carrying out the miscut operation on all the deformed pictures in the time period through Matrix.
A GIF generation module: and selecting the time N as playing time, and generating a dynamic graph by utilizing the recorded coordinate point sequence. The image processing sub-module is used for adjusting the pixels such as the transparency of the first image layer, the second image layer and the third image layer; and the dynamic graph generating submodule is used for selecting each picture of the miscut processing submodule, keeping the video with the generation time of N, and generating the dynamic graph according to the layer.
According to the method and the device, any selected target area in the user image can be selected to generate the dynamic image through user-defined selection, and the dynamic image is not limited to materials provided by a terminal, so that the method and the device can adapt to more scenes, and are favorable for user-defined setting of the personalized dynamic image and various images.
Those of ordinary skill in the art will appreciate that the various illustrative modules and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (8)

1. A method for converting a static graph into a dynamic graph, the method comprising the steps of:
step S100: acquiring a static picture to be processed, carrying out integral to local splitting deformation by setting track points, and recording the coordinates of each vertex after each splitting;
step S200: selecting a target region split deformed picture at the current time point as a first layer, selecting a deformed picture of the first layer after time N as a second layer, selecting an original picture of the target region as a third layer, and performing a wrong cutting operation on the layer deformed picture;
step S300: and selecting the time N as playing time, and generating a dynamic graph by using the recorded coordinate points.
2. The method for converting a static graph into a dynamic graph according to claim 1, wherein the step S100 comprises the following sub-steps:
step S110: adding a track point into the static picture to be processed, and performing triangulation deformation; obtaining four deformed triangles;
step S120: adding a track point by a vector cross multiplication method, triangulating the area where the track point is located, keeping other areas still and generating a plurality of new deformed triangles;
step S130: continuously repeating the step S120 to perform splitting deformation processing;
step S140: and recording the coordinates of the vertexes of the triangles after the splitting and the deformation, and recording and sequencing according to the sequence of the same area.
3. The method for converting a static graph into a dynamic graph according to claim 1, wherein the step S200 comprises the following sub-steps:
step S210: selecting a target area after the triangulation deformation in the step S100;
step S220: and in the time N when the first graph is deformed to the second graph layer, selecting a certain time when the target area is deformed in the step S140 as a playing time point, calculating the moving distance of each vertex of the triangle, and performing a cross-cut operation on all deformed pictures in the time period through Matrix.
4. The method for converting a static graph into a dynamic graph according to claim 1, wherein the step S300 comprises the following sub-steps:
step S310: adjusting the transparency and other pixels of the first layer, the second layer and the third layer according to the playing time point;
step S320: and selecting the picture subjected to the cross-cut operation in the step S220, keeping the picture as a video, and generating a dynamic picture according to the layer.
5. An apparatus for converting a static graph into a dynamic graph, wherein the apparatus comprises:
a cyclic graph-taking module: acquiring a static picture to be processed, carrying out integral to local splitting deformation by setting track points, and recording the coordinates of each vertex after each splitting;
a target area processing module: selecting a target region split deformed picture at the current time point as a first layer, selecting a deformed picture of the first layer after time N as a second layer, selecting an original picture of the target region as a third layer, and performing a wrong cutting operation on the layer deformed picture;
a GIF generation module: and selecting the time N as playing time, and generating a dynamic graph by utilizing the recorded coordinate point sequence.
6. The device for converting the static map into the dynamic map according to claim 5, wherein the cyclic mapping module comprises a triangulation sub-module, a vector cross multiplication sub-module, a cyclic sub-module and a recording sub-module, wherein the triangulation sub-module triangulates by adding a trace point to the static picture to be processed; obtaining four deformed triangles; the vector cross multiplication submodule is used for adding new track points, triangulating the area where the track points are located, keeping other areas still and generating a plurality of new deformed triangles; the circulation submodule is used for repeating the steps of the circulation triangulation submodule and the vector cross multiplication submodule; and the recording submodule records the coordinates of the vertexes of the triangles after the splitting and the deformation and records and sorts the vertexes according to the sequence of the same area.
7. The apparatus for converting a static map into a dynamic map according to claim 5, wherein the target area processing module comprises a mark selection sub-module and a miscut processing sub-module, wherein the mark selection sub-module is used for selecting a deformed target area from the loop extraction module; and the miscut processing submodule is used for selecting and recording a certain time of the target area deformation of the submodule as a playing time point from the time N from the first graph deformation to the second graph layer, calculating the moving distance of each vertex of the triangle, and carrying out the miscut operation on all the deformed pictures in the time period through Matrix.
8. The apparatus according to claim 5, wherein the GIF generating module comprises an image processing sub-module and a video generating sub-module, wherein the image processing sub-module is configured to adjust the pixels of the first, second, and third image layers, such as transparency, etc.; and the dynamic graph generating submodule is used for selecting each picture of the miscut processing submodule, keeping the video with the generation time of N, and generating the dynamic graph according to the layer.
CN201911204041.1A 2019-11-29 2019-11-29 Method and device for converting static diagram into dynamic diagram Active CN110942500B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911204041.1A CN110942500B (en) 2019-11-29 2019-11-29 Method and device for converting static diagram into dynamic diagram

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911204041.1A CN110942500B (en) 2019-11-29 2019-11-29 Method and device for converting static diagram into dynamic diagram

Publications (2)

Publication Number Publication Date
CN110942500A true CN110942500A (en) 2020-03-31
CN110942500B CN110942500B (en) 2024-06-07

Family

ID=69908366

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911204041.1A Active CN110942500B (en) 2019-11-29 2019-11-29 Method and device for converting static diagram into dynamic diagram

Country Status (1)

Country Link
CN (1) CN110942500B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112488977A (en) * 2020-12-22 2021-03-12 北京达佳互联信息技术有限公司 Image processing method and device, electronic equipment and storage medium
CN115660944A (en) * 2022-10-27 2023-01-31 深圳市大头兄弟科技有限公司 Dynamic method, device and equipment for static picture and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5566280A (en) * 1993-09-20 1996-10-15 Kabushiki Kaisha Toshiba 3D dynamic image production system with automatic viewpoint setting
JP2002369205A (en) * 2001-06-06 2002-12-20 Matsushita Electric Ind Co Ltd Equipment for generating dynamic image
CN108416825A (en) * 2017-07-25 2018-08-17 平安科技(深圳)有限公司 Generating means, method and the computer readable storage medium of Dynamic Graph
CN109862295A (en) * 2019-01-18 2019-06-07 平安科技(深圳)有限公司 GIF generation method, device, computer equipment and storage medium
CN110503708A (en) * 2019-07-03 2019-11-26 华为技术有限公司 A kind of image processing method and electronic equipment based on vertical synchronizing signal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5566280A (en) * 1993-09-20 1996-10-15 Kabushiki Kaisha Toshiba 3D dynamic image production system with automatic viewpoint setting
JP2002369205A (en) * 2001-06-06 2002-12-20 Matsushita Electric Ind Co Ltd Equipment for generating dynamic image
CN108416825A (en) * 2017-07-25 2018-08-17 平安科技(深圳)有限公司 Generating means, method and the computer readable storage medium of Dynamic Graph
CN109862295A (en) * 2019-01-18 2019-06-07 平安科技(深圳)有限公司 GIF generation method, device, computer equipment and storage medium
CN110503708A (en) * 2019-07-03 2019-11-26 华为技术有限公司 A kind of image processing method and electronic equipment based on vertical synchronizing signal

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112488977A (en) * 2020-12-22 2021-03-12 北京达佳互联信息技术有限公司 Image processing method and device, electronic equipment and storage medium
CN112488977B (en) * 2020-12-22 2024-06-11 北京达佳互联信息技术有限公司 Image processing method and device, electronic equipment and storage medium
CN115660944A (en) * 2022-10-27 2023-01-31 深圳市大头兄弟科技有限公司 Dynamic method, device and equipment for static picture and storage medium
CN115660944B (en) * 2022-10-27 2023-06-30 深圳市闪剪智能科技有限公司 Method, device, equipment and storage medium for dynamic state of static picture

Also Published As

Publication number Publication date
CN110942500B (en) 2024-06-07

Similar Documents

Publication Publication Date Title
CN109508681B (en) Method and device for generating human body key point detection model
CN111291584B (en) Method and system for identifying two-dimensional code position
CN110765795B (en) Two-dimensional code identification method and device and electronic equipment
KR102464271B1 (en) Pose acquisition method, apparatus, electronic device, storage medium and program
CN110942500B (en) Method and device for converting static diagram into dynamic diagram
CN115115552A (en) Image correction model training method, image correction device and computer equipment
CN113486941B (en) Live image training sample generation method, model training method and electronic equipment
TW201436552A (en) Method and apparatus for increasing frame rate of an image stream using at least one higher frame rate image stream
CN112511767A (en) Video splicing method and device, and storage medium
CN107543507A (en) The determination method and device of screen profile
CN107203962B (en) Method for making pseudo-3D image by using 2D picture and electronic equipment
US20240261677A1 (en) Determination method, determination apparatus of calibration information and electronic device
CN111209908B (en) Method, device, storage medium and computer equipment for updating annotation frame
CN107203961B (en) Expression migration method and electronic equipment
EP3146502B1 (en) Accelerated image processing
CN113487480A (en) Image processing method, image processing device, electronic equipment and computer readable storage medium
CN111539435A (en) Semantic segmentation model construction method, image segmentation equipment and storage medium
CN117593547A (en) Commodity area detection method, commodity area detection device, terminal equipment and medium
CN113393572B (en) Point cloud data generation method and device, mobile terminal and readable storage medium
CN115953504A (en) Special effect processing method and device, electronic equipment and storage medium
CN114862866A (en) Calibration plate detection method and device, computer equipment and storage medium
CN114913287A (en) Three-dimensional human body model reconstruction method and system
CN111179332B (en) Image processing method and device, electronic equipment and storage medium
US11606512B2 (en) System and method for robust model-based camera tracking and image occlusion removal
CN107093199A (en) Method and device for generating clue figure

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
PE01 Entry into force of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: A method and device for converting static images into dynamic images

Granted publication date: 20240607

Pledgee: China Co. truction Bank Corp Guangzhou Yuexiu branch

Pledgor: GUANGZHOU GOMO SHIJI TECHNOLOGY Co.,Ltd.

Registration number: Y2024980029336