Geometria Epipolar Correspondência a partir da calibração das câmeras ou Forma a partir de...
-
Upload
lorena-ana-carolina-valverde-alvarenga -
Category
Documents
-
view
218 -
download
0
Transcript of Geometria Epipolar Correspondência a partir da calibração das câmeras ou Forma a partir de...
![Page 1: Geometria Epipolar Correspondência a partir da calibração das câmeras ou Forma a partir de correspondências.](https://reader033.fdocumentos.tips/reader033/viewer/2022052704/570638721a28abb823907f2a/html5/thumbnails/1.jpg)
Geometria Epipolar
Correspondência a partir da calibração das câmerasou
Forma a partir de correspondências
![Page 2: Geometria Epipolar Correspondência a partir da calibração das câmeras ou Forma a partir de correspondências.](https://reader033.fdocumentos.tips/reader033/viewer/2022052704/570638721a28abb823907f2a/html5/thumbnails/2.jpg)
Um caso simples (cameras paralelas)
http://www.44bx.com/vic3d/Cameras/Rig1b_med.jpg
![Page 3: Geometria Epipolar Correspondência a partir da calibração das câmeras ou Forma a partir de correspondências.](https://reader033.fdocumentos.tips/reader033/viewer/2022052704/570638721a28abb823907f2a/html5/thumbnails/3.jpg)
Guido Gerig
Disparidade: deslocamento relativo de um ponto
disparidade
![Page 4: Geometria Epipolar Correspondência a partir da calibração das câmeras ou Forma a partir de correspondências.](https://reader033.fdocumentos.tips/reader033/viewer/2022052704/570638721a28abb823907f2a/html5/thumbnails/4.jpg)
Profundidade versus disparidade
zl
xlol xr
or
zr
p
cl cr
xl xr
t
z = z l =
z r
f = fl = fr
l r
![Page 5: Geometria Epipolar Correspondência a partir da calibração das câmeras ou Forma a partir de correspondências.](https://reader033.fdocumentos.tips/reader033/viewer/2022052704/570638721a28abb823907f2a/html5/thumbnails/5.jpg)
Geometria Epipolar: notação
l
ol
p
r
or
pl
qlxcl
ycl
zcl
xcr
ycr
zcr
qr
pr
el er
linhaepipolar
linhaepipolar
epipolo epipolo
![Page 6: Geometria Epipolar Correspondência a partir da calibração das câmeras ou Forma a partir de correspondências.](https://reader033.fdocumentos.tips/reader033/viewer/2022052704/570638721a28abb823907f2a/html5/thumbnails/6.jpg)
Example: motion parallel with image plane
![Page 7: Geometria Epipolar Correspondência a partir da calibração das câmeras ou Forma a partir de correspondências.](https://reader033.fdocumentos.tips/reader033/viewer/2022052704/570638721a28abb823907f2a/html5/thumbnails/7.jpg)
Example: converging cameras
![Page 8: Geometria Epipolar Correspondência a partir da calibração das câmeras ou Forma a partir de correspondências.](https://reader033.fdocumentos.tips/reader033/viewer/2022052704/570638721a28abb823907f2a/html5/thumbnails/8.jpg)
Example: forward motion
e
e’
![Page 9: Geometria Epipolar Correspondência a partir da calibração das câmeras ou Forma a partir de correspondências.](https://reader033.fdocumentos.tips/reader033/viewer/2022052704/570638721a28abb823907f2a/html5/thumbnails/9.jpg)
Geometria Epipolar: relações básicas
l
p
r
xcl
ycl
zcl
xcr
ycr
zcr
rlr tpp
ol ortr
rllrr tpRp
![Page 10: Geometria Epipolar Correspondência a partir da calibração das câmeras ou Forma a partir de correspondências.](https://reader033.fdocumentos.tips/reader033/viewer/2022052704/570638721a28abb823907f2a/html5/thumbnails/10.jpg)
Produto misto (revistado)
u
v
w
wv
h
wvbasedaárea
wv
wvu
altura
wvu alturabaseV
![Page 11: Geometria Epipolar Correspondência a partir da calibração das câmeras ou Forma a partir de correspondências.](https://reader033.fdocumentos.tips/reader033/viewer/2022052704/570638721a28abb823907f2a/html5/thumbnails/11.jpg)
Matriz Essencial0)( lrrl pttp
rrlrl pRtp
llr pSpt
00
0
rxry
rxrz
ryrz
tttt
ttS
0llrr pSRp
0lr pEp
Matriz Essencial
l
eye l
P
r
eye r
pl
xcl
ycl
zcl
xcr
ycr
zcr
pr
el errt
0 lrrl pttp
lrrrl Rptp
SRE lr
![Page 12: Geometria Epipolar Correspondência a partir da calibração das câmeras ou Forma a partir de correspondências.](https://reader033.fdocumentos.tips/reader033/viewer/2022052704/570638721a28abb823907f2a/html5/thumbnails/12.jpg)
Rotação de a para b (left to right)
lrlrlr
lrlrlr
lrlrlrlr
kkjkikkjjjijkijiii
R
Twl
wr
lw
wr
lr RRRRR
lwlwlw
lwlwlw
lwlwlw
wrwrwr
wrwrwr
wrwrwrlr
kkjkikkjjjijkijiii
kkjkikkjjjijkijiii
R
rwrwrw
rwrwrw
rwrwrw
wlwlwl
wlwlwl
wlwlwlrl
kkjkikkjjjijkijiii
kkjkikkjjjijkijiii
R
![Page 13: Geometria Epipolar Correspondência a partir da calibração das câmeras ou Forma a partir de correspondências.](https://reader033.fdocumentos.tips/reader033/viewer/2022052704/570638721a28abb823907f2a/html5/thumbnails/13.jpg)
Vetor do eye de b em a lr
wlr eyeeyeRt
xw
eye lxcl
ycl
zcl rt
xcr
ycr
zcr
eye r
yw
zw
![Page 14: Geometria Epipolar Correspondência a partir da calibração das câmeras ou Forma a partir de correspondências.](https://reader033.fdocumentos.tips/reader033/viewer/2022052704/570638721a28abb823907f2a/html5/thumbnails/14.jpg)
Matriz essencial (código C)Matrix epiEssencialMatrix( Matrix Ra, Vector eye_a, Matrix Rb, Vector eye_b) { Matrix Rba = algMult(Rb,algTransp(Ra)); Vector eye = algMult(Ra,algSub(eye_b,eye_a); Matrix S = algVectorProductMatrix(eye); Matrix E = algMult(Rba,S);
return E;}
SRE lr
![Page 15: Geometria Epipolar Correspondência a partir da calibração das câmeras ou Forma a partir de correspondências.](https://reader033.fdocumentos.tips/reader033/viewer/2022052704/570638721a28abb823907f2a/html5/thumbnails/15.jpg)
Linha epipolar
tr
l
Ol
p
r
Or
pl
ql
xcl
ycl
zcl
xcr
ycr
zcr
qr
pr
el er
0lT
r Epp
r
r
fyx
p
![Page 16: Geometria Epipolar Correspondência a partir da calibração das câmeras ou Forma a partir de correspondências.](https://reader033.fdocumentos.tips/reader033/viewer/2022052704/570638721a28abb823907f2a/html5/thumbnails/16.jpg)
Geometria Epipolar: Matriz Fundamental
lllimlw pKp
0lT
r pEp
01 lliml
Tr
Trimr ww pKEKp
1 lT
r EKKF
Matriz fundamental 0limT
rim pFp
zyx
ofof
yx
w yy
xx
im
im
1000
0
1
rrrimrw pKp
limlll w pKp 1
limlw p lK lp
rimrrr w pKp 1
![Page 17: Geometria Epipolar Correspondência a partir da calibração das câmeras ou Forma a partir de correspondências.](https://reader033.fdocumentos.tips/reader033/viewer/2022052704/570638721a28abb823907f2a/html5/thumbnails/17.jpg)
Matriz fundamental 1 lT
r EMMF
100
0
0
0
0
0
100
0
0
ylyl
l
xlxl
l
x
rly
rl
x
rlz
rl
y
rlz
rl
lrlrlr
lrlrlr
lrlrlr
T
yryr
r
xrxr
r
osf
osf
osf
osf
eyeeye
eyeeye
eyeeye
kkjkikkjjjijkijiii
F
333231
232221
131211
FFFFFFFFF
F
Pode ser estimada diretamente se conhecermos pelo menos oito pares de pontos correspondentes
![Page 18: Geometria Epipolar Correspondência a partir da calibração das câmeras ou Forma a partir de correspondências.](https://reader033.fdocumentos.tips/reader033/viewer/2022052704/570638721a28abb823907f2a/html5/thumbnails/18.jpg)
Transformações do OpenGL
xe
ye
zecenter
eye
zo
yo
xo
up
xn
yn
zn
wzyx
c
c
c
110
0
0
zyx
zyx
viewe
e
e
M
1e
e
e
c
c
c
zyx
wzyx
P
wzyx
wzyx
c
c
c
n
n
n 1
xe
ye
zexn
yn
zn
wzyx
c
c
c
1e
e
e
c
c
c
zyx
wzyx
P
wzyx
wzyx
c
c
c
n
n
n 1
![Page 19: Geometria Epipolar Correspondência a partir da calibração das câmeras ou Forma a partir de correspondências.](https://reader033.fdocumentos.tips/reader033/viewer/2022052704/570638721a28abb823907f2a/html5/thumbnails/19.jpg)
Transformação para o viewport
xn
yn
zn
111
-1-1-1
void glViewport(int x0, int y0, int w, int h );
zw[0.. zmax], zmax = 2n-1 geralmente 65535
2
10
nw
xwxx
2
10
nw
yhyy
2
1max
nw
zzz
xw
yw
w
h
0
y0
x0
![Page 20: Geometria Epipolar Correspondência a partir da calibração das câmeras ou Forma a partir de correspondências.](https://reader033.fdocumentos.tips/reader033/viewer/2022052704/570638721a28abb823907f2a/html5/thumbnails/20.jpg)
Revendo as transformações
1000100010001
1000000
0100
2)(00
020
002
100022
002
02
02
002
maxmaxz
y
x
exexex
eyeyex
ezeyex
eyeeyeeye
zzzyyyxxx
nffn
nfnf
btbt
btn
lrlr
lrn
zz
hh
ww
cK tpRptRp wwcwc
100
0
0
yy
xx
osf
osf
1w
w
w
z
y
x
cwcwcw
cwcwcw
cwcwcw
ZYX
ttt
kkkjkijkjjjiikijii
![Page 21: Geometria Epipolar Correspondência a partir da calibração das câmeras ou Forma a partir de correspondências.](https://reader033.fdocumentos.tips/reader033/viewer/2022052704/570638721a28abb823907f2a/html5/thumbnails/21.jpg)
Transformação de K em P
0100
200
02
12
0
02122
pp
pp
pp
pp
yy
xx
nfnf
nfnf
hu
hf
wu
wwf
P
1000 yy
xx
ufuf
K
0100
200
000
'
pp
ppmp
pp
m
yy
xx
nfnfz
fnf
zufuf
K
![Page 22: Geometria Epipolar Correspondência a partir da calibração das câmeras ou Forma a partir de correspondências.](https://reader033.fdocumentos.tips/reader033/viewer/2022052704/570638721a28abb823907f2a/html5/thumbnails/22.jpg)
Transformação de K em P
0100
200
02
12
0
02122
pp
pp
pp
pp
yy
xx
nfnf
nfnf
hu
hf
wu
wwf
P
1000 yy
xx
ufuf
K
0100
200
000
'
pp
ppmp
pp
m
yy
xx
nfnfz
fnf
zufuf
K
![Page 23: Geometria Epipolar Correspondência a partir da calibração das câmeras ou Forma a partir de correspondências.](https://reader033.fdocumentos.tips/reader033/viewer/2022052704/570638721a28abb823907f2a/html5/thumbnails/23.jpg)
Revendo as transformações
0100
2)(00
02
0
02
0
0100
2)(00
02
0
02
0
0100
2)(00
0020
0002
100022
002
02
02
002
maxmax
nffn
nfnf
hsf
wsf
nffn
nfnf
hsn
wsn
nffn
nfnf
hsn
wsn
zz
hh
ww
y
x
y
x
y
x
100
0 yy
xx
osf
osf
![Page 24: Geometria Epipolar Correspondência a partir da calibração das câmeras ou Forma a partir de correspondências.](https://reader033.fdocumentos.tips/reader033/viewer/2022052704/570638721a28abb823907f2a/html5/thumbnails/24.jpg)
Matriz Fundamental (código C)
Matrix epiFundamentalMatrix( Matrix Ma, Matrix Ra, Vector eye_a, Matrix Mb, Matrix Rb, Vector eye_b){ Matrix E = epiEssencialMatrix(Ra,eye_a,Rb,eye_b); Matrix invMa = algInv(Ma); Matrix invMbTransp = algTransp(algInv(Mb)); Matrix tmp = algMult(invMbTransp,E); Matrix F = algMult(tmp,invMa); return F;}
![Page 25: Geometria Epipolar Correspondência a partir da calibração das câmeras ou Forma a partir de correspondências.](https://reader033.fdocumentos.tips/reader033/viewer/2022052704/570638721a28abb823907f2a/html5/thumbnails/25.jpg)
Estimativa direta da Matriz Fundamental
O algoritmo de 8 pontos
![Page 26: Geometria Epipolar Correspondência a partir da calibração das câmeras ou Forma a partir de correspondências.](https://reader033.fdocumentos.tips/reader033/viewer/2022052704/570638721a28abb823907f2a/html5/thumbnails/26.jpg)
Estimating Fundamental Matrix
Cada par de pontos correspondents produz uma equação linear.
01
1
333231
232221
131211
r
r
ll yx
FFFFFFFFF
yx
01
33
32
31
23
22
21
13
12
11
FFFFFFFFF
yxyyyxyxyxxx rrlrlrllrlrl
The 8-point algorithm
0limT
rim pFp
![Page 27: Geometria Epipolar Correspondência a partir da calibração das câmeras ou Forma a partir de correspondências.](https://reader033.fdocumentos.tips/reader033/viewer/2022052704/570638721a28abb823907f2a/html5/thumbnails/27.jpg)
Estimating Fundamental Matrix
0
1
111
33
32
31
23
22
21
13
12
11
33
22
11111
FFFFFFFFF
xx
xxxx
xyxxx
nr
nl
rl
rl
lllrl
The 8-point algorithm
0FA }]{[
TUDVA
F é a coluna de V correspondente ao menor valor singular
![Page 28: Geometria Epipolar Correspondência a partir da calibração das câmeras ou Forma a partir de correspondências.](https://reader033.fdocumentos.tips/reader033/viewer/2022052704/570638721a28abb823907f2a/html5/thumbnails/28.jpg)
Estimating Fundamental MatrixThe 8-point algorithm
333231
232221
131211
FFFFFFFFF
F deveria ter posto 2!
TUDVF Seja D' = D com o menor valor singular = 0
TVUDF ''
FF 'min0'det F
![Page 29: Geometria Epipolar Correspondência a partir da calibração das câmeras ou Forma a partir de correspondências.](https://reader033.fdocumentos.tips/reader033/viewer/2022052704/570638721a28abb823907f2a/html5/thumbnails/29.jpg)
The Normalized 8-point AlgorithmRichard Hartley
0lT
r Fpp
0'' llTr
Tr pFTTp
Tpp '
lTr FTTF '
:= T
1000 0 -500
0 1000 -500
0 0 1
:= Tt
1000 0 0
0 1000 0
-500 -500 1
1250000 250000 -500
250000 1250000 -500
-500 -500 1
![Page 30: Geometria Epipolar Correspondência a partir da calibração das câmeras ou Forma a partir de correspondências.](https://reader033.fdocumentos.tips/reader033/viewer/2022052704/570638721a28abb823907f2a/html5/thumbnails/30.jpg)
The Normalized 8-point AlgorithmRichard Hartley
centróide
escale para a distância média ficar em 2