[go: up one dir, main page]

CN110942500B - Method and device for converting static diagram into dynamic diagram - Google Patents

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

Info

Publication number
CN110942500B
CN110942500B CN201911204041.1A CN201911204041A CN110942500B CN 110942500 B CN110942500 B CN 110942500B CN 201911204041 A CN201911204041 A CN 201911204041A CN 110942500 B CN110942500 B CN 110942500B
Authority
CN
China
Prior art keywords
layer
picture
module
deformation
sub
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911204041.1A
Other languages
Chinese (zh)
Other versions
CN110942500A (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 Gomo Shiji Technology Co ltd
Original Assignee
Guangzhou Gomo Shiji 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 Gomo Shiji Technology Co ltd filed Critical Guangzhou Gomo Shiji 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

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 the dynamic image aiming at a self-defined local area. The method comprises the steps of obtaining a still 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 area splitting deformation picture at the current time point as a first layer, wherein the deformation picture of the first layer after the time N is passed is used as a second layer, selecting an original picture of the target area as a third layer, and performing error cutting operation on the deformation picture of the layer. 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 diagram into dynamic diagram
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 picture into a dynamic picture.
Background
In the prior art, if the image deformation is realized by using a moving least square method based on a cartoon image deformation algorithm (Moving Least Squares), different transparent treatments are carried out on the deformed picture by practically changing the deformation degree so as to realize the conversion from a static image to a dynamic image. However, the algorithm can only process the whole picture, and cannot realize local dynamic picture operation, so that the generation method of the GIF picture has great limitation, and the user experience is poor.
Disclosure of Invention
The invention aims to provide a method and a device for converting a static image into a dynamic image, which are used for solving the problems in the background art.
In order to achieve the above object, the present invention provides a method for converting a static diagram into a dynamic diagram, comprising the following steps:
Step S100: and acquiring a still 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 area splitting deformation picture at the current time point as a first layer, wherein the deformation picture of the first layer after the time N is passed is used as a second layer, selecting an original picture of the target area as a third layer, and performing error cutting operation on the deformation picture of the layer.
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 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, and generating a plurality of new deformed triangles by keeping other areas still; step S130: step S120 is repeated continuously, and split deformation treatment is carried out; step S140: and recording the coordinates of the vertexes of each triangle after splitting deformation, and recording and sequencing according to the sequence of the same area.
Preferably, the step S200 includes the following substeps: step S210: selecting the target area after triangulation deformation in the step S100; step S220: and in the time N from the deformation of the first graph to the deformation of the second graph layer, selecting a certain time of the deformation of the target area in the step S140 as a playing time point, calculating the moving distance of each vertex of the triangle, and performing the error cutting operation on all the deformed pictures in the time period through Matrix.
Preferably, the step S300 includes the following substeps: step S310: according to the playing time point, pixels such as transparency of the first layer, the second layer and the third layer are adjusted; 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 according to the picture layer.
In order to achieve the above object, the present invention further provides a device for converting a static diagram into a dynamic diagram, which includes:
and a cyclic graph taking module: and acquiring a still 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 target area processing module: and selecting a target area splitting deformation picture at the current time point as a first layer, wherein the deformation picture of the first layer after the time N is passed is used as a second layer, selecting an original picture of the target area as a third layer, and performing error cutting operation on the deformation picture of the layer.
GIF generation module: and selecting the time N as playing time, and generating a dynamic diagram by using the recorded coordinate point sequence.
The cyclic drawing module comprises a triangular splitting sub-module, a vector fork multiplication sub-module, a cyclic sub-module and a recording sub-module, wherein the triangular splitting sub-module performs triangular splitting deformation by adding a track point into the static picture to be processed; obtaining four deformed triangles; the vector fork multiplication sub-module 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 triangle sectioning submodule and the vector fork multiplying submodule; the recording submodule records the coordinates of the vertexes of each triangle after splitting deformation, and records and sorts according to the sequence of the same area.
The target area processing module comprises a mark selecting sub-module and a miscut processing sub-module, wherein the mark selecting sub-module is used for selecting the deformed target area from the cyclic graph taking module; the miscut processing sub-module is used for selecting a certain time for deformation of the target area of the recording sub-module from the time N for deformation of the first graph to the second graph layer as a playing time point, calculating the moving distance of each vertex of the triangle, and performing miscut operation on all deformed pictures in the time period through Matrix.
The GIF generation module comprises an image processing sub-module and a dynamic image generation sub-module, wherein the image processing sub-module is used for adjusting pixels such as transparency of the first layer, the second layer and the third layer; the dynamic image generation submodule is used for selecting each picture of the miscut processing submodule, keeping the generation time of the video with the generation time of N, and generating a dynamic image according to the picture layer.
Through user-defined selection, any selected target area in the user image can be selected to generate a dynamic picture, and the dynamic picture is not limited to materials provided by a terminal, so that the embodiment of the application can adapt to more scenes, is beneficial to user-defined setting of the user-defined dynamic picture and various images.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are required to be used in the description of the embodiments of the present invention will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort to a person of ordinary skill in the art.
FIG. 1 shows a flow chart of a method of converting a static diagram to a dynamic diagram in accordance with the present invention;
Fig. 2 shows a flow chart of the substeps of a method step S100 of converting a static diagram into a dynamic diagram according to the invention;
fig. 3 shows a flow chart of the substeps of a method step S200 of converting a static diagram into a dynamic diagram according to the invention;
fig. 4 shows a flow chart of the substeps of a method step S300 of converting a static diagram into a dynamic diagram according to the invention;
fig. 5 shows a flow chart of an apparatus for converting a static diagram into a dynamic diagram according to the present invention.
Detailed Description
For the purpose of making the technical solution and some of the advantages of the present invention more clear, the present invention is further explained below with reference to the accompanying drawings. It is apparent that the described embodiments are a part, but not all, of embodiments of the present invention, and that all other embodiments, which a person having ordinary skill in the art would obtain without making inventive efforts, are within the scope of this embodiment of the invention.
The invention provides a method for converting a static diagram into a dynamic diagram, which comprises the following steps:
Step S100: and acquiring a still 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. 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, and generating a plurality of new deformed triangles by keeping other areas still; step S130: step S120 is repeated continuously, and split deformation treatment is carried out; step S140: and recording the coordinates of the vertexes of each triangle after splitting deformation, and recording and sequencing according to the sequence of the same area.
Step S200: and selecting a target area splitting deformation picture at the current time point as a first layer, wherein the deformation picture of the first layer after the time N is passed is used as a second layer, selecting an original picture of the target area as a third layer, and performing error cutting operation on the deformation picture of the layer. Comprises the following substeps: step S210: selecting the target area after triangulation deformation in the step S100; step S220: and in the time N from the deformation of the first graph to the deformation of the second graph layer, selecting a certain time of the deformation of the target area in the step S140 as a playing time point, calculating the moving distance of each vertex of the triangle, and performing the error cutting operation on all the 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. Comprises the following substeps: step S310: according to the playing time point, pixels such as transparency of the first layer, the second layer and the third layer are adjusted; 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 according to the picture layer in a highlighting mode.
As shown in fig. 5, an apparatus for converting a static diagram into a dynamic diagram includes:
And a cyclic graph taking module: and acquiring a still 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 system comprises a triangular splitting sub-module, a vector fork multiplication sub-module, a circulation sub-module and a recording sub-module, wherein the triangular splitting sub-module performs triangular splitting deformation by adding a track point into the to-be-processed static picture; obtaining four deformed triangles; the vector fork multiplication sub-module 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 triangle sectioning submodule and the vector fork multiplying submodule; the recording submodule records the coordinates of the vertexes of each triangle after splitting deformation, and records and sorts according to the sequence of the same area.
The target area processing module: and selecting a target area splitting deformation picture at the current time point as a first layer, wherein the deformation picture of the first layer after the time N is passed is used as a second layer, selecting an original picture of the target area as a third layer, and performing error cutting operation on the deformation picture of the layer. The device comprises a mark selecting sub-module and a miscut processing sub-module, wherein the mark selecting sub-module is used for selecting a deformed target area from the cyclic graph taking module; the miscut processing sub-module is used for selecting a certain time for deformation of the target area of the recording sub-module from the time N for deformation of the first graph to the second graph layer as a playing time point, calculating the moving distance of each vertex of the triangle, and performing miscut operation on all deformed pictures in the time period through Matrix.
GIF generation module: and selecting the time N as playing time, and generating a dynamic diagram by using the recorded coordinate point sequence. The dynamic image processing system comprises an image processing sub-module and a dynamic image generation sub-module, wherein the image processing sub-module is used for adjusting pixels such as transparency of the first image layer, the second image layer and the third image layer; the dynamic image generation submodule is used for selecting each picture of the miscut processing submodule, keeping the generation time of the video with the generation time of N, and generating a dynamic image according to the picture layer.
Through user-defined selection, any selected target area in the user image can be selected to generate a dynamic picture, and the dynamic picture is not limited to materials provided by a terminal, so that the embodiment of the application can adapt to more scenes, is beneficial to user-defined setting of the user-defined dynamic picture 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 solution. 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 this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a usb disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk, etc.
The foregoing is merely illustrative of the present invention, and the present invention is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present invention. Therefore, the protection scope of the invention is subject to the protection scope of the claims.

Claims (6)

1. A method for converting a static map to a dynamic map, the method comprising the steps of:
Step S100: acquiring a still picture to be processed, through 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, and generating a plurality of new deformed triangles by keeping other areas still; step S130: step S120 is repeated continuously, and split deformation treatment is carried out; step S140: recording coordinates of the vertexes of each triangle after splitting deformation, and recording and sequencing according to the sequence of the same area;
step S200: selecting a target area splitting deformation picture at the current time point as a first layer, wherein the deformation picture of the first layer after the time N is passed is used as a second layer, selecting an original picture of the target area as a third layer, and performing error cutting operation on the deformation picture of the layer;
step S300: and selecting the time N as playing time, and generating a dynamic graph by using the recorded coordinate points.
2. The method according to claim 1, wherein said step S200 comprises the sub-steps of:
Step S210: selecting the target area after triangulation deformation in the step S110;
step S220: and in the time N from the first layer to the second layer, selecting a certain time of deformation of the region where the track points obtained by processing in the steps S120 and S130 are located in the step S140 as a playing time point, calculating the moving distance of each vertex of the triangle, and performing error cutting operation on all deformed pictures from the playing time point to the time N through Matrix.
3. A method for converting a static graph into a dynamic graph according to claim 2, wherein said step S300 comprises the sub-steps of:
step S310: according to the playing time point, transparency of the first layer, the second layer and the third layer is adjusted;
step S320: and selecting the picture subjected to the miscut operation in the step S220, storing the picture into a video, and generating a dynamic picture according to the second picture layer.
4. An apparatus for converting a static graph into a dynamic graph, wherein the apparatus comprises:
And a cyclic graph taking module: the method comprises the steps of obtaining a static picture to be processed, wherein the static picture comprises a triangular splitting sub-module, a vector fork multiplication sub-module, a circulation sub-module and a recording sub-module, and the triangular splitting sub-module performs triangular splitting deformation by adding a track point into the static picture to be processed; obtaining four deformed triangles; the vector fork multiplication sub-module 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 triangle sectioning submodule and the vector fork multiplying submodule; the recording submodule records the coordinates of the vertexes of each triangle after splitting deformation, and records and sorts according to the sequence of the same area;
The target area processing module: selecting a target area splitting deformation picture at the current time point as a first layer, wherein the deformation picture of the first layer after the time N is passed is used as a second layer, selecting an original picture of the target area as a third layer, and performing error cutting operation on the deformation picture of the layer;
GIF generation module: and selecting the time N as playing time, and generating a dynamic diagram by using the recorded coordinate point sequence.
5. The apparatus for converting a static map into a dynamic map according to claim 4, wherein said target region processing module comprises a marker selection sub-module and a miscut processing sub-module, wherein the marker selection sub-module is configured to select the deformed target region from the cyclic mapping module; the miscut processing sub-module is used for selecting a certain time of deformation of the target area where the track point of the recording sub-module is located from the time N of deformation of the first layer to the second layer as a playing time point, calculating the moving distance of each vertex of the triangle, and performing miscut operation on all deformed pictures from the playing time point to the time N through Matrix.
6. The device for converting a static image into a dynamic image according to claim 5, wherein the GIF generating module comprises an image processing sub-module and a dynamic image generating sub-module, and the image processing sub-module is configured to adjust transparency of the first layer, the second layer and the third layer; the dynamic image generation submodule is used for selecting each picture of the miscut processing submodule, storing the video with the generation time of N, and generating a dynamic image according to the second image 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 CN110942500A (en) 2020-03-31
CN110942500B true 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)

Families Citing this family (2)

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

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

Also Published As

Publication number Publication date
CN110942500A (en) 2020-03-31

Similar Documents

Publication Publication Date Title
CN111291584B (en) Method and system for identifying two-dimensional code position
US10510148B2 (en) Systems and methods for block based edgel detection with false edge elimination
CN109543489B (en) Positioning method and device based on two-dimensional code and storage medium
CN114331951B (en) Image detection method, image detection device, computer, readable storage medium, and program product
EP2383701B1 (en) Image processing method and apparatus
CN110942500B (en) Method and device for converting static diagram into dynamic diagram
CN114648640A (en) Target object monomer method, device, equipment and storage medium
JP2022515517A (en) Image depth estimation methods and devices, electronic devices, and storage media
TW201436552A (en) Method and apparatus for increasing frame rate of an image stream using at least one higher frame rate image stream
CN110363837B (en) Method and device for processing texture image in game, electronic equipment and storage medium
CN111275776A (en) Projection augmented reality method and device and electronic equipment
CN116109765A (en) Three-dimensional rendering method and device for labeling objects, computer equipment and storage medium
CN107203962B (en) Method for making pseudo-3D image by using 2D picture and electronic equipment
JP2010146043A (en) Information processing apparatus, information processing method, program and image processing apparatus
CN111209908B (en) Method, device, storage medium and computer equipment for updating annotation frame
CN107543507A (en) The determination method and device of screen profile
CN112418147A (en) Track \30758identificationmethod and device based on aerial images
CN107203961B (en) Expression migration method and electronic equipment
US20190172226A1 (en) System and method for generating training images
JP2023109570A (en) Information processing device, learning device, image recognition device, information processing method, learning method, image recognition method
CN111932517A (en) Contour mapping method and device for excess material plate, electronic equipment and storage medium
CN112561915A (en) Image processing method and device, image acquisition device and storage medium
CN117710703A (en) Image processing method, device, computer equipment and readable storage medium
CN113393572B (en) Point cloud data generation method and device, mobile terminal and readable storage medium
CN113844034B (en) Three-dimensional model punching processing method, printing method, related equipment and storage medium

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

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

PE01 Entry into force of the registration of the contract for pledge of patent right