CN104899889B - A kind of video vectorization method based on tetrahedral grid - Google Patents
A kind of video vectorization method based on tetrahedral grid Download PDFInfo
- Publication number
- CN104899889B CN104899889B CN201510349260.4A CN201510349260A CN104899889B CN 104899889 B CN104899889 B CN 104899889B CN 201510349260 A CN201510349260 A CN 201510349260A CN 104899889 B CN104899889 B CN 104899889B
- Authority
- CN
- China
- Prior art keywords
- tetrahedral
- grid
- video
- vertex
- summit
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/90—Determination of colour characteristics
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10016—Video; Image sequence
Landscapes
- Engineering & Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Image Generation (AREA)
- Image Processing (AREA)
Abstract
The invention discloses a kind of video vectorization method based on tetrahedral grid, over-segmentation is carried out to video including the use of video undue segmentation method;Result according to video over-segmentation sets up initial tetrahedral mesh;Initial tetrahedral mesh is cut using Lattice Cleaving algorithms;Tetrahedral grid is simplified using the tetrahedron method for simplifying based on side collapse;Color optimization is carried out to tetrahedral grid by solving-optimizing equation;It is finally that tetrahedral grid is rendered.The present invention tries one's best to maintain in video while being tetrahedral grid model by video vectorization interacts operation in the feature, and processing procedure such as geometry of object without user.
Description
Technical field
The invention belongs to fields such as computer graphics, multimedia information technology, Video processings, it is related to a kind of based on four sides
The video vectorization method of volume mesh.
Background technology
Graphical content based on vector is more and more presented on smart mobile phone, computer and network.And in people at any time
Under the promotion for obtaining information everywhere, various electronic equipments emerge in an endless stream, for example mobile phone, tablet personal computer, notebook computer
Deng.The display resolution of these equipment is not of uniform size, and conventional video has set resolution ratio, shows on devices often
Need the zoom operations damaged.And vector graphics then has the unrelated characteristic of resolution ratio, it is all lossless to scale anyway
, the problem of solving so well.
On the other hand, with the high speed development and the rapid expansion of information content of science and technology, personal electronic equipments are deposited
Storage can not meet all the more the demand of people, and people need to meet the need of itself by way of obtaining information constantly from network
Ask, and the data compaction that vector graphics has can be good at meeting high-efficiency network communication this demand.
The widespread demand of network materials promotes the making of network materials, and traditional art designing's manufacturing process can consume substantial amounts of
Human cost and time cost, and the editability of vector graphics is higher, can save many human costs.
Under many merits basis of vector graphics, its development trend is self-evident, has there is substantial amounts of by hand on network
The vector graphics of work creation, while image vector method has also obtained certain development, is occurred in that based on triangular mesh
Image vector method, the image vector method based on gradient grid, image vector method based on diffusion profile etc. one
Series methods.
But for traditional video, it is simple to convert them into vector graphics and unrealistic by hand-designed,
And video causes the method for image vector can not be applied to video well to the demand of space-time consistency.Therefore need
A kind of method that video can be converted into vector graphics automatically, patent 200810102127.9, colored raster images or video
Vectorization method can to cartoon video carry out vector quantization, be also a kind of method of video vectorization, but may not apply to
General natural video frequency.
The content of the invention
Goal of the invention:The technical problems to be solved by the invention are that there is provided a kind of video arrow in view of the shortcomings of the prior art
Quantization method, so as to which traditional dot matrix video is converted into vector visual.
Technical scheme:The invention discloses a kind of video vectorization method based on tetrahedral grid, its core is to count
Calculate the tetrahedral grid model of original input video and simplified and optimized, comprise the following steps:
Step 1, video over-segmentation:Original input video over-segmentation is turned into super-pixel using video undue segmentation method, and
For each super-pixel mark label, and all pixels for belonging to the super-pixel are assigned by this label;
Step 2, initial tetrahedral mesh is set up:Using each pixel of video as summit, an initial four sides is set up
Volume mesh, its corresponding summit is assigned by the corresponding color and label of each pixel;
Step 3, initial tetrahedral mesh is split:Tetrahedron in initial tetrahedral mesh is split so that each
Tetrahedral four summits all have like number;
Step 4, initial tetrahedral mesh is simplified:Using the tetrahedron method for simplifying based on side collapse, to initial tetrahedral
Grid carries out simplifying subdivision, the control grid after being segmented;
Step 5, color optimization is carried out to control grid:Original input video is sampled, the result obtained with sampling
Color optimization is carried out to control grid;
Step 6, control grid is rendered:Control grid subdivision after color is optimized is differentiated to 1 to 3 time with being adapted to target
Rate, is then rendered.
Wherein, step 1 comprises the following steps:
Step 1-1, using the undue segmentation method of video, some pieces of (random natural number) super pictures are divided into by original input video
Element, each super-pixel of original input video obtains a unique label, and this label is assigned and all belongs to the super-pixel
Pixel, each pixel that the super-pixel after segmentation is included be owned by original input video red, green, blue color attribute (r,
G, b) and new label attribute L.
Step 2 comprises the following steps:
Step 2-1, according to original input video, each pixel sets up a summit, and vertex attribute includes the position of pixel
Information (x, y, z), color attribute (r, g, b) and label attribute L;
Step 2-2, for the summit of every 8 direct neighbors, uses (the reference of Delaunay (delaunay) tetrahedralizations method
Article DeWall:A fast divide and conquer Delaunay triangulation algorithm in Ed)
6 tetrahedrons are set up between the square of 8 summit compositions, an initial tetrahedral mesh is obtained.
Step 3 comprises the following steps:
Step 3-1, checks all sides in initial tetrahedral mesh, if two the Vertex Labeling differences of a line,
A summit, the union marked as two the Vertex Labelings in side on the summit are increased newly at the side center;
Step 3-2, checks all triangles in initial tetrahedral mesh, if three the Vertex Labelings of a triangle
Differ, then the heart increases a summit, the union marked as the Atria the Vertex Labeling on the summit newly in the triangles;
Step 3-3, checks all tetrahedrons in initial tetrahedral mesh, if tetrahedral four the Vertex Labeling
Differ, then increase a summit newly at the tetrahedral body center, the Vertex Labeling is four the Vertex Labelings of the tetrahedron
Union;
Step 3-4, uses Lattice Cleaving (lattice cutting) algorithms (articles of reference Lattice Cleaving:
Conforming Tetrahedral Meshes of Multimaterial Domains with Bounded Quality),
Cutting is carried out to tetrahedral grid according to newly-increased summit and produces tetrahedron inner mesh border, a new tetrahedron net is obtained
Lattice.
Step 4 comprises the following steps:
Step 4-1, for each tetrahedron T in tetrahedral grid, calculates its hyperplane equation coefficient vector h, tool
Body process is as follows:
For each vertex point v in tetrahedral grid, its coordinate representation is four dimensional vectors [x, y, z, c]T, wherein x,
Y, z are coordinate of the vertex v in original input video, and c is its color value.Make tetrahedral four summits be respectively it is four-dimensional to
Measure v1、v2、v3、v4, the four-dimensional vector v of order12=v2-v1、v13=v3-v1、v14=v4-v1, n=Cross (v12,v13,v14),
Wherein Cross (v12,v13,v14) represent four-dimensional vector v12、v13、v14Cross product, its result n be one perpendicular to
v12、v13、v14Four dimensional vectors, make n1、n2、n3、n4Represent n four elements, i.e. n=[n1,n2,n3,n4]。
Make d=-Dot (n, v1), wherein Dot (n, v1) represent n and v1Dot product.
Then tetrahedron T hyperplane equation coefficient vector h=[n1,n2,n3,n4, d], i.e. hyperplane side where tetrahedron T
Journey is n1x+n2y+n3z+n4C+d=0.
Step 4-2, for each vertex v in tetrahedral grid, be denoted as homogeneous coordinates form v=[x, y,
z,c,1]T, calculate its Q matrix and its second order error Δ (v):
Q=∑sh∈H(v)hTH,
Δ (v)=∑h∈H(v)(hTv)2=vTQv,
All tetrahedral set that wherein H (v) is connected by vertex v;
Step 4-3, is calculated in tetrahedral grid per a line eijCollapse optimal location v*With collapse cost Cost (eij),
Collapse optimal location v*Drawn by solving following optimization method:
Wherein QiWith QjRespectively side eijTwo vertex vsiWith vjQ matrixes, order:
Wherein q11~q55It is QijElement, order:
Then collapse optimal location v*=AQ -1BQ,
Collapse cost Cost (eij) be calculated as follows:
Cost(eij)=v*T(Qi+Qj)v*;
Step 4-4, to keep the inner mesh border because cutting and producing to tetrahedron in step 3-4, by one end
Internally side of the net boundary other end not internally in net boundary forecloses, to remaining all sides according to its collapse generation
Valency Cost is ranked up, and collapse operation is carried out to side minimum collapse cost Cost, and the summit being collapsed into is set into optimal to its
V on position*, merge eijTwo summits Topology connection, repeat this step, until remaining number of vertex reaches and preset
Untill quantity (random natural number) or no qualified side are available for collapse, so as to obtain the control grid after collapse;
Step 4-5, (articles of reference A new solid subdivision are finely divided to the control grid after collapse
Scheme based on box splines), then by solving following optimization method, control grid is optimized:
minvE (v)=EF(v)+λEL(v),
Wherein EFAnd E (v)L(v) it is respectively error energy and Laplce's energy term, parameter lambda (any real number) is to adjust
The weight between them is saved, in EF(v) in definition, vkTo control the summit after grid subdivision,For vkOn initial mesh
Projection,On initial mesh, vkOn control grid after subdivision,It is vkOptimization aim.Here it is to use control
The subdivided meshes of grid obtain control grid optimization more similar to initial mesh, and optimised is control grid.NsFor control net
Vertex number after lattice subdivision, 1~N of k valuess, αkRepresent linear group of the summit in the summit and subdivided meshes in control grid
Conjunction relation, in EL(v) in definition, viTo control the summit of grid,For viLaplce's coordinate, NcFor control grid
Vertex number,Represent to solve the v for make it that E (v) is minimum, the optimization problem can be solved by least square method..
Step 5 includes:Original input video is sampled using the control grid after subdivision, following optimization method is solved
With the vertex color of optimal control grid:
Wherein,Represent to solve the color value c, c for make it that E (c) is minimumkFor the summit face after control grid subdivision
Color,Square of square of 2 norms, i.e. Euclidean distance is represented,For ckThe color up-sampled in original input video, should
Optimization problem can be solved by least square method.
Step 6 includes:Control grid subdivision after color is optimized is to the density for being adapted to target resolution, then by it
Zoom to and video is rendered to after target resolution, the color value of each pixel passes through to tetrahedral four belonging to it in video
The color value on summit carries out Tri linear interpolation (reference book:Graphics Gems IV) obtain.
Beneficial effect:The present invention remarkable advantage be:
(1) method of video vectorization proposed by the present invention need not during having the automaticity of height, whole vector quantization
User is interacted manually.
(2) the tetrahedron vector model that the present invention is used has generality in geometric manipulations, obtained by the present invention
Vector visual model can use general tetrahedron processing method to enter edlin.
(3) the obtained tetrahedron vector model of the present invention has fidelity, it is rendered to again after video with it is original defeated
Enter video error smaller.
Brief description of the drawings
Fig. 1 is the basic flow sheet of the inventive method.
Fig. 2 is uniform cutting cube schematic diagram.
Fig. 3 is the tetrahedron schematic diagram of multiaspect.
Fig. 4 is Cleaver algorithm cutting board schematic diagrames.
Fig. 5 is some frames of original input video.
Fig. 6 is some frames that vector visual is rendered.
Embodiment
The present invention is done with reference to the accompanying drawings and detailed description and further illustrated.
The flow chart of this method is as shown in figure 1, be divided into six big processes:It is that video is entered using video undue segmentation method first
Row over-segmentation;Followed by set up initial tetrahedral mesh according to the result of video over-segmentation;Followed by use Cleaver algorithms pair
Initial tetrahedral mesh is cut;Followed by letter is carried out to tetrahedral grid using the tetrahedron method for simplifying based on side collapse
Change;Followed by color optimization is carried out to tetrahedral grid by solving-optimizing equation;It is finally that tetrahedral grid is rendered.
Specifically, as shown in figure 1, the invention discloses a kind of video vectorization method, mainly including following step
Suddenly:
Step 1, video over-segmentation:Original input video over-segmentation is turned into super-pixel using video undue segmentation method, and
For each super-pixel mark label, and all pixels for belonging to the super-pixel are assigned by this label;
Step 2, initial tetrahedral mesh is set up:Using each pixel of video as summit, set up one it is dense
Initial tetrahedral mesh, its corresponding summit is assigned by the corresponding color and label of each pixel;
Step 3, initial tetrahedral mesh is split:Tetrahedron in grid is split so that each tetrahedral four
Individual summit all has like number.
Step 4, the simplification of tetrahedral grid:Using the tetrahedron method for simplifying based on side collapse, to dense tetrahedron
Grid is simplified, and is reduced tetrahedral number on the premise of its shape is not influenceed as far as possible, is obtained sparse control grid.
Step 5, the color optimization of tetrahedral grid:By the sparse control grid subdivision after simplification, then it is originally inputted
Sampled in video, the result obtained with sampling carries out color optimization to sparse control grid.
Step 6, tetrahedral grid is rendered:Control grid subdivision 1 to 3 time after color is optimized is differentiated with being adapted to target
Rate, is then rendered.
For step 1, the specific implementation details following steps of video over-segmentation:
Step 1-1, is some pieces of super-pixel by Video segmentation using the undue segmentation method of video.Each super-pixel of video
A unique label will be all obtained, and all pixels for belonging to the super-pixel are assigned by this label, so that each of video
Pixel is owned by the red, green, blue color attribute (r, g, b) and new label attribute L of script.
For step 2, the specific implementation details following steps of initial tetrahedral mesh are set up:
Step 2-1, according to video, each pixel sets up a summit, and its attribute has including positional information (x, y, z),
Color attribute (r, g, b) and label attribute L.
Step 2-2, for the summit of every 8 direct neighbors, uses (the reference of Delaunay (delaunay) tetrahedralizations method
Article DeWall:A fast divide and conquer Delaunay triangulation algorithm in Ed)
6 tetrahedrons are set up therebetween, as shown in Fig. 2 so as to obtain a dense initial tetrahedral mesh.
For step 3, the specific implementation details following steps of tetrahedral grid are cut:
Step 3-1, checks all sides in initial tetrahedral mesh, if two the Vertex Labeling differences of a line,
A summit is increased newly at the side center, and it is marked as the union of two the Vertex Labelings in side, (a) and (b) institute in Fig. 3 in Fig. 3
Show.
Step 3-2, checks all triangles in initial tetrahedral mesh, if three the Vertex Labelings of a triangle
Differ, then the heart increases a summit newly in the triangles, and it is marked as the union of the Atria the Vertex Labeling, such as Fig. 3
In shown in (c).
Step 3-3, checks all tetrahedrons in initial tetrahedral mesh, if tetrahedral four the Vertex Labeling
Differ, then increase a summit newly in the middle of the side, its marked as four the Vertex Labelings of tetrahedron union, in such as Fig. 3
(d) shown in.
Step 3-4, uses Lattice Cleaving (lattice cutting) algorithms (articles of reference Lattice Cleaving:
Conforming Tetrahedral Meshes of Multimaterial Domains with Bounded Quality),
According to newly-increased summit tetrahedral grid is carried out cutting produce tetrahedron inner mesh border, cutting board as shown in figure 4, from
And obtain a new more dense tetrahedral grid.
The specific implementation details following steps simplified for step 4, tetrahedral grid:
Step 4-1, for each tetrahedron T in tetrahedral grid, calculates its hyperplane equation coefficient vector h, tool
Body process is as follows:
For vertex v, its coordinate representation is four dimensional vectors [x, y, z, c]T, wherein x, y, z is that the vertex v is being originally inputted
Coordinate in video, c is its color value.
It is respectively four-dimensional vector v to make tetrahedral four summits1、v2、v3、v4, the four-dimensional vector v of order12=v2-v1、v13=v3-
v1、v14=v4-v1, n=Cross (v12,v13,v14),
Wherein Cross (v12,v13,v14) represent four-dimensional vector v12、v13、v14Cross product, its result n be one perpendicular to
v12、v13、v14Four dimensional vectors, make n1、n2、n3、n4Represent n four elements, i.e. n=[n1,n2,n3,n4]。
Make d=-Dot (n, v1), wherein Dot (n, v1) represent n and v1Dot product.
Then tetrahedron T hyperplane equation coefficient vector h=[n1,n2,n3,n4, d], i.e. hyperplane side where tetrahedron T
Journey is n1x+n2y+n3z+n4C+d=0.
Step 4-2, for each vertex v in tetrahedral grid, be denoted as homogeneous coordinates form v=[x, y,
z,c,1]T, calculate its Q matrix and its second order error Δ (v):
Q=∑sh∈H(v)hTH,
Δ (v)=∑h∈H(v)(hTv)2=vTQv,
All tetrahedral set that wherein H (v) is connected by vertex v;
Step 4-3, is calculated in tetrahedral grid per a line eijCollapse optimal location v*With collapse cost Cost (eij),
Collapse optimal location v*Drawn by solving following optimization method:
minvvT(Qi+Qj) v,
Wherein QiWith QjRespectively side eijTwo vertex vsiWith vjQ matrixes, order:
Wherein q11~q55It is QijElement, order:
Then collapse optimal location v*=AQ -1BQ,
Collapse cost Cost (eij) be calculated as follows:
Cost(eij)=v*T(Qi+Qj)v*;
Step 4-4, will to need to keep because of the inner mesh border cut tetrahedron in step 3-4 and produced
One end internally forecloses on side of the net boundary other end not internally in net boundary, to remaining all sides according to it
Cost is ranked up, and collapse operation is carried out to side minimum Cost, and the summit being collapsed into is set and arrives its optimal location v*On, close
And eijTwo summits Topology connection.Repeat this step, until remaining number of vertex reaches that user's predetermined amount (is appointed
Meaning natural number) or untill being available for collapse without qualified side, so as to obtain controlling grid.
Step 4-5, (articles of reference A new solid subdivision are finely divided to the control grid after collapse
Scheme based on box splines), then by solving following optimization method, control grid is optimized so that
Its shape is closer to initial mesh:
minvE (v)=EF(v)+λEL(v),
Wherein EFAnd E (v)L(v) it is respectively error energy and Laplce's energy term, parameter lambda (any real number of value, λ
Adjusted to obtain its preferable result by user) to adjust the weight between them.In EF(v) in definition, vkFor control
Summit after grid subdivision,For vkProjection on initial mesh, NsFor the vertex number after control grid subdivision, αkExpression
The linear combination relation on the summit in summit and subdivided meshes in control grid.In EL(v) in definition, viFor control net
The summit of lattice,For viLaplce's coordinate, NcTo control the vertex number of grid,Represent to solve and cause E (v)
Minimum v, the optimization problem can be solved by least square method.
For step 5, the specific implementation details of tetrahedral grid color optimization are as follows:
Control grid is finely divided, original input video sampled using subdivided meshes, is then solved following excellent
Change equation with the vertex color of optimal control grid:
ckTo control the vertex color after grid subdivision,For ckThe color up-sampled in original input video, NsFor control
Vertex number after grid subdivision, αkThe linear combination for expressing the summit in summit and subdivided meshes in control grid is closed
System, the optimization problem can be solved by least square method.
For step 6, the specific implementation details that tetrahedral grid is rendered are as follows:
Control grid subdivision to the density for being adapted to target resolution on tetrahedron, then scale it to target resolution
After be rendered to the color value of each pixel in video, video and pass through the color value on tetrahedral four summits belonging to it is carried out
Tri linear interpolation (reference book:Graphics Gems IV) obtain.
Embodiment
The Experimental Hardware environment of the present embodiment is:Intel (R) Xero (R) CPU E5-2620 2.0GHz, 144G internal memories,
Software environment is MicrosoftVisual Studio2010, MicrosoftWindows7Professional and Matlab
2012a.Test video comes from disclosed video on network.
The invention discloses a kind of video vectorization method based on tetrahedral grid, its core is to calculate original defeated
Enter the tetrahedral grid model of video and simplified and optimized, comprise the following steps:
Step 1, video over-segmentation:Original input video over-segmentation is turned into super-pixel using video undue segmentation method, and
For each super-pixel mark label, and all pixels for belonging to the super-pixel are assigned by this label;
Step 2, initial tetrahedral mesh is set up:Using each pixel of video as summit, one initial four is set up
Face volume mesh, its corresponding summit is assigned by the corresponding color and label of each pixel;
Step 3, initial tetrahedral mesh is split:Tetrahedron in grid is split so that each tetrahedral four
Individual summit all has like number;
Step 4, tetrahedral grid is simplified:Using the tetrahedron method for simplifying based on side collapse, tetrahedral grid is carried out
Simplify, obtain controlling grid;
Step 5, color optimization is carried out to control grid:Grid subdivision will be controlled, then original input video will be adopted
Sample, the result obtained with sampling carries out color optimization to control grid;
Step 6, control grid is rendered:Control grid subdivision 1 to 3 time after color is optimized to be adapted to target resolution,
Then rendered.
The test video of input is as shown in figure 5, control super-pixel number 100 when using to video progress over-segmentation
Between~200, the weight λ values of Laplce are between 0.1~0.01 during tetrahedral grid simplification, after simplifying
Control vertices number is set to the 0.5% of the video image prime number, and the rendering result of tetrahedral grid is as shown in fig. 6, can see
The video gone out after vector quantization maintains the notable feature such as shape of object in original input video substantially.
The invention provides a kind of video vectorization method based on tetrahedral grid, the side of the technical scheme is implemented
Method and approach are a lot, and described above is only the preferred embodiment of the present invention, it is noted that for the common skill of the art
For art personnel, under the premise without departing from the principles of the invention, some improvements and modifications can also be made, these improvements and modifications
Also it should be regarded as protection scope of the present invention.Each part being not known in the present embodiment can use prior art to be realized.
Claims (7)
1. a kind of video vectorization method based on tetrahedral grid, it is characterised in that comprise the following steps:
Step 1, video over-segmentation:Original input video over-segmentation is turned into super-pixel using video undue segmentation method, and is every
One super-pixel mark label, and assign all pixels for belonging to the super-pixel by this label;
Step 2, initial tetrahedral mesh is set up:Using each pixel of video as summit, an initial tetrahedral net is set up
Lattice, its corresponding summit is assigned by the corresponding color and label of each pixel;
Step 3, initial tetrahedral mesh is split:Tetrahedron in initial tetrahedral mesh is split so that each four sides
Four summits of body all have like number;
Step 4, initial tetrahedral mesh is simplified:Using the tetrahedron method for simplifying based on side collapse, to initial tetrahedral mesh
Progress simplifies subdivision, the control grid after being segmented;
Step 5, color optimization is carried out to control grid:Original input video is sampled, the result obtained with sampling is to control
Grid processed carries out color optimization;
Step 6, control grid is rendered:Control grid subdivision 1 to 3 time after color is optimized is to be adapted to target resolution, then
Rendered.
2. a kind of video vectorization method based on tetrahedral grid as claimed in claim 1, it is characterised in that step 1 is wrapped
Include following steps:
Step 1-1, using the undue segmentation method of video, some pieces of super-pixel, original input video are divided into by original input video
Each super-pixel obtain a unique label, all pixels for belonging to the super-pixel are assigned by this label, after segmentation
Each pixel that super-pixel is included is owned by the red, green, blue color attribute (r, g, b) and new label of original input video
Attribute L.
3. a kind of video vectorization method based on tetrahedral grid as claimed in claim 2, it is characterised in that step 2 is wrapped
Include following steps:
Step 2-1, according to original input video, each pixel sets up a summit, and vertex attribute includes the positional information of pixel
(x, y, z), color attribute (r, g, b) and label attribute L;
Step 2-2, for the summit of every 8 direct neighbors, is constituted just using Delaunay tetrahedralizations method on 8 summits
6 tetrahedrons are set up between cube, an initial tetrahedral mesh is obtained.
4. a kind of video vectorization method based on tetrahedral grid as claimed in claim 3, it is characterised in that step 3 is wrapped
Include following steps:
Step 3-1, checks all sides in initial tetrahedral mesh, if two the Vertex Labeling differences of a line, at this
Side center increases a summit, the union marked as two the Vertex Labelings in side on the summit newly;
Step 3-2, checks all triangles in initial tetrahedral mesh, if three the Vertex Labelings of a triangle are not
Identical, then the heart increases a summit, the union marked as the Atria the Vertex Labeling on the summit newly in the triangles;
Step 3-3, checks all tetrahedrons in initial tetrahedral mesh, if tetrahedral four the Vertex Labeling is not
It is identical, then increase a summit newly at the tetrahedral body center, the Vertex Labeling is the union of four the Vertex Labelings of tetrahedron;
Step 3-4, using Lattice Cleaving algorithms, carries out cutting to tetrahedral grid according to newly-increased summit and produces four
Net boundary inside the body of face, obtains a new tetrahedral grid.
5. a kind of video vectorization method based on tetrahedral grid as claimed in claim 4, it is characterised in that step 4 is wrapped
Include following steps:
Step 4-1, for each tetrahedron T in tetrahedral grid, calculates its hyperplane equation coefficient vector h, specific mistake
Journey is as follows:
For each vertex v in tetrahedral grid, its coordinate representation is four dimensional vectors [x, y, z, c]T, wherein x, y, z is to be somebody's turn to do
Coordinate of the vertex v in original input video, c is its color value,
Four summits for making tetrahedron T are respectively four-dimensional vector v1、v2、v3、v4, the four-dimensional vector v of order12=v2-v1、v13=v3-v1、
v14=v4-v1, n=Cross (v12,v13,v14),
Wherein Cross (v12,v13,v14) represent four-dimensional vector v12、v13、v14Cross product, its result n is one perpendicular to v12、v13、
v14Four dimensional vectors, make n1、n2、n3、n4Represent n four elements, i.e. n=[n1,n2,n3,n4],
Make parameter d=-Dot (n, v1), wherein Dot (n, v1) represent n and v1Dot product,
Then tetrahedron T hyperplane equation coefficient vector h=[n1,n2,n3,n4, d], i.e. hyperplane equation where tetrahedron T is
n1x+n2y+n3z+n4C+d=0;
Step 4-2, for each vertex v in tetrahedral grid, be denoted as homogeneous coordinates form v=[x, y, z, c,
1]T, calculate its Q matrix and its second order error Δ (v):
Q=∑sh∈H(v)hTH,
Δ (v)=∑h∈H(v)(hTv)2=vTQv,
All tetrahedral set that wherein H (v) is connected by vertex v;
Step 4-3, is calculated in tetrahedral grid per a line eijCollapse optimal location v*With collapse cost Cost (eij), collapse
Optimal location v*Drawn by solving following optimization method:
minv vT(Qi+Qj) v,
Wherein QiWith QjRespectively side eijTwo vertex vsiWith vjQ matrixes, order:
Wherein q11~q55It is QijElement, order:
Then collapse optimal location v*=AQ -1BQ,
Collapse cost Cost (eij) be calculated as follows:
Cost(eij)=v*T(Qi+Qj)v*;
Step 4-4, one end is internally foreclosed on side of the net boundary other end not internally in net boundary, to remaining institute
Some sides are ranked up according to its collapse cost, carry out collapse operation to the side of collapse Least-cost, the summit being collapsed into is set
Put its optimal location v*On, merge side eijTwo summits Topology connection, repeat this step, until remaining number of vertex
Untill reaching predetermined amount or being available for collapse without qualified side, so as to obtain the control grid after collapse;
Step 4-5, is finely divided to the control grid after collapse, by solving following optimization method, control grid is carried out excellent
Change:
Wherein EFAnd E (v)L(v) it is respectively error energy and Laplce's energy term, parameter lambda is to adjust the power between them
Weight, in EF(v) in definition, vkTo control the summit after grid subdivision,For vkProjection on initial mesh, NsFor control
Vertex number after grid subdivision, 1~N of k valuess, αkExpression controls the linear of the summit in summit and subdivided meshes in grid
Syntagmatic, in EL(v) in definition, viTo control the apex coordinate of grid,For viLaplce's coordinate, NcFor control
The vertex number of grid,Represent to solve the v for make it that E (v) is minimum.
6. a kind of video vectorization method based on tetrahedral grid as claimed in claim 5, it is characterised in that step 5 is wrapped
Include:Original input video is sampled using the control grid after subdivision, following optimization method is solved with optimal control grid
Vertex color:
Wherein,Represent to solve the color value c, c for make it that E (c) is minimumkTo control the vertex color after grid subdivision,
For ckThe color up-sampled in original input video.
7. a kind of video vectorization method based on tetrahedral grid as claimed in claim 6, it is characterised in that step 6 is wrapped
Include:Then control grid subdivision after color is optimized scales it to target and differentiates to the density for being adapted to target resolution
The color value that each pixel in video, video is rendered to after rate is entered by the color value to tetrahedral four summits belonging to it
Row Tri linear interpolation is obtained.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510349260.4A CN104899889B (en) | 2015-06-23 | 2015-06-23 | A kind of video vectorization method based on tetrahedral grid |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510349260.4A CN104899889B (en) | 2015-06-23 | 2015-06-23 | A kind of video vectorization method based on tetrahedral grid |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104899889A CN104899889A (en) | 2015-09-09 |
CN104899889B true CN104899889B (en) | 2017-07-25 |
Family
ID=54032534
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510349260.4A Active CN104899889B (en) | 2015-06-23 | 2015-06-23 | A kind of video vectorization method based on tetrahedral grid |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104899889B (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109005411B (en) * | 2018-07-27 | 2021-11-30 | 广州中国科学院工业技术研究院 | Image compression method and electronic equipment |
CN111179414B (en) * | 2019-12-30 | 2020-09-25 | 中国电力企业联合会电力建设技术经济咨询中心 | Terrain LOD generation method |
CN111601181B (en) * | 2020-04-27 | 2022-04-29 | 北京首版科技有限公司 | Method and device for generating video fingerprint data |
CN112258655B (en) * | 2020-11-13 | 2023-08-08 | 河北地质大学 | Three-dimensional grid simplifying method applied to VR virtual bank |
CN117473655B (en) * | 2023-12-27 | 2024-03-15 | 中国人民解放军国防科技大学 | Aircraft simulation driving design method and device based on edge collapse grid optimization |
-
2015
- 2015-06-23 CN CN201510349260.4A patent/CN104899889B/en active Active
Non-Patent Citations (4)
Title |
---|
《A Study of Video Vectorization》;K Tsutsuguchi等;《Ite Technical Report》;20110613;第35卷(第23期);41-44 * |
《Video Vectorization between Two Keyframes》;N Mclean等;《Ite Technical Report》;20120604;第36卷(第21期);25-28 * |
《基于多级对象的图像矢量化研究》;赵锟;《中国博士学位论文全文数据库 信息科技辑》;20120715;第2012年卷(第07期);I138-136 * |
《基于梯度网格的图像矢量化》;蔡庆重;《中国优秀硕士学位论文全文数据库 信息科技辑》;20090715;第2009年卷(第07期);I138-881 * |
Also Published As
Publication number | Publication date |
---|---|
CN104899889A (en) | 2015-09-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104899889B (en) | A kind of video vectorization method based on tetrahedral grid | |
CN108681991A (en) | Based on the high dynamic range negative tone mapping method and system for generating confrontation network | |
CN104239855B (en) | Image style transfer synthesis method based on stroke synthesis | |
CN101303772A (en) | Method for modeling non-linear three-dimensional human face based on single sheet image | |
CN101916454A (en) | Method for reconstructing high-resolution human face based on grid deformation and continuous optimization | |
CN105678683A (en) | Two-dimensional storage method of three-dimensional model | |
CN108986221A (en) | A kind of three-dimensional face grid texture method lack of standardization approached based on template face | |
US20230306685A1 (en) | Image processing method, model training method, related apparatuses, and program product | |
CN103337085A (en) | Efficient portrait face distortion method | |
Chen et al. | Image vectorization with real-time thin-plate spline | |
Chai et al. | Roundness-preserving warping for aesthetic enhancement-based stereoscopic image editing | |
CN105160705B (en) | A kind of processing method based on d engine to mobile terminal 3 d image data | |
CN101795410A (en) | Texture compression and synthesis method with fine granularity and high compression rate | |
US20050024364A1 (en) | High speed display processing apparatus | |
CN106021228B (en) | A kind of method and system carrying out text analyzing using knowledge topographic map | |
CN108876870B (en) | Domain mapping GANs image coloring method considering texture complexity | |
CN115546455A (en) | Three-dimensional building model monomer method, device and storage medium | |
Hongying et al. | Image completion by a fast and adaptive exemplar-based image inpainting | |
CN115082597A (en) | Palette-based image recoloring method and system | |
Dai et al. | Automatic image vectorization using superpixels and random walkers | |
CN107784658A (en) | The tactile texture display method of regular two-dimensional coloured image | |
CN114882197B (en) | High-precision three-dimensional face reconstruction method based on graph neural network | |
Jia | Research on the application of computer aided technology in graphic design visual aesthetics | |
CN105957137B (en) | Three-dimensional colour model image processing method based on texture mapping | |
JP4055407B2 (en) | Image conversion apparatus, image display apparatus, and image transmission system, image conversion method, image transmission method, image conversion program, and image display program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |