Show / Hide Table of Contents

    Class ArucoCameraCalibration

    Calibrates a ArucoCamera with a ArucoBoard and saves the calibrated camera parameters in a file managed by ArucoCameraParametersController. Base class to reference in editor fields.

    See the OpenCV and the ArUco module documentations for more information about the calibration process: http://docs.opencv.org/3.4/da/d13/tutorial_aruco_calibration.html and https://docs.opencv.org/3.4/da/d13/tutorial_aruco_calibration.html

    Inheritance
    Object
    Controller
    ArucoCameraController
    ArucoObjectDetector
    ArucoCameraCalibration
    ArucoCameraCalibrationGeneric<T, U>
    Implements
    IArucoCameraController
    IController
    IHasDetectorParameter
    Inherited Members
    ArucoObjectDetector.DetectorParameters
    ArucoCameraController.ArucoCamera
    Controller.Configured
    Controller.Ready
    Controller.Started
    Controller.Stopped
    Controller.AutoStart
    Controller.IsConfigured
    Controller.IsReady
    Controller.IsStarted
    Controller.Awake()
    Controller.Start()
    Controller.OnDestroy()
    Controller.AddDependency(IController)
    Controller.RemoveDependency(IController)
    Controller.GetDependencies()
    Controller.Configure()
    Controller.StartController()
    Controller.StopController()
    Controller.OnConfigured()
    Controller.OnStarted()
    Controller.OnStopped()
    Namespace: ArucoUnity.Calibration
    Assembly: Assembly-CSharp.dll
    Syntax
    public abstract class ArucoCameraCalibration : ArucoObjectDetector, IArucoCameraController, IController, IHasDetectorParameter

    Fields

    | Improve this Doc View Source

    applicationPath

    Declaration
    protected string applicationPath
    Field Value
    Type Description
    String
    | Improve this Doc View Source

    calibratingException

    Declaration
    protected Exception calibratingException
    Field Value
    Type Description
    Exception
    | Improve this Doc View Source

    calibratingMutex

    Declaration
    protected Mutex calibratingMutex
    Field Value
    Type Description
    Mutex
    | Improve this Doc View Source

    calibratingThread

    Declaration
    protected Thread calibratingThread
    Field Value
    Type Description
    Thread

    Properties

    | Improve this Doc View Source

    AllMarkerCorners

    Gets the detected marker corners for each camera.

    Declaration
    public Std.VectorVectorVectorPoint2f[] AllMarkerCorners { get; protected set; }
    Property Value
    Type Description
    Std.VectorVectorVectorPoint2f[]
    | Improve this Doc View Source

    AllMarkerIds

    Gets the detected marker ids for each camera.

    Declaration
    public Std.VectorVectorInt[] AllMarkerIds { get; protected set; }
    Property Value
    Type Description
    Std.VectorVectorInt[]
    | Improve this Doc View Source

    CalibrationBoard

    Gets or sets the ArUco board to use for calibration.

    Declaration
    public ArucoBoard CalibrationBoard { get; set; }
    Property Value
    Type Description
    ArucoBoard
    | Improve this Doc View Source

    CalibrationFlags

    Gets or sets the flags for the cameras calibration.

    Declaration
    public CalibrationFlags CalibrationFlags { get; set; }
    Property Value
    Type Description
    CalibrationFlags
    | Improve this Doc View Source

    CalibrationRunning

    Gets if CalibrateAsync() has been called and hasn't completed yet.

    Declaration
    public bool CalibrationRunning { get; protected set; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    CameraParametersController

    Gets or sets the camera parameters to use if UseIntrinsicGuess is true. Otherwise, the camera parameters file will be generated from the camera name and the calibration datetime.

    Declaration
    public ArucoCameraParametersController CameraParametersController { get; set; }
    Property Value
    Type Description
    ArucoCameraParametersController
    | Improve this Doc View Source

    Images

    Gets the images to use for the calibration.

    Declaration
    public Std.VectorMat[] Images { get; protected set; }
    Property Value
    Type Description
    Std.VectorMat[]
    | Improve this Doc View Source

    IsCalibrated

    Gets if the last CalibrateAsync() call has been a success.

    Declaration
    public bool IsCalibrated { get; protected set; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    MarkerCorners

    Gets the detected marker corners on the current images of each camera.

    Declaration
    public Std.VectorVectorPoint2f[] MarkerCorners { get; protected set; }
    Property Value
    Type Description
    Std.VectorVectorPoint2f[]
    | Improve this Doc View Source

    MarkerIds

    Gets the detected marker ids on the current images of each camera.

    Declaration
    public Std.VectorInt[] MarkerIds { get; protected set; }
    Property Value
    Type Description
    Std.VectorInt[]
    | Improve this Doc View Source

    RefineMarkersDetection

    Gets or sets if need to use a refine algorithm to find not detected markers based on the already detected and the board layout.

    Declaration
    public bool RefineMarkersDetection { get; set; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    Rvecs

    Gets the estimated rotation vector for each detected markers in each camera.

    Declaration
    public Std.VectorVec3d[] Rvecs { get; protected set; }
    Property Value
    Type Description
    Std.VectorVec3d[]
    | Improve this Doc View Source

    Tvecs

    Gets the estimated translation vector for each detected markers in each camera.

    Declaration
    public Std.VectorVec3d[] Tvecs { get; protected set; }
    Property Value
    Type Description
    Std.VectorVec3d[]

    Methods

    | Improve this Doc View Source

    AddImages()

    Adds the current images of the cameras and the detected corners for the calibration.

    Declaration
    public virtual void AddImages()
    | Improve this Doc View Source

    ArucoCamera_ImagesUpdated()

    Detects and draw the ArUco markers on the current images of the cameras.

    Declaration
    protected virtual void ArucoCamera_ImagesUpdated()
    | Improve this Doc View Source

    Calibrate()

    Calibrates each mono camera in ArucoCamera using the detected markers added with AddImages(), the ArucoCameraParameters, the ArucoCameraUndistortion and save the results on a calibration file. Stereo calibrations will be additionally executed on these results for every camera pair.

    Declaration
    public virtual void Calibrate()
    | Improve this Doc View Source

    Calibrate(Std.VectorVectorPoint2f[], Std.VectorVectorPoint3f[])

    Applies a calibration to the ArucoCamera, set the extrinsic camera parameters to Rvecs and Tvecs and saves the camera parameters in CameraParameters.

    Declaration
    protected abstract void Calibrate(Std.VectorVectorPoint2f[] imagePoints, Std.VectorVectorPoint3f[] objectPoints)
    Parameters
    Type Name Description
    Std.VectorVectorPoint2f[] imagePoints

    The detected image points of each camera.

    Std.VectorVectorPoint3f[] objectPoints

    The corresponding object points of each camera.

    | Improve this Doc View Source

    CalibrateAsync()

    Calls Calibrate() in a background thread.

    Declaration
    public virtual void CalibrateAsync()
    | Improve this Doc View Source

    CancelCalibrateAsync()

    Stops the calibration if CalibrationRunning is true.

    Declaration
    public virtual void CancelCalibrateAsync()
    | Improve this Doc View Source

    Configuring()

    Checks if CalibrationBoard is set and calls ResetCalibration().

    Declaration
    protected override void Configuring()
    Overrides
    ArucoObjectDetector.Configuring()
    | Improve this Doc View Source

    DetectMarkers()

    Detects the Aruco markers on the current images of the cameras and store the results in the MarkerCorners and MarkerIds properties.

    Declaration
    public virtual void DetectMarkers()
    | Improve this Doc View Source

    DrawDetectedMarkers()

    Draws the detected ArUco markers on the current images of the cameras.

    Declaration
    public virtual void DrawDetectedMarkers()
    | Improve this Doc View Source

    InitializeCameraParameters()

    Initializes and configure the CameraParameters.

    Declaration
    protected virtual void InitializeCameraParameters()
    | Improve this Doc View Source

    LateUpdate()

    Calls the Calibrated event when a calibration has just completed.

    Declaration
    protected virtual void LateUpdate()
    | Improve this Doc View Source

    ResetCalibration()

    Resets the properties.

    Declaration
    public virtual void ResetCalibration()
    | Improve this Doc View Source

    Starting()

    Susbcribes to UndistortRectifyImages.

    Declaration
    protected override void Starting()
    Overrides
    Controller.Starting()
    | Improve this Doc View Source

    Stopping()

    Unsusbcribes from UndistortRectifyImages.

    Declaration
    protected override void Stopping()
    Overrides
    Controller.Stopping()

    Events

    | Improve this Doc View Source

    Calibrated

    Called when IsCalibrated is set to true.

    Declaration
    public event Action Calibrated
    Event Type
    Type Description
    Action

    Implements

    IArucoCameraController
    IController
    IHasDetectorParameter
    • Improve this Doc
    • View Source
    Back to top Aruco Unity - Erwan Normand