摄像机标定:理论--Calibrating a camera: Theory

本文介绍了相机校准的基本原理,解释了为什么要进行相机校准,并详细阐述了通过棋盘格图案来确定镜头焦距、畸变参数等的过程。此外,还讨论了如何通过不同角度拍摄棋盘格以获取更准确的校准结果。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Calibrating a camera: Theory

Calibration

Why calibrate your camera? After calibration, you can use your camera to do real world measurements. It establishes a relation between pixels and real world dimensions. Also, you can remove distortions caused by a camera's physical flaws. The goal of calibration is to estimate the following:

  1. Focal length of lens along X axis
  2. Focal length of lens along Y axis
  3. Lens displacement along X axis
  4. Lens displacement along Y axis
  5. 3 numbers that describe radial distortion
  6. 2 numbers that describe tangential distortion
  7. The position of the camera in the real world (x, y and z)
  8. The orientation of the camera in the real world (around the x, y and z axis)

That's a lot of things that calibration establishes. Variables 1-4 constitute intrinsic parameters. Variables 5 and 6 are the distortion parameters. And variables 7 and 8 are the extrinsic parameters.

Calibrating with chessboards

One standard procedure to calculate all the unknowns above, or simply calibrating a camera, is to use a chessboard pattern. It looks like this:

A chessboard pattern

Remember that this is just an algorithm. They designed it using a chessboard. They could have done it using something else too.. a box or even a rubber duck. But a chessboard certain properties that makes it good for calibrating purposes:

  • It is a plane. You don't need to deal with "depth".
  • There exist points on this plane that you can identify uniquely.
  • You can extract these points very easily.
  • These points physically lie in straight lines, no matter how they appear on camera.

Posing the chessboard

You take several pictures of the chessboard. Each picture in a different orientation. These orientations should vary a lot. Or you might get a bad estimate of the various parameters. A possible chessboard orientation could be like this:

Multiple views of the chessboard

From all those images, you solve several equations. The result is the best estimate for all the unknowns we were looking for. This solving produces what is known as a homography. A homography is a matrix that connects the image-coordinates (pixels) and the real world coordinates (meters, centimeters, etc).

I won't go into its math right now, but just know that multiplying the homography with the position of a point in actual plane (chessboard) produces its image coordinates. And multiplying the image coordinates by the matrix inverse produces actual plane coordinates.

After calibration

Once you're done with solving all the equations and you have a result, you can fix distortions in the image and make actual measurements. Calibration is also needed for stereo vision.

Summary

You got an overview of how one particular method of camera calibration works. OpenCV comes with several functions that help you implement this. But there are minor points that need to be taken care of. We'll implement it next.


from: http://aishack.in/tutorials/calibrating-camera-theory/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值