You are on page 1of 9

Computer Vision: 2D Camera Calibration 30-jan-13

Jaap van de Loosdrecht, NHL, vdLMV, j.van.de.loosdrecht@tech.nhl.nl 1


Computer vision
3D Stereo camera Bumblebee
22 January 2013
Copyright 2001 2013 by
NHL Hogeschool and Van de Loosdrecht Machine Vision BV
All rights reserved
Thomas Osinga
j.van.de.loosdrecht@tech.nhl.nl, jaap@vdlmv.nl
30-jan-13 3D Stereo camera Bumblebee 2
3D Stereo Camera Bumblebee
Overview:
Introduction to stereo vision
Camera stereo parameters
Accuracy with different baselengths
Examples
Advantages / Disadvantages
Computer Vision: 2D Camera Calibration 30-jan-13
Jaap van de Loosdrecht, NHL, vdLMV, j.van.de.loosdrecht@tech.nhl.nl 2
30-jan-13 3D Stereo camera Bumblebee 3
Introduction to stereo vision
30-jan-13 3D Stereo camera Bumblebee 4
Introduction to stereo vision
Stereo vision cameras are used to perform 3D measurements
Stereo vision is based on the human eyes:
The camera takes two snapshots from different positions.
When a certain object can be identified as a pixel location in
one image and in the other image, then the distance can be
calculated based on the translation of the object pixel
Some problems in stereo vision:
Identifying of pixels in multiple images for matching the
same world coordinates
Correct calibration of both cameras, so the pixels can be
correlated
Less accuracy on larger distances
Computer Vision: 2D Camera Calibration 30-jan-13
Jaap van de Loosdrecht, NHL, vdLMV, j.van.de.loosdrecht@tech.nhl.nl 3
30-jan-13 3D Stereo camera Bumblebee 5
Introduction to stereo vision
Identifying of pixels in multiple images for matching the same
world coordinates:
This can be solved with stereo vision algorithms. There are
many algorithms available. A stereo vision SDK is delivered
with the BumbleBee cameras.
30-jan-13 3D Stereo camera Bumblebee 6
Introduction to stereo vision
Correct calibration of both cameras, so the pixels can be
correlated
A stereo rig is used to calibrate the cameras. The images have
to be mapped to a pin-hole camera model. This image is called
rectified.
Raw image with lens distortion Rectified pin-hole image
Computer Vision: 2D Camera Calibration 30-jan-13
Jaap van de Loosdrecht, NHL, vdLMV, j.van.de.loosdrecht@tech.nhl.nl 4
30-jan-13 3D Stereo camera Bumblebee 7
Introduction to stereo vision
Less accuracy on larger distances
The distance calculation is based on the following equation:
in this equation f is the focal length of the lens in pixels. The
disparity is the difference in x-direction of the pixel
coordinates in both images
) (
) ( ) (
) (
pix
m pix
m
Disp
base f
Dist

=
30-jan-13 3D Stereo camera Bumblebee 8
Introduction to stereo vision
Less accuracy on larger distances
When the distance according to each pixelvalue is plotted, the
following graph will appear
Disparity y = 184,35x
-1,0033
R
2
= 0,9972
0
2
4
6
8
10
12
14
16
0 20 40 60 80
Pixelwaarde
A
f
s
t
a
n
d
(
m
)
Disparity
Macht (Disparity)
Computer Vision: 2D Camera Calibration 30-jan-13
Jaap van de Loosdrecht, NHL, vdLMV, j.van.de.loosdrecht@tech.nhl.nl 5
30-jan-13 3D Stereo camera Bumblebee 9
Introduction to stereo vision
To get a correct depth image, a few steps need to be taken:
30-jan-13 3D Stereo camera Bumblebee 10
Camera stereo parameters
Mode
The BumbleBee cameras have 7 different modes:
1: Raw Image
2: Rectified Color
3: Rectified
4: Disparity (this gives a depth image)
5: Disparity Color (this gives a depth image in false colors)
6: Disparity Validation (when certain areas are not volidated in
the vision algorithm they get a certain color)
7: Absolute (in this mode the absolute world coordinates are
given)
Pan
With this parameter the user can choose witch cameras are
used to perform stereo vision algorithms
Computer Vision: 2D Camera Calibration 30-jan-13
Jaap van de Loosdrecht, NHL, vdLMV, j.van.de.loosdrecht@tech.nhl.nl 6
30-jan-13 3D Stereo camera Bumblebee 11
Camera stereo parameters
Disparity
The disparity range is the range of pixelvalues in wich the
stereo algorithm searches for a best match. A disparity value
of 0 means that an object is unlimited far away. A maximum
disparity value means that this is the closest distance that an
object can be measured
Disparity Mapping
With disparity mapping the user can define a pixel range in
wich the result pixels will be shown. This is comparable with a
contrast stretch.
Stereo Mask
The user can define the size of the mask that is used to
correlate both images.
Edge Mask
The user can define the size of the edge mask that is used to
correlate both images.
30-jan-13 3D Stereo camera Bumblebee 12
Accuracy with different baselengths
To achieve higher accuray a bigger baselength is needed.
When measuring the same distance with the same stereo
cameras on a bigger base. The accuracy will be like the
following graph
Nauwkeurigheid
0
0,1
0,2
0,3
0,4
0,5
0,6
0,7
0,8
0,9
1
1,1
1,2
1,3
1,4
1,5
1,6
1,7
1,8
1,9
2
2,1
2,2
2,3
0 1 2 3 4 5 6
Basis (m)
N
a
u
w
k
e
u
r
ig
h
e
id
(
m
)
Nauwkeurigheid
Computer Vision: 2D Camera Calibration 30-jan-13
Jaap van de Loosdrecht, NHL, vdLMV, j.van.de.loosdrecht@tech.nhl.nl 7
30-jan-13 3D Stereo camera Bumblebee 13
Examples
Rectified Color Image
30-jan-13 3D Stereo camera Bumblebee 14
Examples
Disparity image (on 3m distance)
Computer Vision: 2D Camera Calibration 30-jan-13
Jaap van de Loosdrecht, NHL, vdLMV, j.van.de.loosdrecht@tech.nhl.nl 8
30-jan-13 3D Stereo camera Bumblebee 15
Examples
Disparity image (on 2m distance)
30-jan-13 3D Stereo camera Bumblebee 16
Examples
Disparity image (on 1m distance)
Computer Vision: 2D Camera Calibration 30-jan-13
Jaap van de Loosdrecht, NHL, vdLMV, j.van.de.loosdrecht@tech.nhl.nl 9
30-jan-13 3D Stereo camera Bumblebee 17
Advantages / Disadvantages
Advantages
High accuracy can be achieved by using the correct base
Accuracy on different distances can be calculated
When focal length of the lens is known, the needed base
can be calculated for good accuracy
Disadvantages
Not possible to calculate distance of every pixel in the
image
Accuracy is not linear

You might also like