CN106340062A - Three-dimensional texture model file generating method and device - Google Patents

Three-dimensional texture model file generating method and device Download PDF

Info

Publication number
CN106340062A
CN106340062A CN201510400686.8A CN201510400686A CN106340062A CN 106340062 A CN106340062 A CN 106340062A CN 201510400686 A CN201510400686 A CN 201510400686A CN 106340062 A CN106340062 A CN 106340062A
Authority
CN
China
Prior art keywords
model
data block
photo
point
texture coordinate
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201510400686.8A
Other languages
Chinese (zh)
Other versions
CN106340062B (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.)
Changsha Venus Gram Information Technology Co Ltd
Original Assignee
Changsha Venus Gram Information 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 Changsha Venus Gram Information Technology Co Ltd filed Critical Changsha Venus Gram Information Technology Co Ltd
Priority to CN201510400686.8A priority Critical patent/CN106340062B/en
Publication of CN106340062A publication Critical patent/CN106340062A/en
Application granted granted Critical
Publication of CN106340062B publication Critical patent/CN106340062B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Generation (AREA)
  • Processing Or Creating Images (AREA)
  • Image Processing (AREA)

Abstract

The invention provides a three-dimensional texture model file generating method and device. The method comprises the steps that the vertex data of a geometric grid model are detected and acquired to generate a geometric point model data block; according to the geometric grid model and a photograph, the texture coordinate calculating is carried out on the geometric grid model vertex by vertex, so as to generate a texture coordinate model data block; vertex, height and width information of the photograph is detected and acquired, and the pixel data of the photograph are extracted line by line to generate a photograph data block; and according to the data block, the vertex index, the photograph index and the texture coordinate index of the geometric grid model are established, and a geometric grid model data block is generated. According to the invention, separate data blocks of the geometric grid model and the photograph of an existing object are generated and are integrated into the same file; and the problem that a texture model cannot be completely displayed due to the missing or damage of the photograph is solved when a file is loaded in the prior art.

Description

A kind of generation method of three-D grain model file and device
Technical field
The present invention relates to technical field of image processing, particularly relate to a kind of generation of three-D grain model file Method and apparatus.
Background technology
In recent years, the popularization of spatial digitizer makes to obtain body surface accurate point cloud one-tenth within a short period of time For possibility.Based on accurate point cloud model, can be utilized resurfacing techniques can obtain expression object first The Grid square of surface configuration, the colouring information that then can carry photo is by automatic or manual means It is mapped on Grid square, generate the texture model of vividly distinct point cloud color model or higher level.
The color on summit is simply rendered by point cloud color model, and its verity more depends on geometry The precision of grid model.And the three-D grain model of higher level is that real photo is mapped to geometry lattice In pessimistic concurrency control, its verity depends on the mapping accuracy of photo and model, and three-D grain model can be significantly The visual acuity of raising threedimensional model, and make up the deficiency of geometry grid model precision, therefore virtual existing In real application, there is important effect.The model format that 3D sculpting software common at present is supported has 3ds, wrl, ply, obj etc..These model format can support geometry grid model, you can to record top Point coordinates, Grid Index and vertex color etc..And for texture model, these forms need to believe photo Breath is attached in model file folder, and name of pictures is write in model file.If photo disappearance or damage Bad, geometric model will be only able to display.
Content of the invention
In view of this, it is an object of the invention to propose a kind of generation method of three-D grain model file and Device, the three-D grain model file of generation without having to worry about photo disappearance or damages problem.
A kind of generation method of the three-D grain model file being provided based on the above-mentioned purpose present invention, is applied to Default geometry grid model and photo, including step:
Detect and obtain the vertex data of described geometry grid model, generate geometric point model data block;
According to described geometry grid model and photo, by summit, texture is calculated to described geometry grid model Coordinate, generates texture coordinate model data block;
Detect and obtain described photo summit, highly, width information, and extract described photo line by line Pixel data, generates picture data block;
According to described geometric point model data block, set up the vertex index of described geometry grid model;According to Described picture data block, sets up the print reference of described geometry grid model;According to described texture coordinate mould Type data block, sets up the texture coordinate index of described geometry grid model;By described vertex index, photo Index, texture coordinate index generate geometry grid model data block.
Preferably, the step calculating texture coordinate further includes:
Described geometry grid model and photo are carried out alignment demarcate, show that described photo is several with respect to described The focal length of what grid model, principal point, position, sensing;
It is connected a straight line between a summit of described geometry grid model and camera photocentre;
Record the coordinate (i, j) of described straight line and photograph imaging plane intersection point;
According to equation below acquisition texture coordinate (u, v):
U=i/ (w-1)
V=(h-1-j)/(h-1)
Wherein, w is the width of described photograph, and h is the height of described photograph.
Preferably, further include be loaded into step:
It is loaded into described geometric point model data block and geometry grid model data block, according to described vertex data And vertex index, generate geometry grid model;
It is loaded into described picture data block, generate photo;
It is loaded into described texture coordinate model data block and geometry grid model data block, according to geometry grid mould The each vertex texture coordinate of type, described texture coordinate index, described print reference and described photo, by institute State photo to be mapped in described geometry grid model, generate three-D grain model.
Preferably, further include dynamic importing step:
Described photo is carried out n times compress, and carry out resampling, using as follows during resampling Formula recalculates photograph pixel:
gi,j=(1-dx) * (1-dy) * gi,j+dx*(1-dy)*gi+1,j+dx*dy*gi+1,j+1+(1-dx)*dy*gi,j+1
Wherein gi,jFor original pixels, gi,jFor the pixel after compression, gi+1,j, gi+1,j+1, gi,j+1For adjacent Three pixel coordinates, dx, dy are the decimal of the determinant in original photo for the Determinant Mapping after compression Part;
Photo after resampling is mapped in described geometry grid model, generates three-D grain model.
Preferably, further include automatic measurement step:
On cumulative described three-D grain model, all of grid area is as the surface of described three-D grain model Long-pending, and show;
All grid on the described three-D grain model successively projection in the plane of z=0 are generated more than one Prism, the volume of all polygon prisms that add up, as the volume of described three-D grain model, and shows.
Preferably, further include interactive measuring process:
Obtain the measured zone determined by selection operation that user passes through input on screen;
According to the transformational relation of screen and described texture model, described measured zone is worked back to described three-dimensional In texture model, obtain measurement point or survey grid;
According to described measurement point or survey grid, calculate and generate measurement result and show.
Preferably, when described measured zone be a point when, by described three-D grain model from this point As described measurement point, described measurement result is the coordinate of described measurement point near summit.
Preferably, when described measured zone is straight line, choose in described three-D grain model from this Two nearest summits of straight line two-end-point, as described measurement point, calculate the distance conduct between described measurement point Described measurement result.
Preferably, when described measured zone is a polygonal region, count in described three-D grain model Fall into grid in this polygonal region as described survey grid, the face of all described survey grids that add up Amass as described measurement result.
Present invention also offers a kind of generating means of three-D grain model file, comprising:
First generation module, for detecting and obtaining the vertex data of default geometry grid model, generates several What point model data block;
Second generation module, for according to described geometry grid model and photo, to described geometry grid mould Type calculates texture coordinate by summit, generates texture coordinate model data block;
3rd generation module, for detect and obtain default photo summit, highly, width information, and Extract the pixel data of described photo line by line, generate picture data block;
4th generation module, for according to described geometric point model data block, setting up described geometry grid mould The vertex index of type;According to described picture data block, set up the print reference of described geometry grid model; According to described texture coordinate model data block, set up the texture coordinate index of described geometry grid model;Will Described vertex index, print reference, texture coordinate index generate geometry grid model data block.
From the above it can be seen that the generation method of the three-D grain model file of present invention offer, lead to Cross and the geometry grid model of existing object and photo are generated single data block, be integrated into same In individual file, overcome the nothing in prior art when file is loaded into, causing because of photo disappearance or damage Method completely shows the problem of texture model;Meanwhile, support dynamic resolution compression, adapt to different configuration of Browsing apparatus, render frame per second height, no postpone, and can carry out automatic or interactive texture model measurement, Measurement result can easily show and derive.
Brief description
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below will be to reality The accompanying drawing applying required use in example or description of the prior art be briefly described it should be apparent that, below Accompanying drawing in description is only some embodiments of the present invention, for those of ordinary skill in the art, On the premise of not paying creative work, can also obtain other accompanying drawings according to these accompanying drawings.
Fig. 1 is the generation method flow chart of the three-D grain model file of the embodiment of the present invention;
Fig. 2 is the mapping calculation schematic diagram of texture coordinate in the embodiment of the present invention;
Fig. 3 is the corresponding schematic diagram of different resolution photo and geometry grid model in the embodiment of the present invention;
Fig. 4 is the texture model display effect of different resolution and on computers in the embodiment of the present invention Render frame per second schematic diagram;
Fig. 5 (a) is the display renderings of the measurement that automatic surface amasss in the embodiment of the present invention;
Fig. 5 (b) is the display renderings of the measurement of volume automatically in the embodiment of the present invention;
Fig. 6 (a) is the display renderings that in the embodiment of the present invention, point coordinates interactive quantity is surveyed;
Fig. 6 (b) is the display renderings that the distance interaction of embodiment of the present invention cathetus measures;
Fig. 6 (c) is the display renderings of rectangular area area interaction measurement in the embodiment of the present invention;
Fig. 6 (d) is the display renderings of polygonal region area interaction measurement in the embodiment of the present invention;
Fig. 7 is the structural representation of the three-D grain model file generating means of the embodiment of the present invention.
Specific embodiment
For making the object, technical solutions and advantages of the present invention become more apparent, below in conjunction with being embodied as Example, and referring to the drawings, the present invention is described in more detail.
Embodiments provide a kind of generation method of three-D grain model file, be applied to default Geometry grid model and photo, this geometry grid model and photo are two single files, the present embodiment Method pass through to extract described geometry grid model and picture data and generate different data blocks by its It is integrated into a file;With reference to Fig. 1, it is the generation side of the three-D grain model file of the embodiment of the present invention Method flow chart.
The generation method of described three-D grain model file, comprises the following steps:
S101: detect and obtain the vertex data of described geometry grid model, generate geometric point model data Block.
In this step, detect and obtain the vertex data of geometry grid model, vertex data generally comprises several The coordinate on what each summit of grid model, normal direction and colouring information.Geometric point model data block format is as follows Shown:
vvv x y z nx ny nz r g b
Output point labelling first, then exports the relevant information of single point coordinates, if having multiple in same a line Point, then line feed is exported.Wherein, vvv represents a labelling, is for geometry mould for indicating this row The output of the point of type.The three-dimensional coordinate of x, y, z representation space point, unit is by threedimensional model scanning device Determine to be generally millimeter or rice, the normal direction of nx, ny, nz representation space point, r, g, b representation space point Color.
S102: according to described geometry grid model and photo, described geometry grid model is counted by summit Calculate texture coordinate, generate texture coordinate model data block.
Texture coordinate model data block includes the texture coordinate (scope is between 0~1) on summit, and its form is such as Shown in lower:
vtt u v
Exporting texture coordinate labelling first, then exporting the data of single texture coordinate in same a line, if having Multiple coordinates, then line feed is exported.Wherein vvt represents texture coordinate labelling, for indicating this row is Output for texture coordinate.U, v represent the texture coordinate on summit.With reference to Fig. 2, it is texture coordinate Mapping calculation schematic diagram.
As preferred, the step calculating texture coordinate includes:
Described geometry grid model and photo are carried out alignment demarcate, show that described photo is several with respect to described The focal length of what grid model, principal point, position, sensing;
Specifically, focal length refers in the distance between moment camera photocentre and photo imaging plane, its Middle camera photocentre refers to the imaging center of camera, is a kind of intrinsic physical features of camera;Principal point refer to by Camera photocentre sets out perpendicular to photo imaging plane and an intersecting point coordinates;Position refers to moment Camera is with respect to the position of geometry grid model;Point to the line referring to that moment camera is concerned about with principal point Directional information with respect to geometry grid model.
It is connected in line between a certain summit in described geometry grid model and camera photocentre;
Record the coordinate (i, j) of described straight line and photograph imaging plane intersection point;
According to equation below acquisition texture coordinate (u, v):
U=i/ (w-1)
V=(h-1-j)/(h-1)
Wherein, w is the width of described photograph, and h is the height of described photograph.
For each summit of geometry grid model, all texture coordinate is obtained by said process.
S103: detect and obtain described photo summit, highly, width information, and extract described line by line The pixel data of photo, generates picture data block.
Picture data block have recorded photographic intelligence and Pixel Information.Its form is as follows:
imgno
left top right bottom cx cy
g0,0g0,1g0,2...g0,cx-3g0,cx-2g0,cx-1
g1,0g1,1g1,2...g1,cx-3g1,cx-2g1,cx-1
......................
......................
gcy-1,0gcy-1,1gcy-1,2...gcy-1,cx-3gcy-1,cx-2gcy-1,cx-1
Wherein, export the number of photo first, then export information header and the pixel data of single photo. Wherein, imgno represents the number of photo.The letter being every photos with the data in rectangle frame after line feed Breath is thrown and pixel data: left, top, right, bottom, cx, cy represent the upper left of photo respectively Angle x, y-coordinate, lower right corner x, y-coordinate, width, highly;g0,0g0,1g0,2...g0,cx-3 g0,cx-2g0,cx-1: represent the pixel data of every a line.Multiple pictures are by according to above-mentioned matrix form successively Arrangement.
S104: according to described geometric point model data block, set up the summit rope of described geometry grid model Draw;According to described picture data block, set up the print reference of described geometry grid model;According to described stricture of vagina Reason coordinate model data block, sets up the texture coordinate index of described geometry grid model;By described summit rope Draw, print reference, texture coordinate index generate geometry grid model data block.
Geometry grid model data block includes index, texture coordinate index and a print reference.Wherein, point Index refers to that three summits of grid come from which three point in vertex data block, such as 123 expression grid Three summits come from the 1st, the 2nd and the 3rd vertex data, these three point be linked to be triangle conduct One grid.Texture index refers to that the texture coordinate on three summits of grid comes from texture coordinate data block In any three points, the texture coordinate on three summits of such as 123 expression grid is respectively from the 1st, the 2 and the 3rd texture coordinate data.Print reference refers to the texture coordinate on three summits of grid at which Photo, such as 123 represent the texture coordinate on three summits of grid respectively the the 1st, the 2nd and the respectively On 3 photos.
The form of geometric point model data block is:
fff v1_idx v2_idx v3_idx vt1_idx vt2_idx vt3_idx img_idx
Export geometry grid model labelling first, then export point index, the stricture of vagina of single grid in same a line Reason coordinated indexing and photo so.If there being multiple grid, line feed is exported.Wherein fff represents geometry Grid model labelling, is applied to the output of geometry grid model data block for indicating this row. V1_idx, v2_idx, v3_idx represent index a little, and in the range from 1~n, n is vertex number. Vt1_idx, vt2_idx, vt3_idx represent the index of texture coordinate, and in the range from 1~n, n is texture coordinate number Mesh.Img_idx represents the index of photo, and in the range from 1~m, m is number of photos.
As preferred, choose the delaunay triangulation network in the present invention to represent grid model, it is by sky Between point be connected as triangle so that a kind of maximum technology in minimum angle in all trianglees, triangle phase Mutually adjoin and non-overlapping copies, in general, it is optimum topological relation model.
By above-mentioned steps, the geometric point model data block of generation, texture coordinate model data block, photo Data block and geometric point model data block constitutes three-D grain model file it is seen that the geometry of original preset The concrete data of grid model and photo all records in above-mentioned each data block, forms one integrated single File.
For the three-D grain model file generating by the method for the present embodiment, also include being loaded into step:
It is loaded into described geometric point model data block and geometry grid model data block, according to described vertex data And vertex index, generate geometry grid model;
It is loaded into described picture data block, generate photo;
It is loaded into described texture coordinate model data block and geometry grid model data block, according to geometry grid mould The each vertex texture coordinate of type, described texture coordinate index, described print reference and described photo, by institute State photo to be mapped in described geometry grid model, generate three-D grain model.
Be loaded into during, first according in three-D grain model file each data block record data, Geometry grid model and photo reduction are generated, then is carried out mapping process, to ultimately generate texture mould Type.
Further, in a preferred embodiment of the invention, also include dynamic importing step, that is, due to three Have recorded original photographic intelligence in dimension texture model file, can dynamically be sampled with life when being loaded into Become the three-D grain model of different resolution.Specifically, during the loading of three-D grain model file, If sampling ratio is n, that is, represent the compression that photo is carried out n times.Texture coordinate keeps constant, needs Resampling is carried out to the pixel data of photo, in order to ensure the loss rate of minimum, using bilinear interpolation Method recalculates photograph pixel, and computing formula is as follows:
gi,j=(1-dx) * (1-dy) * gi,j+dx*(1-dy)*gi+1,j+dx*dy*gi+1,j+1+(1-dx)*dy*gi,j+1
Wherein gi,jFor original pixels, gi,jFor the pixel after compression, gi+1,j, gi+1,j+1, gi,j+1For adjacent Three pixel coordinates, dx, dy are the decimal of the determinant in original photo for the Determinant Mapping after compression Part, even original photo Determinant coordinate are (346.82,159.05), then dx, dy are respectively 0.82 and 0.05.
Through said process, the photo after resampling is mapped in described geometry grid model, generates Three-D grain model.With reference to Fig. 3 and Fig. 4, Fig. 3 is different resolution photo and geometry grid model Corresponding schematic diagram, Fig. 4 be different resolution texture model display effect and on computers render frame Rate schematic diagram.In the diagram, each three-dimensional grid model from left to right, is followed successively by: original resolution, 2 times of resolution, frame per second=45, drop in frame per second=20, drop 3 times of resolution, frame per second=62,4 times of resolutions of fall 4 times of resolution, frame per second=104, drop in rate, frame per second=80.
In a preferred embodiment, on the three-D grain model being generated based on the method for the present invention, also include Automatic measurement step, that is, for the three-D grain model generating, calculates the measurement number that some of is commonly used automatically According to and display to the user that, including automatic surface amass and volume measurement.
The measurement process of surface area is:
On cumulative three-D grain model, all of grid area is as the surface area of three-D grain model, as follows Formula:
s t o t a l = σ i = 1 n s i
Wherein, stotalRepresent the surface area of three-D grain model, n is the total number of grid.
The measurement process of volume is:
All grid on the described three-D grain model successively projection in the plane of z=0 are generated more than one Prism, the volume of all polygon prisms that add up as the volume of described three-D grain model, such as following formula:
v t o t a l = σ i = 1 n v i
Wherein, vtotalRepresent the volume of three-D grain model, v is the volume of single prism, need just to divide Negative.Distinguishing positive and negative principle is: if the normal direction of grid is just all with z=0 plane phase, is otherwise negative.
Automatically, after calculating surface area and the volume of generation three-D grain model, shown to user by dialog box Show, specific example is with reference to Fig. 5 (a) and Fig. 5 (b).
In a preferred embodiment, on the three-D grain model being generated based on the method for the present invention, also include Interaction measuring process, that is, pass through to obtain the selection operation in input on screen for the user, to determine a survey Amount region;Further according to the transformational relation of screen and described texture model, described measured zone is worked back to institute State in three-D grain model, the particular content of this transformational relation is: the two dimensional surface that screen is chosen is sat Mark, is transformed in three-D grain model coordinate systems according to the proportionate relationship that three dimensional display engine provides first, Then according to the focus information that three dimensional display engine provides, two-dimensional plane coordinate is zoomed in and out, finally by three Apart from the nearest point of two-dimensional plane coordinate as the measured zone chosen in dimension texture model.
Change through above, obtain measurement point or survey grid;Described measurement point or survey grid are to survey Measure one or more summits on the three-D grain model obtained by above-mentioned correspondence for the region or grid.Tool Body includes: point measurement, air line distance measurement, region area measurement.
Point coordinates interaction measures:
Point coordinates interaction measures and refers to choose, with mouse, two-dimensional points obtaining on screen, according to screen with The transformational relation of three-D grain model, two-dimensional points on screen are worked back in three-D grain model, Find the point that summit in a nearest three-D grain model of selected point obtains as selection, and by its Three-dimensional coordinate (form is xyz) exports on screen, and display effect is with reference to Fig. 6 (a).
Air line distance interaction measures:
Direct election distance interaction measures and refers to choose, with mouse, a pair of the two-dimensional points obtaining on screen, according to screen With the transformational relation of three-D grain model, this pair of two-dimensional points is worked back to, in three-D grain model, find Summit in a pair of nearest three-D grain model of selected point, as the end points of straight line, calculates according to following formula 2 points of air line distance, and be shown on screen, display effect is with reference to Fig. 6 (b).
d = ( x 1 - x 2 ) 2 + ( y - y 2 ) 2 + ( z 1 - z 2 ) 2
Wherein, (x1y1z1),(x2y2z2) for two end points of straight line three-dimensional coordinate.D be straight line away from From.
Region area measures:
Region area interaction measurement refers to draw out a measured zone frame, this measurement on screen with mouse Regional frame can be the figure of rule, such as rectangle, circular or irregular polygonal region. According to the transformational relation of screen and three-D grain model, the region of measured zone frame is worked back to three-D grain In model, and count the grid dropping in this measured zone, the area of all grid that add up is as measurement The surface area in region, and be shown on screen, display effect is with reference to Fig. 6 (c) and Fig. 6 (d), difference Display renderings for the interaction measurement of rectangular area area and the display effect of polygonal region area interaction measurement Fruit is schemed.
The embodiment of the present invention additionally provides a kind of three-D grain model file generating means, with reference to Fig. 7, is The structural representation of the three-D grain model file generating means of the present embodiment.
Described three-D grain model file generating means include:
First generation module 701, for detecting and obtaining the vertex data of default geometry grid model, raw Become geometric point model data block;
Second generation module 702, for according to described geometry grid model and photo, to described geometry lattice Pessimistic concurrency control calculates texture coordinate by summit, generates texture coordinate model data block;
3rd generation module 703, for detect and obtain default photo summit, highly, width letter Breath, and extract the pixel data of described photo line by line, generate picture data block;
4th generation module 704, for according to described geometric point model data block, setting up described geometry lattice The vertex index of pessimistic concurrency control;According to described picture data block, set up the photo rope of described geometry grid model Draw;According to described texture coordinate model data block, set up the texture coordinate rope of described geometry grid model Draw;Described vertex index, print reference, texture coordinate index are generated geometry grid model data block.
Those of ordinary skill in the art are it is understood that the foregoing is only the specific embodiment of the present invention , be not limited to the present invention, all within the spirit and principles in the present invention, done any repair Change, equivalent, improvement etc., should be included within the scope of the present invention.

Claims (10)

1. a kind of generation method of three-D grain model file, is applied to default geometry grid model and photograph Piece is it is characterised in that include step:
Detect and obtain the vertex data of described geometry grid model, generate geometric point model data block;
According to described geometry grid model and photo, by summit, texture is calculated to described geometry grid model Coordinate, generates texture coordinate model data block;
Detect and obtain described photo summit, highly, width information, and extract described photo line by line Pixel data, generates picture data block;
According to described geometric point model data block, set up the vertex index of described geometry grid model;According to Described picture data block, sets up the print reference of described geometry grid model;According to described texture coordinate mould Type data block, sets up the texture coordinate index of described geometry grid model;By described vertex index, photo Index, texture coordinate index generate geometry grid model data block.
2. method according to claim 1 is it is characterised in that the step calculating texture coordinate enters one Step includes:
Described geometry grid model and photo are carried out alignment demarcate, show that described photo is several with respect to described The focal length of what grid model, principal point, position, sensing;
It is connected a straight line between a summit of described geometry grid model and camera photocentre;
Record the coordinate (i, j) of described straight line and photograph imaging plane intersection point;
According to equation below acquisition texture coordinate (u, v):
U=i/ (w-1)
V=(h-1-j)/(h-1)
Wherein, w is the width of described photograph, and h is the height of described photograph.
3. method according to claim 1 is it is characterised in that further include to be loaded into step:
It is loaded into described geometric point model data block and geometry grid model data block, according to described vertex data And vertex index, generate geometry grid model;
It is loaded into described picture data block, generate photo;
It is loaded into described texture coordinate model data block and geometry grid model data block, according to geometry grid mould The each vertex texture coordinate of type, described texture coordinate index, described print reference and described photo, by institute State photo to be mapped in described geometry grid model, generate three-D grain model.
4. method according to claim 3 is it is characterised in that further include that dynamic importing walks Rapid:
Described photo is carried out n times compress, and carry out resampling, using as follows during resampling Formula recalculates photograph pixel:
gi,j=(1-dx) * (1-dy) * gi,j+dx*(1-dy)*gi+1,j+dx*dy*gi+1,j+1+(1-dx)*dy*gi,j+1
Wherein gi,jFor original pixels, gi,jFor the pixel after compression, gi+1,j, gi+1,j+1, gi,j+1For adjacent Three pixel coordinates, dx, dy are the decimal of the determinant in original photo for the Determinant Mapping after compression Part;
Photo after resampling is mapped in described geometry grid model, generates three-D grain model.
5. the method according to claim 3 or 4 is it is characterised in that further include automatic measurement Step:
On cumulative described three-D grain model, all of grid area is as the surface of described three-D grain model Long-pending, and show;
All grid on the described three-D grain model successively projection in the plane of z=0 are generated more than one Prism, the volume of all polygon prisms that add up, as the volume of described three-D grain model, and shows.
6. method according to claim 1 is it is characterised in that further include interaction measurement step Rapid:
Obtain the measured zone determined by selection operation that user passes through input on screen;
According to the transformational relation of screen and described texture model, described measured zone is worked back to described three-dimensional In texture model, obtain measurement point or survey grid;
According to described measurement point or survey grid, calculate and generate measurement result and show.
7. method according to claim 6 is it is characterised in that working as described measured zone is a point When, using in described three-D grain model from the nearest summit of this point as described measurement point, described measurement knot Fruit is the coordinate of described measurement point.
8. method according to claim 6 is it is characterised in that work as described measured zone for one directly During line, choose in described three-D grain model from two nearest summits of this straight line two-end-point as described survey Amount point, the distance between the described measurement point of calculating is as described measurement result.
9. method according to claim 6 is it is characterised in that when described measured zone is one polygon During shape region, count the grid falling in this polygonal region in described three-D grain model as described survey Amount grid, the area of all described survey grids that add up is as described measurement result.
10. a kind of generating means of three-D grain model file are it is characterised in that include:
First generation module, for detecting and obtaining the vertex data of default geometry grid model, generates several What point model data block;
Second generation module, for according to described geometry grid model and photo, to described geometry grid mould Type calculates texture coordinate by summit, generates texture coordinate model data block;
3rd generation module, for detect and obtain default photo summit, highly, width information, and Extract the pixel data of described photo line by line, generate picture data block;
4th generation module, for according to described geometric point model data block, setting up described geometry grid mould The vertex index of type;According to described picture data block, set up the print reference of described geometry grid model; According to described texture coordinate model data block, set up the texture coordinate index of described geometry grid model;Will Described vertex index, print reference, texture coordinate index generate geometry grid model data block.
CN201510400686.8A 2015-07-09 2015-07-09 A kind of generation method and device of three-D grain model file Active CN106340062B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510400686.8A CN106340062B (en) 2015-07-09 2015-07-09 A kind of generation method and device of three-D grain model file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510400686.8A CN106340062B (en) 2015-07-09 2015-07-09 A kind of generation method and device of three-D grain model file

Publications (2)

Publication Number Publication Date
CN106340062A true CN106340062A (en) 2017-01-18
CN106340062B CN106340062B (en) 2019-05-17

Family

ID=57825861

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510400686.8A Active CN106340062B (en) 2015-07-09 2015-07-09 A kind of generation method and device of three-D grain model file

Country Status (1)

Country Link
CN (1) CN106340062B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109189725A (en) * 2018-07-23 2019-01-11 广州都市圈网络科技有限公司 The obj file lossless compression method of rule-oriented building
CN109712223A (en) * 2017-10-26 2019-05-03 北京大学 A kind of threedimensional model automatic colouring method based on textures synthesis
CN110120088A (en) * 2019-03-29 2019-08-13 武汉方拓数字科技有限公司 A kind of synthetic method of textured structure three-dimensional model

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1514300A (en) * 2002-12-31 2004-07-21 �廪��ѧ Method of multi viewing angle x-ray stereo imaging and system
US20110181589A1 (en) * 2010-01-28 2011-07-28 The Hong Kong University Of Science And Technology Image-based procedural remodeling of buildings
CN102637304A (en) * 2012-03-15 2012-08-15 中国科学院软件研究所 Method for synthesizing isotropic/anisotropic texture on geometric surface based on GPU (Graphics Processing Unit)
WO2015000108A1 (en) * 2013-07-01 2015-01-08 Mediatek Singapore Pte. Ltd. An improved texture merging candidate in 3dvc
CN104637089A (en) * 2015-02-15 2015-05-20 腾讯科技(深圳)有限公司 Three-dimensional model data processing method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1514300A (en) * 2002-12-31 2004-07-21 �廪��ѧ Method of multi viewing angle x-ray stereo imaging and system
US20110181589A1 (en) * 2010-01-28 2011-07-28 The Hong Kong University Of Science And Technology Image-based procedural remodeling of buildings
CN102637304A (en) * 2012-03-15 2012-08-15 中国科学院软件研究所 Method for synthesizing isotropic/anisotropic texture on geometric surface based on GPU (Graphics Processing Unit)
WO2015000108A1 (en) * 2013-07-01 2015-01-08 Mediatek Singapore Pte. Ltd. An improved texture merging candidate in 3dvc
CN104637089A (en) * 2015-02-15 2015-05-20 腾讯科技(深圳)有限公司 Three-dimensional model data processing method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
赵龙等: "一种粗精度三维模型的生成与快速显示方法", 《计算机应用研究》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109712223A (en) * 2017-10-26 2019-05-03 北京大学 A kind of threedimensional model automatic colouring method based on textures synthesis
CN109712223B (en) * 2017-10-26 2020-11-03 北京大学 Three-dimensional model automatic coloring method based on texture synthesis
CN109189725A (en) * 2018-07-23 2019-01-11 广州都市圈网络科技有限公司 The obj file lossless compression method of rule-oriented building
CN109189725B (en) * 2018-07-23 2020-09-18 广州都市圈网络科技有限公司 Regular building oriented OBJ file lossless compression method
CN110120088A (en) * 2019-03-29 2019-08-13 武汉方拓数字科技有限公司 A kind of synthetic method of textured structure three-dimensional model

Also Published As

Publication number Publication date
CN106340062B (en) 2019-05-17

Similar Documents

Publication Publication Date Title
CN108537834B (en) Volume measurement method and system based on depth image and depth camera
CN204730814U (en) A kind of parts passer based on line laser three-dimensional measurement
CN104809755B (en) Three-dimensional rebuilding method based on single image cultural relic ruins
CN103207987B (en) A kind of registration recognition methods of pointer instrument
CN103559735B (en) A kind of three-dimensional rebuilding method and system
CN103322911B (en) A kind of purpose-built elevation drawing mapping method based on image
CN108805936A (en) Join scaling method, device and electronic equipment outside video camera
CN106683068A (en) Three-dimensional digital image acquisition method and equipment thereof
CN109544623A (en) The measurement method and device in vehicle damage region
CN102136140B (en) Rectangular pattern-based video image distance detecting method
Lallensack et al. Photogrammetry in ichnology: 3D model generation, visualisation, and data extraction
CN102289823B (en) Method and device for obtaining area of graph on display device
CN107481291B (en) Traffic monitoring model calibration method and system based on physical coordinates of marked dotted lines
CN109827526A (en) One kind being based on photogrammetric planar smoothness detection method and its flow chart of data processing
CN112254633B (en) Object size measuring method, device and equipment
CN106097433A (en) Object industry and the stacking method of Image model and system
CN107895048A (en) It is a kind of that drawing method is quickly gone out based on outdoor scene three-dimensional
TW201504991A (en) System and method of points cloud section measure
CN109029250A (en) A kind of method, apparatus and equipment based on three-dimensional camera detection package dimensions
CN111623942A (en) Displacement measurement method for test structure model of unidirectional vibration table
CN106340062A (en) Three-dimensional texture model file generating method and device
CN103955316A (en) Fingertip touch detection system and method
CN109373893A (en) A kind of method and storage equipment of calculating object package size
CN104835197A (en) Three-dimensional body temperature measurement device and data processing method
JP3950376B2 (en) Shape model generation method and apparatus from three-dimensional point group, shape model generation program from three-dimensional point group, and recording medium recording the 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