This repository has been archived by the owner on Aug 18, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
enums.go
109 lines (96 loc) · 5.05 KB
/
enums.go
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
package librealsense
/*
#cgo linux darwin LDFLAGS: -L/usr/local/lib/ -lrealsense -I/usr/local/include/librealsense
#include <librealsense/rs.h>
*/
import "C"
// Stream are different types of data provided by RealSense devices
type Stream C.rs_stream
// Stream Types
const (
// Native stream of depth data produced by RealSense device
StreamDepth Stream = C.RS_STREAM_DEPTH
// Native stream of color data captured by RealSense device
StreamColor Stream = C.RS_STREAM_COLOR
// Native stream of infrared data captured by RealSense device
StreamInfrared Stream = C.RS_STREAM_INFRARED
// Native stream of infrared data captured from a second viewpoint by RealSense device
StreamInfrared2 Stream = C.RS_STREAM_INFRARED2
// Native stream of fish-eye (wide) data captured from the dedicate motion camera
StreamFisheye Stream = C.RS_STREAM_FISHEYE
// Synthetic stream containing point cloud data generated by deprojecting the depth image
StreamPoints Stream = C.RS_STREAM_POINTS
// Synthetic stream containing undistorted color data with no extrinsic rotation from the depth stream
StreamRectifiedColor Stream = C.RS_STREAM_RECTIFIED_COLOR
// Synthetic stream containing color data but sharing intrinsic of depth stream
StreamColorAlignedToDepth Stream = C.RS_STREAM_COLOR_ALIGNED_TO_DEPTH
// Synthetic stream containing second viewpoint infrared data but sharing intrinsic of depth stream
StreamInfrared2AlignedToDepth Stream = C.RS_STREAM_INFRARED2_ALIGNED_TO_DEPTH
// Synthetic stream containing depth data but sharing intrinsic of color stream
StreamDepthAlignedToColor Stream = C.RS_STREAM_DEPTH_ALIGNED_TO_COLOR
// Synthetic stream containing depth data but sharing intrinsic of rectified color stream
StreamDepthAlignedToRectifiedColor Stream = C.RS_STREAM_DEPTH_ALIGNED_TO_RECTIFIED_COLOR
// Synthetic stream containing depth data but sharing intrinsic of second viewpoint infrared stream
StreamDepthAlignedToInfrared2 Stream = C.RS_STREAM_DEPTH_ALIGNED_TO_INFRARED2
// Number of enumeration values. Not a valid input: intended to be used in for-loops.
StreamCount Stream = C.RS_STREAM_COUNT
)
// Preset are general preferences that are translated by librealsense into concrete resolution and FPS.
type Preset C.rs_preset
// Preset Types
const (
PresetBestQuality Preset = C.RS_PRESET_BEST_QUALITY // Prefer best overall quality
PresetLargestImage Preset = C.RS_PRESET_LARGEST_IMAGE // Prefer largest image size
PresetHighestFramerate Preset = C.RS_PRESET_HIGHEST_FRAMERATE // Prefer highest frame rate
// Number of enumeration values. Not a valid input: intended to be used in for-loops.
PresetCount Preset = C.RS_PRESET_COUNT
)
// Format defines how each stream can be encoded.
type Format C.rs_format
// Format Types
const (
// When passed to enable stream, librealsense will try to provide best suited format
FormatAny Format = C.RS_FORMAT_ANY
// 16-bit linear depth values. The depth is meters is equal to depth scale * pixel value.
FormatZ16 Format = C.RS_FORMAT_Z16
// 16-bit linear disparity values. The depth in meters is equal to depth scale / pixel value.
FormatDisparity16 Format = C.RS_FORMAT_DISPARITY16
// 32-bit floating point 3D coordinates.
FormatXYZ32F Format = C.RS_FORMAT_XYZ32F
// Standard YUV pixel format as described in https://en.wikipedia.org/wiki/YUV
FormatYUYV Format = C.RS_FORMAT_YUYV
// 8-bit red, green and blue channels
FormatRGB8 Format = C.RS_FORMAT_RGB8
// 8-bit blue, green, and red channels -- suitable for OpenCV
FormatBGR8 Format = C.RS_FORMAT_BGR8
// 8-bit red, green and blue channels + constant alpha channel equal to FF
FormatRGBA8 Format = C.RS_FORMAT_RGBA8
// 8-bit blue, green, and red channels + constant alpha channel equal to FF
FormatBGRA8 Format = C.RS_FORMAT_BGRA8
// 8-bit per-pixel grayscale image
FormatY8 Format = C.RS_FORMAT_Y8
// 16-bit per-pixel grayscale image
FormatY16 Format = C.RS_FORMAT_Y16
// Four 10-bit luminance values encoded into a 5-byte macropixel
FormatRaw10 Format = C.RS_FORMAT_RAW10
// 16-bit raw image
FormatRaw16 Format = C.RS_FORMAT_RAW16
// 8-bit raw image
FormatRaw8 Format = C.RS_FORMAT_RAW8
FormatCount Format = C.RS_FORMAT_COUNT // Number of enumeration values. Not a valid input: intended to be used in for-loops.
)
// Distortion model: defines how pixel coordinates should be mapped to sensor coordinates.
type Distortion C.rs_distortion
// Distortion values
const (
// Rectilinear images. No distortion compensation required.
DistortionNone Distortion = C.RS_DISTORTION_NONE
// Equivalent to Brown-Conrady distortion, except that tangential distortion is applied to radially distorted points
DistortionModifiedBrownConrady Distortion = C.RS_DISTORTION_MODIFIED_BROWN_CONRADY
// Equivalent to Brown-Conrady distortion, except undistorts image instead of distorting it
DistortionInverseBrownConrady Distortion = C.RS_DISTORTION_INVERSE_BROWN_CONRADY
// Distortion model of the fish-eye camera
DistortionFTHETA Distortion = C.RS_DISTORTION_FTHETA
// Number of enumeration values. Not a valid input: intended to be used in for-loops.
DistortionCount Distortion = C.RS_DISTORTION_COUNT
)