[][src]Function opencv::calib3d::calibrate_camera_ro_with_stddev

pub fn calibrate_camera_ro_with_stddev(
    object_points: &dyn ToInputArray,
    image_points: &dyn ToInputArray,
    image_size: Size,
    i_fixed_point: i32,
    camera_matrix: &mut dyn ToInputOutputArray,
    dist_coeffs: &mut dyn ToInputOutputArray,
    rvecs: &mut dyn ToOutputArray,
    tvecs: &mut dyn ToOutputArray,
    new_obj_points: &mut dyn ToOutputArray,
    std_deviations_intrinsics: &mut dyn ToOutputArray,
    std_deviations_extrinsics: &mut dyn ToOutputArray,
    std_deviations_obj_points: &mut dyn ToOutputArray,
    per_view_errors: &mut dyn ToOutputArray,
    flags: i32,
    criteria: &TermCriteria
) -> Result<f64>

Finds the camera intrinsic and extrinsic parameters from several views of a calibration pattern.

This function is an extension of calibrateCamera() with the method of releasing object which was proposed in strobl2011iccv. In many common cases with inaccurate, unmeasured, roughly planar targets (calibration plates), this method can dramatically improve the precision of the estimated camera parameters. Both the object-releasing method and standard method are supported by this function. Use the parameter iFixedPoint for method selection. In the internal implementation, calibrateCamera() is a wrapper for this function.

Parameters

  • objectPoints: Vector of vectors of calibration pattern points in the calibration pattern coordinate space. See calibrateCamera() for details. If the method of releasing object to be used, the identical calibration board must be used in each view and it must be fully visible, and all objectPoints[i] must be the same and all points should be roughly close to a plane. The calibration target has to be rigid, or at least static if the camera (rather than the calibration target) is shifted for grabbing images.
  • imagePoints: Vector of vectors of the projections of calibration pattern points. See calibrateCamera() for details.
  • imageSize: Size of the image used only to initialize the intrinsic camera matrix.
  • iFixedPoint: The index of the 3D object point in objectPoints[0] to be fixed. It also acts as a switch for calibration method selection. If object-releasing method to be used, pass in the parameter in the range of [1, objectPoints[0].size()-2], otherwise a value out of this range will make standard calibration method selected. Usually the top-right corner point of the calibration board grid is recommended to be fixed when object-releasing method being utilized. According to \cite strobl2011iccv, two other points are also fixed. In this implementation, objectPoints[0].front and objectPoints[0].back.z are used. With object-releasing method, accurate rvecs, tvecs and newObjPoints are only possible if coordinates of these three fixed points are accurate enough.
  • cameraMatrix: Output 3x3 floating-point camera matrix. See calibrateCamera() for details.
  • distCoeffs: Output vector of distortion coefficients. See calibrateCamera() for details.
  • rvecs: Output vector of rotation vectors estimated for each pattern view. See calibrateCamera() for details.
  • tvecs: Output vector of translation vectors estimated for each pattern view.
  • newObjPoints: The updated output vector of calibration pattern points. The coordinates might be scaled based on three fixed points. The returned coordinates are accurate only if the above mentioned three fixed points are accurate. If not needed, noArray() can be passed in. This parameter is ignored with standard calibration method.
  • stdDeviationsIntrinsics: Output vector of standard deviations estimated for intrinsic parameters. See calibrateCamera() for details.
  • stdDeviationsExtrinsics: Output vector of standard deviations estimated for extrinsic parameters. See calibrateCamera() for details.
  • stdDeviationsObjPoints: Output vector of standard deviations estimated for refined coordinates of calibration pattern points. It has the same size and order as objectPoints[0] vector. This parameter is ignored with standard calibration method.
  • perViewErrors: Output vector of the RMS re-projection error estimated for each pattern view.
  • flags: Different flags that may be zero or a combination of some predefined values. See calibrateCamera() for details. If the method of releasing object is used, the calibration time may be much longer. CALIB_USE_QR or CALIB_USE_LU could be used for faster calibration with potentially less precise and less stable in some rare cases.
  • criteria: Termination criteria for the iterative optimization algorithm.

Returns

the overall RMS re-projection error.

The function estimates the intrinsic camera parameters and extrinsic parameters for each of the views. The algorithm is based on Zhang2000, BouguetMCT and strobl2011iccv. See calibrateCamera() for other detailed explanations.

See also

calibrateCamera, findChessboardCorners, solvePnP, initCameraMatrix2D, stereoCalibrate, undistort

C++ default parameters

  • flags: 0
  • criteria: TermCriteria( TermCriteria::COUNT + TermCriteria::EPS, 30, DBL_EPSILON)