| Customize Help

Steps to performing a camera calibration

The following steps provide a basic methodology for a typical camera calibration:

  1. Physically place the camera so that the working area is in the camera's field of view.

  2. Allocate a camera calibration context, using McalAlloc(). The camera calibration context will store the non-linear mapping between the pixel coordinate system and the world coordinate system, as well as information about the calibration setup, and the positions of all the coordinate systems. When allocating the context, specify the camera calibration mode.

  3. Calibrate your camera setup, using either McalGrid() or McalList() with M_FULL_CALIBRATION to map image pixels to world points in the camera calibration context.

  4. Associate the camera calibration context with an image or digitizer, using McalAssociate(), to enable working in real-world units. Once an image or digitizer is associated with a camera calibration context, it becomes known as a calibrated image or calibrated digitizer, respectively.

  5. Physically correct an image using McalTransformImage().

  6. Save your camera calibration context using McalSave() or McalStream().

  7. Free the camera calibration context using McalFree().

You can skip all of the above steps if no non-linear distortion is present and uniform camera calibration mode is sufficient; simply call McalUniform() to associate the default uniform camera calibration context with an image. Whereas, additional steps are required in M_3D_ROBOTICS mode. For more information, see the Uniform camera calibration and other camera calibration modes section later in this chapter.

Note that typically, if you physically move your camera, you will have to recalibrate. However, if you are using a 3D-based camera calibration mode, you can remain calibrated in the following two cases: