Top Banner
Fisheye camera calibration 2nd sequence (dated 9-29-05) Left and right cameras Christopher Geyer [email protected] October 6th, 2005 This report contains the calibration data for both of the fisheye cameras in the sequence available at: http://www.frc.ri.cmu.edu/projects/buzzard/fisheyedata/ We use the images in directory grid1/l and grid2/r to respectively calibrate the right and left cameras. I again include below the forward projection model, the backward projection model, both of which are common to both cameras, and then the calibrated parameters for each camera. visodomsbir5-califish-2nd-report.nb 1
21

Fisheye camera calibration - Field Robotics Center · Fisheye camera calibration 2nd sequence (dated 9−29−05) Left and right cameras Christopher Geyer [email protected] October

Jun 09, 2018

Download

Documents

lamthuy
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Fisheye camera calibration - Field Robotics Center · Fisheye camera calibration 2nd sequence (dated 9−29−05) Left and right cameras Christopher Geyer cgeyer@ri.cmu.edu October

Fisheye camera calibration2nd sequence (dated 9−29−05)

Left and right cameras

Christopher [email protected]

October 6th, 2005

This report contains the calibration data for both of the fisheye cameras in the sequence available at:

http://www.frc.ri.cmu.edu/projects/buzzard/fisheyedata/

We use the images in directory grid1/l and grid2/r to respectively calibrate the right and left cameras. I again includebelow the forward projection model, the backward projection model, both of which are common to both cameras, and thenthe calibrated parameters for each camera.

visodomsbir5−califish−2nd−report.nb 1

Page 2: Fisheye camera calibration - Field Robotics Center · Fisheye camera calibration 2nd sequence (dated 9−29−05) Left and right cameras Christopher Geyer cgeyer@ri.cmu.edu October

Projection model

� Forward projection

Since the camera imaging region extends beyond 90é from the optical axis, it is not possible to use the standard radialdistortion model for perspective models. In particular, it is not advised to convert fisheye camera image coordinates to aperspective imaging model, because as the viewing direction approaches a direction 90é from the optical axis, the equivalentperspective image coordinates would be going to infinity. Consequently we use the spherical model to represent imagepoints. The question is to find a transformation from space coordinates to image coordinates and back. We use thefollowing forward model for projection of space coordinates to image coordinates.

ikjjj u

vy{zzz =

ikjjj cx

cy

y{zzz +a0 tan-1 z����������������������������"#####################

x2 +y2+a1

ikjjjtan-1 z����������������������������"#####################x2 +y2

y{zzz2

�������������������������������������������������������������������������������������������������������!!!!!!!!!!!!!!!!x2 +y2

ikjjj x

yy{zzz

=ikjjj cx

cy

y{zzz + a0 Θ + a1 Θ2���������������������������������!!!!!!!!!!!!!!!!

x2 +y2 ikjjj x

yy{zzz

where Hx, y, zL are the space coordinates, and Θ is the angle between the direction of the point and the optical axis (). We usethis model because we expect the camera to obey a standard fisheye projection model given by:

r = "################################################Hu - cxL2 + Hv - cyL2 = a0 Θ

where r is the distance in the image from the image point to the image center. We add a quadratic term to correct fordeviations from this model, so that the first equation is effectively an explicit model of:

r = "################################################Hu - cxL2 + Hv - cyL2 = a0 Θ + a1 Θ2 .

Four calibration parameters. There are four calibration parameters that we will fit: cx , cy , a0 which is effectively the focallength, and a1 which is the quadratic correction term. I assmed square pixels and zero skew.

visodomsbir5−califish−2nd−report.nb 2

Page 3: Fisheye camera calibration - Field Robotics Center · Fisheye camera calibration 2nd sequence (dated 9−29−05) Left and right cameras Christopher Geyer cgeyer@ri.cmu.edu October

� Backward model

Since the forward model is quadratic, we can easily invert the model to obtain the mapping from image points to normalizedspace points, i.e. to a calibrated spherical camera model:

ikjjjjjjjjj x

y

z

y{zzzzzzzzz =

ikjjjjjjjjj cosΦ sinΘ

sinΦ sinΘ

cosΘ

y{zzzzzzzzz

where

Θ = -a0 +�!!!!!!!!!!!!!!!!!!!!!!!!!!!

a02 +4 a1 r���������������������������������������������������2 a1

,

r = "################################################Hu - cxL2 + Hv - cyL2 = a, and

Φ = tan-1 v-cy���������������u-cx

Left camera

� Estimated calibration parameters for left camera

I used the following 11 images for calibration images. Corners were detected with a corner detector (separable filter), andthen put into manual correspondence with a rectilinear lattice.

visodomsbir5−califish−2nd−report.nb 3

Page 4: Fisheye camera calibration - Field Robotics Center · Fisheye camera calibration 2nd sequence (dated 9−29−05) Left and right cameras Christopher Geyer cgeyer@ri.cmu.edu October

Using the lens’ boundary we can obtain an initial estimate of the calibration parameters. That allows us to back project themonto the sphere as shown below in the nine images. The circle denotes the 90é FOV boundary. The surface denotes thebelieved FOV boundary of the sensor (95é ).

visodomsbir5−califish−2nd−report.nb 4

Page 5: Fisheye camera calibration - Field Robotics Center · Fisheye camera calibration 2nd sequence (dated 9−29−05) Left and right cameras Christopher Geyer cgeyer@ri.cmu.edu October

� Calibration parameters

visodomsbir5−califish−2nd−report.nb 5

Page 6: Fisheye camera calibration - Field Robotics Center · Fisheye camera calibration 2nd sequence (dated 9−29−05) Left and right cameras Christopher Geyer cgeyer@ri.cmu.edu October

The resulting calibration parameters for the left camera are:

ikjjjjjjjjjjjjjjj

cx

cy

a0

a1

y{zzzzzzzzzzzzzzz =

ikjjjjjjjjjjjjjjj

242.5

226.5

173.0

|12 .6

y{zzzzzzzzzzzzzzz

visodomsbir5−califish−2nd−report.nb 6

Page 7: Fisheye camera calibration - Field Robotics Center · Fisheye camera calibration 2nd sequence (dated 9−29−05) Left and right cameras Christopher Geyer cgeyer@ri.cmu.edu October

� Coordinate system and 90é circle

y

x

{242.506, 226.506}

234.764 = 90 deg

visodomsbir5−califish−2nd−report.nb 7

Page 8: Fisheye camera calibration - Field Robotics Center · Fisheye camera calibration 2nd sequence (dated 9−29−05) Left and right cameras Christopher Geyer cgeyer@ri.cmu.edu October

NOTE 1: The origin of this coordinate system is the lower−left hand side of the image (this is somewhat non−standard, butthe coordinate system Mathematica uses). Furthermore, the image was downsampled, so the coordinates should bemultiplied by two if you don’t also downsaple your images.

NOTE 2: To correct for possible changes in the lens position in the images that you use. Until we acquire a new sequence, Irecommend fitting a circle to the boundary of the lens image, and scaling the parameters accordingly. For the data acquiredhere, in downsampled coordinates, the radius of this circle was 117.71 pixels. Therefore, supposing you measure the lensboundary to have radius r0 , let your new focal length parameters be:

ikjjj a0¢

a1¢

y{zzz =ikjjjj r0�������������������117.71 a0

r0�������������������117.71 a1

y{zzzzwhere a0 and a1 are the parameters obtained above, and a0

¢ and a1¢ are the parameters you would use. The image center

can be similarly obtained as follows:

ikjjj cx¢

cy¢

y{zzz =ikjjj dx

dy

y{zzz + r0�������������������117.71Aikjjj cx

cy

y{zzz -ikjjj 122.66

111.75y{zzzE

where Hdx , dyL is the center of the circle you obtain, and where H122.66, 111.75L were the coordinates of the circle that Iobtained in the sequence used here.

The distribution of error vectors is shown below. All of the errors are within a pixel.

-0.75 -0.5 -0.25 0.25 0.5 0.75

-1

-0.5

0.5

� Uncertainty in model

In order to estimate the uncertainty in these parameters I have provided the inverse of the Hessian in the calibrationparameters, and also done a bootstrap estimation procedure in which four of the targets are randomly thrown away.

visodomsbir5−califish−2nd−report.nb 8

Page 9: Fisheye camera calibration - Field Robotics Center · Fisheye camera calibration 2nd sequence (dated 9−29−05) Left and right cameras Christopher Geyer cgeyer@ri.cmu.edu October

� Distribution of image center in bootstrap

The red point is the estimated parameter using all the data. The blue point is the mean of the estimates in which data fromfour of the targets is discarded.

241.5 242 242.5 243 243.5 244

226

227

228

image center

visodomsbir5−califish−2nd−report.nb 9

Page 10: Fisheye camera calibration - Field Robotics Center · Fisheye camera calibration 2nd sequence (dated 9−29−05) Left and right cameras Christopher Geyer cgeyer@ri.cmu.edu October

� Distribution of Ha0 , a1 L in bootstrap

168 170 172 174a0 (focal length)

-14

-13

-12

-11

-10

a1 (radialdistortion) a0 vs. a1

� Distribution of radial pixel distances

The distribution of Ha0 , a1L will cause uncertainty in the distance from the image center as a function of angle. The followingplot shows a subset of the models for various values of Ha0 , a1L which were estimated when four of the eleven targets werediscarded.

visodomsbir5−califish−2nd−report.nb 10

Page 11: Fisheye camera calibration - Field Robotics Center · Fisheye camera calibration 2nd sequence (dated 9−29−05) Left and right cameras Christopher Geyer cgeyer@ri.cmu.edu October

0.25 0.5 0.75 1 1.25 1.5rad

50

100

150

200

dist. fromimg. center distance from img.

center as func of angle

The following plot is a closer up near 90é degrees.

visodomsbir5−califish−2nd−report.nb 11

Page 12: Fisheye camera calibration - Field Robotics Center · Fisheye camera calibration 2nd sequence (dated 9−29−05) Left and right cameras Christopher Geyer cgeyer@ri.cmu.edu October

1.25 1.35 1.4 1.45 1.5 1.55rad

210

220

230

240

dist. fromimg. center(close-up) distance from img.

center as func of angle

The following plot is a histogram of the radii when given 90é , and for different values of Ha0 , a1L.

238 239 240 241 242 243

5

10

15

20

distribution of radial distanceat 90 degrees; std dev.:1.23916

visodomsbir5−califish−2nd−report.nb 12

Page 13: Fisheye camera calibration - Field Robotics Center · Fisheye camera calibration 2nd sequence (dated 9−29−05) Left and right cameras Christopher Geyer cgeyer@ri.cmu.edu October

Right camera

� Estimated calibration parameters for left camera

I used the following 12 images for calibration images; nine are show. Corners were detected with a corner detector(separable filter), and then put into manual correspondence with a rectilinear lattice.

visodomsbir5−califish−2nd−report.nb 13

Page 14: Fisheye camera calibration - Field Robotics Center · Fisheye camera calibration 2nd sequence (dated 9−29−05) Left and right cameras Christopher Geyer cgeyer@ri.cmu.edu October

Using the lens’ boundary we can obtain an initial estimate of the calibration parameters. That allows us to back project themonto the sphere as shown below in the nine images. The circle denotes the 90é FOV boundary. The surface denotes thebelieved FOV boundary of the sensor (95é ).

visodomsbir5−califish−2nd−report.nb 14

Page 15: Fisheye camera calibration - Field Robotics Center · Fisheye camera calibration 2nd sequence (dated 9−29−05) Left and right cameras Christopher Geyer cgeyer@ri.cmu.edu October

visodomsbir5−califish−2nd−report.nb 15

Page 16: Fisheye camera calibration - Field Robotics Center · Fisheye camera calibration 2nd sequence (dated 9−29−05) Left and right cameras Christopher Geyer cgeyer@ri.cmu.edu October

� Calibration parameters

245.46474376464928‘, 197.88627655008835‘, 171.76169893550366‘, -11.396663094295993‘

The resulting calibration parameters for the left camera are:

ikjjjjjjjjjjjjjjj

cx

cy

a0

a1

y{zzzzzzzzzzzzzzz =

ikjjjjjjjjjjjjjjj

245.5

197.9

171.8

|11 .4

y{zzzzzzzzzzzzzzz

visodomsbir5−califish−2nd−report.nb 16

Page 17: Fisheye camera calibration - Field Robotics Center · Fisheye camera calibration 2nd sequence (dated 9−29−05) Left and right cameras Christopher Geyer cgeyer@ri.cmu.edu October

� Coordinate system and 90é circle

y

x

{245.465, 197.886}

238.892 = 90 deg

The distribution of error vectors is shown below. All of the errors are within a pixel.

visodomsbir5−califish−2nd−report.nb 17

Page 18: Fisheye camera calibration - Field Robotics Center · Fisheye camera calibration 2nd sequence (dated 9−29−05) Left and right cameras Christopher Geyer cgeyer@ri.cmu.edu October

-0.5 0.5 1

-0.5

0.5

1

� Uncertainty in model

In order to estimate the uncertainty in these parameters I have provided the inverse of the Hessian in the calibrationparameters, and also done a bootstrap estimation procedure in which four of the targets are randomly thrown away.

� Distribution of image center in bootstrap

The red point is the estimated parameter using all the data. The blue point is the mean of the estimates in which data fromfour of the targets is discarded.

244.5 245.5 246 246.5 247

197.5

198

198.5

image center

visodomsbir5−califish−2nd−report.nb 18

Page 19: Fisheye camera calibration - Field Robotics Center · Fisheye camera calibration 2nd sequence (dated 9−29−05) Left and right cameras Christopher Geyer cgeyer@ri.cmu.edu October

� Distribution of Ha0 , a1 L in bootstrap

171 172 173a0 (focal length)

-12.5

-11.5

-11

-10.5

a1 (radialdistortion) a0 vs. a1

� Distribution of radial pixel distances

The distribution of Ha0 , a1L will cause uncertainty in the distance from the image center as a function of angle. The followingplot shows a subset of the models for various values of Ha0 , a1L which were estimated when four of the eleven targets werediscarded.

visodomsbir5−califish−2nd−report.nb 19

Page 20: Fisheye camera calibration - Field Robotics Center · Fisheye camera calibration 2nd sequence (dated 9−29−05) Left and right cameras Christopher Geyer cgeyer@ri.cmu.edu October

0.25 0.5 0.75 1 1.25 1.5rad

50

100

150

200

250

dist. fromimg. center

distance from img.center as func of angle

The following plot is a closer up near 90é degrees.

1.25 1.35 1.4 1.45 1.5 1.55rad

210

220

230

240

dist. fromimg. center(close-up)

distance from img.center as func of angle

visodomsbir5−califish−2nd−report.nb 20

Page 21: Fisheye camera calibration - Field Robotics Center · Fisheye camera calibration 2nd sequence (dated 9−29−05) Left and right cameras Christopher Geyer cgeyer@ri.cmu.edu October

The following plot is a histogram of the radii when given 90é , and for different values of Ha0 , a1L.

240 241 242 243 244 245

2.5

5

7.5

10

12.5

15

distribution of radial distanceat 90 degrees; std dev.:1.37788

Appendix: Easy circle fitting

To spare you the exercise of fitting a circle to a set of points, an approximate method is explained briefly here. Supposingthat you have a set of points Hxi , yi L, construct a matrix:

D =ikjjjjjjjjj » » » »

2 xi 2 yi -1 + xi2 + yi

2 -1 - xi2 - yi

2

» » » »

y{zzzzzzzzz

As usual, take its least singular vector. Equate it with the following vector, up to scale, to find cx , cy and r:H 2 cx 2 cy -1 + cx2 + cy

2 - r2 1 + cx2 + cy

2 - r2 L .There are three unknowns plus scale. (Verify that above vector dotted with one of the rows is the equation of a circle.)

visodomsbir5−califish−2nd−report.nb 21