-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDepthCameraIntrinsics.h
executable file
·61 lines (50 loc) · 2.09 KB
/
DepthCameraIntrinsics.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/**
* @file DepthCameraIntrinsics.h
* @ingroup Kinect
* @author Dominique Vaufreydaz, Grenoble Alpes University, Inria
* @copyright All right reserved.
*/
#ifndef __DEPTH_CAMERA_INTRINSICS_H__
#define __DEPTH_CAMERA_INTRINSICS_H__
#ifdef KINECT_2
#include "KinectBasics.h"
// Add Serialization facilities
#include <Messaging/Serializable.h>
class DepthCameraIntrinsics : public Omiscid::Serializable
{
public:
DepthCameraIntrinsics() :
FocalLengthX(IntrinsicsParameters.FocalLengthX),
FocalLengthY(IntrinsicsParameters.FocalLengthY),
PrincipalPointX(IntrinsicsParameters.PrincipalPointX),
PrincipalPointY(IntrinsicsParameters.PrincipalPointY),
RadialDistortionSecondOrder(IntrinsicsParameters.RadialDistortionSecondOrder),
RadialDistortionFourthOrder(IntrinsicsParameters.RadialDistortionFourthOrder),
RadialDistortionSixthOrder(IntrinsicsParameters.RadialDistortionSixthOrder)
{};
virtual ~DepthCameraIntrinsics() {};
// To (Un)serialize data, declare JSON mapping
virtual void DeclareSerializeMapping()
{
AddToSerialization( "FocalLengthX", IntrinsicsParameters.FocalLengthX );
AddToSerialization( "FocalLengthY", IntrinsicsParameters.FocalLengthY );
AddToSerialization( "PrincipalPointX", IntrinsicsParameters.PrincipalPointX );
AddToSerialization( "PrincipalPointY", IntrinsicsParameters.PrincipalPointY );
AddToSerialization( "RadialDistortionSecondOrder", IntrinsicsParameters.RadialDistortionSecondOrder );
AddToSerialization( "RadialDistortionFourthOrder", IntrinsicsParameters.RadialDistortionFourthOrder );
AddToSerialization( "RadialDistortionSixthOrder", IntrinsicsParameters.RadialDistortionSixthOrder );
}
// Add references to intrinsics values
float &FocalLengthX;
float &FocalLengthY;
float &PrincipalPointX;
float &PrincipalPointY;
float &RadialDistortionSecondOrder;
float &RadialDistortionFourthOrder;
float &RadialDistortionSixthOrder;
public:
// Internal value from the Kinect
CameraIntrinsics IntrinsicsParameters;
};
#endif // KINECT_2
#endif // __DEPTH_CAMERA_INTRINSICS_H__