MYNT EYE D SDK  1.7.1
http://www.myntai.com/mynteye/depth
types_calib.h
1 // Copyright 2018 Slightech Co., Ltd. All rights reserved.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 #ifndef MYNTEYE_STUBS_TYPES_CALIB_H_
15 #define MYNTEYE_STUBS_TYPES_CALIB_H_
16 #pragma once
17 
18 #include <ostream>
19 
20 #include "mynteyed/stubs/global.h"
21 
22 MYNTEYE_BEGIN_NAMESPACE
23 
28 struct MYNTEYE_API CameraIntrinsics {
30  std::uint16_t width;
32  std::uint16_t height;
34  double fx;
36  double fy;
38  double cx;
40  double cy;
42  double coeffs[5];
47  double p[12];
48 };
49 
50 MYNTEYE_API
51 std::ostream &operator<<(std::ostream &os, const CameraIntrinsics &in);
52 
57 struct MYNTEYE_API StreamIntrinsics {
58  CameraIntrinsics left;
59  CameraIntrinsics right;
60 };
61 
66 struct MYNTEYE_API ImuIntrinsics {
75  double scale[3][3];
77  double assembly[3][3];
78  /* Zero-drift: X, Y, Z */
79  double drift[3];
80 
82  double noise[3];
84  double bias[3];
85 
86 
87  // std::uint8_t reserve[100];
88 
95  double x[2];
96  double y[2];
97  double z[2];
98 };
99 
100 MYNTEYE_API
101 std::ostream &operator<<(std::ostream &os, const ImuIntrinsics &in);
102 
107 struct MYNTEYE_API MotionIntrinsics {
110 };
111 
112 MYNTEYE_API
113 std::ostream &operator<<(std::ostream &os, const MotionIntrinsics &in);
114 
119 struct MYNTEYE_API Extrinsics {
120  double rotation[3][3];
121  double translation[3];
127  Extrinsics Inverse() const {
128  return {{{rotation[0][0], rotation[1][0], rotation[2][0]},
129  {rotation[0][1], rotation[1][1], rotation[2][1]},
130  {rotation[0][2], rotation[1][2], rotation[2][2]}},
131  {-translation[0], -translation[1], -translation[2]}};
132  }
133 };
134 
135 MYNTEYE_API
136 std::ostream &operator<<(std::ostream &os, const Extrinsics &ex);
137 
142 using StreamExtrinsics = Extrinsics;
147 using MotionExtrinsics = Extrinsics;
148 
149 MYNTEYE_END_NAMESPACE
150 
151 #endif // MYNTEYE_STUBS_TYPES_CALIB_H_
double fy
The focal length of the image plane, as a multiple of pixel height.
Definition: types_calib.h:36
Extrinsics, represent how the different datas are connected.
Definition: types_calib.h:119
double fx
The focal length of the image plane, as a multiple of pixel width.
Definition: types_calib.h:34
ImuIntrinsics accel
Accelerometer intrinsics.
Definition: types_calib.h:108
Extrinsics Inverse() const
Inverse this extrinsics.
Definition: types_calib.h:127
std::uint16_t width
The width of the image in pixels.
Definition: types_calib.h:30
Motion intrinsics, including accelerometer and gyroscope.
Definition: types_calib.h:107
ImuIntrinsics gyro
Gyroscope intrinsics.
Definition: types_calib.h:109
double cy
The vertical coordinate of the principal point of the image.
Definition: types_calib.h:40
std::uint16_t height
The height of the image in pixels.
Definition: types_calib.h:32
Camera intrinsics: size, coeffs and camera matrix.
Definition: types_calib.h:57
IMU intrinsics: scale, drift and variances.
Definition: types_calib.h:66
double cx
The horizontal coordinate of the principal point of the image.
Definition: types_calib.h:38
Camera intrinsics: size, coeffs and camera matrix.
Definition: types_calib.h:28