Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
Beyond Protocol
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Beyond AKA
Beyond Protocol
Commits
05ada08d
Commit
05ada08d
authored
2 years ago
by
Nicolas Pope
Browse files
Options
Downloads
Patches
Plain Diff
Add new channels and names
parent
02e8f497
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/ftl/protocol/channels.hpp
+150
-90
150 additions, 90 deletions
include/ftl/protocol/channels.hpp
src/channelUtils.cpp
+71
-14
71 additions, 14 deletions
src/channelUtils.cpp
with
221 additions
and
104 deletions
include/ftl/protocol/channels.hpp
+
150
−
90
View file @
05ada08d
...
...
@@ -15,124 +15,184 @@ namespace protocol {
enum
struct
Channel
:
int
{
/* Video Channels */
kNone
=
-
1
,
kColour
=
0
,
//
8UC3 or 8UC4
kColour
=
0
,
//
/ Left-eye colour video
kLeft
=
0
,
kDepth
=
1
,
//
32S or 32F
kRight
=
2
,
//
8UC3 or 8UC4
kDepth
=
1
,
//
/ Left-eye depth
kRight
=
2
,
//
/ Right-eye colour video
kColour2
=
2
,
kDepth2
=
3
,
kDepth2
=
3
,
/// Right-eye depth
kDeviation
=
4
,
kScreen
=
4
,
// 16SC2
kNormals
=
5
,
//
16FC4
kWeights
=
6
,
//
short
kConfidence
=
7
,
//
32F
kContribution
=
7
,
// 32F
kEnergyVector
=
8
,
// 32FC4
kFlow
=
9
,
//
16SC2
kFlow2
=
10
,
//
16SC2
kEnergy
=
10
,
//
32F
kMask
=
11
,
//
32U
kDensity
=
12
,
//
32F
kSupport1
=
13
,
//
8UC4 (currently)
kSupport2
=
14
,
// 8UC4 (currently)
kSegmentation
=
15
,
//
32S?
kNormals2
=
16
,
//
16FC4
kScreen
=
4
,
kNormals
=
5
,
//
/ Normals for left-eye
kWeights
=
6
,
//
/ Per pixel weighting
kConfidence
=
7
,
//
/ Depth or disparity confidence
kContribution
=
7
,
kEnergyVector
=
8
,
kFlow
=
9
,
//
/ Optical flow
kFlow2
=
10
,
//
/ Right optical flow
kEnergy
=
10
,
//
/ Some energy measure
kMask
=
11
,
//
/ Pixel masking
kDensity
=
12
,
//
/ Point density
kSupport1
=
13
,
//
/ Cross support coordinates
kSupport2
=
14
,
kSegmentation
=
15
,
//
/ Segment identifiers
kNormals2
=
16
,
//
/ Right-eye normals
kUNUSED1
=
17
,
kDisparity
=
18
,
kSmoothing
=
19
,
//
32F
kDisparity
=
18
,
/// Original disparity
kSmoothing
=
19
,
//
/ Smoothing magnitude
kUNUSED2
=
20
,
kOverlay
=
21
,
//
8UC4
kGroundTruth
=
22
,
//
32F
kOverlay
=
21
,
//
/ Colour overlay image
kGroundTruth
=
22
,
//
/ Ground truth
/* Audio Channels */
kAudioMono
=
32
,
// Deprecated, will always be stereo
kAudioMono
=
32
,
kAudioStereo
=
33
,
kAudio
=
33
,
kAudio
=
33
,
/// Stereo audio data
/* Special data channels */
kConfiguration
=
64
,
//
JSON Data
kConfiguration
=
64
,
//
/ Device URI list
kSettings1
=
65
,
kCalibration
=
65
,
// Camera Parameters Object
kPose
=
66
,
// Eigen::Matrix4d, camera transform
kCalibration
=
65
,
//
/
Camera Parameters Object
kPose
=
66
,
//
/
Eigen::Matrix4d, camera transform
kSettings2
=
67
,
kCalibration2
=
67
,
// Right camera parameters
kCalibration2
=
67
,
//
/
Right camera parameters
kIndex
=
68
,
kControl
=
69
,
// For stream and encoder control
kControl
=
69
,
//
/
For stream and encoder control
kSettings3
=
70
,
kMetaData
=
71
,
// Map of string pairs (key, value)
kCapabilities
=
72
,
// Unordered set of int capabilities
kCalibrationData
=
73
,
// Just for stereo intrinsics/extrinsics etc
kThumbnail
=
74
,
// Small JPG thumbnail, sometimes updated
kOverlaySelect
=
75
,
// Choose what to have in the overlay channel
kStartTime
=
76
,
// Stream start timestamp
kUser
=
77
,
// User currently controlling the stream
kAccelerometer
=
90
,
// Eigen::Vector3f
kGyroscope
=
91
,
// Eigen::Vector3f
kMetaData
=
71
,
/// Map of string pairs (key, value)
kCapabilities
=
72
,
/// Unordered set of int capabilities
kCalibrationData
=
73
,
/// Just for stereo intrinsics/extrinsics etc
kThumbnail
=
74
,
/// Small JPG thumbnail, sometimes updated
kOverlaySelect
=
75
,
/// Choose what to have in the overlay channel
kStartTime
=
76
,
/// Stream start timestamp
kUser
=
77
,
/// User currently controlling the stream
kName
=
78
,
/// Alternative to meta data channel
kTags
=
79
,
/// Array of string tag names
KDescription
=
80
,
kSelectPoint
=
81
,
/// A selected X,Y screen point
kAccelerometer
=
90
,
/// Eigen::Vector3f
kGyroscope
=
91
,
/// Eigen::Vector3f
/* Camera Options */
kBrightness
=
100
,
kContrast
=
101
,
kExposure
=
102
,
kGain
=
103
,
kWhiteBalance
=
104
,
kAutoExposure
=
105
,
kAutoWhiteBalance
=
106
,
kCameraTemperature
=
107
,
kBrightness
=
100
,
/// Camera brightness setting
kContrast
=
101
,
/// Camera contrast setting
kExposure
=
102
,
/// Camera exposure setting
kGain
=
103
,
/// Camera gain setting
kWhiteBalance
=
104
,
/// Camera white balance setting
kAutoExposure
=
105
,
/// Camera auto exposure enabled
kAutoWhiteBalance
=
106
,
/// Camera auto white balance enabled
kCameraTemperature
=
107
,
/// Current camera temperature reading
/* Realsense Options */
kRS2_LaserPower
=
150
,
kRS2_MinDistance
=
151
,
kRS2_MaxDistance
=
152
,
kRS2_InterCamSync
=
153
,
kRS2_PostSharpening
=
154
,
kRS2_LaserPower
=
150
,
/// RealSense laser power
kRS2_MinDistance
=
151
,
/// RealSense minimum depth
kRS2_MaxDistance
=
152
,
/// RealSense maximum depth
kRS2_InterCamSync
=
153
,
/// RealSense inter-camera sync mode
kRS2_PostSharpening
=
154
,
/// RealSense post sharpening filter
/* Pylon Options 200 */
/* Audio Settings 300 */
/* Renderer Settings 400 */
kRenderer_CameraType
=
400
,
// stereo, normal, tile
kRenderer_Visualisation
=
401
,
// Pointcloud, mesh, other
kRenderer_Engine
=
402
,
// OpenGL, CUDA, other
kRenderer_FPS
=
403
,
// Frames per second
kRenderer_View
=
404
,
// Fixed viewpoint to one source
kRenderer_Channel
=
405
,
// Select overlay channel,
kRenderer_Opacity
=
406
,
// Opacity of overlay channel
kRenderer_Sources
=
407
,
// Which source devices to use
kRenderer_Projection
=
408
,
// 0 = normal, 1 = ortho, 2 = equirect
kRenderer_Background
=
409
,
// Background colour
kRenderer_ShowBadColour
=
420
,
kRenderer_CoolEffect
=
421
,
kRenderer_EffectColour
=
422
,
kRenderer_ShowColourWeights
=
423
,
kRenderer_TriangleLimit
=
424
,
kRenderer_DisconDisparities
=
425
,
kRenderer_NormalWeightColour
=
426
,
kRenderer_ChannelWeights
=
427
,
kRenderer_AccumFunc
=
428
,
kRenderer_CameraType
=
400
,
// stereo, normal, tile
kRenderer_Visualisation
=
401
,
// Pointcloud, mesh, other
kRenderer_Engine
=
402
,
// OpenGL, CUDA, other
kRenderer_FPS
=
403
,
// Frames per second
kRenderer_View
=
404
,
// Fixed viewpoint to one source
kRenderer_Channel
=
405
,
// Select overlay channel,
kRenderer_Opacity
=
406
,
// Opacity of overlay channel
kRenderer_Sources
=
407
,
// Which source devices to use
kRenderer_Projection
=
408
,
// 0 = normal, 1 = ortho, 2 = equirect
kRenderer_Background
=
409
,
// Background colour
kRenderer_ShowBadColour
=
420
,
kRenderer_CoolEffect
=
421
,
kRenderer_EffectColour
=
422
,
kRenderer_ShowColourWeights
=
423
,
kRenderer_TriangleLimit
=
424
,
kRenderer_DisconDisparities
=
425
,
kRenderer_NormalWeightColour
=
426
,
kRenderer_ChannelWeights
=
427
,
kRenderer_AccumFunc
=
428
,
kRenderer_Lights
=
429
,
kRenderer_Debug
=
430
,
// Depends on the renderer engine
/* Pipeline Settings */
kPipeline_Enable
=
500
,
kPipeline_EnableMVMLS
=
501
,
kPipeline_EnableAruco
=
502
,
kOperators
=
500
,
/* Clipping */
kClip_Box
=
510
,
kClip_Enabled
=
511
,
kClip_Colour
=
512
,
/* Fusion operator */
kFusion_Smoothing
=
520
,
kFusion_Iterations
=
521
,
kFusion_Carving
=
522
,
kFusion_ShowChanges
=
523
,
/* MVMLS Operator */
kMLS_DisconPixels
=
540
,
kMLS_ColourSmoothing
=
541
,
kMLS_Iterations
=
542
,
kMLS_Radius
=
543
,
kMLS_WindowSize
=
544
,
kMLS_MergeCorresponding
=
545
,
kMLS_Merge
=
546
,
kMLS_ConfidenceCull
=
547
,
kMLS_ColourSmooth2
=
548
,
kMLS_SpatialSmooth
=
549
,
kMLS_SubPixel
=
550
,
kMLS_P1
=
551
,
kMLS_P2
=
552
,
kMLS_ShowConsistency
=
553
,
kMLS_ShowAdjustment
=
554
,
/* Masking operator */
kMask_DisconPixels
=
560
,
kMask_DisconThreshold
=
561
,
kMask_NoiseThreshold
=
562
,
kMask_AreaMax
=
563
,
kMask_BorderRect
=
564
,
kMask_MaskID
=
565
,
kMask_Radius
=
566
,
kMask_Invert
=
570
,
/* Aruco Operator */
kAruco_Dictionary
=
580
,
kAruco_EstimatePose
=
581
,
kAruco_MarkerSize
=
582
,
/* Poser operator */
kPoser_Identity
=
590
,
kPoser_Locked
=
591
,
kPoser_Inverse
=
592
,
/* Stereo video settings */
kSGMResolution
=
600
,
kStereoRectify
=
601
,
kStereoRightPose
=
602
,
kStereoRectifyCubic
=
603
,
kVideoOffsetZ
=
604
,
kVideoSize
=
605
,
/* Sender settings */
kSenderLosslessFloat
=
700
,
kSenderLosslessColour
=
701
,
kSenderIFrames
=
702
,
kSenderCodecFloat
=
703
,
kSenderCodecColour
=
704
,
kSenderMaxBitrate
=
705
,
kSenderFloatBitrateScale
=
706
,
kSGMResolution
=
600
,
kStereoRectify
=
601
,
kStereoRightPose
=
602
,
kStereoRectifyCubic
=
603
,
kVideoOffsetZ
=
604
,
kVideoSize
=
605
,
/* Pixel weights operator */
kWeights_DisconPixels
=
610
,
kWeights_DisconThreshold
=
611
,
kWeights_NoiseThreshold
=
612
,
kWeights_AreaMax
=
613
,
kWeights_UseDepth
=
614
,
kWeights_UseColour
=
615
,
kWeights_UseNoise
=
616
,
kWeights_UseNormals
=
617
,
/* Cross support operator */
kCross_UseDiscontinuity
=
620
,
kCross_VMax
=
621
,
kCross_HMax
=
622
,
kCross_Symmetric
=
623
,
kCross_Tau
=
624
,
/* Custom / user data channels */
...
...
This diff is collapsed.
Click to expand it.
src/channelUtils.cpp
+
71
−
14
View file @
05ada08d
...
...
@@ -124,6 +124,10 @@ static const std::unordered_map<Channel,ChannelInfo> info = {
{
Channel
::
kOverlaySelect
,
{
"OverlaySelect"
,
-
1
}},
{
Channel
::
kStartTime
,
{
"StartTime"
,
-
1
}},
{
Channel
::
kUser
,
{
"User"
,
-
1
}},
{
Channel
::
kName
,
{
"Name"
,
-
1
}},
{
Channel
::
kTags
,
{
"Tags"
,
-
1
}},
{
Channel
::
KDescription
,
{
"Decription"
,
-
1
}},
{
Channel
::
kSelectPoint
,
{
"SelectPoint"
,
-
1
}},
{
Channel
::
kBrightness
,
{
"Brightness"
,
-
1
}},
{
Channel
::
kContrast
,
{
"Contrast"
,
-
1
}},
...
...
@@ -159,21 +163,74 @@ static const std::unordered_map<Channel,ChannelInfo> info = {
{
Channel
::
kRenderer_NormalWeightColour
,
{
"RenderNormalWeightColour"
,
-
1
}},
{
Channel
::
kRenderer_ChannelWeights
,
{
"RenderChannelWeights"
,
-
1
}},
{
Channel
::
kRenderer_AccumFunc
,
{
"RenderAccumFunc"
,
-
1
}},
{
Channel
::
kRenderer_Lights
,
{
"RenderLights"
,
-
1
}},
{
Channel
::
kRenderer_Debug
,
{
"RenderDebug"
,
-
1
}},
{
Channel
::
kSGMResolution
,
{
"SGMResolution"
,
-
1
}},
{
Channel
::
kStereoRectify
,
{
"StereoRectify"
,
-
1
}},
{
Channel
::
kStereoRightPose
,
{
"StereoRightPose"
,
-
1
}},
{
Channel
::
kStereoRectifyCubic
,
{
"StereoRectifyCubic"
,
-
1
}},
{
Channel
::
kVideoOffsetZ
,
{
"VideoOffsetZ"
,
-
1
}},
{
Channel
::
kVideoSize
,
{
"VideoSize"
,
-
1
}},
{
Channel
::
kSenderLosslessFloat
,
{
"SenderLosslessFloat"
,
-
1
}},
{
Channel
::
kSenderLosslessColour
,
{
"SenderLosslessColour"
,
-
1
}},
{
Channel
::
kSenderIFrames
,
{
"SenderIFrames"
,
-
1
}},
{
Channel
::
kSenderCodecFloat
,
{
"SenderCodecFloat"
,
-
1
}},
{
Channel
::
kSenderCodecColour
,
{
"SenderCodecColour"
,
-
1
}},
{
Channel
::
kSenderMaxBitrate
,
{
"SenderMaxBitrate"
,
-
1
}},
{
Channel
::
kSenderFloatBitrateScale
,
{
"SenderFloatBitrateScale"
,
-
1
}},
{
Channel
::
kOperators
,
{
"Operators"
,
-
1
}},
{
Channel
::
kClip_Box
,
{
"ClipBox"
,
-
1
}},
{
Channel
::
kClip_Enabled
,
{
"ClipEnabled"
,
-
1
}},
{
Channel
::
kClip_Colour
,
{
"ClipColour"
,
-
1
}},
{
Channel
::
kFusion_Smoothing
,
{
"FusionSmoothing"
,
-
1
}},
{
Channel
::
kFusion_Iterations
,
{
"FusionIterations"
,
-
1
}},
{
Channel
::
kFusion_Carving
,
{
"FusionCarving"
,
-
1
}},
{
Channel
::
kFusion_ShowChanges
,
{
"FusionShowChanges"
,
-
1
}},
{
Channel
::
kMLS_DisconPixels
,
{
"MLSDisconPixels"
,
-
1
}},
{
Channel
::
kMLS_ColourSmoothing
,
{
"MLSColourSmoothing"
,
-
1
}},
{
Channel
::
kMLS_Iterations
,
{
"MLSIterations"
,
-
1
}},
{
Channel
::
kMLS_Radius
,
{
"MLSRadius"
,
-
1
}},
{
Channel
::
kMLS_WindowSize
,
{
"MLSWindowSize"
,
-
1
}},
{
Channel
::
kMLS_MergeCorresponding
,
{
"MLSMergeCorresponding"
,
-
1
}},
{
Channel
::
kMLS_Merge
,
{
"MLSMerge"
,
-
1
}},
{
Channel
::
kMLS_ConfidenceCull
,
{
"MLSConfidenceCull"
,
-
1
}},
{
Channel
::
kMLS_ColourSmooth2
,
{
"MLSColourSmooth2"
,
-
1
}},
{
Channel
::
kMLS_SpatialSmooth
,
{
"MLSSpatialSmooth"
,
-
1
}},
{
Channel
::
kMLS_SubPixel
,
{
"MLSSubPixel"
,
-
1
}},
{
Channel
::
kMLS_P1
,
{
"MLSP1"
,
-
1
}},
{
Channel
::
kMLS_P2
,
{
"MLSP2"
,
-
1
}},
{
Channel
::
kMLS_ShowConsistency
,
{
"MLSShowConsistency"
,
-
1
}},
{
Channel
::
kMLS_ShowAdjustment
,
{
"MLSShowAdjustment"
,
-
1
}},
{
Channel
::
kMask_DisconPixels
,
{
"MaskDisconPixels"
,
-
1
}},
{
Channel
::
kMask_DisconThreshold
,
{
"MaskDisconThreshold"
,
-
1
}},
{
Channel
::
kMask_NoiseThreshold
,
{
"MaskNoiseThreshold"
,
-
1
}},
{
Channel
::
kMask_AreaMax
,
{
"MaskAreaMax"
,
-
1
}},
{
Channel
::
kMask_BorderRect
,
{
"MaskBorderRectangle"
,
-
1
}},
{
Channel
::
kMask_MaskID
,
{
"MaskID"
,
-
1
}},
{
Channel
::
kMask_Radius
,
{
"MaskRadius"
,
-
1
}},
{
Channel
::
kMask_Invert
,
{
"MaskInvert"
,
-
1
}},
{
Channel
::
kAruco_Dictionary
,
{
"ArucoDictionary"
,
-
1
}},
{
Channel
::
kAruco_EstimatePose
,
{
"ArucoEstimatePose"
,
-
1
}},
{
Channel
::
kAruco_MarkerSize
,
{
"ArucoMarkerSize"
,
-
1
}},
{
Channel
::
kPoser_Identity
,
{
"PoserIdentity"
,
-
1
}},
{
Channel
::
kPoser_Locked
,
{
"PoserLocked"
,
-
1
}},
{
Channel
::
kPoser_Inverse
,
{
"PoserInverse"
,
-
1
}},
{
Channel
::
kSGMResolution
,
{
"SGMResolution"
,
-
1
}},
{
Channel
::
kStereoRectify
,
{
"StereoRectify"
,
-
1
}},
{
Channel
::
kStereoRightPose
,
{
"StereoRightPose"
,
-
1
}},
{
Channel
::
kStereoRectifyCubic
,
{
"StereoRectifyCubic"
,
-
1
}},
{
Channel
::
kVideoOffsetZ
,
{
"VideoOffsetZ"
,
-
1
}},
{
Channel
::
kVideoSize
,
{
"VideoSize"
,
-
1
}},
{
Channel
::
kWeights_DisconPixels
,
{
"WeightsDisconPixels"
,
-
1
}},
{
Channel
::
kWeights_DisconThreshold
,
{
"WeightsDisconThreshold"
,
-
1
}},
{
Channel
::
kWeights_NoiseThreshold
,
{
"WeightsNoiseThreshold"
,
-
1
}},
{
Channel
::
kWeights_AreaMax
,
{
"WeightsAreaMax"
,
-
1
}},
{
Channel
::
kWeights_UseDepth
,
{
"WeightsUseDepth"
,
-
1
}},
{
Channel
::
kWeights_UseColour
,
{
"WeightsUseColour"
,
-
1
}},
{
Channel
::
kWeights_UseNoise
,
{
"WeightsUseNoise"
,
-
1
}},
{
Channel
::
kWeights_UseNormals
,
{
"WeightsUseNormals"
,
-
1
}},
{
Channel
::
kCross_UseDiscontinuity
,
{
"CrossUseDiscontinuity"
,
-
1
}},
{
Channel
::
kCross_VMax
,
{
"CrossVMax"
,
-
1
}},
{
Channel
::
kCross_HMax
,
{
"CrossHMax"
,
-
1
}},
{
Channel
::
kCross_Symmetric
,
{
"CrossSymmetric"
,
-
1
}},
{
Channel
::
kCross_Tau
,
{
"CrossTau"
,
-
1
}},
{
Channel
::
kData
,
{
"Generic Data"
,
-
1
}},
{
Channel
::
kFaces
,
{
"Faces"
,
-
1
}},
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment