Class ArucoCameraParameters
Manage the camera parameters from a calibration.
Namespace: ArucoUnity.Cameras.Parameters
Assembly: Assembly-CSharp.dll
Syntax
[Serializable]
public class ArucoCameraParameters
Constructors
| Improve this Doc View SourceArucoCameraParameters()
Create an empty CameraParameters and set CalibrationDateTime to now.
Declaration
public ArucoCameraParameters()
Remarks
This constructor is needed for the serialization.
ArucoCameraParameters(Int32)
Initialize the properties.
Declaration
public ArucoCameraParameters(int camerasNumber)
Parameters
| Type | Name | Description |
|---|---|---|
| Int32 | camerasNumber | The number of camera in the camera system. Must be equal to the number of cameras of the related ArucoCamera. |
Fields
| Improve this Doc View SourcecameraMatrices
Declaration
protected Cv.Mat[] cameraMatrices
Field Value
| Type | Description |
|---|---|
| Cv.Mat[] |
Properties
| Improve this Doc View SourceCalibrationDateTime
The calibration date and time.
Declaration
public DateTime CalibrationDateTime { get; set; }
Property Value
| Type | Description |
|---|---|
| DateTime |
CalibrationFlagsValue
The calibration flags used.
Declaration
public int CalibrationFlagsValue { get; set; }
Property Value
| Type | Description |
|---|---|
| Int32 |
CameraMatrices
The camera matrices of the calibration.
Declaration
public Cv.Mat[] CameraMatrices { get; set; }
Property Value
| Type | Description |
|---|---|
| Cv.Mat[] |
Remarks
When SaveToXmlFile(String) is called, it's serialized with the CameraMatricesType and CameraMatricesValues properties.
CameraMatricesType
The camera matrix type of the calibration. Equals to
Declaration
public Cv.Type CameraMatricesType { get; set; }
Property Value
| Type | Description |
|---|---|
| Cv.Type |
Remarks
This property is be public for the serialization.
CameraMatricesValues
The camera matrix values of the calibration. Equals to the CameraMatrices content and automatically written when SaveToXmlFile(String) is called.
Declaration
public double[][][] CameraMatricesValues { get; set; }
Property Value
| Type | Description |
|---|---|
| Double[][][] |
Remarks
This property is be public for the serialization.
CameraNumber
The number of the camera during the calibration.
Declaration
public int CameraNumber { get; set; }
Property Value
| Type | Description |
|---|---|
| Int32 |
DistCoeffs
The distorsition coefficients of the calibration.
Declaration
public Cv.Mat[] DistCoeffs { get; set; }
Property Value
| Type | Description |
|---|---|
| Cv.Mat[] |
Remarks
When SaveToXmlFile(String) is called, it's serialized with the DistCoeffsType and DistCoeffsValues properties.
DistCoeffsType
The distorsition coefficients type of the calibration. Equals to
Declaration
public Cv.Type DistCoeffsType { get; set; }
Property Value
| Type | Description |
|---|---|
| Cv.Type |
Remarks
This property is be public for the serialization.
DistCoeffsValues
The distorsition coefficients values of the calibration. Equals to the DistCoeffs content and automatically written when SaveToXmlFile(String) is called.
Declaration
public double[][][] DistCoeffsValues { get; set; }
Property Value
| Type | Description |
|---|---|
| Double[][][] |
Remarks
This property is be public for the serialization.
FilePath
The file path of the parameters.
Declaration
public string FilePath { get; protected set; }
Property Value
| Type | Description |
|---|---|
| String |
FixAspectRatioValue
Non null if there is a fix image aspect ratio.
Declaration
public float FixAspectRatioValue { get; set; }
Property Value
| Type | Description |
|---|---|
| Single |
ImageHeights
The image height during the calibration.
Declaration
public int[] ImageHeights { get; set; }
Property Value
| Type | Description |
|---|---|
| Int32[] |
ImageWidths
The image width during the calibration.
Declaration
public int[] ImageWidths { get; set; }
Property Value
| Type | Description |
|---|---|
| Int32[] |
OmnidirXis
The xi parameter used in the omnidir calibration process (ccalib module).
Declaration
public Cv.Mat[] OmnidirXis { get; set; }
Property Value
| Type | Description |
|---|---|
| Cv.Mat[] |
Remarks
When SaveToXmlFile(String) is called, it's serialized with the OmnidirXisType and OmnidirXisValues properties.
OmnidirXisType
The xi parameter type of the calibration. Equals to
Declaration
public Cv.Type OmnidirXisType { get; set; }
Property Value
| Type | Description |
|---|---|
| Cv.Type |
Remarks
This property is be public for the serialization.
OmnidirXisValues
The xi parameter values of the calibration. Equals to the OmnidirXis content and automatically written when SaveToXmlFile(String) is called.
Declaration
public double[][][] OmnidirXisValues { get; set; }
Property Value
| Type | Description |
|---|---|
| Double[][][] |
Remarks
This property is be public for the serialization.
ReprojectionErrors
The average re-projection error of the calibration.
Declaration
public double[] ReprojectionErrors { get; set; }
Property Value
| Type | Description |
|---|---|
| Double[] |
StereoCameraParameters
Parameters from possible stereo calibration on the camera system.
Declaration
public StereoArucoCameraParameters StereoCameraParameters { get; set; }
Property Value
| Type | Description |
|---|---|
| StereoArucoCameraParameters |
Methods
| Improve this Doc View SourceLoadFromXmlFile(String)
Create a new CameraParameters object from a previously saved camera parameters XML file.
Declaration
public static ArucoCameraParameters LoadFromXmlFile(string cameraParametersFilePath)
Parameters
| Type | Name | Description |
|---|---|---|
| String | cameraParametersFilePath | The file path to load. |
Returns
| Type | Description |
|---|---|
| ArucoCameraParameters | The CameraParameters loaded from the XML file or null if the file coulnd't be loaded. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | If the camera parameters couldn't be loaded because of a wrong file path. |
SaveToXmlFile(String)
Save the camera parameters to a XML file.
Declaration
public void SaveToXmlFile(string cameraParametersFilePath)
Parameters
| Type | Name | Description |
|---|---|---|
| String | cameraParametersFilePath | The file path where to save the object. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | If the camera parameters couldn't be saved because of a wrong file path. |