Class CalibrateStereoPlanar

All Implemented Interfaces:

public class CalibrateStereoPlanar extends Object implements VerbosePrint

Given a sequence of observations from a stereo camera compute the intrinsic calibration of each camera and the extrinsic calibration between the two cameras. A Planar calibration grid is used, which must be completely visible in all images.

Calibration is performed by first independently determining the intrinsic parameters of each camera as well as their extrinsic parameters relative to the calibration grid. Then the extrinsic parameters between the two cameras is found by creating two point clouds composed of the calibration points in each camera's view. Then the rigid body motion is found which transforms one point cloud into the other.

See comments in CalibrateMonoPlanar about when the y-axis should be inverted.

  • Constructor Details

    • CalibrateStereoPlanar

      public CalibrateStereoPlanar(List<List<Point2D_F64>> layouts)
      Configures stereo calibration
      layouts - How calibration points are laid out on each of the targets
  • Method Details

    • initialize

      public void initialize(ImageDimension left, ImageDimension right)
      Puts the class into its initial state.
      left - Shape of images from left camera
      right - Shape of images from left camera
    • configure

      public void configure(boolean assumeZeroSkew, int numRadialParam, boolean includeTangential)
      Specify calibration assumptions.
      assumeZeroSkew - If true zero skew is assumed.
      numRadialParam - Number of radial parameters
      includeTangential - If true it will estimate tangential distortion parameters.
    • addPair

      public void addPair(int targetID, List<PointIndex2D_F64> left, List<PointIndex2D_F64> right)
      Adds a pair of images that observed the same target.
      targetID - The calibration target being observed
      left - Image of left target.
      right - Image of right target.
    • process

      public StereoParameters process()
      Compute stereo calibration parameters
      Stereo calibration parameters
    • computeQualityText

      public String computeQualityText(List<String> namesLeft)
      Prints statistics based on image residuals
    • computeQualityText

      public static String computeQualityText(List<String> namesLeft, @Nullable @Nullable DogArray_B used, List<ImageResults> errors, CalibrationQuality qualityLeft, CalibrationQuality qualityRight)
      Creates human-readable text with metrics that indicate calibration quality
    • computeErrors

      public List<ImageResults> computeErrors()
    • setVerbose

      public void setVerbose(@Nullable @Nullable PrintStream out, @Nullable @Nullable Set<String> configuration)
      Specified by:
      setVerbose in interface VerbosePrint