5. Overview
5
Goal : estimate distance between two balls
distance
There are no restriction on the direction of image capture
6. Base technology & theory
6
Semantic segmentation
why : estimating area of each ball
When the distance between objects increases by x, the apparent size
increases by 1/x2
・ to estimate the distance to the ball from the area
of the ball
Triangle congruence theorems
why : triangulate the distance between two balls from
the distance between ball and camera
7. Method -overview-
7
Triangle congruence theorem needs
𝐿1:distance between camera and ball
𝐿2:distance between camera and ball
𝜃:angle between ball1, ball2, and camera
𝜃
𝐿1
𝐿2
𝐷
ball1
ball2
𝐿1, 𝐿2, 𝜃 → 𝐷
8. Method -overview-
8
Triangle congruence theorem needs
𝐿1:distance between camera and ball
𝐿2:distance between camera and ball
𝜃:angle between ball1, ball2, and camera
𝜃
𝐿1
𝐿2
𝐷
ball1
ball2
prior information
・camera angle of view
・number of pixels when the ball is
at the reference distance
𝐿1, 𝐿2, 𝜃 → 𝐷
9. Method -estimating distance between ball and camera-
9
𝜃
𝐿1
𝐿2
𝐷
ball1
ball2
Triangle congruence theorem needs
𝐿1:distance between camera and ball
𝐿2:distance between camera and ball
𝜃:angle between ball1, ball2, and camera
10. Method -estimating distance between ball and camera-
10
1 : Calibrating distance of the ball (prior information)
· count the number of pixels when the ball is at the reference distance
· use five annotation images
2 : Calculating the area of each ball
· semantic segmentation
· labeling two balls using K-MEANS
3 : Calculating the distance between ball and camera
· use law of distance 𝑆0
1
𝑥2 ⇄ 𝐿0𝑥
11. 1 : Calibrating distance of the ball (prior information)
· count the number of pixels when the ball is at the reference distance
· use five annotation images
2 : Calculate the area of each ball
· semantic segmentation
· rabeling two balls using K-MEANS
3 : Calculating the distance between ball and camera
· use law of distance 𝑆0
1
𝑥2 ⇄ 𝐿0𝑥
Method -estimating distance between ball and camera-
Ball distance=0.5[m](= 𝐿0) annotation image
X0[pixels]
U [pixels]
V [pixels]
S0=X0/(U2+V2)
11
12. Method -estimating distance between ball and camera-
12
1 : Calibrating distance of the ball (prior information)
· count the number of pixels when the ball is at the reference distance
· use five annotation images
2 : Calculating the area of each ball
· semantic segmentation
· labelling two balls using K-MEANS
3 : Calculating the distance between ball and camera
· use law of distance 𝑆0
1
𝑥2 ⇄ 𝐿0𝑥
output of semseg
output of K-MEANS
13. 1 : Calibrating distance of the ball (prior information)
· count the number of pixels when the ball is at the reference distance
· use five annotation images
2 : Calculating the area of each ball
· semantic segmentation
· labelling two balls using K-MEANS
3 : Calculating the distance between ball and camera
· use law of distance 𝑆0
1
𝑥2 ⇄ 𝐿0𝑥
Method -estimating distance between ball and camera-
13
𝑥:scale factor, 𝐿𝑥: 𝑑𝑖𝑠𝑡𝑎𝑛𝑐𝑒 𝑡ℎ𝑎𝑡 𝑠𝑐𝑎𝑙𝑒 𝑓𝑎𝑐𝑡𝑜𝑟 𝑖𝑠 𝑥
1
𝑥2 =
𝑆𝑥
𝑆0
, 𝑆0
1
𝑥2 ⇄ 𝐿0𝑥 (= 𝐿𝑥)より
𝐿𝑥 = 𝐿0
𝑆0
𝑆𝑥
14. Method -estimate angle between ball1, ball2, and camera-
14
𝜃
𝐿1
𝐿2
𝐷
ball1
ball2
Triangle congruence theorems needs
𝐿1:distance between camera and ball
𝐿2:distance between camera and ball
𝜃:angle between ball1, ball2, and camera
15. 15
Method -estimate angle between ball1, ball2, and camera-
𝜃
Ball1(𝑢1, 𝑣1)
ball2 (𝑢2, 𝑣2)
𝛼: vertical angle
𝛽: horizontal angle
Find the Euclidean distance and
normalize by the angle of view
▶︎ estimate 𝜃 = 𝐴 ×
𝐵
𝐶
𝐵 = (𝑢1 − 𝑢2)2 + (𝑢1−𝑢2)2
𝐴 = 𝛼2 + 𝛽2
𝐶 = 𝑈𝑚𝑎𝑥
2
+ 𝑉
𝑚𝑎𝑥
2
16. 16
Method -triangle congruence theorems -
Triangle congruence theorems needs
𝐿1:distance between camera and ball
𝐿2:distance between camera and ball
𝜃:angle between ball1, ball2, and camera
𝜃
𝐿1
𝐿2
𝐷
ball1
ball2
<repost>
17. 17
Method -triangle congruence theorems -
Triangle congruence theorems needs
𝐿1:distance between camera and ball
𝐿2:distance between camera and ball
𝜃:angle between ball1, ball2, and camera
𝜃
𝐿1
𝐿2
𝐷
ball1
ball2
<repost>
𝐷= 𝐿1
2
+ 𝐿2
2
− 2𝐿1𝐿2𝑐𝑜𝑠𝜃
(Law of cosines)
20. Discussion1
20
No.1 possible source of error is the accuracy of semseg
→ Increase annotation images and new ways to learn
9906
Correct distance : 50[cm]
Output distance 345[cm]
21. Discussion2
21
Photo distortion may affect accuracy
→Obtaining internal parameters and correcting
[1],[2]http://www.tctec.co.jp/solution/img_pro/camera/
Distortion[1] No distortion[2]
22. Application, future potential
22
All this program needs are balls and a monocular
visible light camera. Because it is simple to use, it can
be installed on Smartphone.
Program only needs one direction to work
K-MEANS (k=2) was used, but another algorithm(e.g. X-MEANS)
can be used to estimate if more than three balls are included