using System.Collections; using System.Collections.Generic; using UnityEngine; using Seengene.XDKUnityPluginCloud; /// /// 相机标注 /// [System.Serializable] public class CameraCalibration { public CameraCalibration() { } public CameraCalibration(Vector2 focalLength, Vector2 principalPoint, Vector2Int resolution) { this.focal_length = focalLength; this.principal_point = principalPoint; this.size = resolution; } public CameraCalibration(Vector2 focalLength, Vector2 principalPoint, Vector2Int resolution, bool fishEye, float[] radialDistortion8, string model, float[] radialDistortion) { this.focal_length = focalLength; this.principal_point = principalPoint; this.size = resolution; this.fish_eye = fishEye; this.radial_distortion_8 = radialDistortion8; this.model = model; this.radial_distortion = radialDistortion; } public Vector2 focal_length; public Vector2 principal_point; public Vector2Int size; public bool fish_eye; public float[] radial_distortion_8; public string model; public float[] radial_distortion; public override string ToString() { return string.Format("focalLength:{0}, principalPoint:{1}, resolution:{2}, fishEye:{3}, radialDistortion8:{4}, model:{5}, radialDistortion:{6}", focal_length, principal_point, size, fish_eye, XDKTools.ArrayFloatToString(radial_distortion_8, "f6"), model, XDKTools.ArrayFloatToString(radial_distortion, "f6")); } }