Collapse
CollapsingX
  • - or -

Calibration


Calibration allows you to map pixel coordinates to real-world coordinates. Mapping allows other steps to return results in real-world units.

Calibration can also be used to compensate for distortion from the camera, optics, and placement. The ModelFinder step and Metrology step automatically compensate for any distortion in an image when a calibration is associated. Other steps produce more accurate results when applied to an unwarped image.

Defining new calibrations

A calibration can be defined using one of 4 methods: by scaling, with a list of points, with a list of points from 2 arrays, or by using a grid.

  • The Scale method allows you to calibrate your image by specifying a length in pixels and the equivalent length in real-world coordinates.

  • The Grid method determines the calibration points from a user-provided grid of circles or a chessboard. You will need to provide the number of rows and columns, as well as the center-to-center distance between these rows and columns in real-world units.

  • With the ListOfPoints method you provide a list of points. For each point, you need to precisely provide its pixel's coordinates and real-world coordinates.

  • With the ListOfPointsFromArray method you provide 2 sets of arrays. The first array provides all the pixels' coordinates, and the second array describes all the real-world coordinates.

There are 2 ways to define a calibration:

After the calibration has been defined, you need to associate it with the Camera step. When associating a calibration file, you can use a calibration file that you just defined or use any calibration file (*.mca) on the network. See the Associate a calibration file with the Camera step subsection of the Procedure for using the Camera step section in Chapter 28: Acquisition.

You can also use this calibration in other steps, such as the ImageProcessing step, or when Using static images.

Any new calibration file that you create, using either the portal page or the Calibration step, is initially saved on the runtime platform to which you are currently connected. All calibration files on a runtime platform are stored in a single folder, regardless of how many projects might use the calibration. This implies that all calibration files on a runtime platform must have unique file names based on the CalibrationName property, and not on the step name.

Managing multiple calibrations in one or more platforms

In a project with multiple cameras, it is often necessary for each camera to have its own calibration because each camera is subject to its own placement and distortions.

A calibration file (*.mca) is stored on a runtime platform, for use by all projects and cameras on that platform. Some backup copies of a platform's calibration files are also kept on the development computer. Whenever a project is saved on the development computer, a copy of all calibration files that project uses are saved with the project. For more information about where the calibration files and their copies are stored, see the Using multiple calibrations section later in this chapter.

Calibration in emulation mode

If you are connected to an emulated runtime platform and create a new calibration file with a Calibration step, the .mca file is stored in the project's platform folder under Emulation, for instance at My Documents\Matrox Design Assistant\Projects\TargetProjectName\Platforms\Emulation\Calibrations. This makes an emulation's calibration file the same as the calibration file backups in the other platforms of the project.