API使用说明
数据传输格式
-
参数格式一般使用JSON格式进行传输
-
图像,深度图,点云等格式使用EpicRaw格式进行存储,以下为EpicRaw格式说明
EpicRaw1
-
Header
FileType = "EPICRAW1" // 8 bytes, version info width = int32 // 4 bytes height = int32 // 4 bytes // 3 * 3 camera matrix, row major camera matrix = float64 * 9 // 8 * 9 = 72 bytes, camera matrix distortion = float64 * 5 // 8 * 5 = 40 bytes, camera distortion // K1 = float64 // K2 = float64 // P1 = float64 // P2 = float64 // K3 = float64 camera config // 4 * 7 = 28 bytes, camera configs // projector brightness = int32 // exp time 2d = float32 // exp time 3d = float32 // use hdr = bool but save as int32 // exp time hdr = float32 // use PF = bool but save as int32 // use SF = bool but save as int32 data type = int32 // 4 bytes // 0: RGB only // 1: depth only // 4: depth + RGB depth data length = int32 // 4 bytes image data length = int32 // 4 bytes Total: 168 bytes
-
Data
-
depth data:长度为depth data length
-
image data:长度为image data length
总长度 = depth data length + image data length
-
EpicRaw2
-
Header
FileType = "EPICRAW2" // 8 bytes, version info width = int32 // 4 bytes height = int32 // 4 bytes data type = int32 // 4 bytes // 0: RGB only // 1: depth only // 2: RGB16bit image only // 4: depth + RGB // 8: depth + RGB16bit // 16: origin Fringe-Pattern images camera matrix length = int32 // 4 bytes, default: 8 * 9 = 72, row major distortion length = int32 // 4 bytes config str length = int32 // 4 bytes depth data length = int32 // 4 bytes image data length = int32 // 4 bytes Total: 40 bytes
-
Data
-
Camera matrix
默认长度: float64 * 9 → 8 * 9 = 72 bytes
内容: 3 * 3 camera matrix, row major
-
Distortion
内容参照OpenCV畸变系数协定。
distortion coefficients (k1,k2,p1,p2[,k3[,k4,k5,k6[,s1,s2,s3,s4[,τx,τy]]]]) of 4, 5, 8, 12 or 14 elements. 一般系数长度为5,数据类型为float64,即K1, K2, P1, P2, K3,长度为5 * 8 = 40 bytes
-
Config string:以json str格式存储
-
Depth data:长度为depth data length
-
Image data:长度为image data length
总长度 = camera matrix length + distortion length + config str length + depth data length + image data length
-
接口列表
请参阅接口列表。