xvsdk  3.2.0
xv-types.h
1 #pragma once
2 #define NOMINMAX
3 
4 #include <array>
5 #include <vector>
6 #include <limits>
7 #include <string>
8 #include <memory>
9 
10 #if defined(__ANDROID__) && !defined(__x86_64__)
11 #define __XV_DRIVER_ONLY__
12 #endif
13 
14 namespace xv {
15 
19 enum class LogLevel {
20  debug = 1,
21  info,
22  warn,
23  err,
24  critical,
25  off
26 };
27 
28 enum class SlamStartMode {
29  Normal,
30  VisionOnly,
31  VisionWithGYRO
32 };
33 
34 enum DeviceSupport {
35  ONLYUSB,
36  ONLYDRIVER,
37  USBANDDRIVER
38 };
39 
40 
44 enum class PlugEventType { Plugin, Unplug };
45 
50 #pragma pack(1)
51 
55 struct ExpSetting{
56  std::uint32_t iso_value;
57  std::uint32_t exp_abs;
58  std::uint8_t exp_mode;
59  std::int8_t exp_level;
60  std::uint8_t exp_anti; // ANTIBANDING_MODES
61  std::uint8_t iso_mode;
62 };
63 
67 struct AwbSetting
68 {
69  std::uint8_t awb_mode;
70  std::uint8_t awb_lock;
71 };
72 
76 struct AfSetting
77 {
78  std::uint8_t af_mode;
79  std::uint8_t af_dist;
80 };
81 
86 {
87  std::uint32_t cmd; //sensorId:8 + channel:8 + sensorCmd:16
88 
89  union {
90  std::uint8_t val[24];
91  AwbSetting awb;
92  ExpSetting exp;
93  AfSetting af;
94  std::int16_t val16;
95  std::int32_t val32;
96  }args;
97 };
98 
100 {
101  int32_t maxIsoGainValue;
102  int32_t minIsoGainValue;
103  int32_t maxExposureTimeUs;
104  int32_t minExposureTimeUs;
105  uint8_t targetMeanPixelValue;
106  int32_t ratioIso;
107  int32_t cpt_aec_no_modify_range;
108  float exposureTime_control_porprotion_value;
109  float exposureTime_control_integral_value;
110  float isoGain_control_porprotion_value;
111  float isoGain_control_integral_value;
112  uint32_t ISP_AEC_MODE;
113 };
114 
115 #pragma pack()
116 
126 struct Version{
127  Version( int major = 0, int minor = 0, int patch = 0 );
128  Version( const std::string &s );
129 
130  int major = 0;
131  int minor = 0;
132  int patch = 0;
133 
134  int key() const;
135  std::string toString() const;
136 
137  static int (max)();
138 };
139 
140 bool operator<(const Version &a, const Version &b);
141 bool operator<=(const Version &a, const Version &b);
142 bool operator==(const Version &a, const Version &b);
143 bool operator!=(const Version &a, const Version &b);
144 bool operator>=(const Version &a, const Version &b);
145 bool operator>(const Version &a, const Version &b);
146 
147 std::ostream& operator<<(std::ostream& o, Version const& v);
151 template<class F> using Vector2 = std::array<F,2>;
152 template<class F> using Vector3 = std::array<F,3>;
153 template<class F> using Vector4 = std::array<F,4>;
154 template<class F> using Matrix3 = std::array<F,9>;
155 
156 typedef Vector2<bool> Vector2b;
157 typedef Vector3<bool> Vector3b;
158 typedef Vector4<bool> Vector4b;
159 typedef Vector2<double> Vector2d;
160 typedef Vector3<double> Vector3d;
161 typedef Vector4<double> Vector4d;
162 typedef Matrix3<double> Matrix3d;
163 typedef Vector2<float> Vector2f;
164 typedef Vector3<float> Vector3f;
165 typedef Vector4<float> Vector4f;
166 typedef Matrix3<float> Matrix3f;
167 
177 Vector4f rotationToQuaternion(Matrix3f const& rot);
183 Vector4d rotationToQuaternion(Matrix3d const& rot);
184 
190 Matrix3f quaternionToRotation(Vector4f const& q);
191 
197 Matrix3d quaternionToRotation(Vector4d const& q);
198 
202 Matrix3f quaternionsToRotation(Vector4f const& q);
203 
212 Vector3d rotationToPitchYawRoll(Matrix3d const& rot);
213 
222 Vector3f rotationToPitchYawRoll(Matrix3f const& rot);
223 
231 namespace details {
232 
236 template <class F=double>
237 class Transform_ {
238 
239 protected:
240  Vector3<F> m_translation;
241  Matrix3<F> m_rotation;
242 
243 public:
244 
245  static Transform_ Identity() {
246  return Transform_({0.,0,0},{1.,0,0,0,1,0,0,0,1});
247  }
248 
249  Transform_() {};
250  Transform_(Vector3<F> const& t, Matrix3<F> const& r={}) : m_translation(t), m_rotation(r) {};
251 
255  Transform_& operator*=(Transform_ const& q);
256 
261  Vector3<F> const& translation() const {return m_translation;}
265  void setTranslation(Vector3<F> const& v) {m_translation = v;}
269  void setTranslation(F const* v) {std::copy(v, v+3, m_translation.data());}
270 
275  Matrix3<F> const& rotation() const {return m_rotation;}
279  void setRotation(Matrix3<F> const& v) {m_rotation = v;}
283  void setRotation(F const* v) {std::copy(v, v+9, m_rotation.data());}
284 
288  F x() const { return m_translation[0]; }
292  F y() const { return m_translation[1]; }
296  F z() const { return m_translation[2]; }
301  Transform_<F> inverse() const;
302 };
303 
304 template <class F=double>
305 Transform_<F> operator*(Transform_<F> lhs, const Transform_<F>& rhs) {
306  lhs *= rhs;
307  return lhs;
308 }
309 
315 Vector3d operator*(const Transform_<double>& a, const Vector3d& p);
316 
322 Vector3f operator*(const Transform_<float>& a, const Vector3f& p);
323 
327 Transform_<float> inverse(const Transform_<float>& t);
328 
332 Transform_<double> inverse(const Transform_<double>& t);
333 
334 
335 template <class F=double>
337 
338 protected:
339  Vector3<F> m_translation;
340  Vector4<F> m_quaternions;
341 
342 public:
343 
344  static TransformQuat_ Identity() {
345  return TransformQuat_({0.,0,0},{0.,0,0,0,1});
346  }
347 
348  TransformQuat_() {}
349  TransformQuat_(Vector3<F> const& t, Vector4<F> const& q={}) : m_translation(t), m_quaternions(q) {}
350 
351  TransformQuat_& operator*=(TransformQuat_ const& q);
352 
353  Vector3<F> const& translation() const;
354  void setTranslation(Vector3<F> const& v);
355  void setTranslation(F const* v);
356 
360  Vector4<F> const& quaternion() const;
364  void setQuaternion(Vector4<F> const& v);
368  void setQuaternion(F const* v);
369 
373  F x() const { return m_translation[0]; }
377  F y() const { return m_translation[1]; }
381  F z() const { return m_translation[2]; }
382 
386  F qx() const { return m_quaternions[0]; }
390  F qy() const { return m_quaternions[1]; }
394  F qz() const { return m_quaternions[2]; }
398  F qw() const { return m_quaternions[3]; }
399 };
400 template <class F=double>
401 TransformQuat_<F> operator*(TransformQuat_<F> lhs, const TransformQuat_<F>& rhs) {
402  lhs *= rhs;
403  return lhs;
404 }
405 
406 template <class F=double>
407 class PoseQuat_ : public TransformQuat_<F> {
408  double m_hostTimestamp = std::numeric_limits<double>::infinity();
409  std::int64_t m_edgeTimestampUs = std::numeric_limits<std::int64_t>::min();
410 
411 public:
412 
413  PoseQuat_() {}
414  PoseQuat_(double t, TransformQuat_<F>const& tr={}) : m_hostTimestamp(t), TransformQuat_<F> (tr) {}
415  PoseQuat_(std::int64_t t, TransformQuat_<F>const& tr={}) : m_edgeTimestampUs(t), TransformQuat_<F> (tr) {}
416  PoseQuat_(double t, std::int64_t te, TransformQuat_<F>const& tr={}) : m_hostTimestamp(t), m_edgeTimestampUs(te), TransformQuat_<F> (tr) {}
417 
421  std::int64_t edgeTimestampUs() const {return m_edgeTimestampUs;};
425  void setEdgeTimestampUs(std::int64_t t) { m_edgeTimestampUs = t;};
429  double hostTimestamp() const {return m_hostTimestamp;};
433  void setHostTimestamp(double t) {m_hostTimestamp = t;};
434 };
435 
436 template <class F=double>
437 class PoseRot_ : public Transform_<F> {
438  double m_hostTimestamp = std::numeric_limits<double>::infinity();
439  std::int64_t m_edgeTimestampUs = std::numeric_limits<std::int64_t>::min();
440 
441 public:
442  PoseRot_() {}
443  PoseRot_(double t, Transform_<F>const& tr={}) : m_hostTimestamp(t), Transform_<F> (tr) {}
444  PoseRot_(std::int64_t t, Transform_<F>const& tr={}) : m_edgeTimestampUs(t), Transform_<F> (tr) {}
445  PoseRot_(double t, std::int64_t te, Transform_<F>const& tr={}) : m_hostTimestamp(t), m_edgeTimestampUs(te), Transform_<F> (tr) {}
446 
450  std::int64_t edgeTimestampUs() const {return m_edgeTimestampUs;};
454  void setEdgeTimestampUs(std::int64_t t) { m_edgeTimestampUs = t;};
458  double hostTimestamp() const {return m_hostTimestamp;};
462  void setHostTimestamp(double t) {m_hostTimestamp = t;};
463 };
464 
465 template <class F=double>
466 class Pose_ : public details::PoseRot_<F> {
467 
468 private:
469 
470  Vector4<F> m_quaternions;
471  double m_confidence = 0;
472 
473 public:
474 
475  static Pose_ Identity() {
476  return Pose_({0.,0,0},{1.,0,0,0,1,0,0,0,1});
477  }
478 
479  Pose_() {}
480 
484  Pose_(double c) : m_confidence(c) {}
485 
489  Pose_(Vector3<F> const& translation, Matrix3<F> const& rotation,
490  double hostTimestamp = std::numeric_limits<double>::infinity(), std::int64_t edgeTimestamp = (std::numeric_limits<std::int64_t>::min)(), double c=0.)
491  : m_confidence(c), PoseRot_<F>::PoseRot_(hostTimestamp, edgeTimestamp, {translation, rotation}), m_quaternions(rotationToQuaternion(rotation)) {}
492 
496  double confidence() const {return m_confidence;}
497 
501  void setConfidence(double c) { m_confidence = c;}
502 
506  Vector4<F> const& quaternion() const {return m_quaternions;}
510  void setQuaternion(Vector4<F> const& v) {
511  m_quaternions = v;
513  };
517  void setQuaternion(F const* v) {
518  std::copy(v, v+4, m_quaternions.data());
520  };
524  void setRotation(Matrix3<F> const& v) {
527  };
531  void setRotation(F const* v) {
532  std::copy(v, v+9, PoseRot_<F>::m_rotation.data());
534  };
535 
536 
537 
538 };
539 
540 template <class F>
541 class PosePred_ : public Pose_<F> {
542 
543 protected:
544  Vector3<F> m_linearVelocity = Vector3<F>{0.,0.,0.};
545  Vector3<F> m_angularVelocity = Vector3<F>{0.,0.,0.};
546  Vector3<F> m_linearAcceleration = Vector3<F>{0.,0.,0.};
547  Vector3<F> m_angularAcceleration = Vector3<F>{0.,0.,0.};
548 
549 public:
550 
551  static PosePred_ Identity() {
552  return PosePred_({0.,0,0},{1.,0,0,0,1,0,0,0,1});
553  }
554 
555  PosePred_() {}
556 
560  PosePred_(double c) : Pose_<F>::Pose_(c) {}
561 
565  PosePred_(Vector3<F> const& translation, Matrix3<F> const& rotation,
566  double hostTimestamp = std::numeric_limits<double>::infinity(), std::int64_t edgeTimestamp = (std::numeric_limits<std::int64_t>::min)(), double c=0.)
567  : Pose_<F>::Pose_(translation, rotation, hostTimestamp, edgeTimestamp, c) {}
568 
569  Transform_<F> const& transform() const { return *this; }
570 
574  Vector3<F> const& linearVelocity() const {return m_linearVelocity; }
578  Vector3<F> const& angularVelocity() const {return m_angularVelocity; }
582  void setLinearVelocity(Vector3<F> const& v) { m_linearVelocity=v; }
586  void setLinearVelocity(F const* v) {
587  std::copy(v, v+3, m_linearVelocity.data());
588  }
593  void setAngularVelocity(Vector3<F> const& v) { m_angularVelocity=v; }
598  void setAngularVelocity(F const* v) {
599  std::copy(v, v+3, m_angularVelocity.data());
600  }
601 
605  Vector3<F> const& linearAcceleration() const {return m_linearAcceleration; }
609  Vector3<F> const& angularAcceleration() const {return m_angularAcceleration; }
613  void setLinearAcceleration(Vector3<F> const& v) { m_linearAcceleration=v; }
617  void setLinearAcceleration(F const* v) {
618  std::copy(v, v+3, m_linearAcceleration.data());
619  }
624  void setAngularAcceleration(Vector3<F> const& v) { m_angularAcceleration=v; }
629  void setAngularAcceleration(F const* v) {
630  std::copy(v, v+3, m_angularAcceleration.data());
631  }
632 };
633 
634 }
635 
639 struct Transform : public details::Transform_<double> {
640  Transform();
642  Transform(Vector3d const& t, Matrix3d const& r);
643 };
647 struct TransformF : public details::Transform_<float> {
648  TransformF();
650  TransformF(Vector3f const& t, Matrix3f const& r);
651 };
652 
658 Vector3f operator*(const TransformF& a, const Vector3f& p);
664 Vector3d operator*(const Transform& lhs, const Vector3d& rhs);
668 TransformF inverse(const TransformF& t);
672 Transform inverse(const Transform& t);
673 
674 
678 struct TransformQuat : public details::TransformQuat_<double> {
679  TransformQuat();
680  TransformQuat(Vector3d const& t, Vector4d const& q);
681 };
685 struct TransformQuatF : public details::TransformQuat_<float> {
686  TransformQuatF();
687  TransformQuatF(Vector3f const& t, Vector4f const& q);
688 };
689 
705  int w;
709  int h;
713  double fx;
717  double fy;
721  double u0;
725  double v0;
736  std::array<double,5> distor;
738 };
739 
747  int w;
751  int h;
755  double fx;
759  double fy;
763  double u0;
767  double v0;
771  double xi;
772 };
773 
778  Transform pose;
779  UnifiedCameraModel intrinsics;
780 };
781 
786  Transform pose;
788 };
789 
796 struct Pose : public details::PosePred_<double> {
797  static Pose Identity() {
798  return Pose({0.,0,0},{1.,0,0,0,1,0,0,0,1});
799  }
800  Pose();
804  Pose(Vector3d const& translation, Matrix3d const& rotation,
805  double hostTimestamp = std::numeric_limits<double>::infinity(), std::int64_t edgeTimestamp = (std::numeric_limits<std::int64_t>::min)(), double c=0.);
811  Pose prediction(double dt) const;
812 };
813 
820 struct PoseF : public details::PosePred_<float> {
821  static Pose Identity() {
822  return Pose({0.,0,0},{1.,0,0,0,1,0,0,0,1});
823  }
824  PoseF();
828  PoseF(Vector3f const& translation, Matrix3f const& rotation,
829  double hostTimestamp = std::numeric_limits<double>::infinity(), std::int64_t edgeTimestamp = (std::numeric_limits<std::int64_t>::min)(), double c=0.);
830 
836  PoseF prediction(double dt) const;
837 };
838 
842 struct Event {
843  double hostTimestamp = std::numeric_limits<double>::infinity();
844  std::int64_t edgeTimestampUs = (std::numeric_limits<std::int64_t>::min)();
845  int type = 0;
846  int state = 0;
847 };
848 
852 class Orientation {
853 
854  Matrix3d m_rotation;
855  Vector4d m_quaternions;
856  Vector3d m_angularVelocity = Vector3d{0.,0.,0.};
857  Vector3d m_angularAcceleration = Vector3d{0.,0.,0.};
858 
859 public:
860  double hostTimestamp = std::numeric_limits<double>::infinity();
861  std::int64_t edgeTimestampUs = (std::numeric_limits<std::int64_t>::min)();
862 
863  Orientation();
864 
868  Orientation(Matrix3d const& rotation,
869  double hostTimestamp = std::numeric_limits<double>::infinity(), std::int64_t edgeTimestamp = (std::numeric_limits<std::int64_t>::min)());
870 
874  Orientation(Vector4d const& quaternion,
875  double hostTimestamp = std::numeric_limits<double>::infinity(), std::int64_t edgeTimestamp = (std::numeric_limits<std::int64_t>::min)());
876 
880  Vector4d const& quaternion() const;
884  void setQuaternion(Vector4d const& v);
888  void setQuaternion(double const* v);
889 
893  Matrix3d const& rotation() const {return m_rotation;}
894 
898  void setRotation(Matrix3d const& v);
902  void setRotation(double const* v);
907  Vector3d const& angularVelocity() const;
908 
913  void setAngularVelocity(Vector3d const& v);
914 
919  void setAngularVelocity(double const* v);
920 
925  void setAngularAcceleration(Vector3d const& v);
926 
931  void setAngularAcceleration(double const* v);
932 
938  Orientation prediction(double dt) const;
939 
940 };
941 
947 struct Plane {
949  std::string id;
950 
952  Vector3d normal;
953 
957  double d;
958 
962  std::vector<Vector3d> points;
963 
966  std::vector<Vector3d> vertices;
967  std::vector<std::array<uint32_t,3>> triangles;
968 };
969 
970 
974 struct SlamMap
975 {
976  std::vector<Vector3d> vertices;
977 };
978 
982 class CameraModel {
983 public:
984  virtual std::int32_t width() const {return 0; }
985  virtual std::int32_t height() const {return 0; }
986  virtual bool project(double const* /*p3d*/, double* /*p2d*/) const {return false;};
987  virtual bool raytrace(double const* /*p2d*/, double* /*p3d*/) const {return false;};
988 };
989 
993 struct Calibration {
994  Transform pose;
995  std::vector<UnifiedCameraModel> ucm;
996  std::vector<PolynomialDistortionCameraModel> pdcm;
997  std::vector<std::shared_ptr<CameraModel>> camerasModel;
998 };
999 
1005 struct Imu {
1006  Vector3d gyro;
1007  Vector3d accel;
1008  Vector3b accelSaturation;
1009  Vector3d magneto;
1010  double temperature;
1011  double hostTimestamp = std::numeric_limits<double>::infinity();
1012  std::int64_t edgeTimestampUs = (std::numeric_limits<std::int64_t>::min)();
1013 };
1014 
1019  std::size_t width;
1020  std::size_t height;
1021  std::shared_ptr<const std::uint8_t> data;
1022 };
1023 
1028  double hostTimestamp = std::numeric_limits<double>::infinity();
1029  std::int64_t edgeTimestampUs = (std::numeric_limits<std::int64_t>::min)();
1030  std::vector<GrayScaleImage> images;
1031  std::int64_t id;
1032 };
1033 
1037 struct RgbImage {
1038  std::size_t width = 0;
1039  std::size_t height = 0;
1040  std::shared_ptr<const std::uint8_t> data = nullptr;
1041  RgbImage(std::size_t _width, std::size_t _height, std::shared_ptr<const std::uint8_t> _data) : width(_width), height(_height),data(_data) {}
1042 };
1043 
1047 struct ColorImage {
1048  enum class Codec { YUYV = 0, YUV420p, JPEG, NV12, BITSTREAM};
1049  Codec codec = Codec::YUYV;
1050  std::size_t width = 0;
1051  std::size_t height = 0;
1052  std::shared_ptr<const std::uint8_t> data = nullptr;
1053  unsigned int dataSize = 0;
1054  double hostTimestamp = std::numeric_limits<double>::infinity();
1055  std::int64_t edgeTimestampUs = (std::numeric_limits<std::int64_t>::min)();
1056 
1059  RgbImage toRgb() const;
1060 };
1061 
1066  {
1067  int32_t enable_dewarp;
1068  float dewarp_zoom_factor;
1069  int32_t enable_disparity;
1070  int32_t enable_depth;
1071  int32_t enable_point_cloud;
1072  float baseline;
1073  float fov;
1074  uint8_t disparity_confidence_threshold;
1075  float homography[9];
1076  int32_t enable_gamma;
1077  float gamma_value;
1078  int32_t enable_gaussian;
1079  uint8_t mode;//standard 0 /Default:LRcheck 1 /Extended 2 /Subpixel 3
1080  uint16_t max_distance;//mm
1081  uint16_t min_distance;//mm
1082 
1083  inline bool operator==(const sgbm_config &cmp) const
1084  {
1085  return (enable_dewarp == cmp.enable_dewarp &&
1086  dewarp_zoom_factor == cmp.dewarp_zoom_factor &&
1087  enable_disparity == cmp.enable_disparity &&
1088  enable_depth == cmp.enable_depth &&
1089  enable_point_cloud == cmp.enable_point_cloud &&
1090  baseline == cmp.baseline &&
1091  fov == cmp.fov &&
1092  disparity_confidence_threshold == cmp.disparity_confidence_threshold);
1093  }
1094  inline bool operator!=(const sgbm_config &cmp) const
1095  {
1096  return !(*this == cmp);
1097  }
1098  };
1099 
1108 struct DepthImage {
1109  enum class Type { Depth_16 = 0, Depth_32, IR, Cloud, Raw, Eeprom, IQ };
1110  Type type = Type::Depth_32;
1111  std::size_t width = 0;
1112  std::size_t height = 0;
1113  double confidence = 0.0;
1114  std::shared_ptr<const std::uint8_t> data = nullptr;
1115  unsigned int dataSize = 0;
1116  double hostTimestamp = std::numeric_limits<double>::infinity();
1117  std::int64_t edgeTimestampUs = (std::numeric_limits<std::int64_t>::min)();
1118 
1121  RgbImage toRgb() const;
1122 };
1123 
1125  std::size_t width = 0;
1126  std::size_t height = 0;
1127  std::shared_ptr<const std::uint8_t> data = nullptr;
1128  double hostTimestamp = std::numeric_limits<double>::infinity();
1129 };
1130 
1134 struct PointCloud {
1135  double hostTimestamp = std::numeric_limits<double>::infinity();
1136  std::int64_t edgeTimestampUs = (std::numeric_limits<std::int64_t>::min)();
1137  std::vector<Vector3f> points;
1138 };
1139 
1143 struct Object {
1144  enum class Shape { BoundingBox = 0, Human, HandSkeleton };
1145  struct keypoint {
1146  double x = -1, y = -1, z = -1;
1147  };
1148 
1149  Shape shape = Shape::BoundingBox;
1150 
1151  int typeID = -1;
1152  std::string type = "";
1153  double x = 0;
1154  double y = 0;
1155  double width = 0;
1156  double height = 0;
1157  double confidence = 0.0f;
1158 
1159  std::vector<keypoint> keypoints;
1160 };
1161 
1166  struct keypoint {
1167  double x = -1, y = -1, z = -1;
1168  };
1169 
1170  int idx;
1171  std::string name;
1172  float score;
1173  float left, top, width, height;
1174  std::vector<keypoint> keypoints;
1175  Det2dObject(){};
1176  Det2dObject(int i, const std::string& n, float s, float l, float t, float w, float h) :
1177  idx(i), name(n), score(s), left(l), top(t), width(w), height(h) {}
1178  Det2dObject(int i, const std::string& n, float s, float l, float t, float w, float h, std::vector<keypoint> pts) :
1179  idx(i), name(n), score(s), left(l), top(t), width(w), height(h), keypoints(pts){}
1180 };
1181 
1183  std::shared_ptr<float> raw_data = nullptr;
1184  unsigned int raw_data_length;
1185  double hostTimestamp;
1186  uint64_t edgeTimestamp;
1187 };
1188 
1189 
1190 
1191 
1193  std::string type;
1194  std::vector<std::string> classes;
1195  double threshold = 0.5;
1196  bool flipStereo = false;
1197  bool flipRgb = false;
1198  bool flipTof = false;
1199  bool enable_3dbbox = false;
1200  std::vector<double> prior_bbox_z;
1201 };
1202 
1207 struct SgbmImage {
1208  enum class Type { Disparity = 0, Depth, PointCloud, None};
1209  Type type;
1210  SgbmImage() : type(Type::None) {}
1211  explicit SgbmImage(Type t) : type(t) {}
1212  std::size_t width = 0;
1213  std::size_t height = 0;
1214  std::shared_ptr<const std::uint8_t> data = nullptr;
1215  unsigned int dataSize = 0;
1216  double hostTimestamp = std::numeric_limits<double>::infinity();
1217  std::int64_t edgeTimestampUs = (std::numeric_limits<std::int64_t>::min)();
1218 
1221  RgbImage toRgb() const;
1222 };
1223 
1228  enum class Codec {UYVY};
1229  const Codec codec;
1230  explicit ThermalImage(Codec t) : codec(t) {}
1231  std::size_t width = 0;
1232  std::size_t height = 0;
1233  std::shared_ptr<const std::uint8_t> data = nullptr;
1234  unsigned int dataSize = 0;
1235  double hostTimestamp = std::numeric_limits<double>::infinity();
1236  std::int64_t edgeTimestampUs = (std::numeric_limits<std::int64_t>::min)();
1237 
1240  RgbImage toRgb() const;
1241 };
1242 
1247  double hostTimestamp = std::numeric_limits<double>::infinity();
1248  std::int64_t edgeTimestampUs = (std::numeric_limits<std::int64_t>::min)();
1249  std::vector<GrayScaleImage> images;
1250 };
1251 
1252 struct MicData {
1253  double hostTimestamp = std::numeric_limits<double>::infinity();
1254  std::int64_t edgeTimestampUs = (std::numeric_limits<std::int64_t>::min)();
1255  std::shared_ptr<const std::uint8_t> data = nullptr;
1256  unsigned int dataSize = 0;
1257 };
1258 
1262 struct keypoint {
1263  float x = -1;
1264  float y = -1;
1265  float z = -1;
1266 };
1267 
1271 struct GestureData {
1272  int index[2] = {-1,-1};
1275  double hostTimestamp = std::numeric_limits<double>::infinity();
1276  std::int64_t edgeTimestampUs = (std::numeric_limits<std::int64_t>::min)();
1277  float distance;
1278  float confidence;
1279 };
1280 
1281 enum class ResolutionMode{
1282  R_VGA,
1283  R_720P
1284 };
1285 
1289 typedef union XV_ET_POINT_2D
1290 {
1291  struct {
1292  float x, y;
1293  };
1294  float seq[2];
1295 }xv_ETPoint2D;
1296 
1300 typedef union XV_ET_POINT_3D
1301 {
1302  struct {
1303  float x, y, z;
1304  };
1305  float seq[3];
1306 }xv_ETPoint3D;
1307 
1311 enum XV_ET_EYE_TYPE {
1312  L_EYE = 1,
1313  R_EYE = 2
1314 };
1315 typedef XV_ET_EYE_TYPE xv_ETEyeType;
1316 
1320 enum XV_ET_MODE {
1321  track = 3,
1322  iris = 5
1323 };
1324 typedef XV_ET_MODE xv_ETMode;
1325 
1330  xv_ETMode mode;
1331  char configPath[260];
1332 };
1334 
1338 typedef struct XV_ET_COEFFICIENT {
1339  unsigned char buf[1024];
1341 
1342 
1343 enum XV_EyeGazeExDataValidity {
1344  EYE_GAZE_EXDATA_SCORE = 0,
1345 };
1346 
1352 {
1353  unsigned int gazeBitMask;
1359  float re;
1360  unsigned int exDataBitMask;
1361  float exData[32];
1362 };
1363 
1369 {
1370  unsigned int pupilBitMask;
1377 };
1378 
1384 {
1385  unsigned int eyeDataExBitMask;
1386  int blink;
1387  float openness;
1388  float eyelidUp;
1389  float eyelidDown;
1390 };
1391 
1397 {
1398  unsigned long long timestamp;
1403 
1406 
1409 
1412  float ipd;
1413 };
1414 
1416 typedef enum GazeStatus {
1418  GAZE_STATUS_OK,
1419 
1421  GAZE_STATUS_ERROR,
1422 
1424  GAZE_STATUS_INITIALIZE_FAILED,
1425 
1427  GAZE_STATUS_TERMINATE_FAILED,
1428 
1430  GAZE_STATUS_INVALID_PARAMETER,
1431 
1433  GAZE_STATUS_INVALID_OPERATION,
1434 
1436  GAZE_STATUS_DEVICE_NOT_AVAILABLE,
1437 
1439  GAZE_STATUS_TIMED_OUT,
1440 
1442  GAZE_STATUS_MEM_ALLOCATION_FAILED
1443 }
1444 GazeStatus;
1445 
1446 
1447 typedef enum CalibrationApiStatus {
1452  CALIBRATION_API_STATUS_COMPLETE_AUTOMATICALLY,
1453 
1455  CALIBRATION_API_STATUS_COMPLETE_MANUALLY,
1456 
1461  CALIBRATION_API_STATUS_ACCEPT_CALLING,
1462 
1464  CALIBRATION_API_STATUS_DO_NOT_CALL,
1465 
1467  CALIBRATION_API_STATUS_BUSY
1468 }
1469 CalibrationApiStatus;
1470 
1472 typedef struct CalibrationStatus {
1474  CalibrationApiStatus enter_status;
1475 
1477  CalibrationApiStatus collect_status;
1478 
1480  CalibrationApiStatus setup_status;
1481 
1483  CalibrationApiStatus compute_apply_status;
1484 
1486  CalibrationApiStatus leave_status;
1487 
1489  CalibrationApiStatus reset_status;
1490 }
1492 
1494 typedef struct GazeCalibrationData {
1496  void* data = nullptr;
1497 
1499  size_t size;
1500 
1503  {
1504  if (data != nullptr)
1505  {
1506  free(data);
1507  data = nullptr;
1508  }
1509  };
1510 }
1511 GazeCalibrationData;
1512 
1514 {
1515  std::vector<char> name;
1516  std::vector<unsigned char> feature;
1517  int size;
1518  int error;
1519 };
1520 
1525 struct DateTime {
1526  int Y, M, D;
1527  int h, m;
1528  int s;
1529 };
1530 
1537  int signal;
1538  unsigned char sum;
1539 };
1540 
1541 struct Triple
1542 {
1543  Vector2<unsigned short> p2d;
1544  size_t i3d;
1545  Triple(Vector2<unsigned short> const& p2, size_t i3): p2d(p2), i3d(i3) {}
1546 };
1548 {
1549  FisheyeImages fisheyeImages;
1550  std::vector<std::vector<Triple>> matches;
1551 };
1552 
1554 {
1555  float offset[3];
1556  float angles[3];
1557  float magnetic[3];
1558  int level;
1559 };
1560 
1564 struct HandPose{
1565  std::vector<Pose> pose; // 26 + 26
1566  float scale[2]; // 1 + 1
1567  int status[2] = {-1,-1};
1568  double timestamp[2];
1569  double fisheye_timestamp;
1570 };
1571 
1573  int tv_sec;
1574  int tv_msec;
1575  std::uint8_t state;
1576  float x;
1577  float y;
1578  float z;
1579  float pitch;
1580  float roll;
1581  float yaw;
1582  double hostTimestamp;
1583 };
1584 
1585 }
xv::GPSDistanceData::sum
unsigned char sum
Check sum.
Definition: xv-types.h:1538
xv::Imu::hostTimestamp
double hostTimestamp
host timestamp of the physical measurement (in second based on the std::chrono::steady_clock).
Definition: xv-types.h:1011
xv::details::PoseQuat_::setHostTimestamp
void setHostTimestamp(double t)
Set the host timestamp corresponding to the pose (in s).
Definition: xv-types.h:433
xv::details::PosePred_::setLinearVelocity
void setLinearVelocity(F const *v)
Set the angular velocity (x,y,z) in rad/s.
Definition: xv-types.h:586
xv::ExternalData
Definition: xv-types.h:1572
xv::XV_ET_EYE_DATA_EX::ipd
float ipd
The estimated interpupilary distance (IPD)
Definition: xv-types.h:1412
xv::XV_ET_EYE_DATA_EX::timestamp
unsigned long long timestamp
timestamp.
Definition: xv-types.h:1398
xv::Plane::d
double d
Signed distance to origin. Signed distance between the plane and the origin of the world....
Definition: xv-types.h:957
xv::XV_ET_EYE_DATA_EX::recomGaze
XV_ET_GAZE_POINT recomGaze
recommend gaze data
Definition: xv-types.h:1400
xv::Pose::prediction
Pose prediction(double dt) const
Prediction of the pose based on angular and linear velocity and acceleration.
xv::Orientation
Orientation only (3dof) of the pose.
Definition: xv-types.h:852
xv::details::Pose_::setQuaternion
void setQuaternion(Vector4< F > const &v)
Set the quaternion of the rotation.
Definition: xv-types.h:510
xv::keypoint
Gesture key point.
Definition: xv-types.h:1262
xv::MicData::hostTimestamp
double hostTimestamp
host timestamp of the physical measurement (in second based on the std::chrono::steady_clock).
Definition: xv-types.h:1253
xv::XV_ET_PUPIL_INFO::pupilBitMask
unsigned int pupilBitMask
pupil bit mask, identify the six data below are valid or invalid.
Definition: xv-types.h:1370
xv::details::PoseRot_::setHostTimestamp
void setHostTimestamp(double t)
Set the host timestamp of the pose (in s).
Definition: xv-types.h:462
xv::XV_ET_EYE_DATA_EX
Definition: xv-types.h:1396
xv::XV_ET_PUPIL_INFO::pupilCenter
xv_ETPoint2D pupilCenter
pupil center(0-1), the coordinate value of pupil center in the image, normalization value,...
Definition: xv-types.h:1371
xv::PoseF::prediction
PoseF prediction(double dt) const
Prediction of the pose based on angular and linear velocity and acceleration.
xv::Event::edgeTimestampUs
std::int64_t edgeTimestampUs
timestamp of the physical measurement (in microsecond based on edge clock).
Definition: xv-types.h:844
xv::XV_ET_COEFFICIENT
Definition: xv-types.h:1338
xv::PolynomialDistortionCameraModel::distor
std::array< double, 5 > distor
Distortion parameters.
Definition: xv-types.h:736
xv::details::Transform_::operator*=
Transform_ & operator*=(Transform_ const &q)
Composition operator for transformations.
xv::PolynomialDistortionCameraModel::fy
double fy
Focal length in height direction (in pixel)
Definition: xv-types.h:717
xv::CalibrationStatus::enter_status
CalibrationApiStatus enter_status
Definition: xv-types.h:1474
xv::ThermalImage::height
std::size_t height
height of the image (in pixel)
Definition: xv-types.h:1232
xv::GestureData::confidence
float confidence
reserved, gesture confidence.
Definition: xv-types.h:1278
xv::details::Transform_::setTranslation
void setTranslation(Vector3< F > const &v)
Set the translation part of the transformation.
Definition: xv-types.h:265
xv::CameraModel
Generic camera model.
Definition: xv-types.h:982
xv::FisheyeImages::edgeTimestampUs
std::int64_t edgeTimestampUs
timestamp of the physical measurement (in microsecond based on edge clock).
Definition: xv-types.h:1029
xv::details::TransformQuat_::qw
F qw() const
qx quaternion composant
Definition: xv-types.h:398
xv::EyetrackingImage::hostTimestamp
double hostTimestamp
host timestamp of the physical measurement (in second based on the std::chrono::steady_clock),...
Definition: xv-types.h:1247
xv::Orientation::setRotation
void setRotation(Matrix3d const &v)
Get the rotation matrix part of the transformation.
xv::Imu
Data from IMU sensor of the XVisio device.
Definition: xv-types.h:1005
xv::GestureData::position
keypoint position[2]
Position array for hand gesture, max size is two, 2D points, z isn't used by default.
Definition: xv-types.h:1273
xv::details::Transform_::setRotation
void setRotation(Matrix3< F > const &v)
Get the rotation matrix part of the transformation.
Definition: xv-types.h:279
xv::SgbmImage::height
std::size_t height
height of the image (in pixel)
Definition: xv-types.h:1213
xv::ThermalImage::toRgb
RgbImage toRgb() const
Convert to a xv::RgbImage.
xv::DepthImage::hostTimestamp
double hostTimestamp
host timestamp of the physical measurement (in second based on the std::chrono::steady_clock).
Definition: xv-types.h:1116
xv::UnifiedCameraModel
Unified Camera Model.
Definition: xv-types.h:743
xv::XV_ET_PUPIL_INFO::pupilDiameterMM
float pupilDiameterMM
pupil diameter, pupil long axis value(mm).
Definition: xv-types.h:1374
xv::XV_ET_GAZE_POINT::gazeBitMask
unsigned int gazeBitMask
gaze bit mask, identify the six data below are valid or invalid.
Definition: xv-types.h:1353
xv::Event::type
int type
Type of event.
Definition: xv-types.h:845
xv::details::PoseRot_
Definition: xv-types.h:437
xv::Imu::edgeTimestampUs
std::int64_t edgeTimestampUs
timestamp of the physical measurement (in microsecond based on edge clock).
Definition: xv-types.h:1012
xv::XV_ET_EYE_EXDATA::eyelidDown
float eyelidDown
down eyelid data(0-1), down eyelid's vertical position in the image, normalization value,...
Definition: xv-types.h:1389
xv::CalibrationStatus::reset_status
CalibrationApiStatus reset_status
Definition: xv-types.h:1489
xv::details::Transform_::y
F y() const
Y coordinate of the translation.
Definition: xv-types.h:292
xv::details::Pose_::quaternion
Vector4< F > const & quaternion() const
Get the quaternion of the rotation.
Definition: xv-types.h:506
xv::CalibrationStatus::collect_status
CalibrationApiStatus collect_status
Definition: xv-types.h:1477
xv::XV_ET_EYE_EXDATA::blink
int blink
blink data, 0-no blink, 1-start blinking, 2-closing process, 3-close eyes, 4-opening process,...
Definition: xv-types.h:1386
xv::Plane
A 3D plane definition.
Definition: xv-types.h:947
xv::XV_ET_EYE_DATA_EX::rightGaze
XV_ET_GAZE_POINT rightGaze
right eye gaze data
Definition: xv-types.h:1402
xv::SlamMap
A sparse SLAM map with 3D points.
Definition: xv-types.h:974
xv::Orientation::prediction
Orientation prediction(double dt) const
Prediction of the orientation based on angular velocity and acceleration.
xv::DepthImage::toRgb
RgbImage toRgb() const
Convert to a xv::RgbImage.
xv::details::PosePred_::setAngularVelocity
void setAngularVelocity(F const *v)
Set an estimation of instantaneous angular velocity of the pose.
Definition: xv-types.h:598
xv::Imu::magneto
Vector3d magneto
3-axis magnetometer values
Definition: xv-types.h:1009
xv::PointCloud::hostTimestamp
double hostTimestamp
host timestamp of ? (in second based on the std::chrono::steady_clock).
Definition: xv-types.h:1135
xv::GestureData::distance
float distance
reserved, dynamic gesture movement distance.
Definition: xv-types.h:1277
xv::XV_ET_GAZE_POINT::exData
float exData[32]
reserved data.
Definition: xv-types.h:1361
xv::PdmCameraCalibration
Calibration parameters of a camera using Polynomial Distortion Model for camera intrinsics.
Definition: xv-types.h:785
xv::details::TransformQuat_
Definition: xv-types.h:336
xv::EyetrackingImage
A color image given by xv::EyetrackingCamera.
Definition: xv-types.h:1246
xv::SgbmImage::toRgb
RgbImage toRgb() const
Convert to a xv::RgbImage.
xv::Orientation::rotation
Matrix3d const & rotation() const
Get the rotation matrix part of the transformation.
Definition: xv-types.h:893
xv::Version
The Version struct.
Definition: xv-types.h:126
xv::XV_ET_EYE_DATA_EX::rightExData
XV_ET_EYE_EXDATA rightExData
right eye extend data(include blink and eyelid data)
Definition: xv-types.h:1408
xv::XV_ET_POINT_2D
Definition: xv-types.h:1289
xv::Object::keypoint
Definition: xv-types.h:1145
xv::details::PosePred_::setAngularAcceleration
void setAngularAcceleration(Vector3< F > const &v)
Set an estimation of instantaneous angular acceleration of the pose.
Definition: xv-types.h:624
xv::ColorImage::edgeTimestampUs
std::int64_t edgeTimestampUs
timestamp of the physical measurement (in microsecond based on edge clock).
Definition: xv-types.h:1055
xv::XV_ET_EYE_DATA_EX::rightEyeMove
int rightEyeMove
0-Eye movement type is no-eye detected. 1-Eye movement type is blink. 2-Eye movement type is noraml.
Definition: xv-types.h:1411
xv::PolynomialDistortionCameraModel
Polynomial Distortion Model for camera intrisics.
Definition: xv-types.h:701
xv::Plane::points
std::vector< Vector3d > points
Points lying at the border of the plane. Array of 3D points lying on the plane that describes the pol...
Definition: xv-types.h:962
xv::XV_ET_GAZE_POINT::exDataBitMask
unsigned int exDataBitMask
reserved data.
Definition: xv-types.h:1360
xv::XV_ET_GAZE_POINT::rawPoint
xv_ETPoint3D rawPoint
gaze point before smooth, x and y are valid, z default value is 0, x and y scope are as above.
Definition: xv-types.h:1355
xv::XV_ET_GAZE_POINT::re
float re
gaze re value, confidence level.
Definition: xv-types.h:1359
xv::XV_ET_PUPIL_INFO::pupilDistance
float pupilDistance
the distance between pupil and camera(mm)
Definition: xv-types.h:1372
xv::Triple
Definition: xv-types.h:1541
xv::Imu::temperature
double temperature
sensor temperature (in K)
Definition: xv-types.h:1010
xv::GestureData::edgeTimestampUs
std::int64_t edgeTimestampUs
timestamp of the physical measurement (in microsecond based on edge clock).
Definition: xv-types.h:1276
xv::details::Transform_::x
F x() const
X coordinate of the translation.
Definition: xv-types.h:288
xv::GestureData
Gesture data.
Definition: xv-types.h:1271
xv::Calibration::ucm
std::vector< UnifiedCameraModel > ucm
pose of the sensor(camera and display) in the IMU frame coordinates.
Definition: xv-types.h:995
xv::DepthImage::confidence
double confidence
confidence of depth [0.0,1.0]
Definition: xv-types.h:1113
xv::XV_IRIS_DATA
Definition: xv-types.h:1513
xv::CalibrationStatus::leave_status
CalibrationApiStatus leave_status
Definition: xv-types.h:1486
xv::XV_ET_INIT_PARAM::configPath
char configPath[260]
config file path.
Definition: xv-types.h:1331
xv::details::PosePred_::setLinearAcceleration
void setLinearAcceleration(Vector3< F > const &v)
Set the linear acceleration (in m/s)
Definition: xv-types.h:613
xv::details::Pose_::setConfidence
void setConfidence(double c)
Set the confidence of the pose. Value in [0,1], 0 means lost.
Definition: xv-types.h:501
xv::PointMatches
Definition: xv-types.h:1547
xv::PointCloud::edgeTimestampUs
std::int64_t edgeTimestampUs
timestamp of ? (in microsecond based on edge clock).
Definition: xv-types.h:1136
xv::PolynomialDistortionCameraModel::v0
double v0
Optical axis intersection in height direction (in pixel)
Definition: xv-types.h:725
xv::XV_ET_GAZE_POINT
Definition: xv-types.h:1351
xv::SgbmImage::hostTimestamp
double hostTimestamp
host timestamp of the physical measurement (in second based on the std::chrono::steady_clock).
Definition: xv-types.h:1216
xv::UnifiedCameraModel::v0
double v0
Optical axis intersection in height direction (in pixel)
Definition: xv-types.h:767
xv::Orientation::hostTimestamp
double hostTimestamp
host timestamp of the plane (in second based on the std::chrono::steady_clock).
Definition: xv-types.h:860
xv::GPSDistanceData::distance
int distance
Distance.
Definition: xv-types.h:1536
xv::details::PosePred_::linearAcceleration
Vector3< F > const & linearAcceleration() const
Get the linear acceleration (in m/s/s) of the pose.
Definition: xv-types.h:605
xv::details::Pose_::setQuaternion
void setQuaternion(F const *v)
Set the quaternion of the rotation using pointer of 4D array.
Definition: xv-types.h:517
xv::details::TransformQuat_::y
F y() const
Y coordinate of the translation.
Definition: xv-types.h:377
xv::DepthImage
An image provided by a TOF camera.
Definition: xv-types.h:1108
xv::details::inverse
Transform_< float > inverse(const Transform_< float > &t)
Compute the inverse transformation.
xv::PoseF
Class representing a 6dof pose at a timestamp with a linear model for prediction.
Definition: xv-types.h:820
xv::details::TransformQuat_::qx
F qx() const
qx quaternion composant
Definition: xv-types.h:386
xv::XV_ET_EYE_EXDATA::eyeDataExBitMask
unsigned int eyeDataExBitMask
eye extend data bit mask, identify the four data below are valid or invalid.
Definition: xv-types.h:1385
xv::RgbImage
A color image in RGB format.
Definition: xv-types.h:1037
xv::Calibration
Calibration (extrinsics and intrinsics).
Definition: xv-types.h:993
xv::details::Pose_::confidence
double confidence() const
Get the confidence of the pose. Value in [0,1], 0 means lost.
Definition: xv-types.h:496
xv::SgbmImage::dataSize
unsigned int dataSize
data of SGBM
Definition: xv-types.h:1215
xv::DepthColorImage::height
std::size_t height
height of the image (in pixel)
Definition: xv-types.h:1126
xv::XV_ET_GAZE_POINT::smoothPoint
xv_ETPoint3D smoothPoint
gaze point after smooth, x and y are valid, z default value is 0, x and y scope are as above.
Definition: xv-types.h:1356
xv::TransformQuatF
Represents a float typed transformation (or pose) with translation and quaternion for rotation in flo...
Definition: xv-types.h:685
xv::GazeCalibrationData::~GazeCalibrationData
~GazeCalibrationData()
Definition: xv-types.h:1502
xv::quaternionToRotation
Matrix3d quaternionToRotation(Vector4d const &q)
Convert quaternion to rotation matrix.
xv::details::Pose_::Pose_
Pose_(Vector3< F > const &translation, Matrix3< F > const &rotation, double hostTimestamp=std::numeric_limits< double >::infinity(), std::int64_t edgeTimestamp=(std::numeric_limits< std::int64_t >::min)(), double c=0.)
Construct a pose with a translation, rotation, timestamps and confidence.
Definition: xv-types.h:489
xv::Calibration::camerasModel
std::vector< std::shared_ptr< CameraModel > > camerasModel
Deprecated, better to use camerasModel; List of Polynomial Distortion Camera Model parameters for dif...
Definition: xv-types.h:997
xv::TerrestrialMagnetismData
Definition: xv-types.h:1553
xv::Orientation::setAngularVelocity
void setAngularVelocity(Vector3d const &v)
Set an estimation of instantaneous angular velocity of the pose.
xv::ThermalImage
A color image given by xv::ThermalCamera.
Definition: xv-types.h:1227
xv::SgbmImage::edgeTimestampUs
std::int64_t edgeTimestampUs
timestamp of the physical measurement (in microsecond based on edge clock).
Definition: xv-types.h:1217
xv::details::PosePred_::angularAcceleration
Vector3< F > const & angularAcceleration() const
Get the angular acceleration (x,y,z) in rad/s/s.
Definition: xv-types.h:609
xv::XV_ET_INIT_PARAM
Definition: xv-types.h:1329
xv::SgbmImage
SGBM data.
Definition: xv-types.h:1207
xv::GestureData::slamPosition
keypoint slamPosition[2]
Convert rgb points into slam points, Position array for hand gesture, max size is two.
Definition: xv-types.h:1274
xv::details::Pose_::Pose_
Pose_(double c)
Construct a pose with a specified confidence.
Definition: xv-types.h:484
xv::ThermalImage::width
std::size_t width
width of the image (in pixel)
Definition: xv-types.h:1231
xv::ColorImage::width
std::size_t width
width of the image (in pixel)
Definition: xv-types.h:1050
xv::details::PosePred_::setLinearAcceleration
void setLinearAcceleration(F const *v)
Set the angular acceleration (x,y,z) in rad/s/s.
Definition: xv-types.h:617
xv::RgbImage::width
std::size_t width
width of the image (in pixel)
Definition: xv-types.h:1038
xv::CalibrationStatus::compute_apply_status
CalibrationApiStatus compute_apply_status
Definition: xv-types.h:1483
xv::Imu::accel
Vector3d accel
3-axis accelerometer values (in m/s²)
Definition: xv-types.h:1007
xv::GrayScaleImage::width
std::size_t width
width of the image (in pixel)
Definition: xv-types.h:1019
xv::RgbImage::RgbImage
RgbImage(std::size_t _width, std::size_t _height, std::shared_ptr< const std::uint8_t > _data)
image data (in row-major) : RGB RGB RGB .... Data size = width*height*3
Definition: xv-types.h:1041
xv::DeviceSetting
Device setting.
Definition: xv-types.h:85
xv::ColorImage
A color image given by xv::ColorCamera.
Definition: xv-types.h:1047
xv::Imu::gyro
Vector3d gyro
3-axis gyrometer values (in rad/s)
Definition: xv-types.h:1006
xv::XV_ET_GAZE_POINT::gazeOrigin
xv_ETPoint3D gazeOrigin
origin gaze center coordinate.
Definition: xv-types.h:1357
xv::CalibrationStatus
Definition: xv-types.h:1472
xv::sgbm_config
SGBM CONFIG STRUCT.
Definition: xv-types.h:1065
xv::details::PosePred_::setAngularAcceleration
void setAngularAcceleration(F const *v)
Set an estimation of instantaneous angular acceleration of the pose.
Definition: xv-types.h:629
xv::XV_ET_EYE_EXDATA::eyelidUp
float eyelidUp
up eyelid data(0-1), up eyelid's vertical position in the image, normalization value,...
Definition: xv-types.h:1388
xv::UcmCameraCalibration
Calibration parameters of a camera using Unified Camera Model for camera intrinsics.
Definition: xv-types.h:777
xv::details::TransformQuat_::qy
F qy() const
qx quaternion composant
Definition: xv-types.h:390
xv::details::PoseRot_::edgeTimestampUs
std::int64_t edgeTimestampUs() const
Get the edge timestamp of the pose (in microseconds).
Definition: xv-types.h:450
xv::UnifiedCameraModel::w
int w
Image width (in pixel)
Definition: xv-types.h:747
xv::details::PoseQuat_
Definition: xv-types.h:407
xv::Pose
Class representing a 6dof pose at a timestamp with a linear model for prediction.
Definition: xv-types.h:796
xv::GrayScaleImage::height
std::size_t height
height of the image (in pixel)
Definition: xv-types.h:1020
xv::XV_ET_PUPIL_INFO
Definition: xv-types.h:1368
xv::details::PosePred_::linearVelocity
Vector3< F > const & linearVelocity() const
Get the linear velocity (in m/s) of the pose.
Definition: xv-types.h:574
xv::details::Transform_::setRotation
void setRotation(F const *v)
Set the rotation matrix (row major 3x3) part of the transformation using pointer to array of size 9.
Definition: xv-types.h:283
xv::Orientation::quaternion
Vector4d const & quaternion() const
Get the quaternion of the rotation [qx,qy,qz,qw].
xv::details::Pose_::setRotation
void setRotation(Matrix3< F > const &v)
Get the rotation matrix part of the transformation.
Definition: xv-types.h:524
xv::ColorImage::dataSize
unsigned int dataSize
image data
Definition: xv-types.h:1053
xv::DateTime::s
int s
Seconds.
Definition: xv-types.h:1528
xv::MicData
Definition: xv-types.h:1252
xv::details::TransformQuat_::qz
F qz() const
qx quaternion composant
Definition: xv-types.h:394
xv::AfSetting
AF settings.
Definition: xv-types.h:76
xv::details::TransformQuat_::z
F z() const
Z coordinate of the translation.
Definition: xv-types.h:381
xv::GestureData::index
int index[2]
Index array for hands gesture, max size is two, default is -1 means invalid.
Definition: xv-types.h:1272
xv::UnifiedCameraModel::fx
double fx
Focal length in width direction (in pixel)
Definition: xv-types.h:755
xv::details::Pose_
Definition: xv-types.h:466
xv::TransformF
Represents atransformation (or pose) with translation and rotation matrix in float type.
Definition: xv-types.h:647
xv::ThermalImage::dataSize
unsigned int dataSize
image data
Definition: xv-types.h:1234
xv::SgbmImage::width
std::size_t width
width of the image (in pixel)
Definition: xv-types.h:1212
xv::GPSDistanceData::signal
int signal
Signal Intensity.
Definition: xv-types.h:1537
xv::DepthImage::dataSize
unsigned int dataSize
image of depth
Definition: xv-types.h:1115
xv::Event
Event.
Definition: xv-types.h:842
xv::XV_ET_COEFFICIENT::buf
unsigned char buf[1024]
calibration factor.
Definition: xv-types.h:1339
xv::UnifiedCameraModel::h
int h
Image height (in pixel)
Definition: xv-types.h:751
xv::GazeCalibrationData
Definition: xv-types.h:1494
xv::rotationToPitchYawRoll
Vector3f rotationToPitchYawRoll(Matrix3f const &rot)
Convert rotation Euler angles.
xv::details::Pose_::setRotation
void setRotation(F const *v)
Set the quaternion of the rotation using pointer of 4D array.
Definition: xv-types.h:531
xv::Transform
Represents a transformation (or pose) with translation and rotation matrix.
Definition: xv-types.h:639
xv::Det2dObject::keypoint
Definition: xv-types.h:1166
xv::Orientation::angularVelocity
Vector3d const & angularVelocity() const
An estimation of instantaneous angular velocity of the pose.
xv::ColorImage::hostTimestamp
double hostTimestamp
host timestamp of the physical measurement (in second based on the std::chrono::steady_clock).
Definition: xv-types.h:1054
xv::Event::state
int state
State of the event.
Definition: xv-types.h:846
xv::XV_ET_PUPIL_INFO::pupilDiameter
float pupilDiameter
pupil diameter, pupil long axis value(0-1), the ratio of the pixel value of the long axis size of the...
Definition: xv-types.h:1373
xv::CalibrationStatus::setup_status
CalibrationApiStatus setup_status
Definition: xv-types.h:1480
xv::DepthColorImage::width
std::size_t width
width of the image (in pixel)
Definition: xv-types.h:1125
xv::details::PoseQuat_::hostTimestamp
double hostTimestamp() const
Get the host timestamp corresponding to the pose (in s).
Definition: xv-types.h:429
xv::details::TransformQuat_::setQuaternion
void setQuaternion(Vector4< F > const &v)
Set the quaternion [qx,qy,qz,qw] of the rotation.
xv::PolynomialDistortionCameraModel::u0
double u0
Optical axis intersection in width direction (in pixel)
Definition: xv-types.h:721
xv::details::Transform_::setTranslation
void setTranslation(F const *v)
Set the translation part of the transformation using pointer to 3D array.
Definition: xv-types.h:269
xv::IspAecSetting
Definition: xv-types.h:99
xv::XV_ET_EYE_DATA_EX::leftEyeMove
int leftEyeMove
0-Eye movement type is no-eye detected. 1-Eye movement type is blink. 2-Eye movement type is noraml.
Definition: xv-types.h:1410
xv::GazeCalibrationData::data
void * data
Definition: xv-types.h:1496
xv::rotationToQuaternion
Vector4d rotationToQuaternion(Matrix3d const &rot)
Convert a rotation matrix to quaternion.
xv::XV_ET_EYE_EXDATA::openness
float openness
eye openness(0-100), 0-cloing, 100-opening normally, >100-opening on purpose.
Definition: xv-types.h:1387
xv::MicData::dataSize
unsigned int dataSize
image data
Definition: xv-types.h:1256
xv::GestureData::hostTimestamp
double hostTimestamp
host timestamp of the physical measurement (in second based on the std::chrono::steady_clock).
Definition: xv-types.h:1275
xv::CnnRawWrapper
Definition: xv-types.h:1182
xv::details::PosePred_
Definition: xv-types.h:541
xv::XV_ET_POINT_3D
Definition: xv-types.h:1300
xv::ThermalImage::hostTimestamp
double hostTimestamp
host timestamp of the physical measurement (in second based on the std::chrono::steady_clock).
Definition: xv-types.h:1235
xv::Det2dObject
Object detection bounding box. 2d.
Definition: xv-types.h:1165
xv::ColorImage::height
std::size_t height
height of the image (in pixel)
Definition: xv-types.h:1051
xv::Plane::id
std::string id
Plane unique identifier.
Definition: xv-types.h:949
xv::details::Transform_::translation
Vector3< F > const & translation() const
Get the translation part of the transformation.
Definition: xv-types.h:261
xv::XV_ET_EYE_DATA_EX::recommend
int recommend
whether if there has the recommend point. 0-no recommend point, 1-use left eye as recommend point,...
Definition: xv-types.h:1399
xv::FisheyeImages
Images coming from xv::FisheyeCameras sensor system used for visual SLAM.
Definition: xv-types.h:1027
xv::details::PosePred_::PosePred_
PosePred_(Vector3< F > const &translation, Matrix3< F > const &rotation, double hostTimestamp=std::numeric_limits< double >::infinity(), std::int64_t edgeTimestamp=(std::numeric_limits< std::int64_t >::min)(), double c=0.)
Construct a pose with a translation, rotation, timestamps and confidence.
Definition: xv-types.h:565
xv::DepthColorImage::hostTimestamp
double hostTimestamp
image data of RGB-D pixels : RGB (3 bytes) D (float 4bytes)
Definition: xv-types.h:1128
xv::details::PosePred_::setAngularVelocity
void setAngularVelocity(Vector3< F > const &v)
Set an estimation of instantaneous angular velocity of the pose.
Definition: xv-types.h:593
xv::details::PosePred_::PosePred_
PosePred_(double c)
Construct a pose with a specified confidence.
Definition: xv-types.h:560
xv::DateTime::m
int m
Hour and minutes.
Definition: xv-types.h:1527
xv::XV_ET_EYE_DATA_EX::leftPupil
XV_ET_PUPIL_INFO leftPupil
left eye pupil data
Definition: xv-types.h:1404
xv::EyetrackingImage::edgeTimestampUs
std::int64_t edgeTimestampUs
timestamp of the physical measurement (in microsecond based on edge clock).
Definition: xv-types.h:1248
xv::GazeCalibrationData::size
size_t size
Definition: xv-types.h:1499
xv::Imu::accelSaturation
Vector3b accelSaturation
3-axis accel saturation status (true if saturating)
Definition: xv-types.h:1008
xv::XV_ET_INIT_PARAM::mode
xv_ETMode mode
sdk mode, refer to xv_ETMode.
Definition: xv-types.h:1330
xv::Version::minor
int minor
Minor number of the version.
Definition: xv-types.h:131
xv::TransformQuat
Represents a float typed transformation (or pose) with translation and quaternion for rotation.
Definition: xv-types.h:678
xv::Calibration::pdcm
std::vector< PolynomialDistortionCameraModel > pdcm
Deprecated, better to use camerasModel; List of Unified Camera Model parameters for differents camera...
Definition: xv-types.h:996
xv::details::Transform_::rotation
Matrix3< F > const & rotation() const
Get the rotation matrix part of the transformation.
Definition: xv-types.h:275
xv::XV_ET_GAZE_POINT::gazeDirection
xv_ETPoint3D gazeDirection
gaze direction.
Definition: xv-types.h:1358
xv::PolynomialDistortionCameraModel::fx
double fx
Focal length in width direction (in pixel)
Definition: xv-types.h:713
xv::GrayScaleImage
A grayscale image that is usually an image from a camera used for visual SLAM.
Definition: xv-types.h:1018
xv::XV_ET_PUPIL_INFO::pupilMinorAxisMM
float pupilMinorAxisMM
pupil diameter, pupil minor axis value(mm).
Definition: xv-types.h:1376
xv::details::Transform_::inverse
Transform_< F > inverse() const
Compute the inverse transformation.
xv::Orientation::setQuaternion
void setQuaternion(Vector4d const &v)
Set the quaternion of the rotation [qx,qy,qz,qw].
xv::Object
Object detection bounding box.
Definition: xv-types.h:1143
xv::details::PoseRot_::setEdgeTimestampUs
void setEdgeTimestampUs(std::int64_t t)
Set the edge timestamp of the pose (in microseconds).
Definition: xv-types.h:454
xv::DateTime
Definition: xv-types.h:1525
xv::ExpSetting
Exposure settings.
Definition: xv-types.h:55
xv::DepthImage::width
std::size_t width
width of the image (in pixel)
Definition: xv-types.h:1111
xv::details::TransformQuat_::quaternion
Vector4< F > const & quaternion() const
Get the quaternion [qx,qy,qz,qw] of the rotation.
xv::AwbSetting
AWB settings.
Definition: xv-types.h:67
xv::DepthColorImage
Definition: xv-types.h:1124
xv::DepthImage::height
std::size_t height
height of the image (in pixel)
Definition: xv-types.h:1112
xv::details::Transform_::z
F z() const
Z coordinate of the translation.
Definition: xv-types.h:296
xv::PointCloud
A point cloud of 3D points.
Definition: xv-types.h:1134
xv::UnifiedCameraModel::u0
double u0
Optical axis intersection in width direction (in pixel)
Definition: xv-types.h:763
xv::Orientation::edgeTimestampUs
std::int64_t edgeTimestampUs
timestamp of the plane (in microsecond based on edge clock).
Definition: xv-types.h:861
xv::XV_ET_EYE_DATA_EX::leftGaze
XV_ET_GAZE_POINT leftGaze
left eye gaze data
Definition: xv-types.h:1401
xv::UnifiedCameraModel::xi
double xi
xi parameter of Unified Camera Model
Definition: xv-types.h:771
xv::Plane::normal
Vector3d normal
Unit vector normal to the plane.
Definition: xv-types.h:952
xv::ObjectDescriptor
Definition: xv-types.h:1192
xv::UnifiedCameraModel::fy
double fy
Focal length in height direction (in pixel)
Definition: xv-types.h:759
xv::details::PoseRot_::hostTimestamp
double hostTimestamp() const
Get the host timestamp of the pose (in s).
Definition: xv-types.h:458
xv::quaternionsToRotation
Matrix3f quaternionsToRotation(Vector4f const &q)
Deprecated. Same to #quaternionToRotation.
xv::RgbImage::height
std::size_t height
height of the image (in pixel)
Definition: xv-types.h:1039
xv::PolynomialDistortionCameraModel::h
int h
Image height (in pixel)
Definition: xv-types.h:709
xv::FisheyeImages::id
std::int64_t id
List of images (typically 2, first is left and second image is the right image)
Definition: xv-types.h:1031
xv::DepthImage::edgeTimestampUs
std::int64_t edgeTimestampUs
timestamp of the physical measurement (in microsecond based on edge clock).
Definition: xv-types.h:1117
xv::Orientation::setAngularAcceleration
void setAngularAcceleration(Vector3d const &v)
Set an estimation of instantaneous angular acceleration of the pose.
xv::details::TransformQuat_::x
F x() const
X coordinate of the translation.
Definition: xv-types.h:373
xv::Event::hostTimestamp
double hostTimestamp
host timestamp of the physical measurement (in second based on the std::chrono::steady_clock).
Definition: xv-types.h:843
xv::FisheyeImages::hostTimestamp
double hostTimestamp
host timestamp of the physical measurement (in second based on the std::chrono::steady_clock),...
Definition: xv-types.h:1028
xv::XV_ET_PUPIL_INFO::pupilMinorAxis
float pupilMinorAxis
pupil diameter, pupil minor axis value(0-1), the ratio of the pixel value of the minor axis size of t...
Definition: xv-types.h:1375
xv::XV_ET_EYE_EXDATA
Definition: xv-types.h:1383
xv::XV_ET_EYE_DATA_EX::rightPupil
XV_ET_PUPIL_INFO rightPupil
right eye pupil data
Definition: xv-types.h:1405
xv::details::PoseQuat_::edgeTimestampUs
std::int64_t edgeTimestampUs() const
Get the edge timestamp of the pose (in microseconds).
Definition: xv-types.h:421
xv::Plane::vertices
std::vector< Vector3d > vertices
Flat, 3D, triangle mesh describing the detailed plane geometry extents. More convenient than the bord...
Definition: xv-types.h:966
xv::Version::major
int major
Major number of the version.
Definition: xv-types.h:130
xv::ThermalImage::edgeTimestampUs
std::int64_t edgeTimestampUs
timestamp of the physical measurement (in microsecond based on edge clock).
Definition: xv-types.h:1236
xv::HandPose
new hand pose struct.
Definition: xv-types.h:1564
xv::details::PosePred_::angularVelocity
Vector3< F > const & angularVelocity() const
Get the angular velocity (x,y,z) in rad/s.
Definition: xv-types.h:578
xv::details::PoseQuat_::setEdgeTimestampUs
void setEdgeTimestampUs(std::int64_t t)
Set the edge timestamp of the pose (in microseconds).
Definition: xv-types.h:425
xv::DateTime::D
int D
Year, month, and day.
Definition: xv-types.h:1526
xv::ColorImage::toRgb
RgbImage toRgb() const
Convert to a xv::RgbImage.
xv::XV_ET_EYE_DATA_EX::leftExData
XV_ET_EYE_EXDATA leftExData
left eye extend data(include blink and eyelid data)
Definition: xv-types.h:1407
xv::MicData::edgeTimestampUs
std::int64_t edgeTimestampUs
timestamp of the physical measurement (in microsecond based on edge clock).
Definition: xv-types.h:1254
xv::details::PosePred_::setLinearVelocity
void setLinearVelocity(Vector3< F > const &v)
Set the linear velocity (in m/s)
Definition: xv-types.h:582
xv::Version::patch
int patch
Patch number of the version.
Definition: xv-types.h:132
xv::XV_ET_GAZE_POINT::gazePoint
xv_ETPoint3D gazePoint
gaze point, x and y are valid, z default value is 0, x and y scope are related to the input calibrati...
Definition: xv-types.h:1354
xv::details::Transform_
Definition: xv-types.h:237
xv::PolynomialDistortionCameraModel::w
int w
Image width (in pixel)
Definition: xv-types.h:705
xv::GPSDistanceData
Definition: xv-types.h:1535