CN105139449B - A kind of threedimensional model compression method for segmenting and encoding based on three-dimensional grid - Google Patents

A kind of threedimensional model compression method for segmenting and encoding based on three-dimensional grid Download PDF

Info

Publication number
CN105139449B
CN105139449B CN201510524490.XA CN201510524490A CN105139449B CN 105139449 B CN105139449 B CN 105139449B CN 201510524490 A CN201510524490 A CN 201510524490A CN 105139449 B CN105139449 B CN 105139449B
Authority
CN
China
Prior art keywords
dimensional
bounding box
threedimensional model
axis
data
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
CN201510524490.XA
Other languages
Chinese (zh)
Other versions
CN105139449A (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.)
Shanghai hi-tech limited company
Original Assignee
Shanghai Hi-Tech Ltd Co
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 Shanghai Hi-Tech Ltd Co filed Critical Shanghai Hi-Tech Ltd Co
Priority to CN201510524490.XA priority Critical patent/CN105139449B/en
Publication of CN105139449A publication Critical patent/CN105139449A/en
Application granted granted Critical
Publication of CN105139449B publication Critical patent/CN105139449B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The present invention relates to computer graphical processing field, more particularly to a kind of threedimensional model compression method for segmenting and encoding based on three-dimensional grid, including:It is determined that the boundary parameter of axial bounding box;Calculate axial bounding box waits molecular group, according to etc. divide factor pair axial direction bounding box to carry out three-dimensional grid subdivision, and establish the unique index coding of subdivided meshes;Calculate the index coded data of the corresponding three-dimensional subdivided meshes in summit;Calculate the coordinate of each subdivided meshes origin;Offset of the threedimensional model apex coordinate relative to three-dimensional subdivided meshes origin is calculated, obtains the floating number precision of apex coordinate, and to offset integer;Data entropy code is carried out to data above, supplemental characteristic compression is carried out using the LZMA compression algorithms increased income.The present invention carries out the index coding of three-dimensional subdivided meshes by relevant parameter to threedimensional model summit and calculates corresponding offset, and offset space-consuming greatly reduces relative to former vertex coordinates data, improves compression ratio.

Description

A kind of threedimensional model compression method for segmenting and encoding based on three-dimensional grid
Technical field
The present invention relates to computer graphical processing field, more particularly to it is a kind of segment and encode based on three-dimensional grid three Dimension module compression method.
Background technology
With the development of computer graphics, the threedimensional model that is actually needed is increasing, becomes increasingly complex, threedimensional model Data volume sharply increases and produces large-scale threedimensional model.Meanwhile the fast development of mobile Internet, more and more moving There is strong three-dimensional use demand on dynamic terminal device.Under current mobile network bandwidth limited circumstances, extensive threedimensional model Huge data and limited network bandwidth resource between certain contradiction be present.Efficient pressure only is carried out to extensive threedimensional model Contracting is only possible to solve extensive threedimensional model using upper transmission bandwidth limitation to reduce the data volume of transmission.
Threedimensional model compression method mainly has connectivity compression and Geometric compression, is often both used in combination among reality. Connectivity compression master is the compression of the related information between the top points, edges, faces on threedimensional model, can currently reach certain compression effect Fruit, but the process amount of calculation of its compression and decompression is very huge, requires too high to hardware device.Geometric compression is primarily with regard to three The compression of the vertex position of dimension module and some association attributes parameters (such as color, texture coordinate, normal), but current geometry Compression method efficiency is not universal high, and extensive threedimensional model can not effectively compress at high proportion.
It is currently based on connectivity compression and the huge operational capability of topology information calculating needs is carried out to large-scale threedimensional model And storage capacity, it is that pressure energy power is conciliate in the compression that can not be provided required for it for limited mobile terminal device, it is difficult to moving Quickly run in the equipment such as dynamic terminal.And for threedimensional model vertex position and the geometric compressing method of other attributes, using normal The compression algorithms such as zip, lzma of rule, only data are compressed in itself, do not carried for the build-in attribute of threedimensional model Take, therefore compression ratio is limited.Therefore, if the space-consuming of three-dimensional modeling data can effectively be reduced, in mobile terminal The operation and maintenance of the three-dimensional software of upper operation, are all significant.
The content of the invention
The present invention is for the shortcomings of threedimensional model compression ratio is not high in the prior art, there is provided one kind is based on three-dimensional grid Subdivision and the threedimensional model compression method of coding.
In order to solve the above-mentioned technical problem, the present invention is addressed by following technical proposals:
A kind of threedimensional model compression method for being segmented and being encoded based on three-dimensional grid, comprises the following steps:Step 1, read The vertex coordinates data of threedimensional model, the x of opposite vertexes, y, z coordinate are compared one by one, calculate threedimensional model maximum and most Small apex coordinate;The boundary parameter of axial bounding box is determined by minimum and maximum apex coordinate, boundary parameter includes axially wrapping Enclose minimum and maximum position coordinates of the box in three-dimensional system of coordinate;
Step 2, axial bounding box is calculated according to the boundary parameter of axial bounding box in x, y, the length in z-axis, obtain The summit quantity of threedimensional model, according to the summit quantity of threedimensional model and axial bounding box in x, y, the length in z-axis, calculate Axial bounding box in x, y, wait molecular group in z-axis, three carried out according to the decile factor pair axial direction bounding box of axial bounding box Tie up grid subdivision, according to the length of axial bounding box, etc. molecular group three-dimensional subdivided meshes are established successively unique index coding;
Step 3, the vertex coordinates data to threedimensional model are preferentially ranked up by Z axis, are obtained the summit by sequence and are sat Mark, according to apex coordinate, the minimum position coordinate of axial bounding box, axial bounding box in x, y, the length of z-axis and axial bag Enclose box and calculate the index coded data of the corresponding three-dimensional subdivided meshes in summit in x, y, the grade molecular group of z-axis;
Step 4, the unique index of the three-dimensional subdivided meshes calculated according to step 2 encode, and obtain the minimum of axial bounding box Position coordinates, axial bounding box are in x, y, and the length and axial bounding box in z-axis wait molecular group in x, y, z-axis, calculate every The x of individual subdivided meshes origin, y, z coordinate, carry out intermediate storage and be used to calculate in next step;
Step 5, the index coded data according to the origins of three-dimensional subdivided meshes, the corresponding three-dimensional subdivided meshes in summit With the threedimensional model apex coordinate of acquisition, offset of the threedimensional model apex coordinate relative to three-dimensional subdivided meshes origin is calculated, The floating number precision on threedimensional model summit is obtained, and offset divided by floating number precision are subjected to integer, obtains integer skew Amount;
Step 6, molecular group, three-dimensional subdivision net are waited to the boundary parameter of axial bounding box, the x of axial bounding box, y, z-axis The unique index codings of lattice, the index coded data of threedimensional model vertex correspondence three-dimensional subdivided meshes, threedimensional model summit it is floating Precision of counting and threedimensional model summit carry out data entropy code relative to the integer shifts of three-dimensional subdivided meshes origin.
Preferably, data compression is carried out using the LZMA compression algorithms increased income to the data after step 6 entropy code.
Preferably, to the threedimensional model apex coordinate of step 5 relative to the integer shifts of three-dimensional subdivided meshes origin Carry out crossed series:Pressing x originally1,y1,z1…xn,yn,zn(n is integer) sequence vertex coordinates data series turn to by x1…xn(n is integer), y1…yn(n is integer), z1…zn(n is integer) is stored.
Preferably, carrying out entropy code to the integer shifts data of crossed series, compressed and calculated using the LZMA to increase income Method carries out data compression.
The present invention is as a result of above technical scheme, there is provided a kind of brand-new threedimensional model compression method, to three-dimensional Grid subdivision, threedimensional model summit is sat using coding and offset record data, offset space-consuming relative to former summit Mark data greatly reduce, and reduce space-consuming compared to decimal using integer storage, compression ratio are improved, using this compression side The software of method is more suitable for running and safeguarding on the mobile apparatus.
Brief description of the drawings
Fig. 1 is compression method flow chart of the present invention;
Embodiment
The present invention is described in further detail with embodiment below in conjunction with the accompanying drawings.
Embodiment 1
Specific compression process is as shown in figure 1, a kind of threedimensional model compression method for being segmented and being encoded based on three-dimensional grid, bag Include following steps:
Step 1, the vertex coordinates data for reading threedimensional model, the x of opposite vertexes, y, z coordinate are compared, calculated one by one The minimum and maximum apex coordinate of threedimensional model;The boundary parameter of axial bounding box is determined by minimum and maximum apex coordinate, Boundary parameter includes axial bounding box the minimum and maximum position coordinates in three-dimensional system of coordinate, and boundary parameter is stored, The scope of axial bounding box is confirmed by boundary parameter;OBBs algorithm is a kind of side for solving the optimal encircling space of discrete point set Method, basic thought are the simple solids of and characteristic slightly larger with volume (being referred to as bounding box) approx to replace complicated geometry pair As.
Step 2, axial bounding box is calculated according to the boundary parameter of axial bounding box in x, y, the length in z-axis, obtain The summit quantity of threedimensional model, according to the summit quantity of threedimensional model and axial bounding box in x, y, the length in z-axis, calculate Axial bounding box in x, y, wait molecular group in z-axis, three carried out according to the decile factor pair axial direction bounding box of axial bounding box Tie up grid subdivision, according to the length of axial bounding box, etc. molecular group three-dimensional subdivided meshes are established successively unique index coding, often Individual three-dimensional subdivided meshes have a unique index coding, to axial bounding box in x, y, length and decile in z-axis because The unique index coding of sub, three-dimensional subdivided meshes is stored, for using in next step.
Step 3, the vertex coordinates data to threedimensional model are preferentially ranked up by Z axis, are obtained the summit by sequence and are sat Mark, according to apex coordinate, the minimum position coordinate of axial bounding box, axial bounding box in x, y, the length of z-axis and axial bag Enclose box and calculate the index coded data of the corresponding three-dimensional subdivided meshes in summit in x, y, the grade molecular group of z-axis, such as:Sequence top The x-axis coordinate value of point subtracts the x-axis coordinate value of minimum position, obtains x-axis difference;The molecular group such as x-axis length divided by x-axis, obtains x The single Gridding length value of three-dimensional subdivided meshes on axle;Determine that sequence summit is relative according to x-axis difference and single Gridding length value The x-axis position of three-dimensional subdivided meshes is answered, by that analogy, it is determined that the y-axis of the sequence corresponding three-dimensional subdivided meshes in summit and z-axis position Put, with reference to x, y, z-axis position determines the unique index coding of which three-dimensional subdivided meshes of sequence vertex correspondence, record ordering summit The corresponding relation of corresponding three-dimensional subdivided meshes, that is, the index coded data for the vertex correspondence three-dimensional subdivided meshes that sort.
Step 4, the unique index of the three-dimensional subdivided meshes calculated according to step 2 encode, and obtain the minimum of axial bounding box Position coordinates, axial bounding box are in x, y, and the length and axial bounding box in z-axis wait molecular group in x, y, z-axis, calculate every The x of individual subdivided meshes origin, y, z coordinate, carry out intermediate storage and be used to calculate in next step;By axial bounding box in x, y, z-axis Length and wait molecular group to calculate single grid in x, y, the single Gridding length value in z-axis, according to minimum position coordinate and Unique index coding, single Gridding length value extrapolate the x of each subdivided meshes origin, y, z coordinate.
Step 5, the index coded data according to the origins of three-dimensional subdivided meshes, the corresponding three-dimensional subdivided meshes in summit With the threedimensional model apex coordinate of acquisition, offset of the threedimensional model apex coordinate relative to three-dimensional subdivided meshes origin is calculated, The floating number precision on threedimensional model summit is obtained, and offset divided by floating number precision are subjected to integer, obtains integer skew Amount, according to the index coded data of vertex correspondence three-dimensional subdivided meshes, by threedimensional model apex coordinate and corresponding three-dimensional subdivision Grid origin subtracts each other, and obtains offset of the apex coordinate relative to three-dimensional subdivided meshes origin;Obtain threedimensional model The floating number precision on summit, offset divided by floating number precision obtain integer shifts, and floating number is compared using integer shifts Offset is occupied little space, and integer shifts are stored, for using in next step.
Step 6, molecular group, three-dimensional subdivision net are waited to the boundary parameter of axial bounding box, the x of axial bounding box, y, z-axis The unique index codings of lattice, the index coded data of threedimensional model vertex correspondence three-dimensional subdivided meshes, threedimensional model summit it is floating Precision of counting and threedimensional model summit carry out data entropy code, entropy code relative to the integer shifts of three-dimensional subdivided meshes origin The coding of any information is not lost in cataloged procedure by Entropy principle.
Data compression is carried out using the LZMA compression algorithms increased income to the data after step 6 entropy code.
Intersection system is carried out relative to the integer shifts of three-dimensional subdivided meshes origin to the threedimensional model apex coordinate of step 5 Rowization:Pressing x originally1,y1,z1…xn,yn,znThe vertex coordinates data series of (n is integer) sequence is turned to by x1…xn(n is whole Number), y1…yn(n is integer), z1…zn(n is integer) is stored;Under coordinates data, possess the data more than identical numerical value With higher compression ratio, originally coordinate is x1,y1,z1…xn,yn,zn(n is integer), become using coordinate after crossed series Into x1…xn(n is integer), y1…yn(n is integer), z1…zn(n is integer), x1…xn,y1…yn,z1…znCompared to x1,y1, z1…xn,yn,zn(n is integer) possesses the numerical value more continuously repeated, has higher compression ratio, using this compression method Software be more suitable for running on the mobile apparatus.
Entropy code is carried out to the integer shifts data of crossed series, data are carried out using the LZMA compression algorithms increased income Compression.
In a word, the preferred embodiment of invention, all impartial changes made according to scope of the present invention patent be the foregoing is only Change and modify, should all belong to the covering scope of patent of the present invention.

Claims (4)

1. a kind of threedimensional model compression method for segmenting and encoding based on three-dimensional grid, it is characterised in that comprise the following steps:
Step 1, the vertex coordinates data for reading threedimensional model, the x of opposite vertexes, y, z coordinate are compared one by one, calculate three-dimensional The minimum and maximum apex coordinate of model;The boundary parameter of axial bounding box, border are determined by minimum and maximum apex coordinate Parameter includes axial bounding box the minimum and maximum position coordinates in three-dimensional system of coordinate;
Step 2, axial bounding box is calculated according to the boundary parameter of axial bounding box in x, y, the length in z-axis, obtain three-dimensional The summit quantity of model, according to the summit quantity of threedimensional model and axial bounding box in x, y, the length in z-axis, calculate axial direction Bounding box in x, y, wait molecular group in z-axis, three dimensional network carried out according to the decile factor pair axial direction bounding box of axial bounding box Lattice segment, and according to axial bounding box in x, y, length and axial bounding box in z-axis are in x, y, wait molecular group to establish only in z-axis One index coding;
Step 3, the vertex coordinates data to threedimensional model are preferentially ranked up by z-axis, obtain the apex coordinate by sequence, root According to apex coordinate, the minimum position coordinate of axial bounding box, axial bounding box in x, y, the length of z-axis and axial bounding box in x, Y, the grade molecular group of z-axis calculate the index coded data of the corresponding three-dimensional subdivided meshes in summit;
Step 4, the unique index of the three-dimensional subdivided meshes calculated according to step 2 encode, and obtain the minimum position of axial bounding box Coordinate, axial bounding box are in x, y, and the length and axial bounding box in z-axis wait molecular group in x, y, z-axis, calculate each thin The x of subnetting lattice origin, y, z coordinate, carry out intermediate storage and be used to calculate in next step;
Step 5, according to the origin of three-dimensional subdivided meshes, the index coded data of the corresponding three-dimensional subdivided meshes in summit and obtain The threedimensional model apex coordinate taken, offset of the threedimensional model apex coordinate relative to three-dimensional subdivided meshes origin is calculated, obtained The floating number precision on threedimensional model summit, and offset divided by floating number precision are subjected to integer, obtain integer shifts;
Step 6, to the boundary parameter of axial bounding box, the x of axial bounding box, y, z-axis waits molecular group, three-dimensional subdivided meshes Unique index coding, index coded data, the floating number on threedimensional model summit of threedimensional model vertex correspondence three-dimensional subdivided meshes Precision and threedimensional model summit carry out data entropy code relative to the integer shifts of three-dimensional subdivided meshes origin.
2. a kind of threedimensional model compression method for segmenting and encoding based on three-dimensional grid according to claim 1, its feature It is:Data compression is carried out using the LZMA compression algorithms increased income to the data after step 6 entropy code.
3. a kind of threedimensional model compression method for segmenting and encoding based on three-dimensional grid according to claim 1, its feature It is:Crossed series are carried out relative to the integer shifts of three-dimensional subdivided meshes origin to the threedimensional model apex coordinate of step 5 Change:Pressing x originally1,y1,z1…xn,yn,znThe vertex coordinates data series of (n is integer) sequence is turned to by x1…xn(n is whole Number), y1…yn(n is integer), z1…zn(n is integer) is stored.
4. a kind of threedimensional model compression method for segmenting and encoding based on three-dimensional grid according to claim 3, its feature It is:Entropy code is carried out to the integer shifts data of crossed series, data pressure is carried out using the LZMA compression algorithms increased income Contracting.
CN201510524490.XA 2015-08-24 2015-08-24 A kind of threedimensional model compression method for segmenting and encoding based on three-dimensional grid Active CN105139449B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510524490.XA CN105139449B (en) 2015-08-24 2015-08-24 A kind of threedimensional model compression method for segmenting and encoding based on three-dimensional grid

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510524490.XA CN105139449B (en) 2015-08-24 2015-08-24 A kind of threedimensional model compression method for segmenting and encoding based on three-dimensional grid

Publications (2)

Publication Number Publication Date
CN105139449A CN105139449A (en) 2015-12-09
CN105139449B true CN105139449B (en) 2018-03-20

Family

ID=54724781

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510524490.XA Active CN105139449B (en) 2015-08-24 2015-08-24 A kind of threedimensional model compression method for segmenting and encoding based on three-dimensional grid

Country Status (1)

Country Link
CN (1) CN105139449B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107341191B (en) * 2017-06-14 2020-10-09 童晓冲 Multi-scale integer coding method and device for three-dimensional space
CN107167261B (en) * 2017-06-14 2019-09-13 成都雅骏新能源汽车科技股份有限公司 A kind of temperature checking method and circuit based on thermistor
WO2019068259A1 (en) * 2017-10-02 2019-04-11 Huawei Technologies Co., Ltd. Point cloud coding
CN108022309B (en) * 2017-12-07 2019-05-21 梦工场珠宝企业管理有限公司 Threedimensional model intelligent connecting method
CN108111863A (en) * 2017-12-22 2018-06-01 洛阳中科信息产业研究院(中科院计算技术研究所洛阳分所) A kind of online real-time three-dimensional model video coding-decoding method
CN108846901A (en) * 2018-06-14 2018-11-20 宁波视睿迪光电有限公司 Model introduction method and device
CN110826122B (en) * 2019-10-12 2023-02-28 中广核工程有限公司 Voxel method and system for nuclear power three-dimensional layout design model
CN111046005B (en) * 2019-11-01 2023-09-01 宝略科技(浙江)有限公司 Gridding coding method for urban three-dimensional live-action data
CN112562062B (en) * 2020-12-01 2023-04-11 浙江中控信息产业股份有限公司 Automatic generation method of three-dimensional model of road intersection
CN112685616A (en) * 2020-12-22 2021-04-20 北京旋极伏羲科技有限公司 Precise power component management method based on space grid and building information model

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104167017A (en) * 2014-07-17 2014-11-26 广东电网公司教育培训评价中心 Method and system for realizing data compression of transformer substation three-dimensional model
US9111333B2 (en) * 2011-11-07 2015-08-18 Thomson Licensing Predictive position encoding

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101669873B1 (en) * 2009-10-16 2016-10-27 삼성전자주식회사 APPARATUS AND METHOD FOR coding three dimentional mesh

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9111333B2 (en) * 2011-11-07 2015-08-18 Thomson Licensing Predictive position encoding
CN104167017A (en) * 2014-07-17 2014-11-26 广东电网公司教育培训评价中心 Method and system for realizing data compression of transformer substation three-dimensional model

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Piecewise Regular Meshes: Construction;Andrzej Szymczak 等;《graphical models》;20021231;第64卷(第3期);第183-198页 *
大型三维网格模型的简化及基于视点的LOD控制;冯洁 等;《计算机辅助设计与图形学学报》;20060228;第18卷(第2期);第186-193页 *

Also Published As

Publication number Publication date
CN105139449A (en) 2015-12-09

Similar Documents

Publication Publication Date Title
CN105139449B (en) A kind of threedimensional model compression method for segmenting and encoding based on three-dimensional grid
EP2628145B1 (en) Triangle mesh compression
CN102577442B (en) Method and apparatus for encoding a mesh model, encoded mesh model, and method and apparatus for decoding a mesh model
CN102804230B (en) Use repeat patterns compression 3D grid
EP2697985B1 (en) Method for encoding a mesh model, encoded mesh model and method for decoding a mesh model
CN110691243A (en) Point cloud geometric compression method based on deep convolutional network
CN111260784B (en) Urban three-dimensional space grid compression coding method and device and terminal equipment
US20130182960A1 (en) Method and apparatus for encoding geometry patterns, and method for apparatus for decoding geometry patterns
EP2947630A1 (en) Method for compressing coordinate data
CN112836278A (en) Intelligent factory multi-source data fusion method and device based on BIM
CN110765298B (en) Tile coding method for decoupling geometric attributes of vector data
CN103731153B (en) Vectorizations algorithms is carried out the method and device of data compression by Computer Image Processing
CN115994849B (en) Three-dimensional digital watermark embedding and extracting method based on point cloud up-sampling
CN107093197B (en) Animation compression method based on local cylindrical coordinates
CN111522899B (en) Parallel compression method and device for high compression ratio of three-dimensional vector data
CN112070895A (en) High-quality real-time isosurface network generation method
CN103440673A (en) Etching surface evolution model compression method based on cellular automaton
AU2015264921B2 (en) Triangle mesh compression
Yang et al. Cluster-based three-dimensional non-uniform mesh simplification algorithm
Wu et al. A Fast Reconstruction Algorithm for Stereolithography File Topology Based on Hash Tables
CN116342821A (en) Terrain model-based data editing method, device, equipment and storage medium
CN117971837A (en) Method for constructing spatial index of live-action three-dimensional model
Hao et al. Mesh Connectivity Compression for Progressive-to-Lossless Transmission
CN115830260A (en) Elevation data processing method based on terrain, server and storage medium
CN111371461A (en) Original code and inverse code mixed data compression method suitable for intelligent electric meter

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20180123

Address after: 201803 Shanghai city Jiading District Huajiang 129 Lane Road No. 6 room J431

Applicant after: Shanghai hi-tech limited company

Address before: 201906 0172 room 0172, No. 848, Yao Jia village, Qing Cun town, Shanghai

Applicant before: SHANGHAI WEIGAO NETWORK TECHNOLOGY CO., LTD.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant