CN102831637A - Three-dimensional reconstruction method based on mobile device - Google Patents
Three-dimensional reconstruction method based on mobile device Download PDFInfo
- Publication number
- CN102831637A CN102831637A CN2012102244976A CN201210224497A CN102831637A CN 102831637 A CN102831637 A CN 102831637A CN 2012102244976 A CN2012102244976 A CN 2012102244976A CN 201210224497 A CN201210224497 A CN 201210224497A CN 102831637 A CN102831637 A CN 102831637A
- Authority
- CN
- China
- Prior art keywords
- value
- mobile device
- depth value
- white
- screen
- 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
Links
Abstract
The invention discloses a three-dimensional reconstruction method based on a mobile device. An three-dimensional reconstruction is applied to a cell phone mobile device with an Android system by adopting the luminosity three-dimensional technology; a screen with high brightness is converted into light sources of multiple different positions by adopting a programming mode; an object is shot by a camera of a cell phone in a dark environment so as to obtain images at each light source; subsequently, multiple images are analyzed and calculated through a luminosity three-dimensional algorithm so as to obtain depth value information of an object surface; and finally a model corresponding to the object is established according to the depth value information. The three-dimensional reconstruction method is applied to cell phone mobile devices and is a creation in three-dimensional reconstruction direction; establishing object models by adopting such mode has the advantages of low cost, rapid calculation speed, clear model and the like.
Description
Technical field
The present invention is applied on the mobile device, relates to a kind of three-dimensional rebuilding method.
Background technology
Three-dimensional reconstruction is an important directions of computer vision field as the main target of human vision research.It mainly is to adopt certain technological means to realize the shape modeling to three-dimensional body.Along with the promotion of the theory of vision computing of Marr, three-dimensional reconstruction has obtained breakthrough progress, has emerged many substantial algorithms and reconstruction mode, for example directly the method for measuring distance, rebuild the method etc. of the degree of depth indirectly.Wherein based on the three-dimensional reconstruction of two dimensional image; Because characteristics such as low cost, modeling is convenient, drafting is quick; Extensively praised highly use by people, wherein the most representative three kinds of methods are: based on the silhouettes line rebuild geometric model, adopt the stereoscopic vision method rebuild geometric model, based on the modeling method of zone coupling.
All the time, the technology of utilizing low cost equipment to obtain the 3D model of real-world object automatically all has very important meaning in practical application area.Nowadays the fast development of mobile phone mobile device is that hardware or software have all had qualitative leap, and this also makes three-dimensional reconstruction become a kind of possibility above being applied to.
Summary of the invention
The present invention has provided a kind of three-dimensional rebuilding method based on mobile device, is directed to the mobile phone mobile device with Android operating system.
Should may further comprise the steps based on the three-dimensional rebuilding method of mobile device:
The first step: the background of choosing light source, mobile phone screen is set to white according to the order of upper and lower, left and right, and other three positions corresponding when a position is set to white are black;
Second step: the N pictures { I of order toggle lights, shot object
j: j=1...N}, and each pictures all is at different lighting environment L
jUnder take, each pixel adopts following formula to confirm show white or black under the situation of the j pictures of current shooting on the screen so:
Wherein sign () value is-1 interval scale black, be 1 interval scale white, and the center of screen is (0; 0), coordinate x, y arranges based on this; Confirm that under the situation of taking first pictures, the left-half background of screen is a white, the right half part background is a black;
The 3rd step: adopt Lambertian scattering model computing object surface normal value;
3.1 specifying the resolution of every width of cloth image is M * N pixel, and brightness value is expressed as
I=(I
1, I
2, I
3), the light source direction that every width of cloth image is corresponding is:
S
1=(s
11,s
12,s
13)?S
2=(s
21,s
22,s
23)?S
3=(s
31,s
32,s
33)
Adopt the form of matrix to represent, definition
3.2 the brightness value to image carries out normalization, order
Wherein (i=1,2 ... M, j=1,2 ... N);
3.3 order
Wherein (i=1,2 ... M, j=1,2 ... N);
The 4th step: computing object case depth value, calculate corresponding depth value according to the 3rd body surface normal direction value that obtain of step;
4.1 each point on the body surface adopts the mode of three angle sections to make up, and sets variable T
kRepresent k tri patch;
4.2 at tri patch T
kIn, three summits that constitute it are respectively P
0=(x
0y
0z
0) P
1=(x
1y
1z
1) P
2=(x
2y
2z
2) and the corresponding normal direction value in each summit be N
1, N
2, N
3
4.3 the relation that exists between the position according to three summits of the normal direction value of each tri patch and it self is set up corresponding system of equations:
[N wherein
xN
yN
z]=(N
1+ 2N
2+ N
3)/4;
4.4 above-mentioned formula is converted into matrix representation, use matrix A to represent the coefficient of depth value z, use matrix B to represent the normal direction value and the coefficient value on the whole system of equations left side, the matrix equation group of formation is Z=(A
TA)
-1(A
TB);
4.5 the system of linear equations that adopts least square method to find the solution this overdetermination obtains final depth value.
The 5th step: adopt OpenGL ES shape library to draw out the model of object.
5.1 draw out number is the point of M * N, is the image of M * N corresponding to pixel;
Draw out a plane 5.2 adopt the GL10.GL_TRIANGLES instrument;
5.3 wherein a picture shot is attached to this above plane as texture;
5.4 based on the object surface depth value that the 4th step obtained, the point of correspondence is adjusted on reference axis Z, is formed final threedimensional model.
Beneficial effect of the present invention:
1. through the screen of mobile phone mobile device is divided, create out a plurality of light sources that satisfy condition;
2. adopt the photometric stereo technology, obtain the depth value information of body surface;
3. through drawing, obtain the corresponding 3D model of final object;
Description of drawings
Fig. 1 divides the mode that screen forms four Different Light;
The triangulation mode that adopts during Fig. 2 gauging surface depth value.
Embodiment
Below in conjunction with accompanying drawing the present invention is done further introduction.
The present invention has provided three-dimensional reconstruction has been applied to the method on the mobile phone mobile device, requires the condition that possesses:
1. dark environment;
2. the mobile phone mobile device that has Android operating system;
3. has preposition camera;
The flow process of entire method relates to theoretical algorithm and practical application, is divided into three parts: image taking, three-dimensional reconstruction algorithm, modeling rendering.
One, image taking
Choosing of light source: the present invention programmes on the Android of mobile phone mobile device operating system, through the brightness demonstration of control screen, reaches the purpose of a plurality of light sources.Concrete way is: the background of mobile phone screen is set to white according to the order of upper and lower, left and right, and corresponding other three positions are black, and when for example the left side was white, the background on top, bottom and the right then was a black.Like this, when maximum is transferred in the brightness of screen, background will provide levelling for the part of white, and the black part does not provide, and just can create out four light sources that the position is different, satisfies the needed shooting condition of photometric stereo algorithm.
The order of light source is switched:
We need the N pictures { I of shot object
j: j=1...N}, and each pictures all is at different lighting environment L
jTake down, each pixel adopts following formula to confirm show white or black under the situation of the j pictures of current shooting on the screen so:
-1 represents black, and 1 represents white, and the center of screen is (0,0), coordinate x, and y arranges according to this.For example when taking first pictures, x and y are positioned at the pixel on the screen left side, owing to return positive number, so the sign method can return 1, are white; And the pixel on the right is a negative owing to what return, so the sign method returns-1, is black.Through like this, just can confirm that under the situation of taking first pictures, the left-half background of screen is a white, the right half part background is a black.
Photographing program is realized:
Realize the function of the image of shot object under Different Light through the Camera interface of Android operating system:
Create light source:
Create up, down, left, four view of right,, on the layout of current background, be provided with simultaneously, they are presented on the screen position of appointment, for example the setting of up position as the screen portions of four appointments:
For each view,, in needs, be set to white through the method for correspondence:
left.setBackgroundColor(Color.WHITE)
Successively four view are set to white background, afterwards screen intensity are adjusted to the highlyest, just can serve as four different light sources with screen.
Realize shoot function:
At first create the Camera object, and the picture that camera is captured is as prospect preview:
mCamera=Camera.open(1)
mCamera.startPreview()
Follow the touch event of calling mobile phone screen, catch operation in real time screen:
onTouchEvent(MotionEvent?event)
Here, our appointment is when mobile phone screen is sensed pressing of finger, promptly to carry out the shooting to object:
case?MotionEvent.ACTION_DOWN
mCamera.takePicture(null,null,new?PictureCallbackListener())
Wherein the parameter PictureCallbackListener () that calls of takePicture aspect is the callback method of camera photographic images, through this method, can get access to camera and take the image that gets off, and this is handled.At last, we realize the concrete operations of PictureCallbackListener () callback method:
Transform into the Bitmap form through byte arrays, promptly become and take the subject image of taking memory image.
Two, three-dimensional reconstruction algorithm
The calculating of body surface normal direction value:
Adopt the Lambertian scattering model, concrete steps are following:
One, specifying the resolution of every width of cloth image is M * N pixel, and brightness value is expressed as
I=(I
1, I
2, I
3), the light source direction that every width of cloth image is corresponding is:
S
1=(s
11,s
12,s
13)?S
2=(s
21,s
22,s
23)?S
3=(s
31,s
32,s
33)
Adopt the form of matrix to represent, definition
Two, the brightness value to image carries out normalization, order
Wherein (i=1,2 ... M, j=1,2 ... N).
Three, order
Wherein (i=1,2 ... M, j=1,2 ... N).
The calculating of object surface depth value:
Under the situation that obtains the surface normal value, calculate corresponding depth value:
One, for each point on the body surface, adopts the mode of three angle sections to make up, set variable T
kRepresent k tri patch.
Two, at tri patch T
kIn, three summits that constitute it are respectively P
0=(x
0y
0z
0) P
1=(x
1y
1z
1) P
2=(x
2y
2z
2), and the corresponding normal direction value in each summit is N
1, N
2, N
3
Three, the relation that exists between the position according to three summits of the normal direction value of each tri patch and it self, set up corresponding system of equations:
[N wherein
xN
yN
z]=(N
1+ 2N
2+ N
3)/4
Four, above-mentioned formula is converted into matrix representation, uses matrix A to represent the coefficient of depth value z, use matrix B to represent the normal direction value and the coefficient value on the whole system of equations left side, the matrix equation group of formation is Z=(A
TA)
-1(A
TB).
Five, the system of linear equations that adopts least square method to find the solution this overdetermination obtains final depth value.
Three, modeling rendering
Adopt the OpenGL ES shape library of Android operating system lift-launch, draw out the model of object, concrete steps are following:
One, draws out the point that number is M * N (is the image of M * N corresponding to pixel);
Two, call the glDrawElements method, and the mode of specify drawing is GL10.GL_TRIANGLES, draws out a plane;
Three, wherein a picture shot is attached to this above plane as texture;
Four, the object surface depth value of coming out based on algorithm computation is adjusted the point of correspondence on reference axis Z, form final threedimensional model;
Claims (4)
1. based on the three-dimensional rebuilding method of mobile device, it is characterized in that, may further comprise the steps:
The first step: the background of choosing light source, mobile phone screen is set to white according to the order of upper and lower, left and right, and other three positions corresponding when a position is set to white are black;
Second step: the N pictures { I of order toggle lights, shot object
j: j=1...N}, and each pictures all is at different lighting environment L
jUnder take, each pixel adopts following formula to confirm show white or black under the situation of the j pictures of current shooting on the screen so:
Wherein sign () value is-1 interval scale black, be 1 interval scale white, and the center of screen is (0; 0), coordinate x, y arranges based on this; Confirm that under the situation of taking first pictures, the left-half background of screen is a white, the right half part background is a black;
The 3rd step: adopt Lambertian scattering model computing object surface normal value;
The 4th step: computing object case depth value, calculate corresponding depth value according to the 3rd body surface normal direction value that obtain of step;
The 5th step: adopt OpenGL ES shape library to draw out the model of object.
2. the three-dimensional rebuilding method based on mobile device as claimed in claim 1 is characterized in that, wherein computing object surface normal value adopts following method:
3.1 specifying the resolution of every width of cloth image is M * N pixel, and brightness value is expressed as
I=(I
1, I
2, I
3), the light source direction that every width of cloth image is corresponding is:
S
1=(s
11,s
12,s
13)?S
2=(s
21,s
22,s
23)?S
3=(s
31,s
32,s
33)
Adopt the form of matrix to represent, definition
3.2 the brightness value to image carries out normalization, order
I=1 wherein, 2 ... M, j=1,2 ... N;
3.3 order
I=1 wherein, 2 ... M, j=1,2 ... N.
3. according to claim 1 or claim 2 the three-dimensional rebuilding method based on mobile device is characterized in that wherein the compute depth value adopts following method:
4.1 each point on the body surface adopts the mode of three angle sections to make up, and sets variable T
kRepresent k tri patch;
4.2 at tri patch T
kIn, three summits that constitute it are respectively P
0=(x
0y
0z
0) P
1=(x
1y
1z
1) P
2=(x
2y
2z
2) and the corresponding normal direction value in each summit be N
1, N
2, N
3
4.3 the relation that exists between the position according to three summits of the normal direction value of each tri patch and it self is set up corresponding system of equations:
[N wherein
xN
yN
z]=(N
1+ 2N
2+ N
3)/4;
4.4 above-mentioned formula is converted into matrix representation, use matrix A to represent the coefficient of depth value z, use matrix B to represent the normal direction value and the coefficient value on the whole system of equations left side, the matrix equation group of formation is Z=(A
TA)
-1(A
TB);
4.5 the system of linear equations that adopts least square method to find the solution this overdetermination obtains final depth value.
4. according to claim 1 or claim 2 the three-dimensional rebuilding method based on mobile device is characterized in that, wherein draws object model and adopts following method:
5.1 draw out number is the point of M * N, is the image of M * N corresponding to pixel;
Draw out a plane 5.2 adopt the GL10.GL_TRIANGLES instrument;
5.3 wherein a picture shot is attached to this above plane as texture;
5.4 based on the object surface depth value that the 4th step obtained, the point of correspondence is adjusted on reference axis Z, is formed final threedimensional model.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210224497.6A CN102831637B (en) | 2012-06-28 | 2012-06-28 | Based on the three-dimensional rebuilding method of mobile device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210224497.6A CN102831637B (en) | 2012-06-28 | 2012-06-28 | Based on the three-dimensional rebuilding method of mobile device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102831637A true CN102831637A (en) | 2012-12-19 |
CN102831637B CN102831637B (en) | 2015-08-26 |
Family
ID=47334750
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210224497.6A Expired - Fee Related CN102831637B (en) | 2012-06-28 | 2012-06-28 | Based on the three-dimensional rebuilding method of mobile device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102831637B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2015024361A1 (en) * | 2013-08-20 | 2015-02-26 | 华为技术有限公司 | Three-dimensional reconstruction method and device, and mobile terminal |
WO2016089606A1 (en) * | 2014-12-04 | 2016-06-09 | Google Inc. | Three-dimensional shape capture using non-collinear display illumination |
CN110717494A (en) * | 2019-07-16 | 2020-01-21 | 北京航空航天大学青岛研究院 | Android mobile terminal indoor scene three-dimensional reconstruction and semantic segmentation method |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050286757A1 (en) * | 2004-06-28 | 2005-12-29 | Microsoft Corporation | Color segmentation-based stereo 3D reconstruction system and process |
CN102184565A (en) * | 2011-04-27 | 2011-09-14 | 深圳技师学院 | Non-grid three-dimensional reconstruction method for medical image |
CN102521586A (en) * | 2011-12-08 | 2012-06-27 | 中国科学院苏州纳米技术与纳米仿生研究所 | High-resolution three-dimensional face scanning method for camera phone |
-
2012
- 2012-06-28 CN CN201210224497.6A patent/CN102831637B/en not_active Expired - Fee Related
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050286757A1 (en) * | 2004-06-28 | 2005-12-29 | Microsoft Corporation | Color segmentation-based stereo 3D reconstruction system and process |
CN102184565A (en) * | 2011-04-27 | 2011-09-14 | 深圳技师学院 | Non-grid three-dimensional reconstruction method for medical image |
CN102521586A (en) * | 2011-12-08 | 2012-06-27 | 中国科学院苏州纳米技术与纳米仿生研究所 | High-resolution three-dimensional face scanning method for camera phone |
Non-Patent Citations (1)
Title |
---|
陈宇峰: "光度立体三维重建算法", 《计算机辅助设计与图形学学报》 * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2015024361A1 (en) * | 2013-08-20 | 2015-02-26 | 华为技术有限公司 | Three-dimensional reconstruction method and device, and mobile terminal |
WO2016089606A1 (en) * | 2014-12-04 | 2016-06-09 | Google Inc. | Three-dimensional shape capture using non-collinear display illumination |
CN110717494A (en) * | 2019-07-16 | 2020-01-21 | 北京航空航天大学青岛研究院 | Android mobile terminal indoor scene three-dimensional reconstruction and semantic segmentation method |
CN110717494B (en) * | 2019-07-16 | 2023-06-20 | 北京航空航天大学青岛研究院 | Android mobile terminal indoor scene three-dimensional reconstruction and semantic segmentation method |
Also Published As
Publication number | Publication date |
---|---|
CN102831637B (en) | 2015-08-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111062873B (en) | Parallax image splicing and visualization method based on multiple pairs of binocular cameras | |
CN104330074B (en) | Intelligent surveying and mapping platform and realizing method thereof | |
CN109003325B (en) | Three-dimensional reconstruction method, medium, device and computing equipment | |
CN107563088A (en) | A kind of light field display device emulation mode based on Ray Tracing Algorithm | |
CN111028155B (en) | Parallax image splicing method based on multiple pairs of binocular cameras | |
US20170124689A1 (en) | Image processing apparatus and image processing method | |
CN109035327B (en) | Panoramic camera attitude estimation method based on deep learning | |
CN109816784B (en) | Method and system for three-dimensional reconstruction of human body and medium | |
CN103838437A (en) | Touch positioning control method based on projection image | |
CN104809755A (en) | Single-image-based cultural relic three-dimensional reconstruction method | |
CN104463969B (en) | A kind of method for building up of the model of geographical photo to aviation tilt | |
CN106797458A (en) | The virtual change of real object | |
CN109242898B (en) | Three-dimensional modeling method and system based on image sequence | |
Lallensack et al. | Photogrammetry in ichnology: 3D model generation, visualisation, and data extraction | |
CN112651881B (en) | Image synthesizing method, apparatus, device, storage medium, and program product | |
CN108648194A (en) | Based on the segmentation of CAD model Three-dimensional target recognition and pose measuring method and device | |
CN104680532A (en) | Object labeling method and device | |
CN104732592A (en) | Real-time three-dimensional data generation method based on two-dimensional LED rotating screen | |
CN106500626A (en) | A kind of mobile phone stereoscopic imaging method and three-dimensional imaging mobile phone | |
JP2018045587A (en) | Image processing device, image processing method, and image processing program | |
TWM565860U (en) | Smart civil engineering information system | |
CN106023307A (en) | Three-dimensional model rapid reconstruction method and system based on field environment | |
CN108010122B (en) | Method and system for reconstructing and measuring three-dimensional model of human body | |
CN108257182A (en) | A kind of scaling method and device of three-dimensional camera module | |
CN102831637B (en) | Based on the three-dimensional rebuilding method of mobile device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20150826 Termination date: 20170628 |
|
CF01 | Termination of patent right due to non-payment of annual fee |