CN107146287B - Two-dimensional projection image to threedimensional model mapping method - Google Patents
Two-dimensional projection image to threedimensional model mapping method Download PDFInfo
- Publication number
- CN107146287B CN107146287B CN201710172933.2A CN201710172933A CN107146287B CN 107146287 B CN107146287 B CN 107146287B CN 201710172933 A CN201710172933 A CN 201710172933A CN 107146287 B CN107146287 B CN 107146287B
- Authority
- CN
- China
- Prior art keywords
- threedimensional model
- bounding box
- axis
- positive
- negative direction
- 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
- G06T17/00—Three dimensional [3D] modelling, e.g. data description of 3D objects
- G06T17/30—Polynomial surface description
Landscapes
- Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Pure & Applied Mathematics (AREA)
- Mathematical Optimization (AREA)
- Mathematical Physics (AREA)
- Mathematical Analysis (AREA)
- Algebra (AREA)
- Computer Graphics (AREA)
- Geometry (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Processing Or Creating Images (AREA)
Abstract
The invention discloses the mapping methods of two-dimensional projection image to threedimensional model, comprising: step 1, obtains threedimensional model by spatial digitizer;Step 2, threedimensional model is pre-processed, obtains pretreated threedimensional model;Step 3, pretreated threedimensional model is normalized, obtains the bounding box of threedimensional model;Step 4, threedimensional model OBB bounding box is established;Step 5, contacting between two-dimensional projection image and threedimensional model is established;The present invention overcomes threedimensional model in the prior art and its projected image relatively independent disadvantages between the two, effectively establish connection between the two;And overcome threedimensional model and two-dimensional projection image has the problem of scalability simultaneously, solve the problems, such as pantography and threedimensional model scaling.
Description
Technical field
The invention belongs to threedimensional model correlative technology fields, are related to a kind of mapping side of two dimensional image corresponding three-dimensional model
Method.The present invention can will map directly to corresponding threedimensional model itself to the operation of two dimensional image.
Background technique
3-D geometric model has reproduced the shape information of object in real world from geometric angle.With 3D model modeling,
Digitlization, the progress of visualization technique, the research of 3-D geometric model have obtained more and more concerns, have set in industrial products
Under the drivings of application of aspects demand such as meter, video display amusement, e-commerce, historical relic's protection, urban planning, obtain unprecedented
Concern.Digital geometry information is considered as the 4th class Digital Media after digital audio, image and video.With digitlization
The development of production and consumption, generates more and more digital geometry information, there is an urgent need to be pocessed, analyze to these information
And identification, effectively to understand, to utilize, or even these information are recycled, further increases productivity.
Two-dimensional projection's method is common in the retrieval of threedimensional model, than in reciprocity application field.In three-dimensional model search, often
The feature of one threedimensional model is described with the two-dimensional projection image of different angle.In three-dimensional model search, people usually recognize
If being two threedimensional models multiple dimensioned, the two-dimensional projection of multi-angle possesses same or similar feature vector, then just
It is considered that the two threedimensional models are identical or similar.This method and thought are nowadays highly developed.When three-dimensional mould
When type changes, corresponding two-dimensional projection can also change, but the change for projecting obtained two dimensional image, but
Few relevant researchs.
The Box technology of threedimensional model is usually used in collision detection.The basic thought of bounding box method is using simple geometry
Body replaces complicated very strange solid, is first detected roughly to the bounding box of object, when bounding box intersects its
The solid of encirclement is possible to intersect;When bounding box is non-intersecting, the solid surrounded is centainly non-intersecting;It can arrange in this way
Except the solid and geometry position that can not largely intersect, to be quickly found out the geometry position of intersection.
Box technology is mainly utilized in the present invention and two-dimensional projection's method solves two-dimensional projection image to threedimensional model
Mapping problems.
Summary of the invention
The object of the present invention is to provide a kind of mapping methods of two-dimensional projection image to threedimensional model, solve the prior art
The problem of lacking connection between middle two-dimensional projection and threedimensional model.
The threedimensional model shadow casting technique of existing maturation is all simply to be thrown using various methods threedimensional model
Shadow, and to contacting between obtained two dimensional image and former threedimensional model is projected, lack concern.
This method propose it is a kind of relevant image operation is carried out in the two-dimensional projection image of threedimensional model, pass through some column
Matrixing, and then by the method for corresponding image operation projection to threedimensional model, effectively establish two dimensional image and three-dimensional mould
Connection between type establishes basis to be further simplified the relevant operation of threedimensional model.
The technical scheme adopted by the invention is that mapping method of the two-dimensional projection image to threedimensional model, which is characterized in that
The following steps are included:
Step 1, threedimensional model is obtained by spatial digitizer;
Step 2, threedimensional model is pre-processed, obtains pretreated threedimensional model;
Step 3, pretreated threedimensional model is normalized, obtains the bounding box of threedimensional model;
Step 4, using the center of the bounding box of threedimensional model as origin O, the vertical axis of the bounding box of threedimensional model is X-axis,
X direction is Y-axis, and the direction perpendicular to XOY plane is Z axis, establishes global coordinate system;
XOY plane is mobile to the positive and negative direction of Z axis respectively, until the bounding box of XOY plane and threedimensional model is tangent, obtain
To two faces of the bounding box on the positive and negative direction of Z axis;
XOZ plane is mobile to the positive and negative direction of Y-axis respectively, until the bounding box of XOZ plane and threedimensional model is tangent, obtain
To two faces of the bounding box on the positive and negative direction of Y-axis;
YOZ plane is mobile to the positive and negative direction of X-axis respectively, until the bounding box of YOZ plane and threedimensional model is tangent, obtain
To two faces of the bounding box on the positive and negative direction of X-axis;
Two faces of two faces, bounding box of the bounding box on the positive and negative direction of Z axis on the positive and negative direction of Y-axis, packet
Enclose six faces of two faces composition OBB bounding box of the box on the positive and negative direction of X-axis;
Step 5, by the projected image in six faces of OBB bounding box, the ratio between projected image and threedimensional model is obtained
Example coordinate;
Include:
Step 51, using any vertex of OBB bounding box as new coordinate origin O ', by the origin translation of global coordinate system
To new coordinate origin O ', bounding box coordinate system is obtained;
Step 52, the one side of optional OBB bounding box projects in the current bounding box face to encirclement as current bounding box face
XO ' the Y plane of box coordinate system, obtains projected image;
Step 53, an optional point M (x on projection imagesm,ym), Scale Translate (x is obtained by formula (2)k,yk):
In formula (2), W indicates that the pixel quantity in the X-direction of projected image, L indicate the pixel quantity in image Y-direction;
Step 54, it is optionally a little used as mark point on projection images, is reflected the mark point in projected image by formula (3)
It is incident upon threedimensional model;
Pi(xp,yp,zi)|xp=lx*xk,yp=ly*yk,0≤zi≤lz (3)
In formula (3), Pi(xp,yp,zi) it is all the points for meeting the Scale Translate of mark point in projected image;
lxFor length of the threedimensional model under global coordinate system in X-axis, lyIt is threedimensional model under global coordinate system in Y-axis
Length, lzFor length of the threedimensional model under global coordinate system on Z axis.
Further, the central point of the bounding box of the threedimensional model after being normalized by formula (1):
In formula (1), n be normalization after threedimensional model on triangle quantity, xi,yi,ziFor the top of i-th of triangle
Point coordinate, i=1,2 ..., n.
Further, carrying out pretreatment to threedimensional model described in step 2 includes denoising.
The beneficial effects of the invention are as follows
(1) mapping method of the present invention, overcome in the prior art both threedimensional model and its projected image it
Between relatively independent disadvantage, effectively establish connection between the two;
(2) mapping method adopted by the present invention, overcome threedimensional model and two-dimensional projection image has scalability simultaneously
The problem of, solve the problems, such as pantography and threedimensional model scaling.
Detailed description of the invention
Fig. 1 is flow chart of the invention;
Fig. 2 (a) is non-denoising model;It (b) is denoising model;
Fig. 3 is the threedimensional model after normalization;
Fig. 4 is OBB bounding box schematic diagram;
Fig. 5 is bounding box coordinate system schematic diagram;
Fig. 6 (a) is projected image;It (b) is the image after label;
Fig. 7 (a) is experimental result overall diagram;It (b) is experimental result partial enlarged view.
Specific embodiment
Below by drawings and examples, the invention will be further described.
The present invention propose it is a kind of relevant image operation is carried out in the two-dimensional projection image of threedimensional model, pass through some column
Matrixing, and then by the method for corresponding image operation projection to threedimensional model, effectively establish two dimensional image and three-dimensional mould
Connection between type establishes basis to be further simplified the relevant operation of threedimensional model.
Embodiment 1
The mapping method of two-dimensional projection image to threedimensional model is present embodiments provided, as shown in Figure 1, including following step
It is rapid:
Step 1, threedimensional model is obtained by spatial digitizer;
The present embodiment scans object using handheld three-dimensional laser scanner Handyscan3D, obtains three-dimensional model information;
Step 2, threedimensional model is pre-processed, obtains pretreated threedimensional model;
The threedimensional model of acquisition is denoised, such as Fig. 2 (a) and Fig. 2 (b).
Step 3, pretreated threedimensional model is normalized, obtains the bounding box of threedimensional model;Such as Fig. 3 institute
Show.
Assuming that vertex set is V, normal direction quantity set is N
Step 31, threedimensional model mass center is acquired
Just by the statistics of model vertices collection, the mean value for obtaining vertex on three directions is mass center for the calculating of mass center.
Step 32, the realization of translation invariance
The mass center of model can be realized to being moved to coincidence at coordinate origin for the realization of translation invariance.
Model after being moved at this time are as follows:
V1=V-C, N1=N
Step 33, the realization of rotational invariance
The realization of rotational invariance obtains spin matrix mainly by the vertex of statistical model, then applies to model
Add matrix rotation.
Influence matrix M is calculated first:
A therein be model meshes the gross area, m be model vertices quantity, then acquire M three characteristic values and
Feature vector can be obtained spin matrix RM according to the sequence assemblage characteristic vector to successively decrease, obtain then according to the size of its characteristic value
Model can be rotated after to this spin matrix, obtain vertex and vector set are as follows:
V2=RM*V1, N2=RM*N1
Step 34, scaling invariance is realized
The realization of scaling invariance is the distribution of the distance between vertex and the mass center for applying above-mentioned operation model by statistics
Relationship:
Wherein:
Sy, SzIt is similar.Zoom operations can be applied to model after obtaining scaled matrix:
V3=S*V2, N3=N2
After normalized, coordinate origin is the center of bounding box;
Step 4, using the center of the bounding box of threedimensional model as origin O, the vertical axis of the bounding box of threedimensional model is X-axis,
X direction is Y-axis, and the direction perpendicular to XOY plane is Z axis, establishes global coordinate system;
The central point of the bounding box of threedimensional model after being normalized by formula (1):
In formula (1), n be normalization after threedimensional model on triangle quantity, xi,yi,ziFor the top of i-th of triangle
Point coordinate, i=1,2 ..., n.
XOY plane is mobile to the positive and negative direction of Z axis respectively, until the bounding box of XOY plane and threedimensional model is tangent, obtain
To two faces of the bounding box on the positive and negative direction of Z axis;
XOZ plane is mobile to the positive and negative direction of Y-axis respectively, until the bounding box of XOZ plane and threedimensional model is tangent, obtain
To two faces of the bounding box on the positive and negative direction of Y-axis;
YOZ plane is mobile to the positive and negative direction of X-axis respectively, until the bounding box of YOZ plane and threedimensional model is tangent, obtain
To two faces of the bounding box on the positive and negative direction of X-axis;
Two faces of two faces, bounding box of the bounding box on the positive and negative direction of Z axis on the positive and negative direction of Y-axis, packet
Six faces of two faces composition OBB bounding box of the box on the positive and negative direction of X-axis are enclosed, as shown in Figure 4;
Step 5, by the projected image in six faces of OBB bounding box, the ratio between projected image and threedimensional model is obtained
Example coordinate;
Include:
Step 51, using any vertex of OBB bounding box as new coordinate origin O ', by the origin translation of global coordinate system
To new coordinate origin O ', bounding box coordinate system, such as Fig. 5 are obtained;
Step 52, the one side of optional OBB bounding box projects in the current bounding box face to encirclement as current bounding box face
XO ' the Y plane of box coordinate system, obtains projected image, such as Fig. 6 (a);
Step 53, an optional point M (x on projection imagesm,ym), Scale Translate (x is obtained by formula (2)k,yk):
In formula (2), W indicates that the pixel quantity in the X-direction of projected image, L indicate the pixel quantity in image Y-direction.
Step 54, it is optionally a little used as mark point on projection images, is reflected the mark point in projected image by formula (3)
It is incident upon threedimensional model;
Pi(xp,yp,zi)|xp=lx*xk,yp=ly*yk,0≤zi≤lz (3)
In formula (3), Pi(xp,yp,zi) it is all the points for meeting the Scale Translate of mark point in projected image;
lxFor length of the threedimensional model under global coordinate system in X-axis, lyIt is threedimensional model under global coordinate system in Y-axis
Length, lzFor length of the threedimensional model under global coordinate system on Z axis.
Claims (3)
1. two-dimensional projection image is to the mapping method of threedimensional model, which comprises the following steps:
Step 1, threedimensional model is obtained by spatial digitizer;
Step 2, threedimensional model is pre-processed, obtains pretreated threedimensional model;
Step 3, pretreated threedimensional model is normalized, obtains the bounding box of threedimensional model;
Step 4, using the center of the bounding box of threedimensional model as origin O, the vertical axis of the bounding box of threedimensional model is X-axis, horizontal axis
To for Y-axis, the direction perpendicular to XOY plane is Z axis, establishes global coordinate system;
XOY plane is mobile to the positive and negative direction of Z axis respectively, until the bounding box of XOY plane and threedimensional model is tangent, wrapped
Enclose two faces of the box on the positive and negative direction of Z axis;
XOZ plane is mobile to the positive and negative direction of Y-axis respectively, until the bounding box of XOZ plane and threedimensional model is tangent, wrapped
Enclose two faces of the box on the positive and negative direction of Y-axis;
YOZ plane is mobile to the positive and negative direction of X-axis respectively, until the bounding box of YOZ plane and threedimensional model is tangent, wrapped
Enclose two faces of the box on the positive and negative direction of X-axis;
Two faces, bounding box two face, bounding boxs on Y-axis positive and negative direction of the bounding box on the positive and negative direction of Z axis
Six faces of two faces composition OBB bounding box on the positive and negative direction of X-axis;
Step 5, by the projected image in six faces of OBB bounding box, the ratio obtained between projected image and threedimensional model is sat
Mark;
Include:
Step 51, using any vertex of OBB bounding box as new coordinate origin O ', by the origin translation of global coordinate system to new
Coordinate origin O ', obtain bounding box coordinate system;
Step 52, which is projected to bounding box and is sat as current bounding box face by the one side of optional OBB bounding box
XO ' the Y plane for marking system, obtains projected image;
Step 53, an optional point M (x on projection imagesm,ym), Scale Translate (x is obtained by formula (2)k,yk):
In formula (2), W indicates that the pixel quantity in the X-direction of projected image, L indicate the pixel number in the Y-direction of projected image
Amount;
Step 54, it is optionally a little used as mark point on projection images, is mapped to the mark point in projected image by formula (3)
Threedimensional model;
Pi(xp,yp,zi)|xp=lx*xk,yp=ly*yk,0≤zi≤lz (3)
In formula (3), Pi(xp,yp,zi) it is all the points for meeting the Scale Translate of mark point in projected image;
lxFor length of the threedimensional model under global coordinate system in X-axis, lyFor length of the threedimensional model under global coordinate system in Y-axis
Degree, lzFor length of the threedimensional model under global coordinate system on Z axis.
2. two-dimensional projection image as described in claim 1 is to the mapping method of threedimensional model, which is characterized in that pass through formula (1)
The central point of the bounding box of threedimensional model after being normalized:
In formula (1), n be normalization after threedimensional model on triangle quantity, xi,yi,ziIt is sat for i-th of vertex of a triangle
Mark, i=1,2 ..., n.
3. two-dimensional projection image as described in claim 1 is to the mapping method of threedimensional model, which is characterized in that institute in step 2
That states pre-process including denoising to threedimensional model.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710172933.2A CN107146287B (en) | 2017-03-22 | 2017-03-22 | Two-dimensional projection image to threedimensional model mapping method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710172933.2A CN107146287B (en) | 2017-03-22 | 2017-03-22 | Two-dimensional projection image to threedimensional model mapping method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107146287A CN107146287A (en) | 2017-09-08 |
CN107146287B true CN107146287B (en) | 2019-08-02 |
Family
ID=59783587
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710172933.2A Active CN107146287B (en) | 2017-03-22 | 2017-03-22 | Two-dimensional projection image to threedimensional model mapping method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107146287B (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108961785B (en) * | 2018-07-10 | 2020-10-02 | 杭州利艾智能科技有限公司 | System and method for adjusting traffic control signal |
CN109631799B (en) * | 2019-01-09 | 2021-03-26 | 浙江浙大万维科技有限公司 | Intelligent measuring and marking method |
CN110766808B (en) * | 2019-11-05 | 2020-03-27 | 北京智拓视界科技有限责任公司 | Method and device for processing face data and computer-readable storage medium |
CN113129423B (en) * | 2019-12-30 | 2023-08-11 | 百度在线网络技术(北京)有限公司 | Method and device for acquiring three-dimensional model of vehicle, electronic equipment and storage medium |
CN112540711B (en) * | 2020-11-30 | 2022-08-05 | 国机工业互联网研究院(河南)有限公司 | Control method, device and equipment for selecting three-dimensional space object at webpage end |
CN113112535B (en) * | 2021-06-15 | 2021-11-02 | 四川大学 | Scale point cloud registration method and device based on directed bounding box |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102254343A (en) * | 2011-07-01 | 2011-11-23 | 浙江理工大学 | Convex hull and OBB (Oriented Bounding Box)-based three-dimensional grid model framework extracting method |
CN103116904A (en) * | 2012-10-23 | 2013-05-22 | 北京航空航天大学深圳研究院 | Two-dimensional feature extraction system and two-dimensional feature extraction method of three-dimensional model |
CN103729877A (en) * | 2013-12-18 | 2014-04-16 | 珠海金山网络游戏科技有限公司 | Method and system for constructing directed bounding box of three-dimensional model |
CN106503347A (en) * | 2016-10-25 | 2017-03-15 | 福州大学 | One kind is based on AABB and the adaptive compound OBBs algorithms of OBB |
-
2017
- 2017-03-22 CN CN201710172933.2A patent/CN107146287B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102254343A (en) * | 2011-07-01 | 2011-11-23 | 浙江理工大学 | Convex hull and OBB (Oriented Bounding Box)-based three-dimensional grid model framework extracting method |
CN103116904A (en) * | 2012-10-23 | 2013-05-22 | 北京航空航天大学深圳研究院 | Two-dimensional feature extraction system and two-dimensional feature extraction method of three-dimensional model |
CN103729877A (en) * | 2013-12-18 | 2014-04-16 | 珠海金山网络游戏科技有限公司 | Method and system for constructing directed bounding box of three-dimensional model |
CN106503347A (en) * | 2016-10-25 | 2017-03-15 | 福州大学 | One kind is based on AABB and the adaptive compound OBBs algorithms of OBB |
Also Published As
Publication number | Publication date |
---|---|
CN107146287A (en) | 2017-09-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107146287B (en) | Two-dimensional projection image to threedimensional model mapping method | |
JP3840150B2 (en) | Image-based representation and rendering method for 3D objects and animated 3D objects | |
CN105678683B (en) | A kind of two-dimensional storage method of threedimensional model | |
JP4785880B2 (en) | System and method for 3D object recognition | |
CN103345771B (en) | A kind of Efficient image rendering intent based on modeling | |
CN110148169A (en) | A kind of vehicle target 3 D information obtaining method based on PTZ holder camera | |
CN109903382A (en) | The fusion method and device of point cloud data | |
Taubin et al. | 3d scanning for personal 3d printing: build your own desktop 3d scanner | |
Lin et al. | Vision system for fast 3-D model reconstruction | |
CN117372642A (en) | Three-dimensional modeling method and visualization system based on digital twin | |
Yu et al. | Multiperspective modeling, rendering, and imaging | |
CN108230442A (en) | A kind of shield tunnel three-dimensional emulation method | |
CN116363290A (en) | Texture map generation method for large-scale scene three-dimensional reconstruction | |
CN115631317B (en) | Tunnel lining ortho-image generation method and device, storage medium and terminal | |
CN102111562A (en) | Projection conversion method for three-dimensional model and device adopting same | |
CN113808243B (en) | Drawing method and device for deformable snowfield grid | |
CN102110298B (en) | Three-dimensional model projecting method in Virtual Studio System and device | |
Li et al. | OmniGS: Omnidirectional Gaussian Splatting for Fast Radiance Field Reconstruction using Omnidirectional Images | |
CN104036547B (en) | Method and device for three-dimensional brush to generate network module in real time based on Leap Motion control | |
CN114416764A (en) | Map updating method, device, equipment and storage medium | |
CN102110299A (en) | Method and device for projecting application distortion in three-dimensional model | |
Habib et al. | Integration of lidar and airborne imagery for realistic visualization of 3d urban environments | |
Meng et al. | Embedded GPU 3D panoramic viewing system based on virtual camera roaming 3D environment | |
Lu et al. | 3D Reconstruction of Grabbed Objects Using a Single Image Based on Palletizing Task | |
Rong et al. | A Method of Dynamic Traffic Scene Reconstruction Based on Roadside Lidar |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |