100% found this document useful (1 vote)
665 views41 pages

เอกสารโครงการการขึ้นรูปโครงสร้าง 3 มิติ โดยใช้ภาพถ่าย 2 มิติ

This project report describes the process of 3D modeling using 2D perspective photography. The report is divided into 6 sections. Section 1 introduces the background and objectives of the project. Section 2 discusses existing 3D reconstruction techniques such as laser scanning and photogrammetry. Section 3 explains the process of image acquisition and 3D reconstruction. Section 4 presents the results of the 3D modeling. Section 5 discusses the implementation and results. Section 6 concludes the report and discusses future work. The project aims to develop a technique for building 3D models of complex objects using multiple photographs as input.

Uploaded by

Know2Pro
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
665 views41 pages

เอกสารโครงการการขึ้นรูปโครงสร้าง 3 มิติ โดยใช้ภาพถ่าย 2 มิติ

This project report describes the process of 3D modeling using 2D perspective photography. The report is divided into 6 sections. Section 1 introduces the background and objectives of the project. Section 2 discusses existing 3D reconstruction techniques such as laser scanning and photogrammetry. Section 3 explains the process of image acquisition and 3D reconstruction. Section 4 presents the results of the 3D modeling. Section 5 discusses the implementation and results. Section 6 concludes the report and discusses future work. The project aims to develop a technique for building 3D models of complex objects using multiple photographs as input.

Uploaded by

Know2Pro
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 41

ก

  COE2006-16



ก
  3 
 2 



ก !"#
 
$% 463040511-3
)$ก$* "+))$  
$% 463040513-9

-. "/ก$ก01ก2$."34- 4 51 % "/%67


18

$ก%9707ก 0% $:;

<72707ก  7 


:=707ก 0%
74 $>ก6
Project Report No. COE2006-16

Title

3D Modeling using 2D Perspective Photography

By

Mr. Kittiphong Bubphahom I.D. 463040511-3


Mr. Chakrapan Pajjaitre I.D. 463040513-9

This is the report of fourth year project assignment submitted in partial


fulfillment of the requirement for the Degree of Bachelor of Engineering

Department of Computer Engineering


Faculty of Engineering Khon Kaen University


ก
  3 
 2 

 ก !"#


 
$% 463040511-3
)$ก$* "+))$  
$% 463040513-9

123456 ก7
 ก

....................................................
. . 7<$ .$

12389 :;
 ก

1. bbbbbbbbbbbbbb
. .74 %!7:7%9

2. bbbbbbbbbbbbbb
#0. .:-
 -

"= :# : 7$4- 12 ก! <$* 2550



<4 =1

ก%c$7> 3 <d64$0  "/ก01ก$eก= 7ก1.9"$7> 3 


)ก<d6 
 ! 7$ d! 82c7 9c Digital Image Processing c  4  3D
Reconstruction f<d6 : ! 6g 7$d! 4fกf7:
6ก$4 :
.#77$d! > c7%c "/$7> 3 7$d!1.
4ก%c$7> 3 > =>  2$4-$e1.hc )=% dfh"82c8ก1.9"$7
> 7$ d! 4- -  7 5$ 5c   7 d1  $  41 ก = - 7$  d! -  7 %f $ i 4"=7$  0 %
740%
ก>4 82c01ก
c6h"8hc

Abstract

3D Modeling using 2D Perspective Photography is a study and development of 3D


modeling process from sequence of images by use of Digital Image Processing technique,
called 3D Reconstruction. First taking multiple-view images around an object, 3D
Reconstruction process is the further step to be performed in order to indicate position or point
of object in 3D simulation system. Then smoothing and surfacing algorithm will finally be applied
for building 3D Model.
The improved technique and application can be used for building 3D models of
historically important ancient or morphological complex object. And can be applied for widely
used such as medical simulation, education, science model and so on.

<=@

4$6 ก
Abstract 
% $i 
% $i9"< )
% $i 
44- 1 4f 1
1.1
$กก> =
!# 1
1.2 7$d!"=%ก 1
1.3  ก 1
1.4 >#กf  2
1.5 # 4-76)=hc$ 2
44- 2 4no-> =7)$4- ก-7c 3
2.1 4no-> =
$กก .c 3
2.1.1 Laser Scan 3
2.1.1 Photogrammetry 4
2.2.7)$4- ก-7c 5
44- 3 กก> > =%c$7> 3  9
3.1 ก)$กd6<
 ! 7$d! 10
3.2 กf7:ก$7$d! 2 3  14
3.3 ก 2 )!ก$ 8
c "/$7> 3 7$d! 14
44- 4 ก$e">ก > =!"ก: 15
4.1. ก4f">ก 15
4.2. ก82c">ก 17
44- 5 $76ก4f">ก 18
5.1 กd6<
 ! 7$d! 18
5.2 ก>%$7> 3  19
44- 6 4%!"> =c %>= 21
6.1. 4%!"กf  21
6.2. "+i
4- 8กf  21

6.3. c %>= 22
6.4. >748ก"=!ก> =$e6h" 22
<#7ก 23
:!ก 28
)
<=@

<4- 2.1 ก4f3D Reconstruction 82c7*- Laser Scan 3


<4- 2.2 7 %$ $*==ก$ 4
<4- 2.3 ก82c
$กก7 %$ $* 3
-  c 5
<4- 2.4 ก4f 3D Reconstruction 7*- Photogrammetry 6
<4- 2.5 4-ก ก7  7: $7> 3  4- ก)ก7*- Laser Scan 6
<4- 2.6 ก82c9"> >%4-6ก$ %c
$%8
c7$d! 7
<4- 2.7 (a)<5c (b)<7 (c) %674->ก6< (Dispairity)
> = (d) >#4-7 1ก7$d! (Depth Map) 7
<4- 3.1 $.ก%c$7> 3  9
<4- 3.2 = ก4f!"ก: 10
<4- 3.3 กd6<
 ! 7$d! 11
<4- 3.4 ก c Logitech Webcam !6 QuickCam Pro 4000 11
<4- 3.5 % x" "   Sanyo denki !6 step syn 12
<4- 3.6 h 4  AT89S52 12
<4- 3.7 ก82c4$. 40 h 4  13
<4- 3.8 กf7:
ก$7$d! 15
<4- 3.9 กf7:ก$8%677 %97$d! 16
<4- 4.1 >#<>%ก4f= 17
<4- 4.2 y
!7$d! 18
<4- 4.3 ">ก %f
$ d6<> =
!7$d! 19
<4- 4.4 ="<9  3 %f
$ >%$7> 3  20
<4- 4.5 ">ก 8%67กd6<7$d! 21
<4- 4.6 ">ก 8%67ก%c$7> 3  21
<4- 5.1  กd6<7$d! 22
<4- 5.2 ">ก d6<7$d!
$)กก Start Capture 23
<4- 5.3 $7> 3 4-hc)ก7$d! 23
<4- 6.1 c)fก$7$d!4-% d%c> )f hc 24
<4- #.1 7)%f
$ ">ก h 4  26
z
<4- #.2 ก6)$ " cก$ $.76 DB25 27
<4- #.3 ก h{ ">ก 27
<4- #.4 HEX h{ 4-hc 27
<4- #.5 ก "~ HEX h{  4-)=">ก h 4  28
<4- #.6 ก HEX h{ 4-hc h h7c 28
<4- #.7 7)%f
$ 6 7 > =h 4  29
<4- #.8 ก6)$ " cก$ $.76 DB9 30
<4- #.9 7))6h{8
cก$ % x" "   30
2
<=@

4- 1.1 == 7 > =>#กf  2


1
<4456 1
<4B

1.1 DE=กกFE:;DG8E
8ก1.9"$7> 3  (3D Modeling) 7$d!) 82c 7 $.4$7h" #9c4fก
1.9")=c4fก"= :
7$7$d!ก682c!"ก:7$ 26 h c 4$
 7 - "/c
> c7)1f64-hc %c "/%c 3  82c">ก 3 %f x)9" ( 26 3D MAX Maya

Lightwave "/c) %f
$ 7$d!4- -7 5$ 5c -7 c 51h 64 % ก7 c$. ก
7$c7 )4f8
c ก7    8ก1.9"hc -ก4$.ก1.9"82c$77$ 2ก 7$
7$d!)  4-82c7$)= -> ก h 6
=ก$ %d01ก

674- - "= :)fก$
:=#9c)$4f)1hc ->78ก01ก$e 4ก1.9"$7> 3  82c<d6 2

 !  7$d! > c782c7 9cc Digital Image Processing 8  3D Reconstruction
%c$7> 3 1. 8
c% d4fก1.9"7$d!4- -9"65$ 5c hc6%=7ก> 6f ก
1. > = % df$7> 3 4-hc h"82c8>%#
 "/ก $41ก%c7$d!6g 4
ก>4  :- ก01 ก กก> #  <$ : ; 8
c "/ > 3   % d82c 8 ก - 9c
c
 $>" >กch6h"hc

1.2 9=G : 31


 ก
01ก7*-ก> =$e">ก %f
$ "= 7 # <d64$0  (Perspective)

! 7$d! f %c "/$7> 3 7$d!8 7 82c!"ก: 4-
hc6> = -
d9ก

1.3 1<;1
 ก
 ก-. 01ก> =$e7*-ก7 4$.= %f
$ ก1.9"$7> 3 
82c<d6 4$0 
 ! 4- $41กก cd6<> )
2
1.4 F8กB; 
4- 1.1 == 7 > =>#กf 

1.5 8E456 92:J=<


% d$eก= 7ก"= 7 # <d64$0 
 ! 8
c "/$7> 3  -
7 > 6f 8ก c -ก$ 7$d!c> )% df 82c8ก01กchc
3
<4456 2
4K7L5FE: 92=45;6 ก5691

.
8 4-.> 6 = -ก "/ 2 %67 %67>ก4no-> =
$กก .c4-82c8ก
d6<> =ก%c$7> 3 7$d! %674- 2 ก01ก7)$8c4- ก-7c 82c "/
>748ก$eก51 - = -$-.

2.1 4K7L5FE:DE=กก;<M1 


4no-> =
$กก .c4-82c8ก-. ก-7cก$ กf7:ก$7$d!)ก< 
>" c 9 )ก< 2 8
c "/%c
$7> 3  # $44-hc% d82c* 9"6
7$d!)hc 51 44-82c 3D Reconstruction
3D Reconstruction "/ก= 7ก8ก= !f>
6 .#77$d! f %c "/$7
> 3 7$d!8 7  4ก4f 3D Reconstruction % d> 6hc$-.
2.1.1 Laser Scan
"/ 4ก= !f>
67$d!82c 5 กz>% 5h"4-7$d!
 4f8
c ก  "/   %c 7$ d! 4f 8
c h cc  9 f>
6  7$d! ก 89 ">  ก !6 )! 
(cloud of points) 8ก82c) c 9 Cloud of points )=d9ก>"  "/c 9 .#7ก 2 )!
6g cก$ "/#77$d!1.  $>%8<4- 2.1

<4- 2.1 ก4f3D Reconstruction 82c7*- Laser Scan

%678
i6> c7 4 Laser Scan $ก82c84!%
ก 51!"ก:8ก82c
 ->
=%f
$ 4-cก7 > 6f8 2ก$%9 > ===
6=
767$d!> =
!"ก:h 6hก ก$ กh"
4
2.1.2 Photogrammetry (Stereoscopy)
ก= !ก$ 2 3 7$d!82c
$กก4 :f7:ก$)ก
<d6$.>6 2 <1.h"51d6)ก ! 4-6ก$ )! -7ก$8<)=d9ก= ! %c%

 %c$ %- ก)ก)!$. ก ch"$ 7$d! >6 =< "- %  "/<4-h c)ก)!$. ก c
6gก$ 4f8
6hc %c$%-
g %c 51ก$ก$ %c
6-. )=% df7:82c
$กก4
: 8
chcก$7$d!ก 
8กd69")=% dc==ก$ (Coordinate) hc 3 ==  ==
ก$ ก
 ==ก$) (World Coordinate) )= "/กcก$ f>
68-กf>
6
1
4 26 !
c
 ==ก$ก cd6< )ก>%)ก7$d!))= 4#6)!{ก$%
> c7กก=4 h"$= 9" 4f8
c กก$<1. ก "/7 %$ $*=
76 ==ก$),
==ก$ก cd6< > ===ก$<1. $>%8<4- 2.2

<4- 2.2 7 %$ $*==ก$

)ก<4- 2.2 = -)!{ก$%4- C 4- % -7 7{ก$% f )ก<)= 76 Coordinate
 ก> = %$. h 6hc ->ก67 ก$ 51)=% d4f8
cก$ก>"  Coordinate Ow
51)):4->ก Xw ก6 ก Xw c7 7ก  t > =4fก
! (Rotate) 82c ก5
R $% ก4-1
 Xc 
Xc = Yc  = R( Xw − t ) ____________________
1
 Zc 
5
): z= Coordinate ก c )=):4- Zc > = Xc $$.4-)! Xc )=d9ก
z  = 9"4- Uc 51 767 %$ $*==ก$)=7 =

$กก%
-
 c $>%8< 2.3 > =% d
7 %$ $*)!Uc hc$% ก4-2

T
 − fzc − fyc 
Uc =  , ,− f  ____________________
2
 Zc Zc 

7 %$ $*7$d!) =={ก$%> =ก$ก cd6< )=hcf ): %c


==ก$< =  7 6h"

<4- 2.3 ก82c


$กก7 %$ $* 3
-  c

2.2 92=456;ก5691
# 7 )$  ก- 7ก$ ก%c > 3  ) ก<d6  - ก  > = - ก$ e 6 
6  $76# 7)$4- ก-7c -$-.
F. Remondino A. Guarnieri > = A.Voettorre (2005) hc %c "- 4- =
76ก%c$7
> 3 7*-ก Photogrammetry > = Laser Scan $ = -6h"-. 7*- Photogrammetry
"/7*-4-hc$ ก4% > c776 "/7*-ก4-%=7ก > = 2dhc%f
$ ก4f 3D Reconstruction
)ก "/ 44-h 65$ 5c !"ก: 26 ก cd69"% dก> =
hc6 -964$7h"
7 d1 ->  2$4-% d
5.hc %67c %- กf7:ก$7$d!)ก<)=4fhc2c 82c 7 
ก
ก4fก$ 7$d!4- -8
i6 261ก
%ก6%c )=h 6% d4fก%c> $ $ >46

! hc$ 26 7$ d!  xก #9c 4 )=c7$ ==d6<c 7  - ก4$. ก82c < 4- - 7
= -%9
f กg 6 -# 6 7  > =7 > 6f8ก"= 7 # 51ก:-4-< -7
= -f)=4f8
cกf7:8 = -h 6- 464-7 $>%8<4- 2.4 %677*- Laser Scan
"/ 4 -4- -7 
!6%9 % d82chcก$ >  2$%f
$ ก%f7)
>  2$
6
%f
$ ก%c$7> 3 hc- 51 -c-% df7:ก$hc7 x7 > cc 9 )= -)f7 ก -
7 4-%9 >66hกx-!"ก:$.กhcก -%9 7 4$.) -ก ก7 ก1.8ก
"= 7 #  7: 7$d!$>%8<4- 2.5

<4- 2.4 ก4f 3D Reconstruction 7*- Photogrammetry

<4- 2.5 ก ก7  7: $7> 3  4- ก)ก7*- Laser Scan

Sergey Winstein (2006) hc01ก"=!ก82cกz9"> >% (Structured Light)


 7$d! 2678ก= !f>
667 (Common Point) 7$d! 8ก4f Photogrammetry 
267
)!67 -7ก$8< 2 < -ก4$.$"=!กก c
$% cก$ กz   -9"> 
>%>ก6ก$
9">  - f$ กz>6 =9"> )!g
16 - f$ 8กhc$
>%6ก$ "/# 8
c>6 =)! 7$d!6กx -9"> ก$ >%4-6ก$ % df "=!ก %c
"/
$%1.$<4- 2.6
7

<4- 2.6 ก82c f$ > =9"> >%4-6ก$ %c


$%8
c7$d!

Ye Lu, Jason Z. Zhang, Q. M. Jonathan Wu > = Ze-Nian Li (2005) hc01ก> =)f>ก


ก= 7ก 4 Parallax 
 Algorithm 4-
=% 8ก82c> 6g fc 9 
%c%c 3  
$กก Parallax $. "/
$กก4- cก$ ก4f ! 
5c> =7  7$d! -7ก$)=
xf>
67$d!6ก$ 4f -7ก$ 7$d!96>6#9c
 " - ! h" 6
x7$d! " -h"c7 51
$กก-.)=fh"4f Stereo Matching 

>#4-7 1ก (Depth Map) 7$d!8 ! $.g )ก$.)1hc82cกf7:4:0% 


= !)!ก$7$d! 7 > 6f6h" $$768<4- 2.7 < 2.7 a > = b <5c
> =<7 f$ c %674->ก6< (Disparity) > = d >#4-7 1ก7$d!
8

(a) (b)

(b) (c) (d)


<4- 2.7 (a)<5c (b)<7 (c) %674->ก6< (Dispairity)
> = (d) >#4-7 1ก7$d! (Depth Map)

%!"> c77)$4- ก-7c4-hcf %cc8 ก%c$7> 3 )ก<d6$.


$. %678
i6)= -กf7:4:0% 2 : 
)!ก$7$d! 8
c> 6f4-%! 
f %c$7> 3 8
c8ก c -ก$ 7$d! ก4-%! 7 4$. -ก# -.
ก ก7c 9 8
c
c4-%!c7
9
<4456 3
ก11กF<<FE:  =9F<< 3 

 4- กก> = 4- ) =$ e 1. 8<ก01 กc #9c $ e cก82c


$ กก
Photogrammetry >6 )ก76ก c webcam 4-82c -7 = -f4f8
c<4-hc -!:<fh 6
% d%$ ก!
x = -4-.#77$d!hc = -4-)=4f Stereo matching =
76)!4-
% cก$8<
 ! hc
$$.#9c$e)1hc82c7*-ก Laser Scan >4 )ก% d82cก$ ก c webcam 4- -7
= - f hc >% 5 4-8 2c - $ ก:= "/ >#6  (Sheet) 51  hc ) กกz>% 5 #6  %
4ก= ก zh"ก=4 7$d!)="ก… "/>7 f>%1.  $.8ก4f= - 3
$.c7ก$
1.ก)$กd6<
 ! 7$d! (Image Acquisition)
2.กf7:
ก$7$d! 2 3  (Point Positioning)
3.ก 2 )!ก$ 8
c "/$7> 3 7$d! (Sufacing and Smoothing Points)
ก= 7ก4$.
% d>%$8<4- 3.1 > = <4- 3.2 >%ก4f67 ก$
!"ก:51)=hc*  = -8
$7c 3.1

<4- 3.1 $.ก%c$7> 3 


10

<4- 3.2 = ก4f!"ก:

3.1 ก1 9=GDEG1


8ก-.#9c$ehcก> = d6<87$d!
 !  82cก c -$7 -7
ก77$d!h7c >464-% d
! $7 hc (Rotating stage) ก
!>46-.d9ก$  
% x"  4-7 ! h 4  %67ก c webcam > =>
6กf >% 5)=
796ก$ 4- >% 5)=z#6)!09ก ก
!>46
! $>%8<4- 3.3 )=hc
<d67$d!8>6 = ! hc )กก"$" ! >4677$d!>6 = ! > c7)182cก c webcam
)$ <>6 =< 4-<d6>6 =<)="ก…>7 f>% 54-กก=4 .#71.  1 >7
>6 )ก<d68
c"ก)= ->% ก7)ก<ก ก 4f8
c>7 f>% 5"ก…h 62$
)1)f "/cd6<7$d!8
c 
11

 7 
h 4 

7$d!

ก c Webcam
y
!

5
<4- 3.3 กd6<
 ! 7$d!

3.1.1 1G กN3456
กE1 Webcam
ก c Webcam 4-82c "/ก c $4 Logitech !6 QuickCam Pro 4000 4-6ก$ 
 7 #6 USB 1.1
 2.0 >6ก:-4-)=d6< 1 cก 5 (Megapixel)
)=c82cUSB 2.0 Hi-Speed 7 = -))=964- 640X480 pixel > =% d)$
<  h
7hc 30 { 674- > =% d82chcก$ = "… $ก Windows 2000 > =
Windows XP hc
12

<4-3.4 ก c Logitech Webcam !6 QuickCam Pro 4000

;Q ; 131;13
% x" "  4-82c "/% x" "   4 Phase  Sanyo denki 82c>$h{{† 2.5 V. 4-
2.1 Amp.
!hc 400 % x"6 %c#609ก    3 .7 7 2.5 .7 >ก 10   
> %9%! 1.2 N-M (12kg-cm)

<4-3.5 % x" "   Sanyo denki !6 step syn


13
J
 1
4E;E13
h 4 4-82c8ก-.4f
c4-7 ! ก
!% x" "  8
chc04-
cก c  9 ! )=d9กกf
 7  > =%6 $ h 4 #6 4 
RS232 h 4 4-82c "/h 4 !6 AT89S52  $4 ATMEL 51 -!: $ก:=
$-.

<4-3.6 h 4  AT89S52

- -7 cก$hcก$ h 4 =ก9 MCS-51


-
677 )f> FLASH %f
$ $41ก Program memory  8 Kbytes
- 4f4->$h{{† 4.0-5.5 Volt
- -
677 )f> RAM  256 Byte
- Timer/Counter 16 Bit 3 Channel
- Full Duplex UART Serial Channel
- Clock 0-33 MHz
ก82c

<4-3.7 ก82c4$. 40 h 4  AT89S52


14

VCC %f
$ 6h{ -. +5 Volt
GND %f
$ 6ก$ ก7=
Port0 (P0.0-P0.7) >6 =% dกf
8
c "/hc4$.!> = !
Port1 (P1.0) "/!%f
$ $ 6 Timer2
(P1.1) "/ !4ก ก Timer2
(P1.5-1.7) %f
$ 2 6> ISP 4fก"> c 9 =
Port2 (P2.0-P2.7) >6 =% dกf
8
c "/hc4$.!> = !
Port3 (P3.0-P3.7) >6 =% dกf
8
c "/hc4$.!> = ! > =
ก)ก$. Port3 $ -
64-ก82c 0$-.
P3.0 82c "/!%f
$ ก%%> !ก (RxD)
P3.1 82c "/ !%f
$ ก%%> !ก (TxD)
P3.2 82c "/!%$ii: $")ก<ก26 0
P3.3 82c "/!%$ii: $")ก<ก26 1
P3.4 "/!%f
$ $ 6 Timer0 (T0)
P3.5 "/!%f
$ $ 6 Timer0 (T1)
P3.6 82c "/%$ii: WR 8ก:- 2 6ก$
677 )f
<ก
P3.7 82c "/%$ii: RD 8ก:- 2 6ก$
677 )f
<ก
XTALL1 > = XTALL2 "/%f
$ 6% %c%$ii:Šก8
cก$ =
RST - 5ก4fh 4 
ALE/PROG "/4-7 ! ก> 5 Port0  -ก82c

677 )f<ก > =$ $ %ก">ก c 9 
8h 4 
EA/VPP "/%f
$ ก6
677 )f<ก
<8$7
h 4 
PSEN "/4-82c8ก%6%$ii: c6
677 )f
<ก
15
3.2 ก B9Nก= 3 <M891 9=G

$)กhc<d6>7 f>% 54-"ก… #77$d!8>6 = ! > c7 $.6 
กfc 9 > f>%4-"ก… f 7:ก$ 3  . #77$d! "ก  $. !"ก:
d6<$>%8< 3.8 )! A )= "/)!4- f>% 5ก=4 .#77$d! )! O "/)!
!
>4677$d!

#77$d!
D )!
!

X Optical Axis
α
O f θ

5
<4- 3.8 กf7:
ก$7$d!
C  )!09ก  %ก c f =={ก$%
D  ==4)ก)!
!d1)!09ก  %
θ  ! 4->% 54fก$ >ก Optical axis
8ก:--.ก* .#77$ d!89"ก$4ก= ก (R, θ ,Z) )=
=% 4-%! )ก
ก$7$d!hc )กกd6<7$d! 8
 !  51hc )กก
!7$d!  )!09ก )!
-7ก$
)ก<)= 76
X R sin θ
=
f D − R cos θ
16
$$.)=hc76
XD
R=
X cos θ + f sin θ

 hc 6$ 0 - R > c 7  f h""=ก ก$ 6 0<d6  )=hc  ก$ 2  $. 7 (Polar
coordinate) (R, θ ) 8%677 %9 Z 7$d! % df7:hc)ก<4- 3.9

y Z
=
f D − R cos θ

f
Z =
y ( D − R cos θ )

6 (R, θ ,Z) "=ก ก$1.  "/ก$4ก= ก f>


6 .#77$d! 51c 9 4-hc)=968
$ก:= "/)!dccกf >% "/.#77$d!)=c 4fก 2 6=
76)!4-8ก c -ก$
8
c "/.#71. 

R cos θ

y f

<4- 3.9 กf7:ก$8%677 %97$d!


17
<4456 4
ก=e
FกFE:1G กN3

4.1 ก4B 1


FกFE:1G กN3
8ก82c= )= -ก4f67 ก$=
76%67กd6<7$d! > =%67y

!7$d! )ก$.)1)=f<d64-hch"4fก"= 7 # 8


chc "/%c 3   hc<
7$d!> c7<)=d9กfh"4fก Thresholding 
 %c 7$d! )ก$.)14fก Thinning
8
c %c  
 1 pixel > c74fก>"  %c "/ก$)! กx h7c8$7>"  d6<
)  7$d!> c7)1f)!4-hch"%c "/$7> 3  ก= 7ก4$.
hc>%8>#<4- 4.1
51 = -> 6 "/ 3 %6751)=hcก 678
$7c6h"

<4- 4.1 >#<>%ก4f=


18
4.1.1 ก4B 1 DG9=G
8กd6<7$d!)=82cy 
!7$d!ก64-)=4fกd6<   )กก77$d! 
y > c7)1z>% 5  7$d!4f ! 60O ก$ >7=
76ก cก$ 7$d! )ก$.)1%$ก8
c>46

!h"$04-cก 51 -f%$4-82c8ก


!$-.
Connect  ก6ก$ h 4 
Disconnect
!ก6ก$ h 4 

!47 x %$8
cy
!47 x Šก

! x %$8
cy
!47 x Šก

<4- 4.2 y


!7$d!

4.1.2 ก4B 1 99=G



$)ก4- -ก
!>6 =$. )=c -กd6<7$d! h7c 51กd6<7$d!)=82cf%$8
ก4f$-.
Initialize  ก4fก c Webcam
Start Capture 4fกd6<7$d!
Pause/Restart
!/  ก)$ <
Auto 4fก
!> =d6<$ $
19

1 2

<4- 4.3 ">ก %f


$ d6<> =
!7$d!

)ก<4- 4.3
  1 
c6>%<)กก c Webcam
  2 
c6
>%<4-d6)กก c > =
  3 
c6>%# ก"= 7 %c7$d!4-f7hc
)ก<d67$d!51)=fh"%c "/$7> 3 6h"

4.1.3 ก4B 1 9  =9F<< 3  (3D Model)


4fกd6< - c> c7">ก )=4fกf7:6ก$ 8
chc%c 3 > =
f >%8"<9  3  $>%8< 4.4
20

<4- 4.4 "<9  3 %f


$ >%$7> 3 

4.2 ก 
Fก
 c8
cf7$d!4-cก1.9" 7h7c >46
! )ก$.)1 "~
>% 58
cz 
h" 7$d! > c7)1ก Initial $>%8<4- 4.5 (
  1)   ก4fก c Webcam
)ก$.)1ก Auto (
  2)   กd6<$ $ > c7)1ก Build 3D Model (
  3)
 "~
c6= 3  >%%c 3  > c7)1ก Build (<4-4.6
  4) 9#
>6
กc กd6 <7$ d! 4- =<> c 7 4f hc 
$  )กก Initial > c 78
c ก Connent
(
  5) > c7 ก76)=
!7$d!47 x
 x Šก )ก$.)1ก
!h" 40$.
(
  7
 8) ) % dก Build 3D Model hc  7  9# d6< %x)
> c7)1ก Disconnect (
  6)
21

1
5
6
2

3 7 8

<4- 4.5 ">ก 8%67กd6<7$d!

<4- 4.6 ">ก 8%67ก%c$7> 3 


22
<4456 5
=91 ก4B 1
Fก

5.1 กDEG1 1 9=G

<4- 5.1  กd6<7$d!

)ก<4- 5.1  "~">ก 1. )= 2ก c Webcam 4-6 cก$  7 96
8
cก Initial   cก4fก c 51)="ก…
x<)กก c8 Mode <  h
7
)ก$. ก Start Capture )="ก…<7$d!> = %c7$d!4-"= 7 # hc)ก>%
54-z 7$d!$>%8<4- 5.2 >6 8
cกd6< "†h"$ $7ก Auto 
d6<> =
!7$d!h"c gก$) 7$d!
23

<4- 5.2 ">ก d6<7$d!


$)กก Start Capture

5.2 กF  =9F<< 3 


d6< 7$d!) - c> c7 8
cก Build 3D Model  "~
c6>%#
1.  )ก$. ก Build >%$7> 3  $>%8<4- 5.3

<4- 5.3 $7> 3 4-hc)ก7$d!


24
<4456 6
<4 G FE:1; 1F:

6.1 <4 G กB; 


= ก1.9"%c 3 4-$e8ก-.% df7:ก$f>
6 #77$d!
89"ก$4ก= กก7$$0 -.#77$d! 0ก%$ ก7$d!8 ! 6g # $4
4-hc "/%c.#77$d!"<9  3   4$. 360 0 c-ก1.9"%c 3 
7$d!82cก$4ก= ก hcc 9 .#77$d! 360 0 > =% df %c "/
> )f 7$d!hc >4 4!ก ! ก 7c  7:8cy7$d! 46$.4-h 6% d7$==hc
%67c)fก$ 7$d!4-f 1.9"c "/7$d!4-h 6 -9
)!$ >% >7$0 -ก 67 c "/7$d!4-
4!ก)! .#77$d! % d ก %ch"$)!09ก ก
!7$d!hc h 6 -ก$ก$ )!
g #77$d! $ 267$d!45c 89"4- 6.1(a) >6)=h 6% df7:hcd9กc
ก "/9"
6.1(b)

R O R O

(a) (b)
<4- 6.1 c)fก$7$d!4-% d%c> )f hc

6. 2 g@D456<กB; 
0%8ก%c$7> 3 )ก7$d!)(Reconstruction) $.8"+))! $$h 6 -7*-ก> =
yก >6 ก !6 7)$6ก !6 ก$กx) -7 c8)>ก6ก$h" $7 h"d17*-ก

4กx>ก6ก$h"c7 $h 6 -กกf
>74h7c6 62$ 4f8
c ก7 ก f ก8
ก
>74
$76 .c 8
c กก  c8 2"o $ -ก4$.กf7:4:0%
4-!6ก> =5$ 5c -ก4$.c 9 4-c
hc> c)= - ก >6กx$h 62$ ) 4f8
cก01ก "/h"6
62c "/# 8
cf ก8$.g กh"c7
25
6. 3 1; 1F:
7 ก f ก4- -968$.กก> $.= d6< กf7:ก$7$d!
ก%c.#78
cก$ $7> 3  7 h"d1ก ->  2$8กf7: >%< 3  > =
%674-6ก$ #9c82c 4f8
cก)f "/4-c82c 7 8ก$e6c ก > =ก>
6c 9
8 2"o $4f8
cก4 8>6 =$. 62c
กh 6 -ก 7 8ก$eกx)f "/64-
#9c )$ 4f )=c 4f ก$ e 6  6  6 7
 > c > 6 ) =c $ $.   6 กh" )=c  
):6  8
cก> c7 %x) 7 

6.4 F94 ก :Gก3FE:=e1J


8
c% d"=!ก82chc
ก
1. 7 -ก$e">ก 8
c% d$ <d6
)ก#9c82c4$7h" c "= 7 # hc 7 4$. -ก"=!ก$ ก41
{+ก2$1.  4fก"$ "!
!:<<8ก:-4-<d6 -!:<>ก6ก$ 8
c ก7 
!68ก82c 8ก:-4-
h 6% d  c

!7$d!hc >6% dd6< g7$d!hc "/c
26
 89ก

ก82ch 4 %f


$ ก7 ! ก4f!"ก:6 g h 676)= "/ก
7 ! % x" " ก6=
76h 4 ก$  7  )f "/c -">ก 8
cก$
h 4  4-)=% d4f8
ch 4 4f 4- cกhc ก-.
)=  ก82c < Assembly 8ก$e  82c ">ก MIDE-51 51  8%67-.) = "/ 7*- 4-)=f 
">ก 4-$eh" กx 8
677 )fh 4 #64 7)6=
76
h 4 ก$  7 #64!ก > =7))6h{8
cก$ % x" "  51 -
 = -$-.

1.  9 2  1E:D9 19;13ก=<J


 1
4E;E13
8134
!"ก:4-82c
1. h 4  AT89S52 1 $7
2. h5-  74HCT541 1 $7
3.$7c4 1 ก 
 4 $7
4.$7c4 100 
 5 $7
5. $7c4 330 
 1 $7
6. $7c4 4.7 ก 
 1 $7
7.
 LED 1

8. >
6)6h{ 5 7 
9. $.76 DB25 $7#9c c %>

<4- #.1 7)%f


$ ">ก h 4 
27

<4- #.2 ก6)$ " cก$ $.76 DB25

c4- 9 Build >> Build 4fก h ">ก 4-$e )=hc HEX h{ ก 

<4- #.3 ก h{ ">ก

<4- #.4 HEX h{ 4-hc


28

$)ก$.82c">ก ISP Œ Flash Programmer 4fก">ก 8
677 )f
h 4   ก4-"!Ž Open File  "~ HEX h{ 4-hc h{ > c7

<4- #.5 ก "~ HEX h{  4-)=">ก h 4 

4fก ก HEX  h h7c

<4- #.6 ก HEX h{ 4-hc h h7c


29
2.  9 2=<-  1E:D9 19;13ก=<J
 1
4E;E13
81341Gก
8ก82c 7 6ก$ h 4  7 ! % x" "  $. )= -ก%6
f%$8
c)ก 7 8
cก$ h 4 $$.)= -7) >" >$h{{† 8
c% d
6ก$hc
!"ก:4-82c
1. $7c4 10 ก 
 1 $7
2. $7 กx "=)! 10 h {$ 5 $7
3. $7 กx "=)! 33 ก{$ 2 $7
4. %$ 10.059 MHz 1 $7
5. h5-  MAX232 1 $7
6. %75 1 $7
7. )$ "c %h{
8.
$76 DB9 $7#9c

<4- #.7 7)%f


$ 6 7 > =h 4 
30

<4- #.8 ก6)$ " cก$ $.76 DB9

3.  9 22ก:F JhhiDก=< ;Q ; 131;13


8ก82c  % x " "   $. h 4  h 6 %  d)6 h{8
c ก$ % x " "
  h c )1  - ก %c  ))h{{†  8
c ก$ % x " "     8
c %  d$ f  %$  )ก
h 4 hc
!"ก:4-82c
1. 45%   TIP120 4 $7
2. $7c4 1 ก 
 4 $7
3. )$ "

<4- #.9 7))6h{8


cก$ % x" "  
31
<NGก

[1] Ahmed H. Eid, Sherif S. Rashad, and Aly A. Farag, Validation of 3-D Reconstruction from
Sequence of Images, University of Louisville, Louisville, USA, 2002
[2] F. Remondino, A. Guarnieri and A. Vettore, 3D Modeling of Close-Range objects:
Photogrammetry or Laser Scanning?, Institute of Geodesy and Photogrammetry ETH
Hönggerberg - Zurich, Switzerland and Cirgeo - Interdept. Research Center of
Geomatics University of Padua Œ Italy, 2005
[3] Milan Sonka, Vaclav Hlavac, and Roger Boyle. Image Processing, Analysis, and Machine
Vision.2004: PWS Pub Co., USA
[4] Nassir Navab, 3D Computer Vision Two View Geometry, technische universität münchen,
January 2006. [Online]. Available form URL:
http://campar.in.tum.de/twiki/pub/Chair/TeachingWs05ComputerVision/3D_CV_WT_2005
_TwoView1.pdf
[5] Sergey Weinstein, 3-D Stereoscopic Reconstruction using Structured Light, Boston college,
2006
[6] Ye Lu, Jason Z. Zhang,Q. M. Jonathan Wu,and Ze-Nian Li, A Survey of Motion-Parallax-
Based 3-D Reconstruction Algorithms, IEEE TRANSACTIONS ON SYSTEMS, MAN, AND
CYBERNETICS, 2005
[7]  %4 > = กn… >กc7 :-, .yกกc7 c%96 ก 3  3D Graphics, 5$ 5% - -
)fก$, ก! 4

You might also like