The presentation file for the talk in ACDDE 2012.
http://www.acdde2012.org/
It deals with the research result published in ICPR 2012 with the title as "Camera Calibration from a Single Image based on Coupled Line Cameras and Rectangle Constraint"
https://iapr.papercept.net/conferences/scripts/abstract.pl?ConfID=7&Number=70
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Note on Coupled Line Cameras for Rectangle Reconstruction (ACDDE 2012)
1. Asian Conference on Design and Digital Engineering 2012 (ACDDE 2012)
Geometric Computing and CAD Workshop
Dec.6-8, 2012, Niseko, Hokkaido, Japan
Note on Coupled Line Cameras for
Rectangle Reconstruction
Joo-Haeng Lee
Robot & Cognitive Systems Dept.
ETRI
2. Outline
• Problem definition
• Outline of proposed solution
• Illustrative example
• Theory: coupled line cameras
• Experimental results
• Q&A
Joo-Haeng Lee (joohaeng@etri.re.kr)
3. QUIZ 1. You have some image quadrilaterals
taken from a camera. Which of the following
is the image of any rectangle?
4. QUIZ 1. You have some image quadrilaterals
taken from a camera. Which of the following
is the image of any rectangle?
(a) Rhombus (b) Parallelogram
Isosceles
(c) Trapezoid___ (d)
Trapezoid
5. QUIZ 1. You have some image quadrilaterals
taken from a camera. Which of the following
is the image of any rectangle?
Parallelogram
Isosceles
(d)
Trapezoid
6. QUIZ 1. You have some image quadrilaterals
taken from a camera. Which of the following
is the image of any rectangle?
Reconstructed Rectangle
Given Image Quadrilateral v0 v3
u0 u3
l0
l3
r f
l1
l2 Parallelogram
u1 u2
v1 v2
Isosceles
(d)
Trapezoid
Reconstructed
Projective Structure
7. QUIZ 2. You have some image quadrilaterals
taken from a camera. Which of the following
is the image of any rectangle?
8. QUIZ 2. You have some image quadrilaterals
taken from a camera. Which of the following
is the image of any rectangle?
(a) Rhombus (b) Parallelogram
Isosceles
(c) (d)
Trapezoid
9. Problem Definition
• Given: (1) a single image of a scene
rectangle of an unknown aspect ratio; (2)
a simple camera model with unknown
parameter values
Joo-Haeng Lee (joohaeng@etri.re.kr)
10. Problem Definition
• Given: (1) a single image of a scene
rectangle of an unknown aspect ratio; (2)
a simple camera model with unknown
parameter values
• Problem: (1) to reconstruct the projective
structure including the scene rectangle;
(2) to calibrate unknown camera
parameters
Joo-Haeng Lee (joohaeng@etri.re.kr)
12. Proposed Solution
1. An analytic solution based on coupled
line cameras is provided for the
constrained case where the center of a
scene rectangle is projected to the image
center.
Joo-Haeng Lee (joohaeng@etri.re.kr)
13. Proposed Solution
1. An analytic solution based on coupled
line cameras is provided for the
constrained case where the center of a
scene rectangle is projected to the image
center.
2. By prefixing a simple pre-processing step,
we can solve the general cases without
the centering constraint above.
Joo-Haeng Lee (joohaeng@etri.re.kr)
14. Proposed Solution
3. We also provide a determinant to tell if an
image quadrilateral is a projection of any
scene rectangle.
Joo-Haeng Lee (joohaeng@etri.re.kr)
15. Proposed Solution
3. We also provide a determinant to tell if an
image quadrilateral is a projection of any
scene rectangle.
4. We present the experimental results of the
proposed method with synthetic and real
data.
Joo-Haeng Lee (joohaeng@etri.re.kr)
17. l is a projection of a scene rectangle.
G
Illustrative Example
trate the performance of the proposed
h synthetic and real data.
Q
pa
a
1. Assume a simple camera model with di
Example what we can do! (ex) pinhole camera
unknown parameters:
C
mple camera • Square pixel: fx= fy di
unknown • No skew: s = 0 ca
• Image center on the tw
principal axis sh
age
So
Joo-Haeng Lee (joohaeng@etri.re.kr)
18. diagon
mple what we can do!
Constra
camera Illustrative= Example
• Square pixel: f f
x y diagon
own • No skew: s = 0 can be
2. Given an image quadrilateral Qg,
• Image center on the two lin
principal axis share th
s given, Qg Solutio
solution
estimat
camera
uad Q
ng points Joo-Haeng Lee (joohaeng@etri.re.kr)
19. • Image center on the two lin
principal axis share t
Illustrative Example
s given, Find a centered quad Q using the
3. Qg Solutio
vanishing points of Qg solutio
estimat
camera
uad Q
ng points
Q Exper
Synthe
e if the • Determinant: D
! 100 ran
d Q is A +A ±2 A A Joo-Haeng Lee (joohaeng@etri.re.kr)
20. Illustrative Example
3. Find a centered quad Q using the
vanishing points of Qg
w1 w0
u3
u3
g Qg
u2
g um Q
u0 u0
u1
Joo-Haeng Lee (joohaeng@etri.re.kr)
21. is given, Qg Soluti
solutio
Illustrative Example estima
camer
quad Q
ng points can determine if the the centered
4. We
quad Q is the image of a scene rectangle.Expe
Q
Synth
ne if the • Determinant: D
! 100 ra
d Q is A0 + A1 ± 2 A0 A1 Gref; (
cene D± = F1(li ) = >0
A1 − A0 within
vertice
relativ
p , an
Joo-Haeng Lee (joohaeng@etri.re.kr)
22. Q Exper
e if the Illustrative Example
• Determinant: D
Synthet
100 ran
Q is !
A0 + A1 ± 2 A0 A1 Gref; (2)
ne 5. If so, ±weF1(li ) =
D = can reconstruct the scene >0
A1 inA0 metric sense within
rectangles, G and Gg, − a
before camera calibration. vertices
relative
nstruct pc, and
e
metric Real: (1
era Gg G
with a k
ratio is
desk: A
Joo-Haeng Lee (joohaeng@etri.re.kr)
23. vertic
relati
construct Illustrative Example pc, an
ene
a metricFinally, we can calibrate camera
6. Real:
Gg G
mera parameters: (1) focal length f, (2) external with
params: [R|T] ratio
desk:
calibrate (2) in
ters: recon
calib
s: [R|T]
Joo-Haeng Lee (joohaeng@etri.re.kr)
24. Line Camera
Joo-Haeng Lee (joohaeng@etri.re.kr)
25. aint!
@etri.re.kr
! Line Camera
I, KOREA !
• Given: (1) 1D image of a scene line
denoted by l0 and l2; (2) the principal
pecial linear camera model!
axis passes through the center m of a
scene line.
pc
e of a
by l0 and y2 y
0
l2
axis l0
enter of s2 d s0
q0
v2 m v0
Joo-Haeng Lee (joohaeng@etri.re.kr)
26. pc
(1) 1D image of a
Line Camera
ine denoted by l0 and
l2
y2 y
0
he principal axis l0
s2 d
through the center an analytic solution to the pose0
of s
• Solution: q0
line. estimation of a line camera
v2 v0
m
n: an analytic l0 − l 2
cos θ 0 = d = dα 0
n to the pose l0 + l 2
ion of a line camera
v2 m v0 c
Joo-Haeng Lee (joohaeng@etri.re.kr)
27. pc
(1) 1D image of a
ine denoted by l0 and Line Camera l2
y2 y
0
he principal axis l0
s2 d
through the center an analytic solution to the pose0
of s
• Solution: q0
line. estimation of a line camera
v2 v0
m
mera model!
n: an analytic l0 − l 2
pc cos θ 0 = d = dα 0
n to the pose l0 + l 2
ion of a line camera
y 2 y0
l2
l0
s2 d s0
q0
v2 m v0 v2 m v0 c
Joo-Haeng Lee (joohaeng@etri.re.kr)
29. se l0 + l 2
e camera
Coupled Line Cameras
• Given:v(1) a centered quad Q; (2) the
2 m v0 c
principal axis passes through the center
Cameras a φ"of G pin-hole camera model!
of a scene rectangle G; (3) a diagonal
angle
special
pc
u1
red quad Q
al axis l1 r
e center of u2 l2 l0 u0 v1 v0
G; (3) a Q
l3 G
m
G: φ u3 v2 v3
Joo-Haeng Lee (joohaeng@etri.re.kr)
30. Cameras a special pin-hole camera model!
Coupled Line Cameras
pc
u1
red quad Q
al axis l1 r
center• Constraint: (1)0 for each diagonal of Q, a
of u2 l2 l u0
v1 v0
G; (3) a line camera lcan be defined; (2) these two
Q 3 G
m
G: φ line cameras share a2 principal axis.v3
u3 v
each cos θ 0 cos θ1
d= = = F2 (θ 0 ,θ1 ,li )
ne camera α0 α1
) these u0
u1 u3
hould
θ0
axis. u2 v0
v1 θ1
v2 v3 Joo-Haeng Lee (joohaeng@etri.re.kr)
31. Cameras adspecial =
G; (3) a
each cos θpin-hole θ1 G mmodel!
Q 30 cos camera
φ
G: camera = = F2 (θ 0 ,θ1 ,li )
ne α 0 u3 αv2 v3
pc 1
these
red quad
each
hould
Coupled Line Cameras
d=
ucos θ
u0 1 0
cos θ1
= u1 Q=u3F2 (θ 0 ,θ1 ,li )
al axis
ine camera u l1 αr α1
θ0 0
axis. of u2 l v0
v1 θ1
center• Solution:2an analytic 1solution to the pose
2
u0
2) these u0 l0 v v0
G; (3) a estimation of3 coupled line 3camerasv
should v2 Q
l u1 G u
m
G: φ
3
θ0 u v0
l axis. u2
3 v2 v1 θ1 v3
ic θ0
tan θ = cos θ) = D±
cos 0 F1(li
eeach vd =
2 2 = 1
= F2 (θ 0 ,θ1 ,li ) v3
ne camera
led line α0 α1
ytic θ 0 → d θ 0 θ 1 → ψ i → si → φ
→
) these u0 tan = F1(li ) = D±
se
hould →G→ c 2 p u1 u3
pled line
axis. u2 θ → θ0 d →vθ → ψ θ1 s → φ
0 →
0 1
v1 i i
erformance of the proposed method!
→G→ p
v2 c v3 Joo-Haeng Lee (joohaeng@etri.re.kr)
32. Cameras a special
G; (3) a 3
Q pin-hole camera model! G
m
came
G: φ u3 v2 v3
d quad Q
Coupled Line Cameras
pc
ucos θ cos θ1
hingquad
red points
each
1
Q= F (θ ,θ ,l )
d= 0
=
al axis
ine camera l1 αr
0
Qα1 2 0 1 i
Expe
center• Solution:l2an analytic 1solution to the pose
2) these of u2 u l0 u0
v v0
0
G; (3) a estimation of3 coupled line 3cameras
should Q
l u1 G u
Synt
ine if the u • Determinant: D m
G: φ
l axis. !2 θ0 u v0
3 v2 v1 θ1 v3 100
uad Q is A0 + A1 ± 2 A0 A1 Gref;
scene
each D± = cosiθ 0= cos θ1
vd = F (l ) = > 03
2 1 = A (θ 0 ,θ1 ,li ) v
A1 − F20 with
ne camera α0 α1 verti
ytic θ0
) these u0 tan = F1(li ) = D± relat
se
hould 2 u1 u3
construct u2
pled line pc, a
axis. θ0 → θ0 d →vθ → ψ θ1 s → φ
0
v1 i → i
ene 1
a metric v2
→ G → pc v3
Joo-Haeng Lee (joohaeng@etri.re.kr)
33. Cameras a special pin-holeu camera model!
should
0
u 1 3
θ0
l axis. u2 v0 θ1
Coupled Line Cameras
pc v1
u1
red quad Q
al axis v2 l1 r v3
center• Solution:l2an θl0 u0 v1solution to the pose
tic of u2 analytic v0
G; (3) a estimation of3 2 = F1(li line cameras
tanl =
) G D±
0
e Q coupled m
G: φ line
pled u3 v2 v3
θ 0 → d → θ 1 → ψ i → si → φ
each cos θ 0 cos θ1
d = → G → pc = = F2 (θ 0 ,θ1 ,li )
ne camera α0 α1
) these
erformance of the proposed method! u3
u0
u1
hould
θ0
axis.
erated
u2 v0
v1 θ1
Qg Gg
ngles: v2 Q v3 Joo-Haeng Lee (joohaeng@etri.re.kr)
34. Coupled Line Cameras
• Solution: an analytic solution to the pose
estimation of coupled line cameras
s0
Ψ0
x
k Β Θ0 pc
t0 Α0 d y z
Q
Φ G
t1 Α1
Ψ1
Θ1 s1
Ρ
Joo-Haeng Lee (joohaeng@etri.re.kr)
35. pc
scene, which will be projected as a line u0 u2 in the line
camera C0 . Especially, we are interested in the posi-
Ψ2 Ψ
0 rectangle G in a pin-hole camera with the center of pro-
l2
tion pc and the orientation θ0 of C0 when the principal
l0 jection at pc . Note that the principal axis passes through
s2 d s0
axis passes through the center vm of v0 v2 and the center vm , um and pc .
Θ
um = (0, 0, 1)0of image line.
v2 v0 v
Using this configuration of coupled line cameras, we
m 2 m v0 c
To simplify the formulation, we assume a canon- find the orientation θi of each line camera Ci and the
ical configuration where Trajectory of the centerand vm is
(a) Line camera (b)
vm vi = 1, of projection length d of the common principal axis Line Camera C1
(a) Pin-hole Camera (b) Line Camera C0 (c) from a given
placed at the1:origin of the worldacoordinate system:
Figure A configuration of line camera quadrilateral H. Using the lengths of partial diagonals,
vm = (0, 0, 0). For derivation, we define followings: Figure 2: A pin-hole camera and its decomposition into
li = um ui , we can find the relation between the cou-
coupled line cameras.
d = pc vm , li = um ui , ψi = ∠vm pc vi , and pled cameras Ci from (1):
s i = pc v i .
tan ψ1 l1 sin θ1 (d − cos θ0 )
scene,this configuration, we can derive theu2 in the line
In which will be projected as a line u0 following re- = = (3)
camera C0 . Especially, we are interested in the posi-
lation: tan ψpin-hole camera (d − the center of pro-
rectangle G in a 0 l0 sin θ0 with cos θ1 )
l2
tion pc and the orientation cosof0C0 when the principal
=
d−θ θ
0 =
d0
(1) jection at pc . Note that the principal axis passes through
Manipulation of (2) and (3) leads to the system of non-
axis passes through l0 thed + cosvθ0 of vd1 2 and the center
center m 0v vm , um and pc .
linear equations:
um = (0, 0, 1)d − cos θ0 = s0 cos ψ0 and d1 = d +
where d0 = of image line. Using this configuration of coupled line cameras, we
β sin θ0 cos θ1 − cos θ0 sin θ1 cos θ cos θ1
cos θ0 simplify the . formulation, we assume a between
To = s2 cos ψ2 We can derive the relation canon- find the orientation θi of each line =
d= camera 0 i and the
C=
icaland d from (1): where vm vi = 1, and vm is
θ0 configuration length d of β sincommon θ1
the θ0 − sin principal axisα0 α1
from a given
(4)
placed at the origin of the world coordinate system: quadrilateral H. Using the lengths of partial diagonals,
where β = l1 /l0 . Using (4), the orientation θ0 can be
vm = (0, 0, θ0 =For(l0 − l2 )/(l0we ldefine followings:
cos 0). d derivation, + 2 ) = d α0 (2) li = um ui , we can find the relation between the cou-
represented with coefficients, α0 , α1 , and β, that are
d = pc vm , li = um ui , ψi = ∠vm pc vi , and pled cameras Ci from (1):
solely derived from a quadrilateral H:
si = pαvi = (li − li+2 )/(li + li+2 ), which is solely
where c i .
tan ψ1 l1 sin θ1 (d − cos θ0 )
derived from a image line ui ui+2 . Note following re-
In this configuration, we can derive the that θ0 and d = + A ± 2√ A A
=
θ0 ψ0 A0 l0 1 sin θ0 (d0− 1 θ1 ) (3)
are sufficient parameters to determine the exact position
lation: tan tan = cos
= D± (5)
l2
of pc in 2D. When α0 d − cos θpc is defined on a certain
is fixed, 0 d0 2 A 1 − A0
= = (1) Manipulation of (2) and (3) leads to the system of non-
sphere as in Fig l0 Once θi and d are 1
1b. d + cos θ0 d known, additional where
linear equations:
where d0 =can − cos θ0determined:ψtan ψi d1 sin θi /d
parameters d be also = s cos
0 0 and
= = d+
A0 sin B0cos2B1 , cos θ0 1 =θB0= cos 1 0 = cos θ1
β = θ0 + θ1 − A sin 1 − 2Bθ
cos θsi = s cos/ sinWe. can derive the relation between
and = sin θi ψ . ψi
0 2 2 d=
θ0 and d from (1): B0 = 2(α0 − 0 −(α0 θ1 α1 ) − 4α0 (α1 − 1)2 βα1
β sin θ 1)2 sin + 2
2 2 α0 2
2.2. Coupled Line Cameras (4)
(α0 − . 2 (α0 (4), the orientation θ0 can be
where1β== l1 /l0 1)Using− α1 )(α0 + α1 )
B
cos θ = d (l − l )/(l + l ) = d α (2)
36. QUIZ 2. You have some image quadrilaterals
taken from a camera. Which of the following
is the image of any rectangle?
(a) Rhombus (b) Parallelogram
Isosceles
(c) (d)
Trapezoid
37. Qg is given, Qg Solu
solu
QUIZ 2. You have some image quadrilaterals
estim
taken from a camera. Which of the following cam
d quad Q
is the image of any rectangle?
hing points
Q Exp
(a) Rhombus (b) Parallelogram Synt
mine if the • Determinant: D
! 100
uad Q is A0 + A1 ± 2 A0 A1 Gref;
scene D± = F1(li ) = >0
A1 − A0 Isosceles with
(c) (d) verti
Trapezoid
relat
p,a
38. QUIZ 2. You have some image quadrilaterals
taken from a camera. Which of the following
is the image of any rectangle?
(a) Rhombus (b) Parallelogram
D>0 D<0
Isosceles
(c) (d)
Trapezoid
D<0 D<0
39. of G: φ (1) for each
raint: cos θ 0 cos θ1 v
u3 d = 2
v = = F2 (θ 0 ,θ1 ,l
3
nal of Q, a line cameraθ
cos 0 cos θ1
α0 α1
ordefined; (2) 2. You have some imageFquadrilaterals
e each QUIZ these d= = u0 = 2 (θ 0 ,θ1 ,li )
α0 α1
line camerashould camera. Which of the following
u1 u3
ne cameras from a
taken
(2) these the imageu0 anyurectangle? v0
is
the principal axis. of 2 θ0
v1 θ1
u1 u3
s should
θ0
pal axis. u2 v
v20 v1 θ1
on: an analytic Rhombus
v2
θ0
(a) tan Parallelogram = D±
= F1(li ) v3
on to the pose D>0
θ0 2
lytic of coupled linetan = F (l ) = D
ation
ose 2 θ 01 → d → θ±1 → ψ i → si → φ
i
ras
upled line → G → pc φ
θ → d →θ →ψ → s → Isosceles
0 1 i Trapezoid
i
→ G → pc
riments performance of the proposed method!
40. QUIZ 2. You have some image quadrilaterals
taken from a camera. Which of the following
is the image of any rectangle?
v0 v3
f
(a) Rhombus Parallelogram
D>0
v1 v2
Isosceles
Trapezoid
51. d; (2) these u0
u1 u3
ras should
cipal axis.
Synthetic Data
u2 θ0 v0
v1 θ1
v2 v3
nalytic θ0
1. Generated 100 random rectangles Gref and
corresponding image quads = refD±
tan = F1(li ) Q ;
pose 2
coupled 2. Get image θ → d →by adding noisesφto Qref
line quad Qg θ → ψ → s →
within dmax 0
pixels; 1 i i
→ G → pc
3. Reconstruct Gg from Qg;
ts performance of the errors between Gref and G
4. Measured proposed method! g.
generated Gg
Qg
ectangles: Q
d noises Gref G
Joo-Haeng Lee (joohaeng@etri.re.kr)
52. 0 1 i i
→ G → pc
Synthetic Data
performance of the proposed method!
nerated Gg
Qg
angles: Q
oises Gref G
s to the Error H%L
6
err; (3)
5
4
-vm|, φ , 3
2
1
dmax
1 2 3
|vi-vm| φ pc f
Aspect Ratio
gle 1.46 Ê
Ê
‡
Raw
Compensated
1.45 Joo-Haeng Lee (joohaeng@etri.re.kr)
53. Gerr; (3) 5
4
vi-vm|, φ , 3
2
1
1
Real Data
|vi-vm|
2
φ pc
3
f
dmax
Aspect Ratio
ngle 1. A rectangle with a known aspect ratio is
1.46 Ê
Ê
‡
Raw
Compensated
pect moving on a desk: (ex) A4-sized paper;
1.45
1.44
Ê Ê
1.43
on the 2. Take pictures to get 9 image quads;
Ê
‡
‡
1.42 Ê
‡ ‡
Ê ‡
φ = 1.414
1.41 ‡
Ê ‡ ‡
Ê
1.40 Ê ‡
y 3. Reconstructed and calibrated for each
1 2 3 4 5 6 7 8
Rect
9 ID
case.
Reconstructed aspect ratio: φ Merged frustums
d
cases. A moving
A4 paper
1 2 3 4
5 6 7 8 9
Joo-Haeng Lee (joohaeng@etri.re.kr)
54. Gerr; (3) 5
4
vi-vm|, φ , 3
2
1
1
Real Data
|vi-vm|
2
φ pc
3
f
dmax
Aspect Ratio
ngle 1.46 Ê
Ê
‡
Raw
Compensated
1.45
pect 1.44
Ê Ê
1.43
on the
Ê
‡
‡
1.42 Ê
‡ ‡
Ê ‡
φ = 1.414
1.41 ‡
Ê ‡ ‡
Ê
1.40 Ê ‡
Rect
y 1 2 3 4 5 6 7 8 9 ID
Reconstructed aspect ratio: φ Merged frustums
d
cases. A moving
A4 paper
1 2 3 4
5 6 7 8 9
Joo-Haeng Lee (joohaeng@etri.re.kr)
55. Summary
• We proposed an analytic solution to
reconstruct a scene rectangle of an
unknown aspect ratio from a single
image quadrilateral.
• Our method is based on novel
formulation of coupled line cameras and
rectangle constraint.
Joo-Haeng Lee (joohaeng@etri.re.kr)
56. Acknowledgement
This research has been partially supported by
KMKE & KRC 2010-ZC1140 and KMKE ISTDP
No.10041743
Joo-Haeng Lee (joohaeng@etri.re.kr)