Intel® Realsense™ SDK 2016 R2 Reference Manual: Api Version 10.0
Intel® Realsense™ SDK 2016 R2 Reference Manual: Api Version 10.0
Intel® Realsense™ SDK 2016 R2 Reference Manual: Api Version 10.0
Reference Manual
API Version 10.0
Table of Contents
Introducing the SDK
13
Basic Concepts
13
......................................................................................................................................................... 59
......................................................................................................................................................... 62
File Compression [Experimental]
Known Limitations ......................................................................................................................................................... 63
Accessing Image Data .......................................................................................................................................................... 64
Coordinate Systems
................................................................................................................................... 76
Configuring Coordinate..........................................................................................................................................................
System
78
Coordinates Mapping .......................................................................................................................................................... 80
.......................................................................................................................................................... 93
Interface Reference
................................................................................................................................... 95
AddRef
Constants
.......................................................................................................................................................... 96
......................................................................................................................................................... 98
Base
.......................................................................................................................................................... 99
Constants
......................................................................................................................................................... 100
......................................................................................................................................... 101
QueryInstance
......................................................................................................................................... 102
......................................................................................................................................... 103
Release (C++)
Calibration
.......................................................................................................................................................... 104
Constants
......................................................................................................................................................... 106
................................................................................................................................... 114
................................................................................................................................... 114
OnDeviceListChanged
......................................................................................................................................................... 115
Constants
Member Functions ......................................................................................................................................................... 115
......................................................................................................................................... 115
CreateDevice
QueryDeviceInfo
......................................................................................................................................... 116
QueryDeviceNum
......................................................................................................................................... 117
......................................................................................................................................... 118
SubscribeCaptureCallbacks
......................................................................................................................................... 118
UnsubscribeCaptureCallbacks
Static Functions
......................................................................................................................................................... 119
StreamTypeFromIndex
......................................................................................................................................... 119
StreamTypeToIndex
......................................................................................................................................... 120
......................................................................................................................................... 121
StreamTypeToString
CaptureManager (+JS,+UWP)
.......................................................................................................................................................... 122
Constants
......................................................................................................................................................... 125
......................................................................................................................................................... 125
Callbacks and Delegates
......................................................................................................................................... 125
Handler
Member Functions
................................................................................................................................... 128
OnCreateDevice
................................................................................................................................... 128
OnSetupStreams
................................................................................................................................... 129
................................................................................................................................... 130
OnNextDevice
Member Functions ......................................................................................................................................................... 131
CloseStreams
......................................................................................................................................... 132
......................................................................................................................................... 135
QueryCapture
......................................................................................................................................... 137
QueryDevice
......................................................................................................................................... 138
QueryFrameByIndex
......................................................................................................................................... 139
QueryNumberOfFrames
......................................................................................................................................... 140
QueryFrameByTimeStamp......................................................................................................................................... 141
......................................................................................................................................... 141
QueryImageSize (+JavaScript)
ReadModuleStreamsAsync......................................................................................................................................... 143
......................................................................................................................................... 144
RequestStreams
SetFileName
......................................................................................................................................... 145
SetFrameByIndex
......................................................................................................................................... 146
......................................................................................................................................... 149
......................................................................................................................................... 150
SetRealtime
Properties
......................................................................................................................................................... 151
capture (C#,JS)
......................................................................................................................................... 151
......................................................................................................................................... 152
device (C#,JS,UWP)
Device (+JS,+UWP) .......................................................................................................................................................... 152
Constants
......................................................................................................................................................... 153
153
Member Functions: .........................................................................................................................................................
Device Neutral
......................................................................................................................................... 156
CreateProjection
......................................................................................................................................... 158
IsStreamProfileSetValid (+UWP)
QueryColorAutoExposure ......................................................................................................................................... 159
......................................................................................................................................... 161
QueryColorAutoPowerLineFrequency
......................................................................................................................................... 162
QueryColorAutoWhiteBalance
......................................................................................................................................... 163
QueryColorBackLightCompensation
......................................................................................................................................... 164
QueryColorBackLightCompensationInfo
QueryColorBrightness
......................................................................................................................................... 165
......................................................................................................................................... 168
QueryColorExposure
......................................................................................................................................... 169
......................................................................................................................................... 172
QueryColorFieldOfView
......................................................................................................................................... 173
QueryColorFocalLength
......................................................................................................................................... 174
QueryColorFocalLengthMM......................................................................................................................................... 175
......................................................................................................................................... 176
QueryColorGain
QueryColorGainInfo
......................................................................................................................................... 177
QueryColorGamma
......................................................................................................................................... 178
QueryColorGammaInfo
......................................................................................................................................... 179
......................................................................................................................................... 180
QueryColorPowerLineFrequency
......................................................................................................................................... 181
QueryColorPowerLineFrequencyDefaultValue
QueryColorPrincipalPoint ......................................................................................................................................... 182
......................................................................................................................................... 183
QueryColorSaturation
QueryColorSaturationInfo ......................................................................................................................................... 184
......................................................................................................................................... 185
QueryColorSharpness
QueryColorSharpnessInfo ......................................................................................................................................... 186
QueryColorWhiteBalance ......................................................................................................................................... 187
......................................................................................................................................... 188
QueryColorWhiteBalanceInfo
......................................................................................................................................... 189
QueryDepthConfidenceThreshold
......................................................................................................................................... 190
QueryDepthConfidenceThresholdInfo
QueryDepthFieldOfView ......................................................................................................................................... 191
QueryDepthFocalLength ......................................................................................................................................... 192
......................................................................................................................................... 193
QueryDepthFocalLengthMM
......................................................................................................................................... 194
QueryDepthLowConfidenceValue
QueryDepthPrincipalPoint ......................................................................................................................................... 195
QueryDepthSensorRange ......................................................................................................................................... 196
......................................................................................................................................... 197
QueryDeviceAllowProfileChange
QueryDeviceInfo
......................................................................................................................................... 198
QueryDepthUnit
......................................................................................................................................... 198
QueryMirrorMode
......................................................................................................................................... 199
QueryStreamProfileSet
......................................................................................................................................... 201
......................................................................................................................................... 202
QueryStreamProfileSetNum
......................................................................................................................................... 203
ReadStreams
ReadStreamsAsync
4
......................................................................................................................................... 204
ResetProperties (+JS)
......................................................................................................................................... 206
.........................................................................................................................................
207
RestorePropertiesUponFocus
(+JS)
......................................................................................................................................... 208
SetColorAutoExposure
SetColorAutoWhiteBalance......................................................................................................................................... 209
......................................................................................................................................... 209
SetColorAutoPowerLineFrequency
......................................................................................................................................... 210
SetColorBackLightCompensation
......................................................................................................................................... 211
SetColorBrightness
SetColorContrast
......................................................................................................................................... 212
SetColorExposure
......................................................................................................................................... 213
SetColorHue
......................................................................................................................................... 214
SetColorGamma
......................................................................................................................................... 215
SetColorGain
......................................................................................................................................... 216
......................................................................................................................................... 217
SetColorPowerLineFrequency
......................................................................................................................................... 218
SetColorSaturation
SetColorSharpness
......................................................................................................................................... 219
SetColorWhiteBalance
......................................................................................................................................... 220
......................................................................................................................................... 221
SetDepthConfidenceThreshold
......................................................................................................................................... 222
SetDepthUnit
......................................................................................................................................... 223
SetDeviceAllowProfileChange
......................................................................................................................................... 224
SetMirrorMode
......................................................................................................................................... 225
SetStreamProfileSet
226
Member Functions: .........................................................................................................................................................
F200 & SR300 Functions
......................................................................................................................................... 226
QueryIVCAMAccuracy
......................................................................................................................................... 228
QueryIVCAMAccuracyDefaultValue
QueryIVCAMFilterOption ......................................................................................................................................... 229
......................................................................................................................................... 231
QueryIVCAMFilterOptionInfo
QueryIVCAMLaserPower ......................................................................................................................................... 232
......................................................................................................................................... 233
QueryIVCAMLaserPowerInfo
......................................................................................................................................... 234
QueryIVCAMMotionRangeTradeOff
......................................................................................................................................... 235
QueryIVCAMMotionRangeTradeOffInfo
......................................................................................................................................... 236
SetIVCAMAccuracy
SetIVCAMFilterOption
......................................................................................................................................... 236
SetIVCAMLaserPower
......................................................................................................................................... 238
......................................................................................................................................... 239
SetIVCAMMotionRangeTradeOff
240
Member Functions: .........................................................................................................................................................
SR300 Functions
......................................................................................................................................... 240
QuerySR300ColorExposurePriority
......................................................................................................................................... 242
QuerySR300ColorExposurePriorityInfo
......................................................................................................................................... 243
SetSR300ColorExposurePriority
243
Member Functions: .........................................................................................................................................................
R200 Functions
......................................................................................................................................... 244
QueryDSColorRectificationEnabled
......................................................................................................................................... 246
QueryDSDepthRectificationEnabled
QueryDSDisparityMultiplier......................................................................................................................................... 247
......................................................................................................................................... 248
QueryDSDisparityOutputEnabled
......................................................................................................................................... 249
QueryDSDisparityShift
QueryDSEmitterEnabled ......................................................................................................................................... 250
QueryDSLeftRightCropping......................................................................................................................................... 251
......................................................................................................................................... 252
QueryDSLeftRightExposure
......................................................................................................................................... 253
QueryDSLeftRightExposureInfo
QueryDSLeftRightGain
......................................................................................................................................... 254
......................................................................................................................................... 257
......................................................................................................................................... 257
SetDSLeftRightAutoExposure
SetDSLeftRightCropping ......................................................................................................................................... 258
5
......................................................................................................................................... 261
......................................................................................................................................... 262
SetDSEnableDisparityOutput
SetDSDisparityMultiplier ......................................................................................................................................... 263
......................................................................................................................................... 264
SetDSDisparityShift
......................................................................................................................................................... 265
Properties
deviceInfo (+JS,+UWP)
......................................................................................................................................... 265
......................................................................................................................................... 266
Sources (UWP)
Static Functions ......................................................................................................................................................... 266
Image
......................................................................................................................................... 266
FindAllAsync (UWP)
.......................................................................................................................................................... 267
Constants
......................................................................................................................................................... 269
......................................................................................................................................... 272
CopyImage
......................................................................................................................................... 273
ExportData
......................................................................................................................................... 274
ImportData
......................................................................................................................................... 275
QueryInfo
......................................................................................................................................... 276
QueryOptions
......................................................................................................................................... 277
QueryStreamType
......................................................................................................................................... 278
QueryTimeStamp
......................................................................................................................................... 280
ReleaseAccess
......................................................................................................................................... 280
SetOptions
......................................................................................................................................... 281
SetStreamType
......................................................................................................................................... 282
SetTimeStamp
......................................................................................................................................... 283
Properties (C#)
......................................................................................................................................................... 284
info
......................................................................................................................................... 285
options
......................................................................................................................................... 285
timeStamp
......................................................................................................................................... 285
......................................................................................................................................... 286
streamType
NativeTexturePlugin (Unity)
.......................................................................................................................................................... 286
Member Functions ......................................................................................................................................................... 289
......................................................................................................................................... 289
UpdateTextureNative (Unity)
Static Functions
......................................................................................................................................................... 290
......................................................................................................................................... 290
Activate (Unity)
Metadata
.......................................................................................................................................................... 290
Constants
......................................................................................................................................................... 291
......................................................................................................................................... 293
CreateSerializable
......................................................................................................................................... 294
DetachMetaData
......................................................................................................................................... 295
QueryBuffer
......................................................................................................................................... 296
QueryBufferSize
......................................................................................................................................... 297
QueryMetaData
......................................................................................................................................... 298
QueryUID
......................................................................................................................................... 299
Properties (C#)
......................................................................................................................................................... 300
......................................................................................................................................... 300
uid
PlatformCameraControl
.......................................................................................................................................................... 300
......................................................................................................................................................... 303
Callbacks and Delegates
......................................................................................................................................... 303
Handler
Member Functions
6
................................................................................................................................... 305
OnPlatformCameraSample................................................................................................................................... 306
OnPlatformCameraError ................................................................................................................................... 306
......................................................................................................................................................... 307
Constants
......................................................................................................................................... 309
......................................................................................................................................... 310
TakePhoto
PowerState
.......................................................................................................................................................... 312
Constants
......................................................................................................................................................... 315
......................................................................................................................................... 316
SetInactivityInterval
......................................................................................................................................... 317
SetState
Projection
......................................................................................................................................... 317
.......................................................................................................................................................... 318
Constants
......................................................................................................................................................... 321
......................................................................................................................................... 325
ProjectCameraToColor
......................................................................................................................................... 326
ProjectCameraToDepth
......................................................................................................................................... 327
ProjectColorToCamera
......................................................................................................................................... 328
ProjectDepthToCamera
......................................................................................................................................... 329
QueryInvUVMap
......................................................................................................................................... 330
QueryUVMap
......................................................................................................................................... 331
QueryVertices
......................................................................................................................................... 332
......................................................................................................................................... 333
SelectOption
SampleReader (UWP).......................................................................................................................................................... 334
......................................................................................................................................................... 336
Events
SampleArrived (UWP)
......................................................................................................................................... 336
................................................................................................................................... 337
SampleArrivedEventArgs (UWP)
Member Functions ......................................................................................................................................................... 337
EnableStream[s] (UWP) ......................................................................................................................................... 337
......................................................................................................................................................... 338
Properties
......................................................................................................................................... 338
sample (UWP)
......................................................................................................................................... 339
paused (UWP)
Static Functions
......................................................................................................................................................... 339
......................................................................................................................................... 339
Activate (UWP)
SenseManager (+JS,+UWP)
.......................................................................................................................................................... 341
Constants
......................................................................................................................................................... 349
......................................................................................................................................................... 349
Callbacks and Delegates
......................................................................................................................................... 349
Handler
Member Functions
................................................................................................................................... 351
OnConnect
................................................................................................................................... 351
OnModuleProcessedFrame................................................................................................................................... 353
................................................................................................................................... 354
OnModuleSetProfile
Events
OnNewSample
................................................................................................................................... 355
OnStatus
................................................................................................................................... 356
......................................................................................................................................................... 357
......................................................................................................................................... 357
DeviceConnected (JS,UWP)
...................................................................................................................................
359
DeviceConnectedEventArgs
(UWP)
StatusChanged (JS,UWP) ......................................................................................................................................... 359
7
................................................................................................................................... 360
StatusChangedEventArgs (UWP)
......................................................................................................................................................... 361
Member Functions Essentials
......................................................................................................................................... 361
AcquireFrame (+UWP)
Close[Down] (+JS,+UWP) ......................................................................................................................................... 364
......................................................................................................................................... 365
EnableModule
Init[Async] (+JS,+UWP) ......................................................................................................................................... 366
......................................................................................................................................... 368
IsConnected
PauseModule
......................................................................................................................................... 369
QuerySession
......................................................................................................................................... 370
QueryCaptureManager
......................................................................................................................................... 371
QueryModule
......................................................................................................................................... 372
Release (C++,JS)
......................................................................................................................................... 373
ReleaseFrame (+UWP)
......................................................................................................................................... 374
FlushFrame
......................................................................................................................................... 375
......................................................................................................................................... 375
StreamFrames (+JS,+UWP)
.........................................................................................................................................................
377
Member Functions (3D
Scanning)
Enable3DScan
......................................................................................................................................... 377
Query3DScan
......................................................................................................................................... 378
.........................................................................................................................................................
379
Member Functions (Blob
Tracking)
......................................................................................................................................... 379
EnableBlob
PauseBlob
......................................................................................................................................... 380
QueryBlob
......................................................................................................................................... 381
......................................................................................................................................... 382
QueryBlobSample
.........................................................................................................................................................
383
Member Functions (Enhanced
Video)
EnableEnhancedVideo
......................................................................................................................................... 383
PauseEnhancedVideo
......................................................................................................................................... 384
QueryEnhancedVideo
......................................................................................................................................... 385
......................................................................................................................................... 386
QueryEnhancedVideoSample
.........................................................................................................................................................
387
Member Functions (Face
Tracking)
EnableFace
......................................................................................................................................... 387
PauseFace
......................................................................................................................................... 388
QueryFace
......................................................................................................................................... 389
......................................................................................................................................... 390
QueryFaceSample
.........................................................................................................................................................
391
Member Functions (Hand
Cursor)
EnableHandCursor
......................................................................................................................................... 391
PauseHandCursor
......................................................................................................................................... 392
QueryHandCursor
......................................................................................................................................... 393
......................................................................................................................................... 395
PauseHand
......................................................................................................................................... 396
QueryHand
......................................................................................................................................... 397
......................................................................................................................................... 398
QueryHandSample
.........................................................................................................................................................
399
Member Functions (Object
Recognition)
EnableObjectRecognition ......................................................................................................................................... 399
PauseObjectRecognition ......................................................................................................................................... 400
QueryObjectRecognition ......................................................................................................................................... 401
......................................................................................................................................... 402
QueryObjectRecognitionSample
.........................................................................................................................................................
403
Member Functions (Object
Tracking)
......................................................................................................................................... 403
EnableTracker
PauseTracker
......................................................................................................................................... 404
QueryTracker
......................................................................................................................................... 405
......................................................................................................................................... 406
QueryTrackerSample
.........................................................................................................................................................
407
Member Functions (Person
Tracking)
8
EnablePersonTracking
......................................................................................................................................... 407
PausePersonTracking
......................................................................................................................................... 408
QueryPersonTracking
......................................................................................................................................... 409
......................................................................................................................................... 410
QueryPersonTrackingSample
.........................................................................................................................................................
411
Member Functions (Scene
Perception)
EnableScenePerception ......................................................................................................................................... 411
PauseScenePerception ......................................................................................................................................... 412
QuerySenePerception
......................................................................................................................................... 413
......................................................................................................................................... 414
QueryScenePerceptionSample
.........................................................................................................................................................
415
Member Functions (Stream
Capture)
EnableStream[s]
......................................................................................................................................... 415
QuerySample
......................................................................................................................................... 417
.........................................................................................................................................................
418
Member Functions (Touchless
Controller)
EnableTouchlessController......................................................................................................................................... 419
PauseTouchlessController ......................................................................................................................................... 420
QueryTouchlessController ......................................................................................................................................... 420
.........................................................................................................................................................
421
Member Functions (User
Segmentation)
......................................................................................................................................... 422
Enable3DSeg
Pause3DSeg
......................................................................................................................................... 423
Query3DSeg
......................................................................................................................................... 423
......................................................................................................................................... 424
Query3DSegSample
......................................................................................................................................................... 425
Properties
......................................................................................................................................... 426
captureManager (C#,JS,UWP)
......................................................................................................................................... 426
sample (UWP)
......................................................................................................................................... 427
session (C#,JS)
......................................................................................................................................................... 427
Static Functions
......................................................................................................................................... 428
CreateInstance (+JS,+UWP)
......................................................................................................................................... 429
detectPlatform (JS)
Session (+JS)
.......................................................................................................................................................... 432
Constants
......................................................................................................................................................... 435
......................................................................................................................................... 438
CreateCaptureManager
......................................................................................................................................... 438
CreateImage
......................................................................................................................................... 439
CreateImpl
......................................................................................................................................... 441
CreatePhoto
......................................................................................................................................... 443
CreatePowerManager
......................................................................................................................................... 444
CreateSenseManager
......................................................................................................................................... 444
LoadImplFromFile
......................................................................................................................................... 445
......................................................................................................................................... 448
......................................................................................................................................... 451
......................................................................................................................................... 452
UnloadImplFromFile
Properties (C#, JS) ......................................................................................................................................................... 453
version
Static Functions
......................................................................................................................................... 453
......................................................................................................................................................... 454
......................................................................................................................................... 454
CreateInstance
SyncPoint
.......................................................................................................................................................... 455
Constants
......................................................................................................................................................... 456
Synchronize
......................................................................................................................................... 456
Static Functions
......................................................................................................................................................... 457
......................................................................................................................................... 457
ReleaseSP
......................................................................................................................................... 459
SynchronizeEx
VideoModule
.......................................................................................................................................................... 461
Constants
......................................................................................................................................................... 463
......................................................................................................................................... 464
QueryCaptureProfile
......................................................................................................................................... 465
SetCaptureProfile
......................................................................................................................................... 467
SetGPUExec
......................................................................................................................................... 467
SetProjection
......................................................................................................................................... 468
Structure Reference
................................................................................................................................... 469
Box3DF32
.......................................................................................................................................................... 470
DataDesc
.......................................................................................................................................................... 471
DeviceCap
.......................................................................................................................................................... 472
DeviceInfo (Capture,+JS,+UWP)
.......................................................................................................................................................... 473
ImageData
.......................................................................................................................................................... 477
......................................................................................................................................... 482
......................................................................................................................................... 483
ToByteArray (C#,Java)
......................................................................................................................................... 484
ToFloatArray (C#,Java)
......................................................................................................................................... 485
ToPImage (Processing)
......................................................................................................................................... 486
ToShortArray (C#,Java)
......................................................................................................................................... 487
ToTexture2D (Unity)
......................................................................................................................................... 487
ToUShortArray (C#)
......................................................................................................................................... 488
......................................................................................................................................... 489
ToWriteableBitmap (C# .NET4)
ImageInfo
.......................................................................................................................................................... 490
ImplDesc (+JS)
.......................................................................................................................................................... 491
ImplVersion (+JS)
.......................................................................................................................................................... 495
Point3DF32 (+JS)
.......................................................................................................................................................... 496
Point4DF32 (+JS)
.......................................................................................................................................................... 497
PointF32 (+JS)
.......................................................................................................................................................... 499
PointI32 (+JS)
.......................................................................................................................................................... 500
PropertyInfo
.......................................................................................................................................................... 501
RangeF32
.......................................................................................................................................................... 502
RatioI32
.......................................................................................................................................................... 503
RectF32
.......................................................................................................................................................... 504
RectI32 (+JS)
.......................................................................................................................................................... 505
Sample (+UWP)
.......................................................................................................................................................... 507
......................................................................................................................................... 509
get (Java)
......................................................................................................................................... 510
set (Java)
10
......................................................................................................................................... 510
SizeI32
.......................................................................................................................................................... 511
StreamCalibration
.......................................................................................................................................................... 512
StreamDesc
.......................................................................................................................................................... 515
StreamDescSet
.......................................................................................................................................................... 516
......................................................................................................................................... 518
set (Java)
StreamProfile
.......................................................................................................................................................... 520
StreamProfileSet
.......................................................................................................................................................... 521
......................................................................................................................................... 519
......................................................................................................................................... 523
set (Java)
StreamTransform
.......................................................................................................................................................... 524
......................................................................................................................................... 523
Enumerator Reference
................................................................................................................................... 525
Access (Image)
.......................................................................................................................................................... 526
ConnectionType (+JS,+UWP)
.......................................................................................................................................................... 527
CoordinateSystem
.......................................................................................................................................................... 528
DeviceModel (+JS,+UWP)
.......................................................................................................................................................... 529
DeviceOrientation (+JS,+UWP)
.......................................................................................................................................................... 530
ImplGroup (+JS)
.......................................................................................................................................................... 531
.......................................................................................................................................................... 534
MirrorMode
.......................................................................................................................................................... 534
Option (Image)
.......................................................................................................................................................... 535
PixelFormat
.......................................................................................................................................................... 535
......................................................................................................................................................... 539
Type Extension (C#,Java)
......................................................................................................................................... 539
ToString
ProjectionOption
.......................................................................................................................................................... 539
.......................................................................................................................................................... 549
State
.......................................................................................................................................................... 550
Status (+JS,+UWP)
.......................................................................................................................................................... 551
555
Type Extension (C#,.........................................................................................................................................................
Java)
.........................................................................................................................................
555
IsError
......................................................................................................................................... 556
IsSuccessful
......................................................................................................................................... 556
IsWarning
StreamOption (+UWP).......................................................................................................................................................... 557
StreamType (+JS,+UWP)
.......................................................................................................................................................... 558
Type Extension
......................................................................................................................................................... 559
ToString (C#,Java)
......................................................................................................................................... 559
ToIndex (C#,Java)
......................................................................................................................................... 560
operator++ (C++)
......................................................................................................................................... 561
Samples
................................................................................................................................... 562
Sample: DF_CameraViewer
..........................................................................................................................................................
[C++]
564
Sample: DF_CameraViewer
..........................................................................................................................................................
(Java)
565
Sample: DF_Projection
..........................................................................................................................................................
[C++]
566
Sample: DF_RawStreams
..........................................................................................................................................................
[C++, C#]
572
Sample: DF_StreamViewer
..........................................................................................................................................................
[UWP]
574
Sample: FF_IQSampleTool
..........................................................................................................................................................
[C#]
574
Appendices
580
11
12
This document gives a general overview of the features and describes different algorithms
and their API definitions.
Notational Conventions
This SDK document uses the Intel Clear typeface for normal prose.
With the exception of section headings, captions and the table of contents, all code-related
items appear in the Courier New typeface (Status).
Hyperlinks appear underlined in blue, such as Status.
This is a note that provides additional information to aid your understanding of the
procedure or concept.
This is a tip that provides alternate methods or shortcuts.
Basic Concepts
SDK Architecture
The SDK library architecture, as illustrated in Figure 1, consists of several layers of
13
components. The essence of the SDK functionalities lays in the input/output (I/O) modules
and the algorithm modules. The I/O modules retrieve input from an input device or send
output to an output device. The algorithm modules include various pattern detection and
recognition algorithms that are critical ingredients of innovative human computer
experience, such as face recognition, gesture recognition, speech recognition, and text to
speech.
The SDK standardizes the interfaces of the I/O and the algorithm modules so that the
applications can access the functionalities without being concerned with the underlying
implementations. Multiple implementations of SDK interfaces may coexist. The SDK provides
the mechanism to search for a specific implementation from available algorithm modules as
well as other critical features such as creating an instance of the algorithm implementation.
2.1
SDK Interfaces
The SDK consists of multiple interfaces. Figure 2 illustrates the interface hierarchy.
14
The Session interface manages the following modules: I/O modules, algorithm modules, and
any other SDK interface implementations. First you need to create an instance of the Session
interface (through the CreateInstance function) in your application, and then create other
module instances from the Session instance. See Session and Modules for basic concepts.
For predefined usages such as hand tracking and face tracking, you can use the
SenseManager interface. This interface organizes a multi-modal pipeline (that contains an I/O
device and multiple algorithm modules) and controls the execution of the pipeline such as
starting, stopping, pausing and resuming the pipeline. To create the SenseManager instance,
use the CreateInstance function.
Internally, the SenseManager interface uses the CaptureManager interface to select the I/O
device and color/depth/audio streams. Retrieve the CaptureManager instance (from the
SenseManager interface) to constrain the device search and/or to set file recording and
playback during the pipeline initialization. You can subsequently retrieve the Capture
interface for physical camera operations, such as enumerating devices/streams, and querying
stream configurations and device properties. See I/O Device Operations for more details.
During the pipeline execution, when some samples are ready from the I/O device, you can
access the captured samples through the Image interfaces, which abstract the image buffers.
When an algorithm module in the pipeline is ready with some processing results, you need to
access algorithm specific interfaces, such as HandModule for hand tracking and FaceModule
for face tracking. These interfaces provide algorithm specific functions to query/set algorithm
configurations and algorithm data.
The audio path is a bit different where the application manages the audio source through the
AudioSource interface, and specific voice features directly in the module interface, for
example, SpeechRecognition.
15
2.2
The interfaces are mostly matched with slightly different naming prefixes.
For C++, C# and Java, this manual uses [M] (where M stands for "managed") in the interface
names to represent interfaces that are available in a managed environment (such as C# and
Java). For example, Capture represents the C++ interface PXCCapture and the C#, and Java
interface PXCMCapture.
The manual uses additional markings after the interface or method names as follows:
16
Marking
Example
Comment
None
Base
(C++)
PXCBase.Release
(C#)
PXCMBase.Dispose
(C#.NET4)
PXCMImage.ImageData.ToBitmap
(Unity)
(Java)
PXCMBase.close
(Processing) PXCMImage.ImageData.ToPImage
(JS)
PXCMSession.QueryImpls
(+JS)
PXCMSession.QueryModelDesc
(UWP)
SampleReader.EnableStream[s]
(+UWP)
SenseManager.CreateInstance
The SDK provides multiple layers of interfaces to enable Unity applications. The SDK Unity C#
scripts support enables developers who write C# scripts for their game applications. The SDK
Unity Toolkit provides a higher level abstraction for developers that would like to introduce
perceptual computing interactions to their applications with minimum code writing. The SDK
Unity C# scripts (same as the C# interface) are described in this manual while the SDK Unity
Toolkit is detailed in the SDK Unity Toolkit reference manual.
17
The SDK provides limited support of browser applications, i.e., JavaScript* programs in a
browser page. As illustrated in Figure 5, the SDK function calls are routed through the web
socket protocol to a local web service, which runs the SDK runtimes. Due to web socket
bandwidth and latency limitations, as well as protecting user privacy, the SDK JavaScript limits
to the following features: face tracking, hand tracking, blob tracking, and speech command
and control.
2.3
18
[C++]
PXCSession *session=PXCSession::CreateInstance();
...
PXCSession::ImplVersion ver=session->QueryVersion();
wprintf_s(L"SDK Version %d.%d\n",ver.major, ver.minor);
...
session->Release();
[C#]
PXCMSession session=PXCMSession.CreateInstance();
...
Console.WriteLn("SDK Version {0}.
{1}",session.version.major,session.version.minor);
...
session.Dispose();
[Java]
PXCMSession session=PXCMSession.CreateInstance();
...
PXCMSession.ImplVersion ver=session.QueryVersion();
System.out.printf("SDK Version %d.%d%n",ver.major,ver.minor);
...
session.close();
[JavaScript]
// In JavaScript, use SenseManager.createInstance instead.
// Then get a session instance from the SenseManager.
intel.realsense.SenseManager.createInstance().then(function(sm) {
document.write(sm.session.version);
});
[C#/UWP]
// As Universal apps must statically include the SDK runtime files.
// The SDK version is fixed at the development time.
2.4
Language-Specific Restrictions
When developing an application with the SDK, you must take into account the following
language-specific restrictions:
[C++]
Do not use the compiler keyword dynamic_cast to cast types. Instead, use the
QueryInstance function or its template.
19
Do not use the compiler keyword delete to destroy an instance. Instead, use the Release
function.
Do not release any instance returned by the QueryInstance function. See the Remarks
section of the QueryInstance function for details.
Example 2 shows how to cast a session instance to a meta data instance in C++.
Example 2: Cast a PXCSession Instance to PXCMetadata
PXCSession *session=PXCSession::CreateInstance();
PXCMetadata *mdata=session->QueryInstance<PXCMetaData>();
session->Release();
See Also
Configuring C++ Development Environment
Appendix A: C++ Data Type Definitions
[C#]
Each C# instance is a C# managed object that internally points to a C++ unmanaged instance.
Dispose the C# object so that the unmanaged C++ instance can be destroyed, with exception
that internally managed instances (such as those returned by the QueryInstance function)
do not have to be explicitly destroyed.
Releasing internally managed instances is ignored.
Example 3 shows how to cast a session instance to a meta data instance in C#:
Example 3: Cast a PXCMSession Instance to PXCMMetadata
PXCMSession session=PXCMSession.CreateInstance();
...
PXCMMetadata mdata=session.QueryInstance<PXCMMetadata>();
...
session.Dispose();
See Also
Configuring C# Development Environment
Configuring Unity Development Environment
[Java]
Java does not support unsigned data types while the SDK defines depth map data as an array
of unsigned short integers for the effective range. You can retrieve the depth map data as a
signed short integer array but should instead treat the values as unsigned.
20
As illustrated in Example 4, each Java instance is a Java managed object that internally points
to a Java unmanaged instance. Release the Java object so that the unmanaged C++ resource
can be destroyed, with exception that internally managed instances (such as those returned
by the QueryInstance function) do not have to be explicitly destroyed.
Releasing internally managed instances is ignored.
Example 4: Create and Manage Instances
Some SDK Java methods must return more than a single value, such as a status code, an
instance of certain interface, and a time stamp. Java does not natively support this feature.
The SDK uses the following convention to overcome this limitation (See Example 5 for an
example):
If the returned value is an SDK interface instance, the application should create the
instance first using the default constructor, and then pass the instance to the Java function,
which initializes the instance.
If the returned value is a structure class or an array of data, the application must initialize
the structure and then pass a reference to the Java function, which sets the structure field
values in place.
If the returned value is a primitive data type, the application must create an array of the
primitive and then pass the array instance to the Java function. The application can retrieve
the values via the first element of the array upon a successful execution.
Example 5: Return Primitives, Structures, or Instances from Java Methods
...
// For instances, create an instance with the default constructor and then
pass the instance to the Java function.
PXCMSpeechSynthesis vsynth=new PXCMSpeechSynthesis();
session.CreateImpl(vsynth);
...
// For structures or arrays, create a structure instance and pass a
reference to the Java function.
PXCMSpeechSynthesis.ProfileInfo pinfo=new
PXCMSpeechSynthesis.ProfileInfo();
vsynth.QueryProfile(pinfo);
...
21
// For primitives, create an array of the primitives and pass the array to
the Java function. The output value is in array[0].
int[] index=new int[1];
PXCMSyncPoint.SynthronizeEx(sps, index); // sps is an array of the
PXCMSyncPoint instances.
...
See Also
Configuring Java Development Environment
Configuring Processing Development Environment
[JavaScript]
The SenseManager and most algorithm interfaces expose two working modes:
o The polling mode where the application explicitly checks data availability periodically
and retrieves the data when available.
o The event callback mode where the data is pushed to the application when available.
In JavaScript, the SDK supports only the event callback mode to follow the asynchronous
nature of the language.
SDK functions return a Promise object if their operations are not instant. You must resolve
the Promise object before making use of the data. Example 6 shows how to create the
SenseManager instance and then resolve the Promise object.
Example 6: Create a SenseManager Instance
var sm;
intel.realsense.SenseManager.createInstance()
.then(function(instance){
sm=instance;
});
Due to browser security restrictions, any SDK functions that require file-based operations
will not be available to JavaScript.
To protect user privacy, the SDK prohibits from delivering any information that may
contain personal identifiable information to the browser pages. This includes raw or
processed image/audio data and any algorithm data that may be sensible.
The SDK supports the following navigational features only:
o Face tracking including location, landmarks, pose, and expressions detection.
o Hand tracking including finger and hand detection.
o Blob Tracking showing blob outlines.
o Voice Command and Control.
22
See Also
Face Tracking and Recognition Algorithm
Hand Tracking Algorithm
Blob Tracking Algorithm
Speech Recognition Algorithm
[C#/UWP]
The C# for Microsoft* Universal Application Platform* supports raw color and depth
streaming and the blob tracking algorithm only. Other algorithms are in development.
See Also
Raw Stream Capturing and Processing
Blob Tracking Algorithm
2.5
23
Conceptually, the application can treat each channel of camera sample capture and algorithm
processing as running independently and concurrently. Each channel is given a module
identifier to identify the captured image sample(s) and the algorithm output.
o The first image channel configured to capture uses the module identifier
Capture.CUID, the second Capture.CUID+1, and so on.
o The algorithm module identifier uses their interface identifiers, such as
HandModule.CUID or FaceModule.CUID.
The typical programming flow of the SenseManager interface includes the following steps:
Create Instance:
Use the CreateInstance function to create an instance of the SenseManager interface.
As the SenseManager interface is the dominant interface that covers most use cases, the
SDK creates a convenient function CreateInstance that shortcuts the Session creation. You
can use the CreateInstance function to quickly get to the SenseManager interface
functions.
Example 7: Create a SenseManager Instance
[C++]
PXCSenseManager *sm=PXCSenseManager::CreateInstance();
[C#]
PXCMSenseManager sm=PXCMSenseManager.CreateInstance();
[Java]
PXCMSenseManager sm=PXCMSenseManager.CreateInstance();
[JavaScript]
intel.realsense.SenseManager.createInstance().then(function(sm) {
// working with sm: the SenseManager instance
24
....
});
[C#/UWP]
using Intel.RealSense;
SenseManager sm=SenseManager.CreateInstance();
[C++]
sm->EnableStream(PXCCapture::STREAM_TYPE_COLOR,0,0);
[C#]
sm.EnableStream(PXCMCapture.StreamType.STREAM_TYPE_COLOR,0,0);
[Java]
sm.EnableStream(PXCMCapture.StreamType.STREAM_TYPE_COLOR,0,0);
[JavaScript]
// SDK prohibits from streaming raw images to browser pages.
// Here we illustarte how to enable face tracking
intel.realsense.FaceModule.activate(sm).then(function{fm) {
// working with fm: the face module instance
}
[C#/UWP]
using Intel.RealSense;
SampleReader reader=SampleReader.Activate(sm, StreamType.STREAM_TYPE_COLOR,
0, 0, 0);
improves performance and saves power if you are not interested in the results of these
modules.
Example 9: Control Flow and Retrieve Results
[C++]
sm->Init();
for (;;) {
pxcStatus sts=sm>AcquireFrame(true);
if
(sts<PXC_STATUS_NO_ERROR)
break;
PXCCapture::Sample
*sample;
sample=sm>QuerySample();
.... // process image
sm->ReleaseFrame();
}
sm->Close();
[C#]
sm.Init();
for (;;) {
pxcmStatus
sts=sm.AcquireFrame(true);
if (sts.IsError())
break;
PXCMCapture.Sample
sample;
sample=sm.QuerySample()
;
.... // process image
sm.ReleaseFrame();
}
26
...
// Initialize my event handler
PXCMSenseManager::Handler handler=
new PXCMSenseManager.Handler();
handler.onNewSample=OnNewSample;
// Stream depth samples
sm.Init(handler);
sm.StreamFrames(true);
sm.Close();
sm.Close();
...
[Java]
sm.Init();
for (;;) {
pxcmStatus
sts=sm.AcquireFrame(true);
if (sts.isError())
break;
PXCMCapture.Sample
sample;
sample=sm.QuerySample(
);
.... // process image
sm.ReleaseFrame();
}
sm.Close();
[JavaScript]
// Here we demo how to configure face tracking since streaming raw images
is prohibited.
// The JavaScript application uses event callback only.
// callback to receive data
var onFaceData=function(sender, data) {
....
}
// fm is the FaceModule instance
fm.onFrameProcessed = onFaceData;
sm.init().then(function () {
// Start Streaming
return sm.streamFrames();
});
[C#/UWP]
sm.Init();
for (;;) {
27
Status
sts=sm.AcquireFrame(true);
if
(sts<Status.STATUS_NO_ERRO
R)
break;
Sample
sample=reader.Sample;
.
.... // process image
}
...
// reader is the SampleReader instance
reader.SampleArrived+=OnSample;
// sm is the SenseManager instance
await sm.InitAsync();
sm.StreamFrames();
sm.Close();
...
sm.ReleaseFrame();
}
sm.Close();
[C++]
PXCSenseManager *sm=PXCSenseManager::CreateInstance();
sm->EnableStream(PXCCapture::STREAM_TYPE_COLOR,0,0);
sm->Init();
while (sm->AcquireFrame(true)>=PXC_STATUS_NO_ERROR) {
PXCCapture::Sample *sample=sm->QuerySample();
.... // process image
sm->ReleaseFrame();
}
sm->Release();
[C#]
PXCMSenseManager sm=PXCMSenseManager.CreateInstance();
sm.EnableStream(PXCMCapture.StreamType.STREAM_TYPE_COLOR,0,0,0);
sm.Init();
while (!sm.AcquireFrame(true).IsSuccessful()) {
PXCMCapture.Sample sample=sm.QuerySample();
.... // process image
sm.ReleaseFrame();
}
sm.Dispose();
[Java]
28
PXCMSenseManager sm=PXCMSenseManager.CreateInstance();
sm.EnableStream(PXCMCapture.StreamType.STREAM_TYPE_COLOR,0,0,0);
sm.Init();
while (sm.AcquireFrame(true).isSuccessful()) {
PXCMCapture.Sample sample=sm.QuerySample();
.... // process image
sm.ReleaseFrame();
}
sm.close();
[JavaScript]
// We demo face tracking since streaming raw images is prohibited.
// name space shortcuts
var rs=intel.realsense;
var rsf=intel.realsense.face;
// the SenseManager instance
var sm;
// the face module instance
var fm;
// Close when page goes away
// See also https://developer.mozilla.org/en-US/docs/Web/Guide/
User_experience/Using_the_Page_Visibility_API about page visibility change.
window.beforeunload=function() {
if (sm!=undefined) {
sm.release().then(function() {
sm=fm=undefined;
}
}
}
// Resume processing when page is active
window.onfocus=function() {
if (fm!=undefined) {
sm.captureManager.device.restorePropertiesUponFocus();
fm.pause(false);
}
}
// Pause processing when page is inactive
window.onblur=function() {
if (fm!=undefined) {
fm.pause(true);
}
}
// My data processing routine
var onFaceData=function(sender, data) {
....
29
}
// create the SenseManager instance
var fc;
rs.SenseManager.createInstance().then(function (instance) {
sm=instance;
// Activate Face Tracking
return rsf.FaceModule.activate(sm);
}).then(function (instance) {
fm=instance;
// Set my Face Data Handler: onFaceData(sender, data)
fm.onFrameProcessed = onFaceData;
// Configure Face Tracking
return fm.createActiveConfiguration();
}).then(function (instance) {
fc=instance;
// Enable face detection
fc.detection.isEnabled = true;
return fc.applyChanges();
}).then(function (result) {
fc.release();
// SenseManager Initialization
return sm.init();
}).then(function (result) {
// Start Streaming
return sm.streamFrames();
});
[C#/UWP]
using Intel.RealSense;
// Create a SenseManager instance
SenseManager sm=SenseManager.CreateInstance();
// Enable blob tracking
SampleReader reader=SampleReader.Activate(sm, StreamType.STREAM_TYPE_COLOR,
640, 480, 30);
// Initialize
sm.Init();
// Stream Data
while (sm.AcquireFrame(true)>=Status.STATUS_NO_ERROR) {
// Working on reader.Sample
....
30
2.6
2.6.1
Select a color stream by using the EnableStream function, and then initialize the pipeline
by using the Init function.
In the loop, use the AcquireFrame function to wait for a color sample to be ready and then
retrieve it through the QuerySample function.
Release the frame for reading next sample using the ReleaseFrame function.
Use the Close function to clean up.
31
[C#]
Select a color stream by using the EnableStream function, and then initialize the pipeline
by using the Init function.
In the loop, use the AcquireFrame function to wait for a color sample to be ready and then
retrieve it through the QuerySample function.
Release the frame for reading next sample using the ReleaseFrame function.
Use the Close function to clean up.
[Java]
Select a color stream by using the EnableStream function, and then initialize the pipeline
by using the Init function.
In the loop, use the AcquireFrame function to wait for a color sample to be ready and then
retrieve it through the QuerySample function.
Release the frame for reading next sample using the ReleaseFrame function.
Use the Close function to clean up.
[C#/UWP]
Activate a color stream by using the Activate function, and then initialize the pipeline by
using the Init function.
In the loop, use the AcquireFrame function to wait for a color sample to be ready and then
retrieve it through the sample property.
Release the frame for reading next sample using the ReleaseFrame function.
Use the Close function to clean up.
You can use the filtering functions (such as FilterByDeviceInfo) of the CaptureManager
interface to customize the stream selection process, for example, to choose a specific
camera. Use the QueryCaptureManager function (or the captureManager property) to
retrieve an instance of the CaptureManager interface.
Example 11: Capture Color Samples using the SenseManager and Procedural Calls
[C++]
// Create a PXCSenseManager instance
PXCSenseManager *sm=PXCSenseManager::CreateInstance();
// Select the color stream
sm->EnableStream(PXCCapture::STREAM_TYPE_COLOR,640,480);
// Initialize and Stream Samples
sm->Init();
32
for (;;) {
// This function blocks until a color sample is ready
if (sm->AcquireFrame(true)<PXC_STATUS_NO_ERROR) break;
// retrieve the sample
PXCCapture::Sample *sample=sm->QuerySample();
// work on the image sample->color
...
// go fetching the next sample
sm->ReleaseFrame();
}
// Close down
sm->Release();
[C#]
// Create a PXCMSenseManager instance
PXCMSenseManager sm=PXCMSenseManager.CreateInstance();
// Select the color stream
sm.EnableStream(PXCMCapture.StreamType.STREAM_TYPE_COLOR,640,480);
// Initialize and Stream samples
sm.Init();
for (;;) {
// This function blocks until a color sample is ready
if (sm.AcquireFrame(true).IsError()) break;
// retrieve the sample
PXCMCapture.Sample sample=sm.QuerySample();
// work on the image sample.color
...
// go fetching the next sample
sm.ReleaseFrame();
}
// Close down
sm.Dispose();
[Java]
// Create a PXCMSenseManager instance
PXCMSenseManager sm=PXCMSenseManager.CreateInstance();
// Select the color stream
sm.EnableStream(PXCMCapture.StreamType.STREAM_TYPE_COLOR,640,480);
// Initialize and Stream samples
sm.Init();
for (;;) {
33
[C++]
class MyHandler: public PXCSenseManager::Handler {
34
public:
virtual pxcStatus PXCAPI OnNewSample(pxcUID, PXCCapture::Sample
*sample) {
// work on sample->color
...
// return NO ERROR to continue, or any ERROR to exit the loop
return PXC_STATUS_NO_ERROR;
}
};
// Create a SenseManager instance
PXCSenseManager *sm=PXCSenseManager::CreateInstance();
// Enable depth stream at 320x240x60fps
sm->EnableStream(PXCCapture::STREAM_TYPE_DEPTH,320,240,60);
// Initialize my event handler
MyHandler handler;
sm->Init(&handler)
// Stream depth samples
sm->StreamFrames(true);
// Clean up
sm->Release();
[C#]
pxcmStatus OnNewSample(int mid, PXCMCapture.Sample sample) {
// work on sample.color
...
// return NO ERROR to continue, or any ERROR to exit the loop
return pxcmStatus.PXCM_STATUS_NO_ERROR;
}
// Create a SenseManager instance
PXCMSenseManager sm=PXCMSenseManager.CreateInstance();
// Enable depth stream at 320x240x60fps
sm.EnableStream(PXCMCapture.StreamType.STREAM_TYPE_DEPTH,320,240,60);
// Initialize my event handler
PXCMSenseManager.Handler handler=new PXCMSenseManager.Handler();
handler.onNewSample=OnNewSample;
sm.Init(handler);
// Stream depth samples
sm.StreamFrames(true);
// Clean up
sm.Dispose();
[Java]
35
36
2.6.2
Select the color and depth streams using the EnableStream function, and then initializes
the pipeline using the Init function.
In the loop, use the AcquireFrame function with ifall=false to wait for any sample that
is ready to read.
Retrieve the sample using the QuerySample function. Check the color or depth sample
readiness and process accordingly.
Release the frame for reading next sample using the ReleaseFrame function.
Use the Close function to clean up.
[C#]
Select the color and depth streams using the EnableStream function, and then initializes
the pipeline using the Init function.
In the loop, use the AcquireFrame function with ifall=false to wait for any sample that
is ready to read.
Retrieve the sample using the QuerySample function. Check the color or depth sample
readiness and process accordingly.
Release the frame for reading next sample using the ReleaseFrame function.
Use the Close function to clean up.
[Java]
Select the color and depth streams using the EnableStream function, and then initializes
the pipeline using the Init function.
In the loop, use the AcquireFrame function with ifall=false to wait for any sample that
is ready to read.
Retrieve the sample using the QuerySample function. Check the color or depth sample
readiness and process accordingly.
Release the frame for reading next sample using the ReleaseFrame function.
Use the Close function to clean up.
37
[C#/UWP]
Select the color and depth streams by activating multiple SampleReader instances, and
then initializes the pipeline using the Init function.
In the loop, use the AcquireFrame function with ifall=false to wait for any sample that
is ready to read.
Retrieve the sample using the sample function. Check the color or depth sample readiness
and process accordingly.
Release the frame for reading next sample using the ReleaseFrame function.
Use the Close function to clean up.
Example 13: Capture Unaligned Color and Depth Samples using the SenseManager
[C++]
// Create a SenseManager instance
PXCSenseManager *sm=PXCSenseManager::CreateInstance();
// Select the color and depth streams
sm->EnableStream(PXCCapture::STREAM_TYPE_COLOR,640,480,30);
sm->EnableStream(PXCCapture::STREAM_TYPE_DEPTH,320,240,30);
// Initialize and Stream Samples
sm->Init();
for (;;) {
// This function blocks until any sample is ready
if (sm->AcquireFrame(false)<PXC_STATUS_NO_ERROR) break;
// retrieve the color and depth samples unaligned
PXCCapture::Sample *sample=sm->QuerySample();
if (sample) {
if (sample->color) {
// work on the color sample
...
}
if (sample->depth) {
// work on the depth sample
...
}
}
// go fetching the next samples
sm->ReleaseFrame();
}
// Close down
sm->Release();
[C#]
38
}
if (sample.depth!=null) {
// work on the depth sample
...
}
}
// go fetching the next samples
sm.ReleaseFrame();
}
// Close down
sm.close();
[C#/UWP]
// Create a SenseManager instance
SenseManager sm=SenseManager.CreateInstance();
// Select the color and depth streams
SampleReader
colorReader=SampleReader.Activate(sm,StreamType.STREAM_TYPE_COLOR,640,480,3
0);
SampleReader
depthReader=SampleReader.Activate(sm,StreamType.STREAM_TYPE_DEPTH,320,240,3
0);
// Initialize and Stream Samples
sm.Init();
for (;;) {
// This function blocks until any sample is ready
if (sm.AcquireFrame(false)<Status.STATUS_NO_ERROR) break;
// retrieve the samples
Sample sample=sm.sample;
if (sample!=null) {
if (sample.Color!=null) {
// work on the color sample
...
}
if (sample.Depth!=null) {
// work on the depth sample
...
}
}
// go fetching the next samples
sm.ReleaseFrame();
}
// Close down
sm.Dispose();
40
It is also possible to capture unaligned color and depth samples using the StreamFrames
function and the SenseManager event callbacks. Example 14 shows how to do that.
Example 14: Capture Unaligned Color and Depth Samples using the SenseManager Events
[C++]
class MyHandler:public PXCSenseManager::Handler {
public:
virtual pxcStatus PXCAPI OnNewSample(pxcUID, PXCCapture::Sample
*sample) {
if (sample->color) {
// work on the color sample
...
}
if (sample->depth) {
// work on the depth sample
...
}
// return NO_ERROR to continue, or any error to exit the loop
return PXC_STATUS_NO_ERROR;
}
};
// Create a SenseManager instance
PXCSenseManager *sm=PXCSenseManager.CreateInstance();
// Select the color and depth streams
sm->EnableStream(PXCCapture::STREAM_TYPE_COLOR,640,480,30);
sm->EnableStream(PXCCapture::STREAM_TYPE_DEPTH,320,240,30);
// Initialize my handler
MyHandler handler;
sm->Init(&hanlder);
// Streaming
sm->StreamFrames(true);
// Clean up
sm->Release();
[C#]
pxcmStatus OnNewSample(Int32 mid, PXCMCapture.Sample sample) {
if (sample.color!=null) {
// work on the color sample
...
}
if (sample.depth!=null) {
// work on the depth sample
...
}
// return NO_ERROR to continue, or any error to exit the loop
return pxcmStatus.PXCM_STATUS_NO_ERROR;
41
};
// Create a SenseManager instance
PXCMSenseManager sm=PXCMSenseManager.CreateInstance();
// select the color and depth streams
sm.EnableStream(PXCMCapture.StreamType.STREAM_TYPE_COLOR,640,480,30);
sm.EnableStream(PXCMCapture.StreamType.STREAM_TYPE_DEPTH,320,240,30);
// Initialize my handler
PXCMSenseManager.Handler handler=new PXCMSenseManager.Handler();
handler.onNewSample=OnNewSample;
sm.Init(handler);
// Streaming
sm.StreamFrames(true);
// Clean up
sm.Dispose();
[Java]
class MyHandler implements PXCMSenseManager.Handler {
public pxcmStatus OnNewImage(int mid, PXCMCapture.Sample sample) {
if (sample.color!=null) {
// work on the color sample
...
}
if (sample.depth!=null) {
// work on the depth sample
...
}
// return NO_ERROR to continue, or any error to exit the loop
return pxcmStatus.PXCM_STATUS_NO_ERROR;
}
};
// Create a SenseManager instance
PXCMSenseManager sm=PXCMSenseManager.CreateInstance();
// select the color and depth streams
sm.EnableStream(PXCMCapture.StreamType.STREAM_TYPE_COLOR,640,480,30);
sm.EnableStream(PXCMCapture.StreamType.STREAM_TYPE_DEPTH,320,240,30);
// Initialize my handler
MyHandler handler=new MyHandler();
sm.Init(handler);
// Streaming
sm.StreamFrames(true);
// Clean up
sm.close();
42
[C#/UWP]
void OnNewSample(Object sender, SampleArrivedEventArgs args) {
if (args.Sample.Color!=null) {
// work on the color sample
...
}
if (args.Sample.Depth!=null) {
// work on the depth sample
...
}
};
// Create a SenseManager instance
SenseManager sm=SenseManager.CreateInstance();
// select the color and depth streams
SampleReader colorReader=SampleReader.Activate(sm,
StreamType.STREAM_TYPE_COLOR,640,480,30);
colorReader.SampleArrived+=OnNewSample;
SampleReader depthReader=SampleReader.Activate(sm,
StreamType.STREAM_TYPE_DEPTH,320,240,30);
depthReader.SampleArrived+=OnNewSample;
// Initialize
sm.Init();
// Streaming
sm.StreamFrames();
43
2.6.3
Select the color and depth streams using the EnableStream function, and then initializes
the pipeline using the Init function.
In the loop, use the AcquireFrame function with ifall=true to wait for both samples to
be ready.
Retrieve the color and depth samples using the QuerySample function.
Release the frame for reading next sample using the ReleaseFrame function.
Use the Close function to clean up.
[C#]
Select the color and depth streams using the EnableStream function, and then initializes
the pipeline using the Init function.
In the loop, use the AcquireFrame function with ifall=true to wait for both samples to
be ready.
Retrieve the color and depth samples using the QuerySample function.
Release the frame for reading next sample using the ReleaseFrame function.
Use the Close function to clean up.
[Java]
Select the color and depth streams using the EnableStream function, and then initializes
the pipeline using the Init function.
In the loop, use the AcquireFrame function with ifall=true to wait for both samples to
be ready.
Retrieve the color and depth samples using the QuerySample function.
Release the frame for reading next sample using the ReleaseFrame function.
Use the Close function to clean up.
[C#/UWP]
Select the color and depth streams by the EnableStream function, and then initializes the
pipeline using the Init function.
44
In the loop, use the AcquireFrame function with ifall=true to wait for both samples to
be ready.
Retrieve the color and depth samples using the sample function.
Release the frame for reading next sample using the ReleaseFrame function.
Use the Close function to clean up.
Example 15: Capture Aligned Color and Depth Samples using the SenseManager
[C++]
// Create a SenseManager instance
PXCSenseManager *sm=PXCSenseManager::CreateInstance();
// Select the color and depth streams
sm->EnableStream(PXCCapture::STREAM_TYPE_COLOR,640,480,30);
sm->EnableStream(PXCCapture::STREAM_TYPE_DEPTH,320,240,30);
// Initialize and Stream Samples
sm->Init();
for (;;) {
// This function blocks until both samples are ready
if (sm->AcquireFrame(true)<PXC_STATUS_NO_ERROR) break;
// retrieve the color and depth samples aligned
PXCCapture::Sample *sample=sm->QuerySample();
// work on the samples sample->color and sample->depth
...
// go fetching the next samples
sm->ReleaseFrame();
}
// Close down
sm->Release();
[C#]
// Create a SenseManager instance
PXCMSenseManager sm=PXCMSenseManager.CreateInstance();
// Select the color and depth streams
sm.EnableStream(PXCMCapture.StreamType.STREAM_TYPE_COLOR,640,480,30);
sm.EnableStream(PXCMCapture.StreamType.STREAM_TYPE_DEPTH,320,240,30);
// Initialize and Stream Samples
sm.Init();
for (;;) {
// This function blocks until both samples are ready
if (sm.AcquireFrame(true).IsError()) break;
45
46
You can capture aligned color and depth samples using the StreamFrames function and the
SenseManager event callbacks. See Example 16.
Example 16: Capture Aligned Color and Depth Samples using the SenseManager Events
[C++]
class MyHandler:public PXCSenseManager::Handler {
public:
virtual pxcStatus PXCAPI OnNewSample(pxcUID, PXCCapture::Sample
*sample) {
// Work on sample->color and sample->depth
...
// return NO_ERROR to continue, or any error to exit the loop
return PXC_STATUS_NO_ERROR;
}
};
// Create a SenseManager instance
PXCSenseManager *sm=PXCSenseManager.CreateInstance();
// Select the color and depth streams
PXCVideoModule::DataDesc ddesc={};
ddesc.deviceInfo.streams=PXCCapture::STREAM_TYPE_COLOR|
PXCCapture::STREAM_TYPE_DEPTH;
sm->EnableStreams(&ddesc);
// Initialize my handler
MyHandler handler;
sm->Init(&hanlder);
// Stream Data
sm->StreamFrames(true);
47
// Clean up
sm->Release();
[C#]
pxcmStatus OnNewSample(Int32 mid, PXCMCapture.Sample sample) {
// Work on sample.color and sample.depth
....
// return NO_ERROR to continue, or any error to exit the loop
return pxcmStatus.PXCM_STATUS_NO_ERROR;
};
// Create a SenseManager instance
PXCMSenseManager sm=PXCMSenseManager.CreateInstance();
// Select the color and depth streams
PXCMVideoModule.DataDesc ddesc=new PXCMVideoModule.DataDesc();
ddesc.deviceInfo.streams=PXCMCapture.StreamType.STREAM_TYPE_COLOR|
PXCMCapture.StreamType.STREAM_TYPE_DEPTH;
sm.EnableStreams(ddesc);
// Initialize my handler
PXCMSenseManager.Handler handler=new PXCMSenseManager.Handler();
handler.onNewSample=OnNewSample;
sm.Init(handler);
// Streaming
sm.StreamFrames(true);
// Clean up
sm.Dispose();
[Java]
class MyHandler implements PXCMSenseManager.Handler {
public pxcmStatus OnNewSample(int mid, PXCMCapture.Sample sample) {
// Work on sample.color and sample.depth
...
// return NO_ERROR to continue, or any error to exit the loop
return pxcmStatus.PXCM_STATUS_NO_ERROR;
}
};
// Create a SenseManager instance
PXCMSenseManager sm=PXCMSenseManager.CreateInstance();
// Select the color and depth streams
PXCMVideoModule.DataDesc ddesc=new PXCMVideoModule.DataDesc();
ddesc.deviceInfo.streams=EnumSet.of(PXCMCapture.StreamType.STREAM_TYPE_COLO
R, PXCMCapture.StreamType.STREAM_TYPE_DEPTH);
sm.EnableStreams(ddesc);
// Initialize my handler
MyHandler handler=new MyHandler();
48
sm.Init(handler);
// Streaming
sm.StreamFrames(true);
// Clean up
sm.close();
[C#/UWP]
void OnNewSample(Object sender, SampleArrivedEventArgs args) {
// Work on args.Sample.Color and args.Sample.Depth
....
};
// Create a SenseManager instance
SenseManager sm=SenseManager.CreateInstance();
// Select the color and depth streams
SampleReader reader=SampleReader.Activate(sm);
reader.EnableStream(StreamType.STREAM_TYPE_COLOR,640,480,30);
reader.EnableStream(StreamType.STREAM_TYPE_DEPTH,640,480,30);
reader.SampleArrived+=OnNewSample;
// Initialize
sm.Init();
// Streaming
sm.StreamFrames();
2.6.3.1
With Intel RealSense Depth Camera Manager 1.3, the SDK supports hardware-based color
and depth stream synchronization, which produces color and depth sample pairs with closer
time stamps. This may be important in many applications such as 3D background
segmentation.
Use the STREAM_OPTION_STRONG_STREAM_SYNC option to enable strong synchronization.
The option must set on all streams that require synchronization, or the option is ignored.
Needless to say, the streams must have the same frame rate. For example, if you need to
synchronize color and depth streams, use the Enable Stream[s] function and specify the
option on both the color and depth streams, as illustrated in Example 7.
With camera model F200, there is a penalty of noticeable stopping and restarting camera
streaming if any of the applications (on a system) requests to enable strong synchronization.
Use strong synchronization only when necessary.
Example 17: Capture Aligned Color and Depth Samples with Strong Synchronization
[C++]
// Create a SenseManager instance
PXCSenseManager *sm=PXCSenseManager::CreateInstance();
49
// Close down
sm.Dispose();
[Java]
// Create a SenseManager instance
PXCMSenseManager sm=PXCMSenseManager.CreateInstance();
// Select the color and depth streams
sm.EnableStream(PXCMCapture.StreamType.STREAM_TYPE_COLOR,0,0,0,PXCMCapture.
Device.StreamOption.STREAM_OPTION_UNRECIFIED);
sm.EnableStream(PXCMCapture.StreamType.STREAM_TYPE_DEPTH,0,0,0,PXCMCapture.
Device.StreamOption.STREAM_OPTION_UNRECIFIED);
// Initialize and Stream Samples
sm.Init();
for (;;) {
// This function blocks until both samples are ready
if (sm.AcquireFrame(true).isError()) break;
// retrieve the samples
PXCMCapture.Sample sample=sm.QuerySample();
// work on the samples: sample.color & sample.depth
...
// go fetching the next samples
sm.ReleaseFrame();
}
// Close down
sm.close();
[C#/UWP]
// Create a SenseManager instance
SenseManager sm=SenseManager.CreateInstance();
// Select the color and depth streams
SampleReader reader=SampleReader.Activate(sm);
reader.EnableStream(StreamType.STREAM_TYPE_COLOR,640,480,30,StreamOption.ST
REAM_OPTION_STRONG_STREAM_SYNC);
reader.EnableStream(StreamType.STREAM_TYPE_DEPTH,640,480,30,StreamOption.ST
REAM_OPTION_STRONG_STREAM_SYNC);
// Initialize and Stream Samples
sm.Init();
for (;;) {
// This function blocks until both samples are ready
if (sm.AcquireFrame(true)<Status.STATUS_NO_ERROR) break;
// retrieve the samples
Sample sample=sm.Sample;
51
52
2.6.3.2
With Intel RealSense Depth Camera Manager 1.4, the SDK supports capturing unrectified
streams for the camera model R200. Rectification is a process that corrects lens distortion
and alignment. The unrectified streams are raw images from the camera sensors.
The SDK identifies the unrectified stream configuration (see the StreamProfile structure)
with the STREAM_OPTION_UNRECTIFIED stream option. This is a mandate option (if not
specified, the stream configuration is rectified.) You can request an unrectified stream by
specifying the STREAM_OPTION_UNRECTIFIED option, as illustrated in Example 7.
Not all R200 algorithm modules support unrectified streams. Use only when necessary.
You can retrieve the unrectified calibration parameters through the
QueryStreamProjectionParametersEx function, by specifying the
STREAM_OPTION_UNRECTIFIED stream option.
Example 18: Capture Unrectified Color Samples
[C++]
// Create a SenseManager instance
PXCSenseManager *sm=PXCSenseManager::CreateInstance();
// Select the color and depth streams
sm>EnableStream(PXCCapture::STREAM_TYPE_COLOR,0,0,0,PXCCapture::Device::STREA
M_OPTION_UNRECTIFIED);
sm->EnableStream(PXCCapture::STREAM_TYPE_DEPTH);
// Initialize and Stream Samples
sm->Init();
for (;;) {
// This function blocks until both samples are ready
if (sm->AcquireFrame(true)<PXC_STATUS_NO_ERROR) break;
// retrieve the color and depth samples aligned
PXCCapture::Sample *sample=sm->QuerySample();
// work on the samples sample->color
...
// go fetching the next samples
sm->ReleaseFrame();
}
// Close down
sm->Release();
53
[C#]
// Create a SenseManager instance
PXCMSenseManager sm=PXCMSenseManager.CreateInstance();
// Select the color and depth streams
sm.EnableStream(PXCMCapture.StreamType.STREAM_TYPE_COLOR,0,0,0,PXCMCapture.
Device.StreamOption.STREAM_OPTION_UNRECTIFIED);
sm.EnableStream(PXCMCapture.StreamType.STREAM_TYPE_DEPTH);
// Initialize and Stream Samples
sm.Init();
for (;;) {
// This function blocks until both samples are ready
if (sm.AcquireFrame(true).IsError()) break;
// retrieve the samples
PXCMCapture.Sample sample=sm.QuerySample();
// work on the samples: sample.color
...
// go fetching the next samples
sm.ReleaseFrame();
}
// Close down
sm.Dispose();
[Java]
// Create a SenseManager instance
PXCMSenseManager sm=PXCMSenseManager.CreateInstance();
// Select the color and depth streams
sm.EnableStream(PXCMCapture.StreamType.STREAM_TYPE_COLOR,0,0,0,PXCMCapture.
Device.StreamOption.STREAM_OPTION_UNRECTIFIED);
sm.EnableStream(PXCMCapture.StreamType.STREAM_TYPE_DEPTH);
// Initialize and Stream Samples
sm.Init();
for (;;) {
// This function blocks until both samples are ready
if (sm.AcquireFrame(true).isError()) break;
// retrieve the samples
PXCMCapture.Sample sample=sm.QuerySample();
// work on the samples: sample.color
...
// go fetching the next samples
sm.ReleaseFrame();
}
54
// Close down
sm.close();
[C#/UWP]
using Intel.RealSense;
// Create a SenseManager instance
SenseManager sm=SenseManager.CreateInstance();
// Select the color and depth streams
SampleReader reader=SampleReader.Activate(sm);
reader.EnableStream(StreamType.STREAM_TYPE_COLOR,0,0,0,StreamOption.STREAM_
OPTION_UNRECTIFIED);
reader.EnableStream(StreamType.STREAM_TYPE_DEPTH);
// Initialize and Stream Samples
sm.Init();
for (;;) {
// This function blocks until both samples are ready
if (sm.AcquireFrame(true,)<Status.STATUS_NO_ERROR) break;
// retrieve the samples
PXCMCapture.Sample sample=sm.QuerySample();
// work on the samples: sample.color
...
// go fetching the next samples
sm.ReleaseFrame();
}
// Close down
sm.Dispose();
}
55
2.6.4
[C++]
void RecordORPlayback(pxcCHAR *file, bool record) {
// Create a SenseManager instance
PXCSenseManager *sm=PXCSenseManager::CreateInstance();
// Set file recording or playback
sm->QueryCaptureManager()->SetFileName(file,record);
// Select the color stream
sm->EnableStream(PXCCapture.STREAM_TYPE_COLOR,640,480,0);
// Initialize and Record 300 frames
sm->Init();
for (int i=0;i<300;i++) {
// This function blocks until a color sample is ready
if (sm->AcquireFrame(true)<PXC_STATUS_NO_ERROR) break;
56
57
58
2.6.4.1
Playback Modes
Default Description
SetPause
false
SetRealtime true
If true, the file playback returns the same sample of the current
frame repeatedly.
If true, the file playback returns the current frame sample at its
presentation time (according to the sample time stamp.) If false,
the file playback returns the sample immediately.
Choose pause=true and realtime=false if you want to accurately locate any frame data
during playback. Example 20 shows how to accurately retrieve the frame data based on the
frame index.
Example 20: Accurate Frame Positioning
[C++]
// Create a SenseManager instance
PXCSenseManager* sm = PXCSenseManager::CreateInstance();
// Set file playback name
sm->QueryCaptureManager()->SetFileName(filename, false);
// Enable stream and Initialize
sm->EnableStream(PXCCapture::STREAM_TYPE_COLOR, 0, 0);
sm->Init();
// Set realtime=true and pause=false
sm->QueryCaptureManager()->SetRealtime(false);
sm->QueryCaptureManager()->SetPause(true);
// Streaming loop
for (int i = 0; i < nframes; i+=3) {
// Set to work on every 3rd frame of data
sm->QueryCaptureManager()->SetFrameByIndex(i);
sm->FlushFrame();
// Ready for the frame to be ready
pxcStatus sts = sm->AcquireFrame(true);
if (sts < PXC_STATUS_NO_ERROR) break;
// Retrieve the sample and work on it. The image is in sample->color.
PXCCapture::Sample* sample = sm->QuerySample();
....
// Resume processing the next frame
sm->ReleaseFrame();
}
59
// Clean up
sm->Release();
[C#]
// Create a SenseManager instance
PXCMSenseManager sm = PXCMSenseManager.CreateInstance();
// Set file playback name
sm.captureManager.SetFileName(filename, false);
// Enable stream and Initialize
sm.EnableStream(PXCMCapture.StreamType.STREAM_TYPE_COLOR, 0, 0);
sm.Init();
// Set realtime=true and pause=false
sm.captureManager.SetRealtime(false);
sm.captureManager.SetPause(true);
// Streaming loop
for (int i = 0; i < nframes; i+=3) {
// Set to work on every 3rd frame of data
sm.captureManager.SetFrameByIndex(i);
sm.FlushFrame();
// Ready for the frame to be ready
pxcmStatus sts = sm.AcquireFrame(true);
if (sts < pxcmStatus.PXCM_STATUS_NO_ERROR) break;
// Retrieve the sample and work on it. The image is in sample.color.
PXCMCapture.Sample sample = sm.QuerySample();
....
// Resume processing the next frame
sm.ReleaseFrame();
}
// Clean up
sm.Dispose();
[Java]
// Create a SenseManager instance
PXCMSenseManager sm = PXCMSenseManager.CreateInstance();
// Set file playback name
sm.QueryCaptureManager().SetFileName(filename, false);
// Enable stream and Initialize
sm.EnableStream(PXCMCapture.StreamType.STREAM_TYPE_COLOR, 0, 0);
sm.Init();
// Set realtime=true and pause=false
sm.QueryCaptureManager().SetRealtime(false);
sm.QueryCaptureManager().SetPause(true);
60
// Streaming loop
for (int i = 0; i < nframes; i+=3) {
// Set to work on every 3rd frame of data
sm.captureManager.SetFrameByIndex(i);
sm.FlushFrame();
// Ready for the frame to be ready
pxcmStatus sts = sm.AcquireFrame(true);
if (sts < pxcmStatus.PXCM_STATUS_NO_ERROR) break;
// Retrieve the sample and work on it. The image is in sample.color.
PXCMCapture.Sample sample = sm.QuerySample();
....
// Resume processing the next frame
sm.ReleaseFrame();
}
// Clean up
sm.close();
61
2.6.4.2
Recording raw color and depth samples to a disk imposes huge burden on the system. For
example, with color configuration RGB32x1920x1080x30fps and depth configuration
640x480x30fps, the SDK needs about 272MB/s disk I/O bandwidth to write the samples to
the disk. This requirement makes most spinning disks and certain slow SSD inapplicable for
file recording.
To solve the issue, the SDK provides an experimental feature to compress the samples before
writing to the disk. The feature is based on H.264 encoding (I-frame only, constant QP) on
color samples and lossless LempelZivOberhumer (LZO) encoding on depth samples. The
compression rate is roughly 10:1 for color samples and 2:1 for depth samples. In the
previous example, the disk I/O bandwidth is now reduced to be about 42MB/s.
The system requirement is as follows:
Intel Iris Graphics with the latest Intel Iris Graphics Driver
You can control the recording features with the following registry settings:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\SOFTWARE\Intel\RSSDK\FileRecording]
"DisableH264Compression"=dword:0
"H264_QPI"=dword:8
"DisableLZOCompression"=dword:0
By default, the H.264 compression is enabled on the color stream, and the LZO
compression is enabled on all other streams.
The H.264 QPI (I-frame quantization parameter) value ranges from 0 (least compression)
to 51 (most compression).
A recorded file with the H.264 compression can only be played back on systems with Intel
Iris Graphics.
See Also
Appendix C: Recorded File Format
62
2.6.4.3
Known Limitations
The SDK file recording and playback feature has the following limitations:
File recording may impact application timing, as organizing data and writing to the disk are
non-trivial workloads. Enable file recording only when necessary.
The timing routine (that calculates the sample presentation time in the realtime playback
mode) is timing sensitive. Thus the file playback routine may skip frames if the system is
under load. To ensure frame-accurate playback, turn off the realtime mode.
If repeatable playback (receiving the exact same frame sequence in multiple application
runs) is expected, for example, in a validation scenario, you must turn off the realtime
mode, and enable no more than a single modality.
63
2.6.5
[C++]
// image is a PXCImage instance
PXCImage::ImageData data;
image->AcquireAccess(PXCImage::ACCESS_READ,&data);
... // image planes are in data.planes[0-3] with pitch data.pitches[0-3]
image->ReleaseAccess(&data);
[C#]
// image is a PXCMImage instance
PXCMImage.ImageData data;
image.AcquireAccess(PXCMImage.Access.ACCESS_READ,out data);
... // image planes are in data.buffer.planes[0-3] with pitch
data.buffer.pitches[0-3]
image.ReleaseAccess(data);
[Java]
// image is a PXCMImage instance
PXCMImage.ImageData data;
image.AcquireAccess(PXCMImage.Access.ACCESS_READ,data);
... // image planes are in data.buffer.planes[0-3] with pitch
data.buffer.pitches[0-3]
image.ReleaseAccess(data);
than that of the PXCImage instance. In Example 23, the application makes a copy of the
imported image.
Example 22: Create an Image Instance Without Data Copy
[C++]
// Image info
PXCImage::ImageInfo info={};
info.format=PXCImage::PIXEL_FORMAT_RGB32;
info.width=image_width;
info.height=image_height;
// Image data
PXCImage::ImageData data={};
data.format=PXCImage::PIXEL_FORMAT_RGB32;
data.planes[0]=image_buffer;
data.pitches[0]=ALIGN64(info.width*4);
// Create the image instance
PXCImage *image=session->CreateImage(&info,0,&data);
...
image->Release();
Example 23: Create an Image Instance With Data Copy
[C++]
// Image info
PXCImage::ImageInfo info={};
info.format=PXCImage::PIXEL_FORMAT_RGB32;
info.width=image_width;
info.height=image_height;
// Create the image instance
PXCImage image=session->CreateImage(&info);
// Write data
PXCImage::ImageData data;
image->AcquireAccess(PXCImage::ACCESS_WRITE,&data);
... // copy the imported image to data.planes[0]
image->ReleaseAccess(&data);
For C# and Java, there is always a copy of the data as the imported image is in the managed
memory while the image storage is in the unmanaged memory. Example 24 shows how to
create a PXCMImage instance from a bitmap.
Example 24: Create an Image Instance from Bitmap
[C#]
// Read bitmap into the memory
Bitmap bitmap = (Bitmap)Image.FromFile(file);
// Image info
PXCMImage.ImageInfo iinfo = new PXCMImage.ImageInfo();
65
iinfo.width = bitmap.Width;
iinfo.height = bitmap.Height;
iinfo.format = PXCMImage.PixelFormat.PIXEL_FORMAT_RGB32;
/* Create the image */
PXCMImage image=session.CreateImage(iinfo);
/* Copy the data */
PXCMImage.ImageData idata;
image.AcquireAccess(PXCMImage.Access.ACCESS_WRITE, out idata);
BitmapData bdata = new BitmapData();
bdata.Scan0 = idata.planes[0];
bdata.Stride = idata.pitches[0];
bdata.PixelFormat = PixelFormat.Format32bppRgb;
bdata.Width = bitmap.Width;
bdata.Height = bitmap.Height;
BitmapData bdata2 = bitmap.LockBits(new Rectangle(0, 0, bitmap.Width,
bitmap.Height),
ImageLockMode.ReadOnly | ImageLockMode.UserInputBuffer,
PixelFormat.Format32bppRgb, bdata);
image.ReleaseAccess(idata);
bitmap.UnlockBits(bdata2);
... // do something with the image
image.Dispose();
66
2.7
2.7.1
Enumerating Devices
[C++]
An SDK session may contain multiple capture modules and each module can manage
multiple devices. Use the QueryImpl function to enumerate each capture module, the
CreateImpl function to create an instance of the module, and then the QueryDevice
function to retrieve device specific information.
Example 25 shows how to enumerate video capture devices.
See Handler for an example of how to subscribe to any camera change events.
Example 25: Enumerate Video Devices
67
sts=capture->QueryDeviceInfo(d,&dinfo);
if (sts<PXC_STATUS_NO_ERROR) break;
wprintf_s(L"
Device[%d]: %s\n",d,dinfo.name);
}
capture->Release();
}
[C#]
An SDK session may contain multiple capture modules and each module can manage
multiple devices. Use the QueryImpl function to enumerate each capture module, the
CreateImpl function to create an instance of the module, and then the QueryDevice
function to retrieve device specific information.
Example 26 shows how to enumerate video capture devices.
See Handler for an example of how to subscribe to any camera change events.
Example 26: Enumerate Video Devices
Device[{0}]: {1}",d,dinfo.name);
}
capture.Dispose();
}
[Java]
An SDK session may contain multiple capture modules and each module can manage
multiple devices. Use the QueryImpl function to enumerate each capture module, the
68
CreateImpl function to create an instance of the module, and then the QueryDevice
}
capture.close();
}
[C#/UWP]
using Intel.RealSense;
// sm is a SenseManager instance
Device[] devices=await Device.FindAllAsync(sm);
69
2.7.2
You can get and set device properties through the Device interface member functions.
Example 29 shows how to get/set device properties.
It is not recommended to change any device settings. Doing so could impact other
applications that share the same physical device.
Example 29: Get/Set Device Properties
You can get and set device properties through the Device interface member functions.
Example 30 shows how to get/set device properties.
It is not recommended to change any device settings. Doing so could impact other
applications that share the same physical device.
Example 30: Get/Set Device Properties
You can get and set device properties through the Device interface member functions.
Example 31 shows how to get/set device properties.
It is not recommended to change any device settings. Doing so could impact other
applications that share the same physical device.
Example 31: Get/Set Device Properties
70
using Intel.RealSense;
using Windows.Devices.Perception;
// device is a Device instance
// Get the color source
auto color=device.Sources[StreamType.STREAM_TYPE_COLOR];
// Get the device property
float value=(float)color.Properties["Intel.RealSense.ColorExposure"];
// Set the device property
using (auto pcs=color.AcquireControlSesseion())
{
await pcs.TrySetPropertyAsync("Intel.RealSense.ColorExposure", 0.2f);
}
See Also
Coexisting with Other Applications
2.7.3
Enumerating Streams
Each SDK device may have multiple streams. The stream information is part of the
DeviceInfo structure. Use the QueryDeviceInfo function (or the deviceInfo property) to
retrieve the stream information. Example 33 shows how to enumerate the stream
information.
Example 33: Enumerate Device Streams
[C++]
71
72
2.7.4
73
Console.WriteLn("depth[{0}]: {1}x{2}", p,
profiles.depth.imageInfo.width, profiles.depth.imageInfo.height);
}
[Java]
using Intel.RealSense;
// device is a Device instance
// Get the color source
auto color=device.Sources[StreamType.STREAM_TYPE_COLOR];
auto profiles=color.SupportedVideoProfiles;
2.7.5
74
Enumerating Devices
There may be multiple peripheral devices connected to the system. See Enumerating Devices
for how to enumerate multiple camera devices.
If the system is equipped with both integrated and peripheral cameras, the order of
enumeration is: peripheral camera first, and the integrated camera last.
Identifying Peripheral Devices
The DeviceInfo structure describes the details of the camera device. Use the
QueryDeviceInfo function (or the deviceInfo property) to retrieve the device information,
then the connectionType field to distinguish between an integrated camera and a peripheral
camera.
Handling Device Disconnection
When a peripheral camera unplugs, the SenseManager pipeline terminates with the
PXC_STATUS_DEVICE_LOST status code as follows:
If you use the SenseManager polling mechanism, the AcquireFrame function returns the
PXC_STATUS_DEVICE_LOST status code, which breaks the streaming loop.
If you use the SenseManager event mechanism, the stream loop terminates after an
OnStatus callback with the PXC_STATUS_DEVICE_LOST status code as the input argument.
Listening for Device Changes
You can monitor any camera device changes, for example, if the camera has been
reconnected, by subscribing to the OnDeviceListChanged event.
The OnDeviceListChanged event is device type specific. For example, the camera SR300
capture module reports changes only from the camera SR300 devices. Thus if you need to
monitor both camera SR300 and R200 changes, subscribe to the events of both the camera
Capture interfaces.
See Enumerating Devices for how to enumerate and create camera instances.
Checking Camera Connection State
During application installation or in other cases where the SDK is not accessible, you can
check the camera connection state as follows:
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Intel\RSDCM\SR300]
"CameraConnected"=dword:00000001
The registry key is set to value 1 if and only if there is at least 1 peripheral camera plugged
into the system.
75
2.8
Coordinate Systems
The SDK uses the following two types of coordinate system definitions: Image and Camera.
See Configuring Coordinate System for details of configuring the camera coordinate system.
The Image Coordinate System
The coordinates refer to the pixel location (x,y) in the color
or depth pictures, where x is in the range of 0 to w-1, (w is the
image width), and y is in the range of 0 to h-1, (h is the image
height). See Figure 7. From the camera point of view, the
origin (0,0) is at the top left; the X axis points to the right;
and the Y axis points down.
76
77
2010-2016
Intel Corporation
Figure 10: Rear Facing OpenCV
Coordinate
System
[C#/UWP]
2.8.1
Upon SDK session initialization, the SDK sets the coordinates (front and rear) to default
values. Use the QueryCoordinateSystem function to retrieve the current coordinate system
setting. Note that the function returns a bit mask of coordinate system values of both front
and rear cameras. Thus if you need to use check the coordinate bit mask for a specific camera
orientation, as illustrated in Example 38.
Example 38: Checking Coordinate System Setting
[C++]
// Create a SenseManager instance.
PXCSenseManager *sm=PXCSenseManager::CreateInstance();
// get the coordinate system setting
PXCSession *session=sm->QuerySession();
78
PXCSession::CoordinateSystem cs=session->QueryCoordinateSystem();
// check the coordinate system for rear facing camera
if (cs & PXCSession::COORDINATE_SYSTEM_OPENCV) {
....
}
// Clean up
sm->Release();
[C#]
// Create a SenseManager instance.
PXCMSenseManager sm=PXCMSenseManager.CreateInstance();
// get the coordinate system setting
PXCMSession session=sm.session;
PXCMSession.CoordinateSystem cs=session.QueryCoordinateSystem();
// check the coordinate system for rear facing camera
if (cs.HasFlag(PXCMSession.CoordinateSystem.COORDINATE_SYSTEM_OPENCV)) {
....
}
// Clean up
sm.Dispose();
[Java]
// Create a SenseManager instance.
PXCMSenseManager sm=PXCMSenseManager.CreateInstance();
// get the coordinate system setting
PXCMSession session=sm.QuerySession();
EnumSet<PXCMSession.CoordinateSystem> cs=session.QueryCoordinateSystem();
// check the coordinate system for rear facing camera
if (cs.contains(PXCMSession.CoordinateSystem.COORDINATE_SYSTEM_OPENCV)) {
....
}
// Clean up
sm.close();
Use the SetCoordinateSystem function to change the coordinate system setting. Each SDK
module reads the coordinate system setting (from the session) during the module
initialization. You must set the coordinate system before any SDK module (algorithm) is
initialized, to ensure all modules work with the same coordinate system. The SenseManager
initializes algorithm modules in the EnableXXX functions and the I/O module in the Init
function. Thus you need to set the coordinate system before those functions. See Example
39 for an example of setting the coordinate system.
Example 39: Set to the OpenCV Coordinate System
[C++]
79
2.8.2
Coordinates Mapping
Due to the differences in a camera's physical location, lens size, and field of view, color and
depth coordinates do not map 1:1 to each other.
[C++][C#][Java]
Use the Projection function to map or project coordinates. Use the CreateProjection
function to retrieve an instance of the Projection interface.
80
[C++]
// Create the PXCProjection instance.
PXCProjection *projection=device->CreateProjection();
// color and depth image size.
PXCImage::ImageInfo dinfo=depth->QueryInfo();
PXCImage::ImageInfo cinfo=color->QueryInfo();
// Calculate the UV map.
PXCPointF32 *uvmap=new PXCPointF32[dinfo.width*dinfo.height];
projection->QueryUVMap(depth, uvmap);
// Translate depth points uv[] to color ij[]
for (int i=0;i<npoints;i++) {
ij[i].x=uvmap[(int)uv[i].y*dinfo.width+(int)uv[i].x].x*cinfo.width;
ij[i].y=uvmap[(int)uv[i].y*dinfo.width+(int)uv[i].x].y*cinfo.height;
}
// Clean up
delete[] uvmap;
projection->Release();
[C#]
// Create the PXCMProjection instance.
PXCMProjection projection=device.CreateProjection();
// color and depth image size.
PXCMImage.ImageInfo dinfo=depth.info;
PXCMImage.ImageInfo cinfo=color.info;
// Calculate the UV map.
PXCMPointF32[] uvmap=new PXCMPointF32[dinfo.width*dinfo.height];
projection.QueryUVMap(depth, uvmap);
// Translate depth points uv[] to color ij[]
for (int i=0;i<uv.Length;i++) {
ij[i].x=uvmap[(int)uv[i].y*dinfo.width+(int)uv[i].x].x*cinfo.width;
ij[i].y=uvmap[(int)uv[i].y*dinfo.width+(int)uv[i].x].y*cinfo.height;
}
81
// Clean up
projection.Dispose();
[Java]
// Create the PXCMProjection instance.
PXCMProjection projection=device.CreateProjection();
// color and depth image size.
PXCMImage.ImageInfo dinfo=depth.QueryInfo();
PXCMImage.ImageInfo cinfo=color.QueryInfo();
// Calculate the UV map.
PXCMPointF32[] uvmap=new PXCMPointF32[dinfo.width*dinfo.height];
projection.QueryUVMap(depth, uvmap);
// Translate depth points uv[] to color ij[]
for (int i=0;i<uv.Length;i++) {
ij[i].x=uvmap[(int)uv[i].y*dinfo.width+(int)uv[i].x].x*cinfo.width;
ij[i].y=uvmap[(int)uv[i].y*dinfo.width+(int)uv[i].x].y*cinfo.height;
}
// Clean up
projection.close();
[C#/UWP]
2.9
82
2.9.1
2.9.2
83
[C++]
// sm is a SenseManager instance
// Enable a Color Stream
sm->EnableStream(PXCCapture::STREAM_TYPE_COLOR);
...
[C#]
// sm is a SenseManager instance
// Enable a Color Stream
sm.EnableStream(PXCMCapture.StreamType.STREAM_TYPE_COLOR);
...
[Java]
// sm is a SenseManager instance
// Enable a Color Stream
sm.EnableStream(PXCMCapture.StreamType.STREAM_TYPE_COLOR);
...
[JavaScript]
// JavaScript does not support streaming raw images to protect user
privacy.
[C#/UWP]
// sm is a SenseManager instance
// Create a StreamReader instance
SampleReader sr=SampleReader.Activate(sm);
// Enable a Color Stream
sr.EnableStream(StreamType.STREAM_TYPE_COLOR);
84
...
When reading image data, use the Image functions (such as AcquireAccess and
ExportData) to force pixel format conversion to your desired pixel format, or if you prefer
to use the native pixel format, handle all cases. See Example 42.
Example 42: Force Conversion to Known Pixel Format
[C++]
// image is a PXCImage instance
PXCImage::ImageData data;
image->AcquireAccess(PXCImage::ACCESS_READ, PXCImage::PIXEL_FORMAT_RGB32,
&data);
...
image->ReleaseAccess(&data);
[C#]
// image is a PXCMImage instance
PXCMImage.ImageData data;
image.AcquireAccess(PXCMImage.Access.ACCESS_READ,
PXCMImage.PixelFormat.PIXEL_FORMAT_RGB32, out data);
...
image.ReleaseAccess(data);
[Java]
// image is a PXCMImage instance
PXCMImage.ImageData data=new PXCMImage.ImageData();
image.AcquireAccess(PXCMImage.Access.ACCESS_READ,
PXCMImage.PixelFormat.PIXEL_FORMAT_RGB32, data);
...
image.ReleaseAccess(data);
[JavaScript]
// JavaScript does not expose raw or processed images to protect user
privacy.
[C#/UWP]
// SoftewareBitmap is the UWP data type for images.
public SoftwareBitmapToWriteableBitmap(SoftwareBitmap bitmap,
WriteableBitmap bitmap2)
{
switch (bitmap.BitmapPixelFormat)
{
default:
using (var converted = SoftwareBitmap.Convert(bitmap,
BitmapPixelFormat.Rgba8))
converted.CopyToBuffer(bitmap2.PixelBuffer);
break;
case BitmapPixelFormat.Bgra8:
bitmap.CopyToBuffer(bitmap2.PixelBuffer);
break;
case BitmapPixelFormat.Gray16:
{
// See the UWP StreamViewer sample for all the code.
85
....
break;
}
}
}
When accessing the camera device properties, use those device neutral device properties
as listed in Device Neutral Device Properties.
2.9.3
86
QueryIVCAMFilterOption or SetIVCAMFilterOption.
o If you use SetIVCAMAccuracy, it is recommended that you only use FINEST. Other
accuracy modes may actually impact the depth quality.
Recommendation: Avoid using device specific properties as much as possible, or your
application is impacted by any camera level feature changes. Specifically, if you use the SDK
algorithm modules only, you do not need to change any camera settings. The SDK
automatically sets the best settings for the algorithm(s).
During your application installation, if you use any camera specific options (see Installer
Options) to force checking a specific camera model, such as F200, your application will be
forced to install only when the specified camera is available on the platform.
Recommendation: Use the option "-front" if your application works with any front-facing
camera and "-rear" if your application works with any rear-facing camera. Do not force a
camera model if your application is not tied to the camera model.
Similarly, for JavaScript applications, if you specify the camera model in the
detectPlatform function in your application landing page (see Designing the Landing
Page), your application will be limited to the platform equipped with the specified camera
model only.
Recommendation: Use "front" if your application works with any front-facing camera and
"rear" if your application works with any rear-facing camera. Do not force a camera model if
your application is not tied to the camera model.
2.9.4
[C++]
// Create a SenseManager instance
PXCSenseManager *sm=PXCSenseManager::CreateInstance();
// Other SenseManager configuration (say, enable streams or modules)
...
87
var sm;
rs.SenseManager.createInstance().then(function(instance) {
sm=instance;
// Create a blob instance
return rsb.BlobModule.createInstance(sm).then(function(bm)) {
// blob configuration: omitted here for simplicity.
....
// Initialize SenseManager
return sm.Init().then(function(result) {
// Check the Camera Model
document.write("camera model = " +
sm.captureManager.device.deviceInfo.model);
});
});
});
[C#/UWP]
using Intel.RealSense;
// Create a SenseManager instance
SenseManager sm=SenseManager.CreateInstance();
// Other SenseManager configuration
...
// Initialize
await sm.InitAsync();
// Get camera model
DeviceModel model=sm.CaptureManager.Device.DeviceInfo.model;
// Clean up
sm.Dispose();
2.10
89
systems and the quality varies with the layout and characteristics of the actual platform
cameras.
Use the following samples to test the R200 Enhanced mode features:
RawStreams: Use this sample to see color and depth streaming.
Projection: Check this sample to see how projection works.
EnhancedPhotography: Refer to this sample on how Depth Enabled Photography and
Videography works.
If this 32-bit registry key exists and the value is non-zero, your platform camera is calibrated
to work with camera model R200.
See Also
Checking SDK, Camera Driver, and Algorithm Versions
[C++]
// Create a SenseManager instance
PXCSenseManager* sm=PXCSenseManager::CreateInstance();
// Select the R200 Enhanced device
PXCCapture::DeviceInfo dinfo={};
dinfo.model=PXCCapture::DEVICE_MODEL_R200_ENHANCED;
sm->QueryCaptureManager()->FilterByDeviceInfo(&dinfo);
90
// Do something here.
....
// Clean up
sm.close();
See Also
Checking R200 Enhanced During Installation
[C++]
// Create a SenseManager instance
PXCSenseManager* sm=PXCSenseManager::CreateInstance();
// Select the R200 Enhanced device
PXCCapture::DeviceInfo dinfo={};
dinfo.model=PXCCapture::DEVICE_MODEL_R200_ENHANCED;
sm->QueryCaptureManager()->FilterByDeviceInfo(&dinfo);
// Enable Color and Depth
sm>EnableStream(PXCCapture::STREAM_TYPE_COLOR,0,0,0,PXCCapture::Device::STREA
M_OPTION_UNRECTIFIED);
sm->EnableStream(PXCCapture::STREAM_TYPE_DEPTH,0,0,0);
// Initialize SenseManager
sm->Init();
// sm->AcquireFrame/ReleaseFrame for polling the samples or
// sm->StreamFrames for event callback when sample is ready.
....
// Clean up
sm->Release();
[C#]
// Create a SenseManager instance
PXCMSenseManager sm=PXCMSenseManager.CreateInstance();
// Select the R200 Enhanced device
PXCMCapture.DeviceInfo dinfo=new PXCMCapture.DeviceInfo();
92
dinfo.model=PXCMCapture.DeviceModel.DEVICE_MODEL_R200_ENHANCED;
sm.captureManager.FilterByDeviceInfo(dinfo);
// The rest SenseManager configurations: activate a stream or an algorithm
sm.EnableStream(PXCMCapture.StreamType.STREAM_TYPE_COLOR,0,0,0,
PXCMCapture.Device.StreamOption.STREAM_OPTION_UNRECTIFIED);
sm.EnableStream(PXCMCapture.StreamType.STERAM_TYPE_DEPTH,0,0,0);
// Initialize SenseManager
sm.Init();
// sm.AcquireFrame/ReleaseFrame for polling the samples or
// sm.StreamFrames for event callback when sample is ready.
....
// Clean up
sm.Dispose();
[Java]
// Create a SenseManager instance
PXCMSenseManager sm=PXCMSenseManager.CreateInstance();
// Select the R200 Enhanced device
PXCMCapture.DeviceInfo dinfo=new PXCMCapture.DeviceInfo();
dinfo.model=PXCMCapture.DeviceModel.DEVICE_MODEL_R200_ENHANCED;
sm.captureManager.FilterByDeviceInfo(dinfo);
// The rest SenseManager configurations: activate a stream or an algorithm
sm.EnableStream(PXCMCapture.StreamType.STREAM_TYPE_COLOR,0,0,0,
PXCMCapture.Device.StreamOption.STREAM_OPTION_UNRECTIFIED);
sm.EnableStream(PXCMCapture.StreamType.STERAM_TYPE_DEPTH,0,0,0);
// Initialize SenseManager
sm.Init();
// sm.AcquireFrame/ReleaseFrame for polling the samples or
// sm.StreamFrames for event callback when sample is ready.
....
// Clean up
sm.close();
93
[C++]
// sm is the SenseManager instance
PXCCapture::Device *device=sm->QueryCaptureManager()->QueryDevice();
PXCPlatformCameraControl *pcc=device>QueryInstance<PXCPlatformCameraControl>();
[C#]
// sm is the SenseManager instance
PXCMCapture.Device device=sm.captureManager.device;
PXCMPlatformCameraControl
pcc=device.QueryInstance<PXCMPlatformCameraControl>();
[Java]
// sm is the SenseManager instance
PXCMCapture.Device device=sm.QueryCaptureManager().QueryDevice();
PXCMPlatformCameraControl pcc=(PXCMPlatformCameraControl)
device.QueryInstance(PXCMPlatformCameraControl.CUID);
[C++]
class MyHandler: public PXCPlatformCameraControl::Handler {
public:
virtual void PXCAPI OnPlatformCameraSample(PXCCapture::Sample& sample)
{
}
virtual void PXCAPI OnPlatformCameraError() {
}
};
// pcc is a PXCPlatformCameraControl interface
94
2.11
Interface Reference
This section describes the Intel RealSense SDK essential interfaces and their operations for
application development.
In each interface description, only commonly used status codes are documented. The
95
function may return additional status codes in certain cases. See the Status enumerator for a
list of all status codes.
Naming Conventions
For C++, C# and Java, this manual uses [M] (where M stands for "managed") in the interface
names to represent interfaces that are available in a managed environment (such as C# and
Java). For example, Capture represents the C++ interface PXCCapture and the C#, and Java
interface PXCMCapture.
The manual uses additional markings after the interface or method names as follows:
Marking
Example
Comment
None
Base
(C++)
PXCBase.Release
(C#)
PXCMBase.Dispose
(C#.NET4)
PXCMImage.ImageData.ToBitmap
(Unity)
(Java)
PXCMBase.close
(Processing) PXCMImage.ImageData.ToPImage
(JS)
PXCMSession.QueryImpls
(+JS)
PXCMSession.QueryModelDesc
(UWP)
SampleReader.EnableStream[s]
(+UWP)
SenseManager.CreateInstance
2.11.1 AddRef
Namespace Hierarchy
96
[C++]
PXCAddRef
[C#]
PXCMAddRef
[Java]
PXCMAddRef
Description
The AddRef interface increases an object reference count. This is usually used to
preserve an object instance without making a copy.
The following object additionally exposes the AddRef interface:
Audio
Image
Photo
Reference
[C++]
pxcaddref.h
[C#/.NET4]
libpxcclr.cs.dll
[C#/Unity]
libpxcclr.unity.dll
[Java]
libpxcclr.java.jar
[Processing]
libpxcclr_processing
Runtime
[C++][C#][Java]
97
2.11.1.1 Constants
Description
CUID
Description
AddRef
2.11.1.2.1 AddRef
Namespace Hierarchy
[C++]
PXCAddRef::AddRef
[C#]
PXCMAddRef.AddRef
[Java]
PXCMAddRef.AddRef
Syntax
[C++]
pxcI32 AddRef(void);
[C#]
Int32 AddRef();
[Java]
int AddRef();
Parameters
None
Description
The AddRef function increases the object reference counter.
98
Return Status
The reference counter before the increment.
Example
Example 48 shows how to increase the reference counter of an Image instance.
Example 48: Increase the Reference Counter of an Image Object
[C++]
// image is a PXCImage instance;
image->QueryInstance<PXCAddRef>()->AddRef();
[C#]
// image is a PXCMImage instance;
image.QueryInstance<PXCMAddRef>().AddRef();
[Java]
// image is a PXCMImage instance;
image.QueryInstance<PXCMAddRef>().AddRef();
2.11.2 Base
Namespace Hierarchy
[C++]
PXCBase
[C#]
PXCMBase
[Java]
PXCMBase
Description
The Base interface is the base class of all SDK interface definitions.
[C++]
The interface overrides the class delete operator with the Release function to work
with the SDK dispatching mechanism and provides a QueryInstance mechanism to
replace the dynamic_cast operation, which relies on compilerspecific, run-time type
checking.
[C#]
99
The interface provides the Dispose function to release any unmanaged memory
objects, and a QueryInstance function to retrieve any other interface that an SDK
module might implement.XCMBase
[Java]
The interface provides the close function to release any unmanaged memory objects,
and a QueryInstance function to retrieve any other interface that an SDK module might
implement.
Reference
[C++]
pxcbase.h
[C#/.NET4]
libpxcclr.cs.dll
[C#/Unity]
libpxcclr.unity.dll
[Java]
libpxcclr.java.jar
[Processing]
libpxcclr_processing
Runtime
[C++][C#][Java]
Description
CUID
100
Member Functions
Description
QueryInstance
Release (C++)
Dispose (C#)
close (Java)
Namespace Hierarchy
PXCMBase.close
Syntax
void close();
Parameters
None
Description
The close function releases any unmanaged memory objects that the SDK interface
might hold.
Return Status
None
Namespace Hierarchy
PXCMBase.Dispose
Syntax
void Dispose();
101
Parameters
None
Description
The Dispose function releases any unmanaged memory objects that the SDK interface
might hold.
Return Status
None
2.11.2.2.3 QueryInstance
Namespace Hierarchy
[C++]
PXCBase::QueryInstance
[C#]
PXCMBase.QueryInstance
[Java]
PXCMBase.QueryInstance
Syntax
[C++]
void* QueryInstance(pxcUID cuid);
[C#]
PXCMBase QueryInstance(Int32 cuid);
[Java]
PXCMBase QueryInstance(int cuid);
Parameters
cuid
Description
102
The QueryInstance function returns the instance of the requested interface if the
implementation supports such interface, or NULL/null if the implementation does not
support the requested interface.
The application should not release the returned instance, which is internally
managed.
Return Status
None
Remarks
[C++]
For simplicity, the application can use the QueryInstance<T> template. For example,
the following statement casts to a Y interface from an X interface: Y *y=x>QueryInstance<Y>();
[C#]
For simplicity, the application can use the QueryInstance<T> template. For example,
the following statement casts to a Y interface from an X interface: Y
y=x.QueryInstance<Y>();
Example
Example 49 shows how to retrieve the Metadata interface from the Session instance.
Example 49: Retrieve the Metadata interface
[C++]
PXCMetadata *meta_data=session->QueryInstance<PXCMetadata>();
[C#]
PXCMMetadata meta_data=session.QueryInstance<PXCMMetadata>();
[Java]
PXCMMetadata meta_data=(PXCMMetadata)
session.QueryInstance(PXCMMetadata.CUID);
2.11.2.2.4 Release (C++)
Namespace Hierarchy
PXCBase::Release
103
Syntax
void Release(void);
Parameters
None
Description
The Release function releases the instance of the PXCBase interface.
Return Status
None
2.11.3 Calibration
Namespace Hierarchy
[C++]
PXCCalibration
[C#]
PXCMCalibration
[Java]
PXCMCalibration
Description
The Calibration interface provides functions to retrieve the device calibration
parameters.
You can use the QueryInstance function to retrieve an instance of the Calibration
interface from the Projection instance.
Reference
[C++]
pxccalibration.h
[C#/.NET4]
libpxcclr.cs.dll
104
[C#/Unity]
libpxcclr.unity.dll
[Java]
libpxcclr.java.jar
[Processing]
libpxcclr_processing
Runtime
[C++][C#][Java]
[C++]
/* device is an instance of the PXCCapture::Device interface */
PXCProjection *projection=device->CreateProjection();
/* Get a calibration instance */
PXCCalibration *calib=projection->QueryInstance<PXCCalibration>();
...
/* Release the interface */
projection->Release();
[C#]
/* device is an instance of the PXCMCapture.Device interface */
PXCMProjection projection=device.CreateProjection();
/* Get a calibration instance */
PXCMCalibration calib=projection.QueryInstance<PXCCalibration>();
...
/* Dispose the interface */
projection.Dispose();
[Java]
/* device is an instance of the PXCMCapture.Device interface */
PXCMProjection projection=device.CreateProjection();
/* Get a calibration instance */
PXCMCalibration calib=(PXCMCalibration)
projection.QueryInstance(PXCMCalibration.CUID);
...
/* Release the interface */
105
projection.close();
See Also
Constants
Member Functions
2.11.3.1 Constants
Description
CUID
Description
QueryStreamProjectionParameters
Namespace Hierarchy
[C++]
PXCCalibration::QueryStreamProjectionParameters
[C#]
PXCMCalibration.QueryStreamProjectionParameters
[Java]
PXCMCalibration.QueryStreamProjectionParameters
Syntax
[C++]
pxcStatus QueryStreamProjectionParameters(StreamType streamType,
StreamCalibration *clibration, StreamTransform *transformation);
[C#]
pxcmStatus QueryStreamProjectionParameters(StreamType streamType, out
StreamCalibration clibration, out StreamTransform transformation);
[Java]
106
Parameters
streamType
calibration
transformation
Description
The QueryStreamProjectionParameters function returns the calibration and
transformation parameters of the specified stream type.
Return Status
STATUS_NO_ERROR
2.11.3.2.2 QueryStreamProjectionParametersEx
Namespace Hierarchy
[C++]
PXCCalibration::QueryStreamProjectionParametersEx
[C#]
PXCMCalibration.QueryStreamProjectionParametersEx
[Java]
PXCMCalibration.QueryStreamProjectionParametersEx
Syntax
[C++]
pxcStatus QueryStreamProjectionParametersEx(StreamType streamType,
StreamOption options, StreamCalibration *clibration, StreamTransform
*transformation);
[C#]
pxcmStatus QueryStreamProjectionParameters(StreamType streamType,
StreamOption options, out StreamCalibration clibration, StreamOption
options, out StreamTransform transformation);
107
[Java]
pxcmStatus QueryStreamProjectionParameters(StreamType streamType,
StreamOption options, StreamCalibration clibration, StreamOption options,
StreamTransform transformation);
Parameters
streamType
options
calibration
transformation
Description
The QueryStreamProjectionParametersEx function returns the calibration and
transformation parameters of the specified stream type and options.
Return Status
STATUS_NO_ERROR
Description
108
The Capture interface provides member functions to query video capture devices
and create an instance of the capture device.
The application can use the QueryCapture function (or the capture property) to
retrieve an instance of the Capture interface.
Reference
[C++]
pxccapture.h
[C#/.NET4]
libpxcclr.cs.dll
[C#/Unity]
libpxcclr.unity.dll
[Java]
libpxcclr.java.jar
[Processing]
libpxcclr_processing
[JavaScript]
realsense.js
Runtime
[C++][C#][Java][JavaScript]
[C++]
PXCSession::ImplDesc desc={};
desc.group=PXCSession::IMPL_GROUP_SENSOR;
desc.subgroup=PXCSession::IMPL_SUBGROUP_VIDEO_CAPTURE;
for (int i=0;;i++) {
PXCSession::ImplDesc desc1;
pxcStatus sts=session->QueryImpl(&desc,i,&desc1);
if (sts<PXC_STATUS_NO_ERROR) break;
PXCCapture *capture;
sts=session->CreateImpl<PXCCapture>(&desc1,&capture);
if (sts<PXC_STATUS_NO_ERROR) continue;
109
....
capture->Release();
}
[C#]
PXCMSession.ImplDesc desc=new PXCMSession.ImplDesc() {
group=PXCMSession.ImplGroup.IMPL_GROUP_SENSOR,
subgroup=PXCMSession.ImplSubgroup.IMPL_SUBGROUP_VIDEO_CAPTURE,
};
for (uint i=0;;i++) {
PXCMSession.ImplDesc desc1;
pxcmStatus sts=session.QueryImpl(desc,i,out desc1);
if (sts.IsError()) break;
PXCMCapture capture;
sts=session->CreateImpl<PXCMCapture>(desc1, out capture);
if (sts.IsError()) continue;
....
capture.Dispose();
}
[Java]
PXCMSession.ImplDesc desc=new PXCMSession.ImplDesc();
desc.group=EnumSet.of(PXCMSession.ImplGroup.IMPL_GROUP_SENSOR);
desc.subgroup=EnumSet.of(PXCMSession.ImplSubgroup.IMPL_SUBGROUP_VIDEO_CAPTU
RE);
for (uint i=0;;i++) {
PXCMSession.ImplDesc desc1=new PXCMSession.ImplDesc();
pxcmStatus sts=session.QueryImpl(desc,i,desc1);
if (sts.isError()) break;
PXCMCapture capture=new PXCMCapture();
sts=session.CreateImpl<PXCMCapture>(desc1, capture);
if (sts.isError()) continue;
....
capture.close();
}
[JavaScript]
// In JavaScript, the capture devices are managed by the SenseManager
// sm is a SenseManager instance
// use sm.captureManager.capture for the Capture instance
See Also
110
111
Description
Handler
2.11.4.1.1 Handler
Namespace Hierarchy
[C++]
PXCCapture::Handler
[C#]
PXCMCapture.Handler
[Java]
PXCMCapture.Handler
Description
The Handler interface is a set of callback functions/delegates to be used to receive
camera events. The application must implement the interface.
Examples
Example 52 shows how to create a handler.
Example 52: Create a Handler
[C++]
class MyHandler: public PXCCapture::Handler {
public:
virtual void PXCAPI OnDeviceListChanged(void) {
....
}
};
// capture is a PXCCapture instance.
MyHandler handler;
capture->SubscribeCaptureCallbacks(&handler);
....
capture->UnsubscribeCaptureCallbacks(&handler);
[C#]
static void OnDeviceListChanged() {
....
}
112
See Also
Member Functions
113
Description
OnDeviceListChanged
Namespace Hierarchy
[C++]
PXCCapture::Handler::OnDeviceListChanged
[C#]
PXCMCapture.Handler.OnDeviceListChanged
[Java]
PXCMCapture.Handler.OnDeviceListChanged
Syntax
[C++]
void OnDeviceListChanged(void);
[C#]
void OnDeviceListChanged();
[Java]
void OnDeviceListChanged();
Parameters
None
Description
The OnDeviceListChanged function is invoked when there is a change in the device
list. Use QueryDeviceInfo to enumerate the device list.
You should not perform any lengthy operation in the callback function.
Return Status
None
114
2.11.4.2 Constants
Description
CUID
STREAM_LIMIT
PROPERTY_VALUE_INVALID
Description
CreateDevice
QueryDeviceNum
QueryDeviceInfo
SubscribeCaptureCallbacks
UnsubscribeCaptureCallbacks
2.11.4.3.1 CreateDevice
Namespace Hierarchy
[C++]
PXCCapture::CreateDevice
[C#]
PXCMCapture.CreateDevice
[Java]
PXCMCapture.CreateDevice
Syntax
[C++]
Device* CreateDevice(pxcI32 didx);
[C#]
Device CreateDevice(Int32 didx);
[Java]
Device CreateDevice(int didx);
115
Parameters
didx
Description
The CreateDevice function creates a Device interface instance for the given capture
device.
Return Status
The capture device instance, or NULL/null if there is any error.
2.11.4.3.2 QueryDeviceInfo
Namespace Hierarchy
[C++]
PXCCapture::QueryDeviceInfo
[C#]
PXCMCapture.QueryDeviceInfo
[Java]
PXCMCapture.QueryDeviceInfo
Syntax
[C++]
pxcStatus QueryDeviceInfo(pxcI32 didx, DeviceInfo *dinfo);
[C#]
pxcmStatus QueryDeviceInfo(Int32 didx, out DeviceInfo dinfo);
[Java]
pxcmStatus QueryDeviceInfo(int didx, DeviceInfo dinfo);
Parameters
didx
dinfo
Description
116
The QueryDeviceInfo function returns the capture device information by index. The
number of available capture devices and their order may change over time, thus the
application should not assume any particular value or order of the capture device
index. The SDK enumerates available capture devices in the system when the
application creates the Capture instance.
Return Status
STATUS_NO_ERROR
STATUS_ITEM_UNAVAILABLE
2.11.4.3.3 QueryDeviceNum
Namespace Hierarchy
[C++]
PXCCapture::QueryDeviceNum
[C#]
PXCMCapture.QueryDeviceNum
[Java]
PXCMCapture.QueryDeviceNum
Syntax
[C++]
pxcI32 QueryDeviceNum(void);
[C#]
Int32 QueryDeviceNum();
[Java]
int QueryDeviceNum();
Parameters
None
Description
The QueryDeviceNum function returns the number of capture devices.
Return Status
117
Namespace Hierarchy
[C++]
PXCCapture::SubscribeCaptureCallbacks
[C#]
PXCMCapture.SubscribeCaptureCallbacks
[Java]
PXCMCapture.SubscribeCaptureCallbacks
Syntax
[C++]
pxcStatus SubscribeCaptureCallbacks(Handler *handler);
[C#]
pxcmStatus SubscribeCaptureCallbacks(Handler handler);
[Java]
pxcmStatus SubscribeCaptureCallbacks(Handler handler);
Parameters
handler
Description
The SubscribeCaptureCallbacks function registers the set of callback functions for
any camera device events.
Return Status
STATUS_NO_ERROR
2.11.4.3.5 UnsubscribeCaptureCallbacks
Namespace Hierarchy
[C++]
PXCCapture::UnsubscribeCaptureCallbacks
118
[C#]
PXCMCapture.UnsubscribeCaptureCallbacks
[Java]
PXCMCapture.UnsubscribeCaptureCallbacks
Syntax
[C++]
pxcStatus UnsubscribeCaptureCallbacks(Handler *handler);
[C#]
pxcmStatus UnsubscribeCaptureCallbacks(Handler handler);
[Java]
pxcmStatus UnsubscribeCaptureCallbacks(Handler handler);
Parameters
handler
Description
The UnsubscribeCaptureCallbacks function unregisters the callback functions,
which must be previously registered via the SubscribeCaptureCallbacks function.
Return Status
STATUS_NO_ERROR
Description
StreamTypeToString
2.11.4.4.1 StreamTypeFromIndex
Namespace Hierarchy
[C++]
119
PXCCapture::StreamTypeFromIndex
[C#]
PXCMCapture.StreamTypeFromIndex
[Java]
PXCMCapture.StreamTypeFromIndex
Syntax
[C++]
StreamType StreamTypeFromIndex(pxcI32 index);
[C#]
StreamType StreamTypeFromIndex(Int32 index);
[Java]
StreamType StreamTypeFromIndex(int index);
Parameters
index
Description
The StreamTypeFromIndex function returns the stream type of a specific stream
specified by the stream index.
Return Status
The stream type; see the StreamType enumerator.
2.11.4.4.2 StreamTypeToIndex
Namespace Hierarchy
[C++]
PXCCapture::StreamTypeToIndex
[C#]
PXCMCapture.StreamTypeToIndex
[Java]
PXCMCapture.StreamTypeToIndex
Syntax
120
[C++]
pxcI32 StreamTypeToIndex(StreamType type);
[C#]
Int32 StreamTypeToIndex(StreamType type);
[Java]
int StreamTypeToIndex(StreamType type);
Parameters
type
Description
The StreamTypeToIndex function returns the stream index of the specified stream
type.
Return Status
The zero-based stream index.
2.11.4.4.3 StreamTypeToString
Namespace Hierarchy
[C++]
PXCCapture::StreamTypeToString
[C#]
PXCMCapture.StreamTypeToString
[Java]
PXCMCapture.StreamTypeToString
Syntax
[C++]
const pxcCHAR *StreamTypeToString(StreamType stream);
[C#]
String StreamTypeToString(StreamType stream);
[Java]
string StreamTypeToString(StreamType stream);
121
Parameters
stream
Description
The StreamTypeToString function returns the string representation of the stream
type.
Return Status
The string representation.
Remarks
[C#]
The Java application can also use the ToString type extension.
Description
122
The CaptureManager interface is a helper interface (on top of the Capture interface)
for creating complex pipelines. The general concept is that there are a set of
processing modules (each with a unique identifier.) The CaptureManager interface
provides a set of functions to help consolidate the input needs of these processing
modules and locate the right I/O device that can provide data to satisfy all input
needs.
You can use the QueryCaptureManager function (or the captureManager property)
to retrieve an instance of the CaptureManager interface.
Reference
[C++]
pxccapturemanager.h
[C#/.NET4]
libpxcclr.cs.dll
[C#/Unity]
libpxcclr.unity.dll
[Java]
libpxcclr.java.jar
[Processing]
libpxcclr_processing
[JavaScript]
realsense.js
[C#/UWP]
Intel.RealSense
Runtime
[C++][C#][Java][JavaScript]
[C++]
// sm is a PXCSenseManager instance
PXCCaptureManager *cm=sm->QueryCaptureManager();
...
[C#]
123
// sm is a PXCMSenseManager instance
PXCMCaptureManager cm=sm.captureManager;
...
[Java]
// sm is a PXCMSenseManager instance
PXCMCaptureManager cm=sm.QueryCaptureManager();
...
[JavaScript]
// sm is a SenseManager instance
var cm=sm.captureManager;
...
[C#/UWP]
using Intel.RealSense;
// sm is a SenseManager instance
CaptureManager cm=sm.captureManager;
...
See Also
Constants
Callbacks and Delegates
Member Functions
Properties
124
2.11.5.1 Constants
Description
CUID
Description
Handler
2.11.5.2.1 Handler
Namespace Hierarchy
[C++]
PXCCaptureManager::Handler
[C#]
PXCMCaptureManager.Handler
[Java]
PXCMCaptureManager.Handler
Description
The Handler interface is a set of callback functions/delegates for the LocateStreams
function as illustrated in Figure 13. The application must implement the interface.
125
Examples
Example 54 shows how to create a handler.
Example 54: Create a Handler
[C++]
class MyHandler: public PXCCaptureManager::Handler {
public:
virtual pxcStatus PXCAPI OnCreateDevice(PXCSession::ImplDesc *mdesc,
PXCCapture::Device *device) {
return PXC_STATUS_NO_ERROR;
}
};
// cm is a PXCCaptureManager instance.
MyHandler handler;
cm->LocateStreams(&handler);
[C#]
static pxcmStatus OnCreateDevice(PXCMSession.ImplDesc mdesc,
PXCMCapture.Device device) {
return pxcmStatus.PXCM_STATUS_NO_ERROR;
}
// cm is a PXCMCaptureManager instance
PXCMCaptureManager.Handler handler=new PXCMCaptureManager.Handler();
handler.onCreateDevice=OnCreateDevice;
cm.LocateStreams(handler);
126
[Java]
class MyHandler implements PXCMCaptureManager.Handler {
public:
public pxcmStatus OnCreateDevice(PXCMSession.ImplDesc mdesc,
PXCMCapture.Device device) {
return pxcmStatus.PXCM_STATUS_NO_ERROR;
}
};
// cm is a PXCMCaptureManager instance.
MyHandler handler=new MyHandler();
cm.LocateStreams(handler);
See Also
Member Functions
127
Description
OnCreateDevice
OnSetupStreams
OnNextDevice
Namespace Hierarchy
[C++]
PXCCaptureManager::Handler::OnCreateDevice
[C#]
PXCMCaptureManager.Handler.onCreateDevice
[Java]
PXCMCaptureManager.Handler.OnCreateDevice
Syntax
[C++]
pxcStatus OnCreateDevice(PXCSession::ImplDesc* mdesc, PXCCapture::Device
*device);
[C#]
delegate pxcmStatus OnCreateDeviceDelegate(PXCSession::ImplDesc mdesc,
PXCMCapture.Device device);
[Java]
pxcmStatus OnCreateDevice(PXCSession::ImplDesc mdesc, PXCMCapture.Device
device);
Parameters
128
mdesc
device
Description
The OnCreateDevice function is invoked after creating a device. The application can
use this function to query the device information, accept or reject the device.
The application should not perform any lengthy operation in the callback function.
Return Status
STATUS_NO_ERROR
Remarks
The device instance is an object that CaptureManager internally manages. Do not
release the device instance.
Namespace Hierarchy
[C++]
PXCCaptureManager::Handler::OnSetupStreams
[C#]
PXCMCaptureManager.Handler.onSetupStreams
[Java]
PXCMCaptureManager.Handler.OnSetupStreams
Syntax
[C++]
pxcStatus OnSetupVideoStream(PXCCapture::Device *device, StreamType
types);
[C#]
delegate pxcmStatus OnSetupStreams(PXCMCapture.Device device, StreamType
types);
[Java]
pxcmStatus OnSetupStreams(PXCMCapture.Device device, StreamType types);
129
Parameters
device
types
Description
The OnSetupStreams function is invoked after all streams are fully configured. The
application can use this function to query the stream configurations, accept or reject
the streams.
The application should not perform any lengthy operation in the callback function.
Return Status
STATUS_NO_ERROR
Remarks
The device instance is an object that CaptureManager internally manages. Do not
release the device instance.
Namespace Hierarchy
[C++]
PXCCaptureManager::Handler::OnNextDevice
[C#]
PXCMCaptureManager.Handler.onNextDevice
[Java]
PXCMCaptureManager.Handler.OnNextDevice
Syntax
[C++]
pxcStatus OnNextDevice(PXCCapture::Device *device);
[C#]
delegate pxcmStatus OnNextDeviceDelegate(PXCMCapture.Device device);
130
[Java]
pxcmStatus OnNextDevice(PXCMCapture.Device device);
Parameters
device
Description
The OnNextDevice function is invoked after CaptureManager has checked the
current device, and the current device does not qualify. If the function returns any
failure, CaptureManager repeats checking the current device again. Otherwise,
CaptureManager continues onto checking the next device.
This function is used to check multiple configurations on the same device. The
application should return PXC_STATUS_NO_ERROR after checking all configurations on
the current device.
The application should not perform any lengthy operation in the callback function.
Return Status
STATUS_NO_ERROR
Remarks
The device instance is an object that CaptureManager internally manages. Do not
release the device instance.
2.11.5.3 Member Functions
131
Member Functions
Description
FilterByDeviceInfo (+UWP)
FilterByStreamProfiles
LocateStreams
matches them.
CloseStreams
QueryCapture
QueryDevice
QueryImageSize
ReadModuleStreamsAsync
SetFileName
SetMask
SetPause
SetRealtime
SetFrameByIndex
QueryFrameByIndex
SetFrameByTimeStamp
QueryFrameByTimeStamp
QueryNumberOfFrames
2.11.5.3.1 CloseStreams
Namespace Hierarchy
[C++]
PXCCaptureManager::CloseStreams
[C#]
PXCMCaptureManager.CloseStreams
[Java]
PXCMCaptureManager.CloseStreams
Syntax
[C++]
void CloseStreams(void);
[C#]
void CloseStreams();
[Java]
void CloseStreams();
132
Parameters
None
Description
The CloseStreams function closes all open streams and any file associated for
recording or playback.
Return Status
None
Namespace Hierarchy
[C++]
PXCCaptureManager::FilterByDeviceInfo
[C#]
PXCMCaptureManager.FilterByDeviceInfo
[Java]
PXCMCaptureManager.FilterByDeviceInfo
[C#/UWP]
Intel.RealSense.CaptureManager.FilterByDeviceInfo
Syntax
[C++]
void FilterByDeviceInfo(DeviceInfo *dinfo);
void FilterByDeviceInfo(pxcCHAR *name, pxcCHAR *did, pxcI32 didx);
[C#]
void FilterByDeviceInfo(DeviceInfo dinfo);
void FilterByDeviceInfo(String name, String did, Int32 didx);
[Java]
void FilterByDeviceInfo(DeviceInfo dinfo);
void FilterByDeviceInfo(string name, string did, int didx);
[C#/UWP]
void FilterByDeviceInfo(DeviceInfo dinfo);
133
Parameters
dinfo
name
did
didx
Description
The FilterByDeviceInfo function saves a list of device filters to be used later in the
LocateStreams function for searching the right I/O device.
If dinfo is NULL/null, the function cleans any previously saved device filters.
Return Status
None
2.11.5.3.3 FilterByStreamProfiles
Namespace Hierarchy
[C++]
PXCCaptureManager::FilterByStreamProfiles
[C#]
PXCMCaptureManager.FilterByStreamProfiles
[Java]
PXCMCaptureManager.FilterByStreamProfiles
Syntax
[C++]
void FilterByStreamProfiles(StreamProfileSet *profiles);
void FilterByStreamProfiles(StreamType stream, pxcI32 width, pxcI32
height, pxcF32 fps);
134
[C#]
void FilterByStreamProfiles(StreamProfileSet profiles);
void FilterByStreamProfiles(StreamType stream, Int32 width, Int32 height,
Single fps);
[Java]
void FilterByStreamProfiles(StreamProfileSet profiles);
void FilterByStreamProfiles(StreamType stream, int width, int height,
float fps);
Parameters
profiles
stream
width
height
fps
Description
The FilterByStreamProfiles function saves a list of stream configuration filters to
be used later in the LocateStreams function for searching the right I/O device.
If profiles is NULL/null, the function cleans any previously saved stream
configuration filters.
Return Status
None
2.11.5.3.4 LocateStreams
Namespace Hierarchy
[C++]
PXCCaptureManager::LocateStreams
[C#]
PXCMCaptureManager.LocateStreams
135
[Java]
PXCMCaptureManager.LocateStreams
Syntax
[C++]
pxcStatus
pxcStatus
LocateStreams(Handler *handler);
LocateStreams(void);
[C#]
pxcmStatus LocateStreams(Handler handler);
pxcmStatus LocateStreams();
[Java]
pxcmStatus LocateStreams(Handler handler);
pxcmStatus LocateStreams();
Parameters
handler
Description
The LocateStreams function consolidates input requests from prior RequestStreams
functions, and locates an input device that can provide the data. The function
searches the input devices by the order of I/O modules listed in the SDK session
(higher merit modules take precedence.) The input device is fully configured for
streaming after the function returns.
The qualifying input device must be able to stream video streams that match the
requested color format, resolutions and any mandated device properties.
After a successful return, the function overwrites the input requests with:
1. The values of requested device properties.
2. The actual resolution of requested streams.
3. The actual device information.
Return Status
136
STATUS_NO_ERROR
STATUS_ITEM_UNAVAILABLE
2.11.5.3.5 QueryCapture
Namespace Hierarchy
[C++]
PXCCaptureManager::QueryCapture
[C#]
PXCMCaptureManager.QueryCapture
[Java]
PXCMCaptureManager.QueryCapture
Syntax
[C++]
PXCCapture *QueryCapture(void)
[C#]
PXCMCapture QueryCapture()
[Java]
PXCMCapture QueryCapture()
Parameters
None
Description
The QueryCapture function returns the Capture instance.
Return Status
The Capture instance, or NULL/null if not available.
Remarks
[C++]
137
2.11.5.3.6 QueryDevice
Namespace Hierarchy
[C++]
PXCCaptureManager::QueryDevice
[C#]
PXCMCaptureManager.QueryDevice
[Java]
PXCMCaptureManager.QueryDevice
Syntax
[C++]
Device *QueryDevice(void);
[C#]
Device QueryDevice();
[Java]
Device QueryDevice();
Parameters
None
Description
The QueryDevice function returns the Capture::Device instance found by the
LocateStreams function.
Return Status
The Device instance, or NULL/null if not available.
Remarks
138
[C++]
2.11.5.3.7 QueryFrameByIndex
Namespace Hierarchy
[C++]
PXCCaptureManager::QueryFrameByIndex
[C#]
PXCMCaptureManager.QueryFrameByIndex
[Java]
PXCMCaptureManager.QueryFrameByIndex
Syntax
[C++]
pxcI32 QueryFrameByIndex(void);
[C#]
Int32 QueryFrameByIndex();
[Java]
int QueryFrameByIndex();
Parameters
None
Description
139
The QueryFrameByIndex function returns the frame index of the frame closest to the
current playback position. The frame index is zero-based.
Return Status
The frame index, or -1 if the playback position is at the end of the file.
2.11.5.3.8 QueryNumberOfFrames
Namespace Hierarchy
[C++]
PXCCaptureManager::QueryNumberOfFrames
[C#]
PXCMCaptureManager.QueryNumberOfFrames
[Java]
PXCMCaptureManager.QueryNumberOfFrames
Syntax
[C++]
pxcI32 QueryNumberOfFrames(void);
[C#]
Int32 QueryNumberOfFrames();
[Java]
int QueryNumberOfFrames();
Parameters
None
Description
The QueryNumberOfFrames function returns the number of frames in a playback file.
Return Status
The frame number, or 0 if it is not in a playback mode.
140
2.11.5.3.9 QueryFrameByTimeStamp
Namespace Hierarchy
[C++]
PXCCaptureManager::QueryFrameByTimeStamp
[C#]
PXCMCaptureManager.QueryFrameByTimeStamp
[Java]
PXCMCaptureManager.QueryFrameByTimeStamp
Syntax
[C++]
pxcI64 QueryFrameByTimeStamp(void);
[C#]
Int64 QueryFrameByTimeStamp();
[Java]
long QueryFrameByTimeStamp();
Parameters
None
Description
The QueryFrameByTimeStamp function returns the time stamp of the closest frame to
the current playback position.
Return Status
The closest frame time stamp, or 0 if the playback position is at the end of the file.
2.11.5.3.10 QueryImageSize (+JavaScript)
Namespace Hierarchy
[C++]
PXCCaptureManager::QueryImageSize
[C#]
PXCMCaptureManager.QueryImageSize
[Java]
141
PXCMCaptureManager.QueryImageSize
[JavaScript]
intel.realsense.CaptureManager.QueryImageSize
Syntax
[C++]
PXCSizeI32 QueryImageSize(StreamType stream);
[C#]
PXCMSizeI32 QueryImageSize(StreamType stream);
[Java]
PXCMSizeI32 QueryImageSize(StreamType stream);
[JavaScript]
function queryImageSize(stream);
Parameters
stream
Description
The QueryImageSize function returns the resolution of the specified stream. The
resolution information is available only after the pipeline is initialized.
Return Status
[C++]
142
size
2.11.5.3.11 ReadModuleStreamsAsync
Namespace Hierarchy
[C++]
PXCCaptureManager::ReadModuleStreamsAsync
[C#]
PXCMCaptureManager.ReadModuleStreamsAsync
[Java]
PXCMCaptureManager.ReadModuleStreamsAsync
Syntax
[C++]
pxcStatus ReadModuleStreamsAsync(pxcUID mid, Sample *sample, PXCSyncPoint
**sp);
[C#]
pxcmStatus ReadModuleStreamsAsync(Int32 mid, Sample sample, out
PXCMSyncPoint sp);
[Java]
pxcmStatus ReadModuleStreamsAsync(Int32 mid, Sample sample, out
PXCMSyncPoint sp);
Parameters
mid
sample
sp
Description
143
The ReadModuleStreamsAsync function reads the set of image samples from the I/O
device for the specified processing module.
This is an asynchronous function. The image samples are invalid until the SP is
signaled.
If the processing module requests more than a single stream, the function
synchronizes the stream reads so that they are time aligned.
The function maps video streams at the I/O device to the specified processing
module, before reading samples. For example, if the I/O device serves a color stream
and a depth stream, in that order, and the processing module needs a depth stream
only, the function reads the depth stream only from the I/O device and serves to the
processing module.
When there are multiple processing modules, the function buffers the reads to each
stream so that each processing module will get a chance to read the samples without
skipping any samples.
If mid=0, the function reads directly from the I/O device.
Return Status
STATUS_NO_ERROR
STATUS_ITEM_UNAVAILABLE
STATUS_DEVICE_LOST
2.11.5.3.12 RequestStreams
Namespace Hierarchy
[C++]
PXCCaptureManager::RequestStreams
[C#]
PXCCaptureManager::RequestStreams
[Java]
PXCMCaptureManager.RequestStreams
Syntax
[C++]
pxcStatus RequestStreams(pxcUID mid, DataDesc *input);
[C#]
144
Parameters
input
mid
Description
The RequestStreams function saves the input requests from an algorithm module.
The function returns failed if the current request conflicts with any previous input
requests.
The module identifier mid can be any non-zero values that uniquely identifies each
processing module.
If input=zero, the function clears any previously saved input requests.
Return Status
STATUS_NO_ERROR
STATUS_ITEM_UNAVAILABLE
2.11.5.3.13 SetFileName
Namespace Hierarchy
[C++]
PXCCaptureManager::SetFileName
[C#]
PXCMCaptureManager.SetFileName
[Java]
PXCMCaptureManager.SetFileName
Syntax
145
[C++]
pxcStatus SetFileName(pxcCHAR *file, pxcBool record);
[C#]
pxcmStatus SetFileName(String file, Boolean record);
[Java]
pxcmStatus SetFileName(string file, boolean record);
Parameters
file
record
Description
The SetFileName function sets mode for file playback or recording.
For file playback, the SDK immediately creates the Capture instance (using the
QueryCapture function), so that the application can query the capabilities of the
recorded content.
Return Status
STATUS_NO_ERROR
2.11.5.3.14 SetFrameByIndex
Namespace Hierarchy
[C++]
PXCCaptureManager::SetFrameByIndex
[C#]
PXCMCaptureManager.SetFrameByIndex
[Java]
PXCMCaptureManager.SetFrameByIndex
Syntax
[C++]
pxcStatus SetFrameByIndex(pxcI32 index);
146
[C#]
pxcmStatus SetFrameByIndex(Int32 index);
[Java]
pxcmStatus SetFrameByIndex(int index);
Parameters
index
Description
The SetFrameByIndex function sets the playback position to be the beginning of the
specified frame.
Return Status
STATUS_NO_ERROR
2.11.5.3.15 SetFrameByTimeStamp
Namespace Hierarchy
[C++]
PXCCaptureManager::SetFrameByTimeStamp
[C#]
PXCMCaptureManager.SetFrameByTimeStamp
[Java]
PXCMCaptureManager.SetFrameByTimeStamp
Syntax
[C++]
pxcStatus SetFrameByTimeStamp(pxcI64 ts);
[C#]
pxcmStatus SetFrameByTimeStamp(Int64 ts);
[Java]
pxcmStatus SetFrameByTimeStamp(long ts);
Parameters
147
ts
Description
The SetFrameByTimeStamp function sets the file playback position to be closest to
the specified time stamp.
2.11.5.3.16 SetMask
Namespace Hierarchy
[C++]
PXCCaptureManager::SetMask
[C#]
PXCMCaptureManager.SetMask
[Java]
PXCMCaptureManager.SetMask
Syntax
[C++]
pxcStatus SetMask(StreamType streams);
[C#]
pxcmStatus SetMask(StreamType streams);
[Java]
pxcmStatus SetMask(StreamType streams);
Parameters
streams
Description
The SetMask function selects certain video streams during recording.
The function does not affect playback.
Return Status
148
STATUS_NO_ERROR
2.11.5.3.17 SetPause
Namespace Hierarchy
[C++]
PXCCaptureManager::SetPause
[C#]
PXCMCaptureManager.SetPause
[Java]
PXCMCaptureManager.SetPause
Syntax
[C++]
pxcStatus SetPause(pxcBool pause);
[C#]
pxcmStatus SetPause(Boolean pause);
[Java]
pxcmStatus SetPause(boolean pause);
Parameters
pause
Description
The SetPause function pauses or resumes playback or recording.
If playback is paused, the application will get the same frame at the current playback
position.
If recording is paused, no frame will be written to the disk.
Return Status
STATUS_NO_ERROR
149
2.11.5.3.18 SetRealtime
Namespace Hierarchy
[C++]
PXCCaptureManager::SetRealtime
[C#]
PXCMCaptureManager.SetRealtime
[Java]
PXCMCaptureManager.SetRealtime
Syntax
[C++]
pxcStatus SetRealtime(pxcBool realtime);
[C#]
pxcmStatus SetRealtime(Boolean realtime);
[Java]
pxcmStatus SetRealtime(Boolean realtime);
Parameters
realtime
Description
The SetRealtime function sets the real time playback mode.
In the real time playback mode, the application retrieves the frames in the same time
span as they are recorded to the disk. If the real time mode is not set, the application
retrieves the frames as fast as possible from the disk.
The default mode is realtime=true. This means that the capture module will deliver
the samples at an interval that is related to their presentation time.
Although the real time mode is good for visually checking if recording is done right,
playing back a file in the real time mode is not repeatable, depending largely on the
current system workload. If repeatability is needed, use realtime=false.
Return Status
150
STATUS_NO_ERROR
2.11.5.4 Properties
Description
capture (C#,JS)
device (C#,JS,UWP)
Namespace Hierarchy
[C#]
PXCMCaptureManager.capture
[JavaScript]
intel.realsense.CaptureManager.capture
Syntax
[C#]
PXCMCapture capture {
get;
}
[JavaScript]
Data Type
{
capture
Capture
Description
The capture property returns the Capture instance.
Remarks
[C#]
151
Namespace Hierarchy
[C#]
PXCMCaptureManager.device
[JavaScript]
intel.realsense.CaptureManager.device
[C#/UWP]
Intel.RealSense.CaptureManager.device
Syntax
[C#]
Device device {
get;
}
[JavaScript]
Data Type
{
device
Device
}
[C#/UWP]
Device Device {
get;
}
Description
The device property returns the Device instance.
Remarks
[C#]
PXCMCapture.Device
[Java]
PXCMCapture.Device
[JavaScript]
intel.realsense.Device
[C#/UWP]
Intel.RealSense.Device
Description
The Device interface provides member functions to enumerate capture video device
stream information and create an instance of a video stream.
You can use the QueryDevice function (or the device property) retrieve an instance
of the Device interface.
See Also
Constants
Member Functions: Device Neutral
Member Functions: F200 Functions
Member Functions: SR300 Functions
Member Functions: R200 Functions
Properties
Static Functions
2.11.6.1 Constants
Description
CUID
PROPERTY_VALUE_INVALID
The Device interface exposes the following device neutral member functions:
General Functions
153
Member Functions
Description
QueryDeviceInfo
QueryStreamProfileSetNum
QueryStreamProfileSet
IsStreamProfileSetValid (+UWP)
SetStreamProfileSet
ReadStreamsAsync
ReadStreams
CreateProjection
Description
ResetProperties (+JS)
RestorePropertiesUponFocus (+JS)
Description
154
QueryColorBrightnessInfo
QueryColorBrightness
SetColorBrightness
QueryColorContrastInfo
QueryColorContrast
SetColorContrast
QueryColorExposureInfo
QueryColorExposure
SetColorExposure
QueryColorAutoExposure
SetColorAutoExposure
QueryColorHueInfo
QueryColorHue
SetColorHue
QueryColorGainInfo
QueryColorGain
SetColorGain
QueryColorGammaInfo
QueryColorGamma
SetColorGain
155
QueryColorSaturationInfo
QueryColorSaturation
SetColorSaturation
QueryColorSharpnessInfo
QueryColorSharpness
SetColorSharpness
QueryColorWhiteBalanceInfo
QueryColorWhiteBalance
SetColorWhiteBalance
QueryColorAutoWhiteBalance
SetColorAutoWhiteBalance
QueryColorFieldOfView
QueryDepthFieldOfView
QueryColorFocalLength
QueryColorFocalLengthMM
QueryDepthFocalLength
QueryDepthFocalLengthMM
QueryColorPrincipalPoint
QueryDepthPrincipalPoint
QueryDepthSensorRange
QueryDepthConfidenceThresholdInfo
QueryDepthConfidenceThreshold
SetDepthConfidenceThreshold
QueryDeviceAllowProfileChange
SetDeviceAllowProfileChange
QueryMirrorMode
SetMirrorMode
QueryDepthUnit
SetDepthUnit
QueryDepthLowConfidenceValue
2.11.6.2.1 CreateProjection
Namespace Hierarchy
[C++]
PXCCapture::Device::CreateProjection
[C#]
PXCMCapture.Device.CreateProjection
[Java]
PXCMCapture.Device.CreateProjection
Syntax
[C++]
PXCProjection* CreateProjection(void);
[C#]
PXCMProjection CreateProjection();
[Java]
PXCMProjection CreateProjection();
Parameters
None
Description
The CreateProjection function returns the Projection instance, which maps
coordinates between color and depth images.
Projection requires an active streaming configuration. Use this function after the
Init function of the SenseManager interface (or the SetStreamProfileSet function
if you use the Capture interface directly.)
Return Status
156
157
Namespace Hierarchy
[C++]
PXCCapture::Device::IsStreamProfileSetValid
[C#]
PXCMCapture.Device.IsStreamProfileSetValid
[Java]
PXCMCapture.Device.IsStreamProfileSetValid
[C#/UWP]
Intel.RealSense.Device.IsStreamProfileSetValid
Syntax
[C++]
pxcBool IsStreamProfileSetValid(StreamProfileSet* profiles);
[C#]
Boolean IsStreamProfileSetValid(StreamProfileSet profiles);
[Java]
boolean IsStreamProfileSetValid(StreamProfileSet profiles);
[C#/UWP]
Boolean IsStreamProfileSetValid(IReadOnlyDictionary<StreamType,
PerceptionVideoProfile> profiles);
Parameters
profiles
Description
The IsStreamProfileSetValid function validates the stream configuration
parameters and returns true if the device accepts the configuration parameters.
Return Status
158
true
false
2.11.6.2.3 QueryColorAutoExposure
Namespace Hierarchy
[C++]
PXCCapture::Device::QueryColorAutoExposure
[C#]
PXCMCapture.Device.QueryColorAutoExposure
[Java]
PXCMCapture.Device.QueryColorAutoExposure
Syntax
[C++]
pxcBool QueryColorAutoExposure(void);
[C#]
Boolean QueryColorAutoExposure();
[Java]
boolean QueryColorAutoExposure();
[JavaScript]
N/A
[C#/UWP]
N/A
Parameters
None
Description
The QueryColorAutoExposure function returns the color exposure auto mode.
Return Status
159
160
2.11.6.2.4 QueryColorAutoPowerLineFrequency
Namespace Hierarchy
[C++]
PXCCapture::Device::QueryColorAutoPowerLineFrequency
[C#]
PXCMCapture.Device.QueryColorAutoPowerLineFrequency
[Java]
PXCMCapture.Device.QueryColorAutoPowerLineFrequency
Syntax
[C++]
pxcBool QueryColorAutoPowerLineFrequency(void);
[C#]
Boolean QueryColorAutoPowerLineFrequency();
[Java]
boolean QueryColorAutoPowerLineFrequency();
Parameters
None
Description
The QueryColorAutoPowerLineFrequency function returns the power line
frequency auto mode.
Return Status
The power line frequency auto mode.
161
2.11.6.2.5 QueryColorAutoWhiteBalance
Namespace Hierarchy
[C++]
PXCCapture::Device::QueryColorAutoWhiteBalance
[C#]
PXCMCapture.Device.QueryColorAutoWhiteBalance
[Java]
PXCMCapture.Device.QueryColorAutoWhiteBalance
Syntax
[C++]
pxcBool QueryColorAutoWhiteBalance(void);
[C#]
Boolean QueryColorAutoWhiteBalance();
[Java]
boolean QueryColorAutoWhiteBalance();
Parameters
None
Description
The QueryColorAutoWhiteBalance function returns the color white balance auto
mode.
Return Status
The color white balance auto mode.
162
2.11.6.2.6 QueryColorBackLightCompensation
Namespace Hierarchy
[C++]
PXCCapture::Device::QueryColorBackLightCompensation
[C#]
PXCMCapture.Device.QueryColorBackLightCompensation
[Java]
PXCMCapture.Device.QueryColorBackLightCompensation
Syntax
[C++]
pxcI32 QueryColorBackLightCompensation(void);
[C#]
pxcI32 QueryColorBackLightCompensation();
[Java]
pxcI32 QueryColorBackLightCompensation();
Parameters
None
Description
The QueryColorBackLightCompensation function returns the status of back ground
light compensation.
Return Status
Non-zero if back light compensation is enabled, zero if it is disabled, or
PROPERTY_VALUE_INVALID if there is any error in retrieving the value.
163
2.11.6.2.7 QueryColorBackLightCompensationInfo
Namespace Hierarchy
[C++]
PXCCapture::Device::QueryColorBackLightCompensationInfo
[C#]
PXCMCapture.Device.QueryColorBackLightCompensationInfo
[Java]
PXCMCapture.Device.QueryColorBackLightCompensationInfo
Syntax
[C++]
PropertyInfo QueryColorBackLightCompensationInfo(void);
[C#]
PropertyInfo QueryColorBackLightCompensationInfo();
[Java]
PropertyInfo QueryColorBackLightCompensationInfo();
Parameters
None
Description
The QueryColorBackLightCompensationInfo function returns the property value
range and other useful information. See the PropertyInfo structure for details.
Return Status
The PropertyInfo structure instance. If any error, the structure is filled with
PROPERTY_VALUE_INVALID.
164
2.11.6.2.8 QueryColorBrightness
Namespace Hierarchy
[C++]
PXCCapture::Device::QueryColorBrightness
[C#]
PXCMCapture.Device.QueryColorBrightness
[Java]
PXCMCapture.Device.QueryColorBrightness
Syntax
[C++]
pxcI32 QueryColorBrightness(void);
[C#]
Int32 QueryColorBrightness();
[Java]
int QueryColorBrightness();
Parameters
None
Description
The QueryColorBrightness function returns the color brightness value, from 10,000 (pure black) to 10,000 (pure white).
Return Status
The color brightness value, or PROPERTY_VALUE_INVALID if there is any error in
retrieving the value.
165
2.11.6.2.9 QueryColorBrightnessInfo
Namespace Hierarchy
[C++]
PXCCapture::Device::QueryColorBrightnessInfo
[C#]
PXCMCapture.Device.QueryColorBrightnessInfo
[Java]
PXCMCapture.Device.QueryColorBrightnessInfo
Syntax
[C++]
PropertyInfo QueryColorBrightnessInfo(void);
[C#]
PropertyInfo QueryColorBrightnessInfo();
[Java]
PropertyInfo QueryColorBrightnessInfo();
Parameters
None
Description
The QueryColorBrightnessInfo function returns the property value range and
other useful information. See the PropertyInfo structure for details.
Return Status
The PropertyInfo structure instance. If any error, the structure is filled with
PROPERTY_VALUE_INVALID.
166
2.11.6.2.10 QueryColorContrast
Namespace Hierarchy
[C++]
PXCCapture::Device::QueryColorContrast
[C#]
PXCMCapture.Device.QueryColorContrast
[Java]
PXCMCapture.Device.QueryColorContrast
Syntax
[C++]
pxcI32 QueryColorContrast(void);
[C#]
Int32 QueryColorContrast();
[Java]
int QueryColorContrast();
Parameters
None
Description
The QueryColorContrast function returns the color contrast value, from 0 (lowest
contrast) to 10,000 (highest contrast).
Return Status
The color contrast value, or PROPERTY_VALUE_INVALID if there is any error in
retrieving the value.
167
2.11.6.2.11 QueryColorContrastInfo
Namespace Hierarchy
[C++]
PXCCapture::Device::QueryColorContrastInfo
[C#]
PXCMCapture.Device.QueryColorContrastInfo
[Java]
PXCMCapture.Device.QueryColorContrastInfo
Syntax
[C++]
PropertyInfo QueryColorContrastInfo(void);
[C#]
PropertyInfo QueryColorContrastInfo();
[Java]
PropertyInfo QueryColorContrastInfo();
Parameters
None
Description
The QueryColorContrastInfo function returns the property value range and other
useful information. See the PropertyInfo structure for details.
Return Status
The PropertyInfo structure instance. If any error, the structure is filled with
PROPERTY_VALUE_INVALID.
168
2.11.6.2.12 QueryColorExposure
Namespace Hierarchy
[C++]
PXCCapture::Device::QueryColorExposure
[C#]
PXCMCapture.Device.QueryColorExposure
[Java]
PXCMCapture.Device.QueryColorExposure
Syntax
[C++]
pxcI32 QueryColorExposure(void);
[C#]
Int32 QueryColorExposure();
[Java]
int QueryColorExposure();
Parameters
None
Description
The QueryColorExposure function returns the color exposure value, in log base 2
seconds.
Return Status
The color exposure value, or PROPERTY_VALUE_INVALID if there is any error in
retrieving the value.
169
2.11.6.2.13 QueryColorExposureInfo
Namespace Hierarchy
[C++]
PXCCapture::Device::QueryColorExposureInfo
[C#]
PXCMCapture.Device.QueryColorExposureInfo
[Java]
PXCMCapture.Device.QueryColorExposureInfo
Syntax
[C++]
PropertyInfo QueryColorExposureInfo(void);
[C#]
PropertyInfo QueryColorExposureInfo();
[Java]
PropertyInfo QueryColorExposureInfo();
Parameters
None
Description
The QueryColorExposureInfo function returns the property value range and other
useful information. See the PropertyInfo structure for details.
Return Status
The PropertyInfo structure instance. If any error, the structure is filled with
PROPERTY_VALUE_INVALID.
170
2.11.6.2.14 QueryColorHue
Namespace Hierarchy
[C++]
PXCCapture::Device::QueryColorHue
[C#]
PXCMCapture.Device.QueryColorHue
[Java]
PXCMCapture.Device.QueryColorHue
Syntax
[C++]
pxcI32 QueryColorHue(void);
[C#]
Int32 QueryColorHue();
[Java]
int QueryColorHue();
Parameters
None
Description
The QueryColorHue function returns the color hue value, from -18,000 to 18,000
(representing -180 to 180 degrees.)
Return Status
The color hue value, or PROPERTY_VALUE_INVALID if there is any error in retrieving
the value.
171
2.11.6.2.15 QueryColorHueInfo
Namespace Hierarchy
[C++]
PXCCapture::Device::QueryColorHueInfo
[C#]
PXCMCapture.Device.QueryColorHueInfo
[Java]
PXCMCapture.Device.QueryColorHueInfo
Syntax
[C++]
PropertyInfo QueryColorHueInfo(void);
[C#]
PropertyInfo QueryColorHueInfo();
[Java]
PropertyInfo QueryColorHueInfo();
Parameters
None
Description
The QueryColorHueInfo function returns the property value range and other useful
information. See the PropertyInfo structure for details.
Return Status
The PropertyInfo structure instance. If any error, the structure is filled with
PROPERTY_VALUE_INVALID.
172
2.11.6.2.16 QueryColorFieldOfView
Namespace Hierarchy
[C++]
PXCCapture::Device::QueryColorFieldOfView
[C#]
PXCMCapture.Device.QueryColorFieldOfView
[Java]
PXCMCapture.Device.QueryColorFieldOfView
Syntax
[C++]
PXCPointF32 QueryColorFieldOfView(void);
[C#]
PXCMPointF32 QueryColorFieldOfView();
[Java]
PXCMPointF32 QueryColorFieldOfView();
Parameters
None
Description
The QueryColorFieldOfView function returns the color sensor field of view, in
degrees, horizontally and vertically.
The property value is the model fixed value, and not the device instance calibrated
value.
Return Status
The color sensor field of view in degrees. If any error, the structure is filled with
PROPERTY_VALUE_INVALID.
173
2.11.6.2.17 QueryColorFocalLength
Namespace Hierarchy
[C++]
PXCCapture::Device::QueryColorFocalLength
[C#]
PXCMCapture.Device.QueryColorFocalLength
[Java]
PXCMCapture.Device.QueryColorFocalLength
Syntax
[C++]
PXCPointF32 QueryColorFocalLength(void);
[C#]
PXCMPointF32 QueryColorFocalLength();
[Java]
PXCMPointF32 QueryColorFocalLength();
Parameters
None
Description
The QueryColorFocalLength function returns the color sensor focal length, in pixels,
along the horizontal and virtual axises. The parameters vary with the color stream
resolution setting.
The property value is the model fixed value, and not the device instance calibrated
value.
Return Status
The color sensor focal length, in pixels. If any error, the structure is filled with
PROPERTY_VALUE_INVALID.
174
2.11.6.2.18 QueryColorFocalLengthMM
Namespace Hierarchy
[C++]
PXCCapture::Device::QueryColorFocalLengthMM
[C#]
PXCMCapture.Device.QueryColorFocalLengthMM
[Java]
PXCMCapture.Device.QueryColorFocalLengthMM
Syntax
[C++]
pxcF32 QueryColorFocalLengthMM(void);
[C#]
Single QueryColorFocalLengthMM();
[Java]
float QueryColorFocalLengthMM();
Parameters
None
Description
The QueryColorFocalLengthMM function returns the color sensor focal length, in
millimeters.
The property value is the model fixed value, and not the device instance calibrated
value.
Return Status
The color sensor focal length, in millimeters.
Remarks
This property is not supported by camera model R200.
175
2.11.6.2.19 QueryColorGain
Namespace Hierarchy
[C++]
PXCCapture::Device::QueryColorGain
[C#]
PXCMCapture.Device.QueryColorGain
[Java]
PXCMCapture.Device.QueryColorGain
Syntax
[C++]
pxcI32 QueryColorGain(void);
[C#]
Int32 QueryColorGain();
[Java]
int QueryColorGain();
Parameters
None
Description
The QueryColorGain function returns the color gain value, with negative values
darker, positive values brighter, and zero as normal.
Return Status
The color gain value, or PROPERTY_VALUE_INVALID if there is any error in retrieving
the value.
176
2.11.6.2.20 QueryColorGainInfo
Namespace Hierarchy
[C++]
PXCCapture::Device::QueryColorGainInfo
[C#]
PXCMCapture.Device.QueryColorGainInfo
[Java]
PXCMCapture.Device.QueryColorGainInfo
Syntax
[C++]
PropertyInfo QueryColorGainInfo(void);
[C#]
PropertyInfo QueryColorGainInfo();
[Java]
PropertyInfo QueryColorGainInfo();
Parameters
None
Description
The QueryColorGainInfo function returns the property value range and other useful
information. See the PropertyInfo structure for details.
Return Status
The PropertyInfo structure instance. If any error, the structure is filled with
PROPERTY_VALUE_INVALID.
177
2.11.6.2.21 QueryColorGamma
Namespace Hierarchy
[C++]
PXCCapture::Device::QueryColorGamma
[C#]
PXCMCapture.Device.QueryColorGamma
[Java]
PXCMCapture.Device.QueryColorGamma
Syntax
[C++]
pxcI32 QueryColorGamma(void);
[C#]
Int32 QueryColorGamma();
[Java]
int QueryColorGamma();
Parameters
None
Description
The QueryColorGamma function returns the color gamma value, from 1 to 500.
Return Status
The color gamma value, or PROPERTY_VALUE_INVALID if there is any error in
retrieving the value.
178
2.11.6.2.22 QueryColorGammaInfo
Namespace Hierarchy
[C++]
PXCCapture::Device::QueryColorGammaInfo
[C#]
PXCMCapture.Device.QueryColorGammaInfo
[Java]
PXCMCapture.Device.QueryColorGammaInfo
Syntax
[C++]
PropertyInfo QueryColorGammaInfo(void);
[C#]
PropertyInfo QueryColorGammaInfo();
[Java]
PropertyInfo QueryColorGammaInfo();
Parameters
None
Description
The QueryColorGammaInfo function returns the property value range and other
useful information. See the PropertyInfo structure for details.
Return Status
The PropertyInfo structure instance. If any error, the structure is filled with
PROPERTY_VALUE_INVALID.
179
2.11.6.2.23 QueryColorPowerLineFrequency
Namespace Hierarchy
[C++]
PXCCapture::Device::QueryColorPowerLineFrequency
[C#]
PXCMCapture.Device.QueryColorPowerLineFrequency
[Java]
PXCMCapture.Device.QueryColorPowerLineFrequency
Syntax
[C++]
PowerLineFrequency QueryColorPowerLineFrequency(void);
[C#]
PowerLineFrequency QueryColorPowerLineFrequency();
[Java]
PowerLineFrequency QueryColorPowerLineFrequency();
Parameters
None
Description
The QueryColorPowerLineFrequency function returns the power line frequency
value, in Hz.
Return Status
The power line frequency value, as defined in the PowerLineFrequency
enumerator.
180
2.11.6.2.24 QueryColorPowerLineFrequencyDefaultValue
Namespace Hierarchy
[C++]
PXCCapture::Device::QueryColorPowerLineFrequencyDefaultValue
[C#]
PXCMCapture.Device.QueryColorPowerLineFrequencyDefaultValue
[Java]
PXCMCapture.Device.QueryColorPowerLineFrequencyDefaultValue
Syntax
[C++]
PowerLineFrequency QueryColorPowerLineFrequencyDefaultValue(void);
[C#]
PowerLineFrequency QueryColorPowerLineFrequencyDefaultValue();
[Java]
PowerLineFrequency QueryColorPowerLineFrequencyDefaultValue();
Parameters
None
Description
The QueryColorPowerLineFrequencyDefaultValue function returns the default
value of the power line frequency setting.
Return Status
The power line frequency value, as defined in the PowerLineFrequency
enumerator.
181
2.11.6.2.25 QueryColorPrincipalPoint
Namespace Hierarchy
[C++]
PXCCapture::Device::QueryColorPrincipalPoint
[C#]
PXCMCapture.Device.QueryColorPrincipalPoint
[Java]
PXCMCapture.Device.QueryColorPrincipalPoint
Syntax
[C++]
PXCPointF32 QueryColorPrincipalPoint(void);
[C#]
PXCMPointF32 QueryColorPrincipalPoint();
[Java]
PXCMPointF32 QueryColorPrincipalPoint();
Parameters
None
Description
The QueryColorPrincipalPoint function returns the color sensor principal point, in
pixels, horizontally and vertically. The parameters vary with the color stream
resolution setting.
The property value is the model fixed value, and not the device instance calibrated
value.
Return Status
The color sensor principal point in pixels. If any error, the structure is filled with
PROPERTY_VALUE_INVALID.
182
2.11.6.2.26 QueryColorSaturation
Namespace Hierarchy
[C++]
PXCCapture::Device::QueryColorSaturation
[C#]
PXCMCapture.Device.QueryColorSaturation
[Java]
PXCMCapture.Device.QueryColorSaturation
Syntax
[C++]
pxcI32 QueryColorSaturation(void);
[C#]
Int32 QueryColorSaturation();
[Java]
int QueryColorSaturation();
Parameters
None
Description
The QueryColorSaturation function returns the color saturation value, from 0 to
10,000.
Return Status
The color saturation value, or PROPERTY_VALUE_INVALID if there is any error in
retrieving the value.
183
2.11.6.2.27 QueryColorSaturationInfo
Namespace Hierarchy
[C++]
PXCCapture::Device::QueryColorSaturationInfo
[C#]
PXCMCapture.Device.QueryColorSaturationInfo
[Java]
PXCMCapture.Device.QueryColorSaturationInfo
Syntax
[C++]
PropertyInfo QueryColorSaturationInfo(void);
[C#]
PropertyInfo QueryColorSaturationInfo();
[Java]
PropertyInfo QueryColorSaturationInfo();
Parameters
None
Description
The QueryColorSaturationInfo function returns the property value range and
other useful information. See the PropertyInfo structure for details.
Return Status
The PropertyInfo structure instance. If any error, the structure is filled with
PROPERTY_VALUE_INVALID.
184
2.11.6.2.28 QueryColorSharpness
Namespace Hierarchy
[C++]
PXCCapture::Device::QueryColorSharpness
[C#]
PXCMCapture.Device.QueryColorSharpness
[Java]
PXCMCapture.Device.QueryColorSharpness
Syntax
[C++]
pxcI32 QueryColorSharpness(void);
[C#]
Int32 QueryColorSharpness();
[Java]
int QueryColorSharpness();
Parameters
None
Description
The QueryColorSharpness function returns the color sharpness value, from 0
(lowest sharpness) to 100 (highest sharpness).
Return Status
The color sharpness value, or PROPERTY_VALUE_INVALID if there is any error in
retrieving the value.
185
2.11.6.2.29 QueryColorSharpnessInfo
Namespace Hierarchy
[C++]
PXCCapture::Device::QueryColorSharpnessInfo
[C#]
PXCMCapture.Device.QueryColorSharpnessInfo
[Java]
PXCMCapture.Device.QueryColorSharpnessInfo
Syntax
[C++]
PropertyInfo QueryColorSharpnessInfo(void);
[C#]
PropertyInfo QueryColorSharpnessInfo();
[Java]
PropertyInfo QueryColorSharpnessInfo();
Parameters
None
Description
The QueryColorSharpnessInfo function returns the property value range and other
useful information. See the PropertyInfo structure for details.
Return Status
The PropertyInfo structure instance. If any error, the structure is filled with
PROPERTY_VALUE_INVALID.
186
2.11.6.2.30 QueryColorWhiteBalance
Namespace Hierarchy
[C++]
PXCCapture::Device::QueryColorWhiteBalance
[C#]
PXCMCapture.Device.QueryColorWhiteBalance
[Java]
PXCMCapture.Device.QueryColorWhiteBalance
Syntax
[C++]
pxcI32 QueryColorWhiteBalance(void);
[C#]
Int32 QueryColorWhiteBalance();
[Java]
int QueryColorWhiteBalance();
Parameters
None
Description
The QueryColorWhiteBalance function returns the color white balance value, as the
color temperature in degrees Kevin.
Return Status
The color white balance value, or PROPERTY_VALUE_INVALID if there is any error in
retrieving the value.
187
2.11.6.2.31 QueryColorWhiteBalanceInfo
Namespace Hierarchy
[C++]
PXCCapture::Device::QueryColorWhiteBalanceInfo
[C#]
PXCMCapture.Device.QueryColorWhiteBalanceInfo
[Java]
PXCMCapture.Device.QueryColorWhiteBalanceInfo
Syntax
[C++]
PropertyInfo QueryColorWhiteBalanceInfo(void);
[C#]
PropertyInfo QueryColorWhiteBalanceInfo();
[Java]
PropertyInfo QueryColorWhiteBalanceInfo();
Parameters
None
Description
The QueryColorWhiteBalanceInfo function returns the property value range and
other useful information. See the PropertyInfo structure for details.
Return Status
The PropertyInfo structure instance. If any error, the structure is filled with
PROPERTY_VALUE_INVALID.
188
2.11.6.2.32 QueryDepthConfidenceThreshold
Namespace Hierarchy
[C++]
PXCCapture::Device::QueryDepthConfidenceThreshold
[C#]
PXCMCapture.Device.QueryDepthConfidenceThreshold
[Java]
PXCMCapture.Device.QueryDepthConfidenceThreshold
Syntax
[C++]
pxcI16 QueryDepthConfidenceThreshold(void);
[C#]
Int16 QueryDepthConfidenceThreshold();
[Java]
short QueryDepthConfidenceThreshold();
Parameters
None
Description
The QueryDepthConfidenceThreshold function returns the depth stream
confidence threshold value. Any depth pixels whose confidence score below this
threshold will be set to the low confidence pixel value, retrievable via the
QueryDepthLowConfidenceValue function.
Return Status
The depth stream confidence threshold value, or PROPERTY_VALUE_INVALID if there
is any error in retrieving the value.
189
2.11.6.2.33 QueryDepthConfidenceThresholdInfo
Namespace Hierarchy
[C++]
PXCCapture::Device::QueryDepthConfidenceThresholdInfo
[C#]
PXCMCapture.Device.QueryDepthConfidenceThresholdInfo
[Java]
PXCMCapture.Device.QueryDepthConfidenceThresholdInfo
Syntax
[C++]
PropertyInfo QueryDepthConfidenceThresholdInfo(void);
[C#]
PropertyInfo QueryDepthConfidenceThresholdInfo();
[Java]
PropertyInfo QueryDepthConfidenceThresholdInfo();
Parameters
None
Description
The QueryDepthConfidenceThresholdInfo function returns the property value
range and other useful information. See the PropertyInfo structure for details.
Return Status
The PropertyInfo structure instance. If any error, the structure is filled with
PROPERTY_VALUE_INVALID.
190
2.11.6.2.34 QueryDepthFieldOfView
Namespace Hierarchy
[C++]
PXCCapture::Device::QueryDepthFieldOfView
[C#]
PXCMCapture.Device.QueryDepthFieldOfView
[Java]
PXCMCapture.Device.QueryDepthFieldOfView
Syntax
[C++]
PXCPointF32 QueryDepthFieldOfView(void);
[C#]
PXCMPointF32 QueryDepthFieldOfView();
[Java]
PXCMPointF32 QueryDepthFieldOfView();
Parameters
None
Description
The QueryDepthFieldOfView function returns the depth sensor field of view, in
degrees, horizontally and vertically.
The property value is the model fixed value, and not the device instance calibrated
value.
Return Status
The depth sensor field of view in degrees. If any error, the structure is filled with
PROPERTY_VALUE_INVALID.
191
2.11.6.2.35 QueryDepthFocalLength
Namespace Hierarchy
[C++]
PXCCapture::Device::QueryDepthFocalLength
[C#]
PXCMCapture.Device.QueryDepthFocalLength
[Java]
PXCMCapture.Device.QueryDepthFocalLength
Syntax
[C++]
PXCPointF32
QueryDepthFocalLength(void);
[C#]
PXCMPointF32 QueryDepthFocalLength();
[Java]
PXCMPointF32 QueryDepthFocalLength();
Parameters
None
Description
The QueryDepthFocalLength function returns the depth sensor focal length, in
pixels, along the horizontal and virtual axises. The parameters vary with the depth
stream resolution setting.
The property value is the model fixed value, and not the device instance calibrated
value.
Return Status
The depth sensor focal length, in pixels. If any error, the structure is filled with
PROPERTY_VALUE_INVALID.
192
2.11.6.2.36 QueryDepthFocalLengthMM
Namespace Hierarchy
[C++]
PXCCapture::Device::QueryDepthFocalLengthMM
[C#]
PXCMCapture.Device.QueryDepthFocalLengthMM
[Java]
PXCMCapture.Device.QueryDepthFocalLengthMM
Syntax
[C++]
pxcF32 QueryDepthFocalLengthMM(void);
[C#]
Single QueryDepthFocalLengthMM();
[Java]
float QueryDepthFocalLengthMM();
Parameters
None
Description
The QueryDepthFocalLengthMM function returns the depth sensor focal length, in
millimeters.
The property value is the model fixed value, and not the device instance calibrated
value.
Return Status
The depth sensor focal length, in millimeters, or PROPERTY_VALUE_INVALID if there
is any error in retrieving the value.
Remarks
This property is not supported by camera model R200.
193
2.11.6.2.37 QueryDepthLowConfidenceValue
Namespace Hierarchy
[C++]
PXCCapture::Device::QueryDepthLowConfidenceValue
[C#]
PXCMCapture.Device.QueryDepthLowConfidenceValue
[Java]
PXCMCapture.Device.QueryDepthLowConfidenceValue
Syntax
[C++]
pxcU16 QueryDepthLowConfidenceValue(void);
[C#]
UInt16 QueryDepthLowConfidenceValue();
[Java]
short QueryDepthLowConfidenceValue();
Parameters
None
Description
The QueryDepthLowConfidenceValue function returns the special depth value for
low-confidence depth pixels. Any low-confidence depth pixels are set to this special
value during the thresholding process. The following cases may result in lowconfidence depth pixels:
Objects are too close to the camera.
Objects are too far away from the camera.
Objects have low infrared reflectivity.
Return Status
The special depth value for low-confidence depth pixels, or
PROPERTY_VALUE_INVALID if there is any error in retrieving the value.
194
2.11.6.2.38 QueryDepthPrincipalPoint
Namespace Hierarchy
[C++]
PXCCapture::Device::QueryDepthPrincipalPoint
[C#]
PXCMCapture.Device.QueryDepthPrincipalPoint
[Java]
PXCMCapture.Device.QueryDepthPrincipalPoint
Syntax
[C++]
PXCPointF32 QueryDepthPrincipalPoint(void);
[C#]
PXCMPointF32 QueryDepthPrincipalPoint();
[Java]
PXCMPointF32 QueryDepthPrincipalPoint();
Parameters
None
Description
The QueryDepthPrincipalPoint function returns the depth sensor principal point,
in pixels, horizontally and vertically. The parameters vary with the depth stream
resolution setting.
The property value is the model fixed value, and not the device instance calibrated
value.
Return Status
The depth sensor principal point in pixels. If any error, the structure is filled with
PROPERTY_VALUE_INVALID.
195
2.11.6.2.39 QueryDepthSensorRange
Namespace Hierarchy
[C++]
PXCCapture::Device::QueryDepthSensorRange
[C#]
PXCMCapture.Device.QueryDepthSensorRange
[Java]
PXCMCapture.Device.QueryDepthSensorRange
Syntax
[C++]
PXCRangeF32 QueryDepthSensorRange(void);
[C#]
PXCMRangeF32 QueryDepthSensorRange();
[Java]
PXCMRangeF32 QueryDepthSensorRange();
Parameters
None
Description
The QueryDepthSensorRange function returns the depth sensor sensing distance, in
mm.
The property value is the model fixed value, and not the device instance calibrated
value.
Return Status
The depth sensor sensing distance values. If any error, the structure is filled with
PROPERTY_VALUE_INVALID.
Remarks
This property is not supported by camera model R200.
196
2.11.6.2.40 QueryDeviceAllowProfileChange
Namespace Hierarchy
[C++]
PXCCapture::Device::QueryDeviceAllowProfileChange
[C#]
PXCMCapture.Device.QueryDeviceAllowProfileChange
[Java]
PXCMCapture.Device.QueryDeviceAllowProfileChange
Syntax
[C++]
pxcBool QueryDeviceAllowProfileChange(void);
[C#]
Boolean QueryDeviceAllowProfileChange();
[Java]
boolean QueryDeviceAllowProfileChange();
Parameters
None
Description
The QueryDeviceAllowProfileChange function returns the status whether the
capture device exposes any resolution change events. If true, the capture device
permits stream resolution change. Otherwise, the capture device will forbid any
resolution change (in the multiple application access scenario.)
Return Status
The resolution change notification status.
197
2.11.6.2.41 QueryDeviceInfo
Namespace Hierarchy
[C++]
PXCCapture::Device::QueryDeviceInfo
[C#]
PXCMCapture.Device.QueryDeviceInfo
[Java]
PXCMCapture.Device.QueryDeviceInfo
Syntax
[C++]
void QueryDeviceInfo(DeviceInfo *dinfo);
[C#]
void QueryDeviceInfo(out DeviceInfo dinfo);
[Java]
void QueryDeviceInfo(DeviceInfo dinfo);
Parameters
dinfo
Description
The QueryDeviceInfo function returns the capture device information.
Return Status
None
Remarks
C#
2.11.6.2.42 QueryDepthUnit
Namespace Hierarchy
[C++]
PXCCapture::Device::QueryDepthUnit
198
[C#]
PXCMCapture.Device.QueryDepthUnit
[Java]
PXCMCapture.Device.QueryDepthUnit
Syntax
[C++]
pxcF32 QueryDepthUnit(void);
[C#]
Single QueryDeviceInfo();
[Java]
float QueryDeviceInfo();
Parameters
None
Description
The QueryDepthUnit function returns the precision, in micrometers or m, of native
depth pixels.
Return Status
The native depth pixel precision in micrometers or m, or
PROPERTY_VALUE_INVALID if there is any error in retrieving the value.
2.11.6.2.43 QueryMirrorMode
Namespace Hierarchy
[C++]
PXCCapture::Device::QueryMirrorMode
[C#]
PXCMCapture.Device.QueryMirrorMode
[Java]
PXCMCapture.Device.QueryMirrorMode
Syntax
199
[C++]
MirrorMode QueryMirrorMode(void);
[C#]
MirrorMode QueryMirrorMode();
[Java]
MirrorMode QueryMirrorMode();
Parameters
None
Description
The QueryMirrorMode function returns the orientation of the camera images of the
Intel RealSense Camera.
Return Status
The orientation of the camera images, as defined in the MirrorMode enumerator.
200
2.11.6.2.44 QueryStreamProfileSet
Namespace Hierarchy
[C++]
PXCCapture::Device::QueryStreamProfileSet
[C#]
PXCMCapture.Device.QueryStreamProfileSet
[Java]
PXCMCapture.Device.QueryStreamProfileSet
Syntax
[C++]
pxcStatus QueryStreamProfileSet(StreamType scope, pxcI32 pidx,
StreamProfileSet* profiles);
pxcStatus QueryStreamProfileSet(StreamProfileSet* profiles);
[C#]
pxcmStatus QueryStreamProfileSet(StreamType scope, Int32 pidx, out
StreamProfileSet profiles);
pxcmStatus QueryStreamProfileSet(out StreamProfileSet profiles);
[Java]
pxcmStatus QueryStreamProfileSet(StreamType scope, int pidx,
StreamProfileSet profiles);
pxcmStatus QueryStreamProfileSet(StreamProfileSet profiles);
Parameters
scope
pidx
profiles
Description
201
STATUS_ITEM_UNAVAILABLE
2.11.6.2.45 QueryStreamProfileSetNum
Namespace Hierarchy
[C++]
PXCCapture::Device::QueryStreamProfileSetNum
[C#]
PXCMCapture.Device.QueryStreamProfileSetNum
[Java]
PXCMCapture.Device.QueryStreamProfileSetNum
Syntax
[C++]
pxcI32 QueryStreamProfileSetNum(StreamType scope);
[C#]
Int32 QueryStreamProfileSetNum(StreamType scope);
[Java]
int QueryStreamProfileSetNum(StreamType scope);
202
Parameters
scope
Description
The QueryStreamProfileSetNum function returns the number of unique
configurations for the selected streams.
Return Status
Namespace Hierarchy
[C++]
PXCCapture::Device::ReadStreams
[C#]
PXCMCapture.Device.ReadStreams
[Java]
PXCMCapture.Device.ReadStreams
Syntax
[C++]
pxcStatus ReadStreams(StreamType scope, Sample *sample);
[C#]
pxcmStatus ReadStreams(StreamType scope, Sample sample);
[Java]
pxcmStatus ReadStreams(StreamType scope, Sample sample);
Parameters
scope
sample
Description
203
The ReadStreams function reads one or multiple streams (specified by the scope
parameter) from the capture device.
In the case of reading multiple streams, the function synchronizes the stream reads
and delivers the data together. You must configure the streams to have the same
frame rate. Otherwise, the function returns STATUS_PARAM_UNSUPPORTED.
Use single stream read or multiple-stream synchronized read. The behavior is not
defined if you mix the two modes.
This function is a synchronous function. The function blocks until all sample data are
available. After use, the application must release the images, by using the
ReleaseImages function.
Return Status
STATUS_NO_ERROR
STATUS_TIME_GAP
STATUS_PARAM_UNSUPPORTED
2.11.6.2.47 ReadStreamsAsync
Namespace Hierarchy
[C++]
PXCCapture::Device::ReadStreamsAsync
[C#]
PXCMCapture.Device.ReadStreamsAsync
[Java]
PXCMCapture.Device.ReadStreamsAsync
Syntax
[C++]
pxcStatus ReadStreamsAsync(StreamType scope, Sample *sample, PXCSyncPoint
**sp);
pxcStatus ReadStreamsAsync(Sample *sample, PXCSyncPoint **sp);
[C#]
pxcmStatus ReadStreamsAsync(StreamType scope, Sample sample, out
PXCMSyncPoint sp);
204
Parameters
scope
sample
sp
The SP to be returned.
Description
The ReadStreamsAsync function reads one or multiple streams (specified by the
scope parameter) from the capture device.
In the case of reading multiple streams, the function synchronizes the stream reads
and delivers the data together. You must configure the streams to have the same
frame rate. Otherwise, the function returns STATUS_PARAM_UNSUPPORTED.
Use single stream read or multiple-stream synchronized read. The behavior is not
defined if you mix the two modes.
This function is an asynchronous function. The function returns immediately after
allocating the image resources. The sample data may not be ready at this time. The
application must synchronize the SP before accessing the captured images. After use,
the application must release the images, by using the ReleaseImages function.
Return Status
205
STATUS_NO_ERROR
STATUS_TIME_GAP
STATUS_PARAM_UNSUPPORTED
Namespace Hierarchy
[C++]
PXCCapture::Device::ResetProperties
[C#]
PXCMCapture.Device.ResetProperties
[Java]
PXCMCapture.Device.ResetProperties
[JavaScript]
intel.realsense.Device.ResetProperties
Syntax
[C++]
void ResetProperties(StreamType streams);
[C#]
void ResetProperties(StreamType streams);
[Java]
void ResetProperties(StreamType streams);
[JavaScript]
function resetProperties(streams);
Parameters
streams
Description
The ResetProperties function resets the device properties of the specified streams
to their factory default values.
If streams=STREAM_TYPE_ANY, the function resets all available streams.
Return Status
None
206
Namespace Hierarchy
[C++]
PXCCapture::Device::RestorePropertiesUponFocus
[C#]
PXCMCapture.Device.RestorePropertiesUponFocus
[Java]
PXCMCapture.Device.RestorePropertiesUponFocus
[JavaScript]
intel.realsense.Device.RestorePropertiesUponFocus
Syntax
[C++]
void RestorePropertiesUponFocus(void);
[C#]
void RestorePropertiesUponFocus();
[Java]
void RestorePropertiesUponFocus();
[JavaScript]
function restorePropertiesUponFocus();
Parameters
None
Description
The RestorePropertiesUponFocus function restores the device properties to the
values that the application set previously.
When multiple SDK applications running on the same system, these applications may
set different device properties thus impact each other in experience. The guideline is
that when an application receives the windows focus, the application should
immediately call the RestorePropertiesUponFocus function to restore any device
properties that the application previously set. The function keeps a record of all
device properties changes internally.
See Coexisting with Other Applications for more details.
207
Return Status
None
2.11.6.2.50 SetColorAutoExposure
Namespace Hierarchy
[C++]
PXCCapture::Device::SetColorAutoExposure
[C#]
PXCMCapture.Device.SetColorAutoExposure
[Java]
PXCMCapture.Device.SetColorAutoExposure
Syntax
[C++]
pxcStatus SetColorAutoExposure(pxcBool auto);
[C#]
pxcmStatus SetColorAutoExposure(Boolean auto);
[Java]
pxcmStatus SetColorAutoExposure(boolean auto);
Parameters
auto
Description
The SetColorAutoExposure function sets the auto exposure mode.
Return Status
208
STATUS_NO_ERROR
STATUS_ITEM_UNAVAILABLE
STATUS_DEVICE_FAILED
2.11.6.2.51 SetColorAutoWhiteBalance
Namespace Hierarchy
[C++]
PXCCapture::Device::SetColorAutoWhiteBalance
[C#]
PXCMCapture.Device.SetColorAutoWhiteBalance
[Java]
PXCMCapture.Device.SetColorAutoWhiteBalance
Syntax
[C++]
pxcStatus SetColorAutoWhiteBalance(pxcBool auto);
[C#]
pxcmStatus SetColorAutoWhiteBalance(Boolean auto);
[Java]
pxcmStatus SetColorAutoWhiteBalance(boolean auto);
Parameters
auto
Description
The SetColorAutoWhiteBalance function sets the auto white balance mode.
Return Status
STATUS_NO_ERROR
STATUS_ITEM_UNAVAILABLE
STATUS_DEVICE_FAILED
2.11.6.2.52 SetColorAutoPowerLineFrequency
Namespace Hierarchy
[C++]
PXCCapture::Device::SetColorAutoPowerLineFrequency
209
[C#]
PXCMCapture.Device.SetColorAutoPowerLineFrequency
[Java]
PXCMCapture.Device.SetColorAutoPowerLineFrequency
Syntax
[C++]
pxcStatus SetColorAutoPowerLineFrequency(pxcBool auto);
[C#]
pxcmStatus SetColorAutoPowerLineFrequency(Boolean auto);
[Java]
pxcmStatus SetColorAutoPowerLineFrequency(boolean auto);
Parameters
auto
Description
The SetColorAutoPowerLineFrequency function sets the auto power line frequency
mode.
Return Status
STATUS_NO_ERROR
STATUS_ITEM_UNAVAILABLE
STATUS_DEVICE_FAILED
2.11.6.2.53 SetColorBackLightCompensation
Namespace Hierarchy
[C++]
PXCCapture::Device::SetColorBackLightCompensation
[C#]
PXCMCapture.Device.SetColorBackLightCompensation
[Java]
210
PXCMCapture.Device.SetColorBackLightCompensation
Syntax
[C++]
pxcStatus SetColorBackLightCompensation(pxcI32 enable);
[C#]
pxcmStatus SetColorBackLightCompensation(Int32 enable);
[Java]
pxcmStatus SetColorBackLightCompensation(int enable);
Parameters
enable
Description
The SetColorBackLightCompensation function enables/disables the color stream
back light compensation.
Return Status
STATUS_NO_ERROR
STATUS_ITEM_UNAVAILABLE
STATUS_DEVICE_FAILED
2.11.6.2.54 SetColorBrightness
Namespace Hierarchy
[C++]
PXCCapture::Device::SetColorBrightness
[C#]
PXCMCapture.Device.SetColorBrightness
[Java]
PXCMCapture.Device.SetColorBrightness
Syntax
211
[C++]
pxcStatus SetColorBrightness(pxcI32 brightness);
[C#]
pxcmStatus SetColorBrightness(Int32 brightness);
[Java]
pxcmStatus SetColorBrightness(int brightness);
Parameters
brightness
Description
The SetColorBrightness function sets the color brightness value, from -10,000
(pure black) to 10,000 (pure white).
Return Status
STATUS_NO_ERROR
STATUS_ITEM_UNAVAILABLE
STATUS_DEVICE_FAILED
2.11.6.2.55 SetColorContrast
Namespace Hierarchy
[C++]
PXCCapture::Device::SetColorContrast
[C#]
PXCMCapture.Device.SetColorContrast
[Java]
PXCMCapture.Device.SetColorContrast
Syntax
[C++]
pxcStatus SetColorContrast(pxcI32 contrast);
[C#]
pxcmStatus SetColorContrast(Int32 contrast);
212
[Java]
pxcmStatus SetColorContrast(int contrast);
Parameters
contrast
Description
The SetColorContrast function sets the color contrast value, from 0 (lowest
contrast) to 10,000 (highest contrast).
Return Status
STATUS_NO_ERROR
STATUS_ITEM_UNAVAILABLE
STATUS_DEVICE_FAILED
2.11.6.2.56 SetColorExposure
Namespace Hierarchy
[C++]
PXCCapture::Device::SetColorExposure
[C#]
PXCMCapture.Device.SetColorExposure
[Java]
PXCMCapture.Device.SetColorExposure
Syntax
[C++]
pxcStatus SetColorExposure(pxcI32 exposure);
[C#]
pxcmStatus SetColorExposure(Int32 exposure);
[Java]
pxcmStatus SetColorExposure(int exposure);
Parameters
213
exposure
Description
The SetColorExposure function sets the color exposure value, in log base 2 seconds.
Return Status
STATUS_NO_ERROR
STATUS_ITEM_UNAVAILABLE
STATUS_DEVICE_FAILED
2.11.6.2.57 SetColorHue
Namespace Hierarchy
[C++]
PXCCapture::Device::SetColorHue
[C#]
PXCMCapture.Device.SetColorHue
[Java]
PXCMCapture.Device.SetColorHue
Syntax
[C++]
pxcStatus SetColorHue(pxcI32 hue);
[C#]
pxcmStatus SetColorHue(Int32 hue);
[Java]
pxcmStatus SetColorHue(int hue);
Parameters
hue
Description
214
The SetColorHue function sets the color hue value, from -18,000 to 18,000
(representing -180 to 180 degrees.)
Return Status
STATUS_NO_ERROR
STATUS_ITEM_UNAVAILABLE
STATUS_DEVICE_FAILED
2.11.6.2.58 SetColorGamma
Namespace Hierarchy
[C++]
PXCCapture::Device::SetColorGamma
[C#]
PXCMCapture.Device.SetColorGamma
[Java]
PXCMCapture.Device.SetColorGamma
Syntax
[C++]
pxcStatus SetColorGamma(pxcI32 gamma);
[C#]
pxcmStatus SetColorGamma(Int32 gamma);
[Java]
pxcmStatus SetColorGamma(int gamma);
Parameters
gamma
Description
The SetColorGamma function sets the color gamma value, from 1 to 500.
Return Status
215
STATUS_NO_ERROR
STATUS_ITEM_UNAVAILABLE
STATUS_DEVICE_FAILED
2.11.6.2.59 SetColorGain
Namespace Hierarchy
[C++]
PXCCapture::Device::SetColorGain
[C#]
PXCMCapture.Device.SetColorGain
[Java]
PXCMCapture.Device.SetColorGain
Syntax
[C++]
pxcStatus SetColorGain(pxcI32 gain);
[C#]
pxcmStatus SetColorGain(Int32 gain);
[Java]
pxcmStatus SetColorGain(int gain);
Parameters
gain
Description
The SetColorGain function sets the color gain value, with negative values darker,
positive values brighter, and zero as normal.
Return Status
216
STATUS_NO_ERROR
STATUS_ITEM_UNAVAILABLE
STATUS_DEVICE_FAILED
2.11.6.2.60 SetColorPowerLineFrequency
Namespace Hierarchy
[C++]
PXCCapture::Device::SetColorPowerLineFrequency
[C#]
PXCMCapture.Device.SetColorPowerLineFrequency
[Java]
PXCMCapture.Device.SetColorPowerLineFrequency
Syntax
[C++]
pxcStatus SetColorPowerLineFrequency(PowerLineFrequency freq);
[C#]
pxcmStatus SetColorPowerLineFrequency(PowerLineFrequency freq);
[Java]
pxcmStatus SetColorPowerLineFrequency(PowerLineFrequency freq);
Parameters
freq
Description
The SetColorPowerLineFrequency function sets the property of the power line
frequency compensation value.
Return Status
217
STATUS_NO_ERROR
STATUS_ITEM_UNAVAILABLE
STATUS_DEVICE_FAILED
2.11.6.2.61 SetColorSaturation
Namespace Hierarchy
[C++]
PXCCapture::Device::SetColorSaturation
[C#]
PXCMCapture.Device.SetColorSaturation
[Java]
PXCMCapture.Device.SetColorSaturation
Syntax
[C++]
pxcStatus SetColorSaturation(pxcI32 saturation);
[C#]
pxcmStatus SetColorSaturation(Int32 saturation);
[Java]
pxcmStatus SetColorSaturation(int saturation);
Parameters
saturation
Description
The SetColorSaturation function sets the color saturation value, from 0 to 10,000.
Return Status
218
STATUS_NO_ERROR
STATUS_ITEM_UNAVAILABLE
STATUS_DEVICE_FAILED
2.11.6.2.62 SetColorSharpness
Namespace Hierarchy
[C++]
PXCCapture::Device::SetColorSharpness
[C#]
PXCMCapture.Device.SetColorSharpness
[Java]
PXCMCapture.Device.SetColorSharpness
Syntax
[C++]
pxcStatus SetColorSharpness(pxcI32 sharpness);
[C#]
pxcmStatus SetColorSharpness(Int32 sharpness);
[Java]
pxcmStatus SetColorSharpness(int sharpness);
Parameters
sharpness
Description
This function sets the color sharpness value, from 0 (lowest sharpness) to 100
(highest sharpness).
Return Status
219
STATUS_NO_ERROR
STATUS_ITEM_UNAVAILABLE
STATUS_DEVICE_FAILED
2.11.6.2.63 SetColorWhiteBalance
Namespace Hierarchy
[C++]
PXCCapture::Device::SetColorWhiteBalance
[C#]
PXCMCapture.Device.SetColorWhiteBalance
[Java]
PXCMCapture.Device.SetColorWhiteBalance
Syntax
[C++]
pxcStatus SetColorWhiteBalance(pxcI32 balance);
[C#]
pxcmStatus SetColorWhiteBalance(Int32 balance);
[Java]
pxcmStatus SetColorWhiteBalance(int balance);
Parameters
balance
Description
The SetColorWhiteBalance function sets the color white balance value, as the color
temperature in degrees Kevin.
Return Status
220
STATUS_NO_ERROR
STATUS_ITEM_UNAVAILABLE
STATUS_DEVICE_FAILED
2.11.6.2.64 SetDepthConfidenceThreshold
Namespace Hierarchy
[C++]
PXCCapture::Device::SetDepthConfidenceThreshold
[C#]
PXCMCapture.Device.SetDepthConfidenceThreshold
[Java]
PXCMCapture.Device.SetDepthConfidenceThreshold
Syntax
[C++]
pxcStatus SetDepthConfidenceThreshold(pxcI16 threshold);
[C#]
pxcmStatus SetDepthConfidenceThreshold(Int16 threshold);
[Java]
pxcmStatus SetDepthConfidenceThreshold(short threshold);
Parameters
threshold
Description
The SetDepthConfidenceThreshold function sets the depth stream confidence
threshold value. Any depth pixels whose confidence score below this threshold will
be set to the low confidence pixel value, retrievable via the
QueryDepthLowConfidenceValue function.
Not supported by camera model R200.
Return Status
221
STATUS_NO_ERROR
STATUS_ITEM_UNAVAILABLE
STATUS_DEVICE_FAILED
2.11.6.2.65 SetDepthUnit
Namespace Hierarchy
[C++]
PXCCapture::Device::SetDepthUnit
[C#]
PXCMCapture.Device.SetDepthUnit
[Java]
PXCMCapture.Device.SetDepthUnit
Syntax
[C++]
pxcStatus SetDepthUnit(pxcF32 value);
[C#]
pxcmStatus SetDepthUnit(Single value);
[Java]
pxcmStatus SetDepthUnit(float value);
Parameters
value
Description
The SetDepthUnit function sets the depth unit value, in micrometre.
Return Status
222
STATUS_NO_ERROR
STATUS_ITEM_UNAVAILABLE
STATUS_DEVICE_FAILED
2.11.6.2.66 SetDeviceAllowProfileChange
Namespace Hierarchy
[C++]
PXCCapture::Device::SetDeviceAllowProfileChange
[C#]
PXCMCapture.Device.SetDeviceAllowProfileChange
[Java]
PXCMCapture.Device.SetDeviceAllowProfileChange
Syntax
[C++]
pxcStatus SetDeviceAllowProfileChange(pxcBool enable);
[C#]
pxcmStatus SetDeviceAllowProfileChange(Boolean enable);
[Java]
pxcmStatus SetDeviceAllowProfileChange(boolean enable);
Parameters
enable
Description
The SetDeviceAllowProfileChange function enables/disables any resolution
change in the multiple access scenarios. If enabled, the capture device returns
STATUS_STREAM_CONFIG_CHANGED. If disabled, the capture device prohibits
any resolution change during streaming.
Return Status
223
STATUS_NO_ERROR
STATUS_ITEM_UNAVAILABLE
STATUS_DEVICE_FAILED
2.11.6.2.67 SetMirrorMode
Namespace Hierarchy
[C++]
PXCCapture::Device::SetMirrorMode
[C#]
PXCMCapture.Device.SetMirrorMode
[Java]
PXCMCapture.Device.SetMirrorMode
Syntax
[C++]
pxcStatus SetMirrorMode(MirrorMode mode);
[C#]
pxcmStatus SetMirrorMode(MirrorMode mode);
[Java]
pxcmStatus SetMirrorMode(MirrorMode mode);
Parameters
mode
Description
The SetMirrorMode function sets the orientation of the camera images of the Intel
RealSense Camera.
Return Status
224
STATUS_NO_ERROR
STATUS_ITEM_UNAVAILABLE
STATUS_DEVICE_FAILED
2.11.6.2.68 SetStreamProfileSet
Namespace Hierarchy
[C++]
PXCCapture::Device::SetStreamProfileSet
[C#]
PXCMCapture.Device.SetStreamProfileSet
[Java]
PXCMCapture.Device.SetStreamProfileSet
Syntax
[C++]
pxcStatus SetStreamProfileSet(StreamProfileSet* profiles);
[C#]
pxcmStatus SetStreamProfileSet(StreamProfileSet profiles);
[Java]
pxcmStatus SetStreamProfileSet(StreamProfileSet profiles);
Parameters
profiles
Description
The SetStreamProfileSet function configures the streams parameters. All streams
must be configured. The device streaming starts after a successful configuration.
If the device supports configuration change, a second call to the function stops the
previous streaming and starts the new configuration. If the device does not support
configuration change, the second call to the function returns an error.
Return Status
225
STATUS_NO_ERROR
The Device interface exposes the following member functions specific to Intel RealSense
camera, model F200:
Device Property Access
Member Functions
Description
QueryIVCAMAccuracyDefaultValue
QueryIVCAMAccuracy
SetIVCAMAccuracy
QueryIVCAMLaserPowerInfo
QueryIVCAMLaserPower
SetIVCAMLaserPower
QueryIVCAMFilterOptionInfo
QueryIVCAMFilterOption
SetIVCAMFilterOption
QueryIVCAMMotionRangeTradeOffInfo
QueryIVCAMMotionRangeTradeOff
SetIVCAMMotionRangeTradeOff
See Also
Member Functions: SR300 Functions
2.11.6.3.1 QueryIVCAMAccuracy
Namespace Hierarchy
[C++]
PXCCapture::Device::QueryIVCAMAccuracy
[C#]
PXCMCapture.Device.QueryIVCAMAccuracy
[Java]
PXCMCapture.Device.QueryIVCAMAccuracy
Syntax
[C++]
IVCAMAccuracy QueryIVCAMAccuracy(void);
[C#]
226
IVCAMAccuracy QueryIVCAMAccuracy();
[Java]
IVCAMAccuracy QueryIVCAMAccuracy();
Parameters
None
Description
The QueryIVCAMAccuracy function returns the projected pattern setting.
Return Status
The projected pattern setting, as defined in the IVCAMAccuracy enumerator.
227
2.11.6.3.2 QueryIVCAMAccuracyDefaultValue
Namespace Hierarchy
[C++]
PXCCapture::Device::QueryIVCAMAccuracyDefaultValue
[C#]
PXCMCapture.Device.QueryIVCAMAccuracyDefaultValue
[Java]
PXCMCapture.Device.QueryIVCAMAccuracyDefaultValue
Syntax
[C++]
IVCAMAccuracy QueryIVCAMAccuracyDefaultValue(void);
[C#]
IVCAMAccuracy QueryIVCAMAccuracyDefaultValue();
[Java]
IVCAMAccuracy QueryIVCAMAccuracyDefaultValue();
Parameters
None
Description
The QueryIVCAMAccuracyDefaultValue function returns the default value of the
projected pattern setting.
Return Status
The projected pattern setting, as defined in the IVCAMAccuracy enumerator.
228
2.11.6.3.3 QueryIVCAMFilterOption
Namespace Hierarchy
[C++]
PXCCapture::Device::QueryIVCAMFilterOption
[C#]
PXCMCapture.Device.QueryIVCAMFilterOption
[Java]
PXCMCapture.Device.QueryIVCAMFilterOption
Syntax
[C++]
pxcI32 QueryIVCAMFilterOption(void);
[C#]
Int32 QueryIVCAMFilterOption();
[Java]
int QueryIVCAMFilterOption();
Parameters
None
Description
The QueryIVCAMFilterOption function returns the smoothing aggressiveness
parameter of the Intel RealSense Camera. See Table 1 for the value definitions.
Return Status
The filter option value, or PROPERTY_VALUE_INVALID if there is any error in
retrieving the value.
Remarks
229
V
al
u
e
0
Name
Description
Skeleton
Raw
Raw +
Gradients
filter
Very
close
range
Close
range
Reports the depth data for high fidelity (high confidence) pixels only,
and all other pixels as invalid. For SR300, the depth range is up to 4m.
Raw depth image without any post-processing filters. For SR300, the
depth range is up to 4m.
Raw depth image with the gradient filter applied. For SR300, the depth
range is up to 4m.
Midrange
[Default]
Far range
Very far
range
Very low smoothing effect with high sharpness, accuracy levels, and low
noise artifacts. Good for any distances of up to 350mm for F200, and up
to 2m for SR300.
Low smoothing effect with high sharpness and accuracy levels. The
noise artifacts are optimized for distances between 350mm to 550mm
for F200, and up to 2m for SR300.
Moderate smoothing effect optimized for distances between 550mm to
850mm for F200 and up to 2m for SR300 to balance between good
sharpness level, high accuracy and moderate noise artifacts.
High smoothing effect for distances between 850mm to 1000mm for
F200 and up to 4m for SR300 bringing good accuracy with moderate
sharpness level.
Very high smoothing effect to bring moderate accuracy level for
distances above 1m for F200, and 0.8-2.5m (up to 4m) for SR300. Use
together with the MotionRangeTradeOff property to increase the
depth range.
Table 1: The Filter Option Table
230
2.11.6.3.4 QueryIVCAMFilterOptionInfo
Namespace Hierarchy
[C++]
PXCCapture::Device::QueryIVCAMFilterOptionInfo
[C#]
PXCMCapture.Device.QueryIVCAMFilterOptionInfo
[Java]
PXCMCapture.Device.QueryIVCAMFilterOptionInfo
Syntax
[C++]
PropertyInfo QueryIVCAMFilterOptionInfo(void);
[C#]
PropertyInfo QueryIVCAMFilterOptionInfo();
[Java]
PropertyInfo QueryIVCAMFilterOptionInfo();
Parameters
None
Description
The QueryIVCAMFilterOptionInfo function returns the property value range and
other useful information. See the PropertyInfo structure for details.
Return Status
The PropertyInfo structure instance. If any error, the structure is filled with
PROPERTY_VALUE_INVALID.
231
2.11.6.3.5 QueryIVCAMLaserPower
Namespace Hierarchy
[C++]
PXCCapture::Device::QueryIVCAMLaserPower
[C#]
PXCMCapture.Device.QueryIVCAMLaserPower
[Java]
PXCMCapture.Device.QueryIVCAMLaserPower
Syntax
[C++]
pxcI32 QueryIVCAMLaserPower(void);
[C#]
Int32 QueryIVCAMLaserPower();
[Java]
int QueryIVCAMLaserPower();
Parameters
None
Description
The QueryIVCAMLaserPower function returns the laser power level from 0 (lowest) to
16 (highest) of the camera device.
Return Status
The laser power level, or PROPERTY_VALUE_INVALID if there is any error in retrieving
the value.
232
2.11.6.3.6 QueryIVCAMLaserPowerInfo
Namespace Hierarchy
[C++]
PXCCapture::Device::QueryIVCAMLaserPowerInfo
[C#]
PXCMCapture.Device.QueryIVCAMLaserPowerInfo
[Java]
PXCMCapture.Device.QueryIVCAMLaserPowerInfo
Syntax
[C++]
PropertyInfo QueryIVCAMLaserPowerInfo(void);
[C#]
PropertyInfo QueryIVCAMLaserPowerInfo();
[Java]
PropertyInfo QueryIVCAMLaserPowerInfo();
Parameters
None
Description
The QueryIVCAMLaserPowerInfo function returns the property value range and
other useful information. See the PropertyInfo structure for details.
Return Status
The PropertyInfo structure instance. If any error, the structure is filled with
PROPERTY_VALUE_INVALID.
233
2.11.6.3.7 QueryIVCAMMotionRangeTradeOff
Namespace Hierarchy
[C++]
PXCCapture::Device::QueryIVCAMMotionRangeTradeOff
[C#]
PXCMCapture.Device.QueryIVCAMMotionRangeTradeOff
[Java]
PXCMCapture.Device.QueryIVCAMMotionRangeTradeOff
Syntax
[C++]
pxcI32 QueryIVCAMMotionRangeTradeOff(void);
[C#]
Int32 QueryIVCAMMotionRangeTradeOff();
[Java]
int QueryIVCAMMotionRangeTradeOff();
Parameters
None
Description
The QueryIVCAMMotionRangeTradeOff function returns the motion vs range trade
off option of the Intel RealSense Camera. The value is in the range of 0 (short
exposure, short range, and better motion) to 100 (long exposure and long range.)
Return Status
The option value, or PROPERTY_VALUE_INVALID if there is any error in retrieving the
value.
234
2.11.6.3.8 QueryIVCAMMotionRangeTradeOffInfo
Namespace Hierarchy
[C++]
PXCCapture::Device::QueryIVCAMMotionRangeTradeOffInfo
[C#]
PXCMCapture.Device.QueryIVCAMMotionRangeTradeOffInfo
[Java]
PXCMCapture.Device.QueryIVCAMMotionRangeTradeOffInfo
Syntax
[C++]
PropertyInfo QueryIVCAMMotionRangeTradeOffInfo(void);
[C#]
PropertyInfo QueryIVCAMMotionRangeTradeOffInfo();
[Java]
PropertyInfo QueryIVCAMMotionRangeTradeOffInfo();
Parameters
None
Description
The QueryIVCAMMotionRangeTradeOffInfo function returns the property value
range and other useful information. See the PropertyInfo structure for details.
Return Status
The PropertyInfo structure instance. If any error, the structure is filled with
PROPERTY_VALUE_INVALID.
235
2.11.6.3.9 SetIVCAMAccuracy
Namespace Hierarchy
[C++]
PXCCapture::Device::SetIVCAMAccuracy
[C#]
PXCMCapture.Device.SetIVCAMAccuracy
[Java]
PXCMCapture.Device.SetIVCAMAccuracy
Syntax
[C++]
pxcStatus SetIVCAMAccuracy(IVCAMAccuracy accuracy);
[C#]
pxcmStatus SetIVCAMAccuracy(IVCAMAccuracy accuracy);
[Java]
pxcmStatus SetIVCAMAccuracy(IVCAMAccuracy accuracy);
Parameters
accuracy
Description
The SetIVCAMAccuracy function sets the projected pattern setting.
Return Status
STATUS_NO_ERROR
STATUS_ITEM_UNAVAILABLE
STATUS_DEVICE_FAILED
2.11.6.3.10 SetIVCAMFilterOption
Namespace Hierarchy
[C++]
PXCCapture::Device::SetIVCAMFilterOption
236
[C#]
PXCMCapture.Device.SetIVCAMFilterOption
[Java]
PXCMCapture.Device.SetIVCAMFilterOption
Syntax
[C++]
pxcStatus SetIVCAMFilterOption(pxcI32 option);
[C#]
pxcmStatus SetIVCAMFilterOption(Int32 option);
[Java]
pxcmStatus SetIVCAMFilterOption(int option);
Parameters
option
Description
The SetIVCAMFilterOption function sets the smoothing aggressiveness parameter
of the Intel RealSense Camera. See Table 2 for the value definitions.
Return Status
STATUS_NO_ERROR
STATUS_ITEM_UNAVAILABLE
STATUS_DEVICE_FAILED
Remarks
237
V
al
u
e
0
Name
Description
Skeleton
Raw
Raw +
Gradients
filter
Very
close
range
Close
range
Reports the depth data for high fidelity (high confidence) pixels only,
and all other pixels as invalid. For SR300, the depth range is up to 4m.
Raw depth image without any post-processing filters. For SR300, the
depth range is up to 4m.
Raw depth image with the gradient filter applied. For SR300, the depth
range is up to 4m.
Midrange
[Default]
Far range
Very far
range
Very low smoothing effect with high sharpness, accuracy levels, and low
noise artifacts. Good for any distances of up to 350mm for F200, and up
to 2m for SR300.
Low smoothing effect with high sharpness and accuracy levels. The
noise artifacts are optimized for distances between 350mm to 550mm
for F200, and up to 2m for SR300.
Moderate smoothing effect optimized for distances between 550mm to
850mm for F200 and up to 2m for SR300 to balance between good
sharpness level, high accuracy and moderate noise artifacts.
High smoothing effect for distances between 850mm to 1000mm for
F200 and up to 4m for SR300 bringing good accuracy with moderate
sharpness level.
Very high smoothing effect to bring moderate accuracy level for
distances above 1m for F200, and 0.8-2.5m (up to 4m) for SR300. Use
together with the MotionRangeTradeOff property to increase the
depth range.
Table 2: The Filter Option Table
2.11.6.3.11 SetIVCAMLaserPower
Namespace Hierarchy
[C++]
PXCCapture::Device::SetIVCAMLaserPower
[C#]
PXCMCapture.Device.SetIVCAMLaserPower
[Java]
PXCMCapture.Device.SetIVCAMLaserPower
Syntax
[C++]
pxcStatus SetIVCAMLaserPower(pxcI32 power);
238
[C#]
pxcmStatus SetIVCAMLaserPower(Int32 power);
[Java]
pxcmStatus SetIVCAMLaserPower(int power);
[JavaScript]
N/A
[C#/UWP]
N/A
Parameters
power
Description
The SetIVCAMLaserPower function sets the laser power level from 0 (lowest) to 16
(highest) of the Intel RealSense Camera.
Return Status
STATUS_NO_ERROR
STATUS_ITEM_UNAVAILABLE
STATUS_DEVICE_FAILED
2.11.6.3.12 SetIVCAMMotionRangeTradeOff
Namespace Hierarchy
[C++]
PXCCapture::Device::SetIVCAMMotionRangeTradeOff
[C#]
PXCMCapture.Device.SetIVCAMMotionRangeTradeOff
[Java]
PXCMCapture.Device.SetIVCAMMotionRangeTradeOff
Syntax
[C++]
pxcStatus SetIVCAMMotionRangeTradeOff(pxcI32 option);
239
[C#]
pxcmStatus SetIVCAMMotionRangeTradeOff(Int32 option);
[Java]
pxcmStatus SetIVCAMMotionRangeTradeOff(int option);
Parameters
option
Description
The SetIVCAMMotionRangeTradeOff function sets the motion vs range trade off
option of the Intel RealSense Camera. The value is in the range of 0 (short exposure,
short range, and better motion) to 100 (long exposure and long range.)
Return Status
STATUS_NO_ERROR
STATUS_ITEM_UNAVAILABLE
STATUS_DEVICE_FAILED
The Device interface exposes the following member functions specific to Intel RealSense
camera, model SR300:
Device Property Access
Member Functions
Description
QuerySR300ColorExposurePriority
Access to the color exposure priority setting.
QuerySR300ColorExposurePriorityInfo
SetSR300ColorExposurePriority
See Also
Member Functions: F200 & SR300 Functions
2.11.6.4.1 QuerySR300ColorExposurePriority
Namespace Hierarchy
[C++]
PXCCapture::Device::QuerySR300ColorExposurePriority
240
[C#]
PXCMCapture.Device.QuerySR300ColorExposurePriority
[Java]
PXCMCapture.Device.QuerySR300ColorExposurePriority
Syntax
[C++]
pxcI32 QuerySR300ColorExposurePriority(void);
[C#]
Int32 QuerySR300ColorExposurePriority();
[Java]
int QuerySR300ColorExposurePriority();
Parameters
None
Description
The QuerySR300ColorExposurePriority function returns the color exposure
priority setting, which specifies constraints on the exposure time control when
automatic exposure is turned on. If the value is zero, the color frame rate must remain
constant. If the value is 1, the color frame rate may vary.
Return Status
The priority setting value.
241
2.11.6.4.2 QuerySR300ColorExposurePriorityInfo
Namespace Hierarchy
[C++]
PXCCapture::Device::QuerySR300ColorExposurePriorityInfo
[C#]
PXCMCapture.Device.QuerySR300ColorExposurePriorityInfo
[Java]
PXCMCapture.Device.QuerySR300ColorExposurePriorityInfo
Syntax
[C++]
PropertyInfo QuerySR300ColorExposurePriorityInfo(void);
[C#]
PropertyInfo QuerySR300ColorExposurePriorityInfo();
[Java]
PropertyInfo QuerySR300ColorExposurePriorityInfo();
Parameters
None
Description
The QuerySR300ColorExposurePriorityInfo function returns the property value
range and other useful information. See the PropertyInfo structure for details.
Return Status
The PropertyInfo structure instance. If any error, the structure is filled with
PROPERTY_VALUE_INVALID.
242
2.11.6.4.3 SetSR300ColorExposurePriority
Namespace Hierarchy
[C++]
PXCCapture::Device::SetSR300ColorExposurePriority
[C#]
PXCMCapture.Device.SetSR300ColorExposurePriority
[Java]
PXCMCapture.Device.SetSR300ColorExposurePriority
Syntax
[C++]
pxcStatus SetSR300ColorExposurePriority(pxcI32 value);
[C#]
pxcmStatus SetSR300ColorExposurePriority(Int32 value);
[Java]
pxcmStatus SetSR300ColorExposurePriority(int value);
Parameters
value
Description
The SetSR300ColorExposurePriority function sets the color exposure priority
setting, which specifies constraints on the exposure time control when automatic
exposure is turned on. If the value is zero, the color frame rate must remain constant.
If the value is 1, the color frame rate may vary.
Return Status
STATUS_NO_ERROR
STATUS_ITEM_UNAVAILABLE
STATUS_DEVICE_FAILED
The Device interface exposes the following member functions specific to Intel RealSense
243
Description
QueryDSLeftRightCropping
SetDSLeftRightCropping
QueryDSLeftRightExposure
QueryDSLeftRightExposureInfo
SetDSLeftRightAutoExposure
SetDSLeftRightExposure
QueryDSLeftRightGain
QueryDSLeftRightGainInfo
SetDSLeftRightGain
QueryDSEmitterEnabled
SetDSEnableEmitter
QueryDSDisparityOutputEnabled
SetDSEnableDisparityOutput
QueryDSDisparityMultiplier
SetDSDisparityMultiplier
QueryDSDisparityShift
SetDSDisparityShift
QueryDSMinMaxZ
SetDSMinMaxZ
QueryDSColorRectificationEnabled
QueryDSDepthRectificationEnabled
2.11.6.5.1 QueryDSColorRectificationEnabled
Namespace Hierarchy
[C++]
PXCCapture::Device::QueryDSColorRectificationEnabled
[C#]
PXCMCapture.Device.QueryDSColorRectificationEnabled
[Java]
PXCMCapture.Device.QueryDSColorRectificationEnabled
Syntax
[C++]
244
pxcBool QueryDSColorRectificationEnabled(void);
[C#]
Boolean QueryDSColorRectificationEnabled();
[Java]
boolean QueryDSColorRectificationEnabled();
Parameters
None
Description
The QueryDSColorRectificationEnabled function returns the color rectification
status.
Return Status
The color rectification status.
245
2.11.6.5.2 QueryDSDepthRectificationEnabled
Namespace Hierarchy
[C++]
PXCCapture::Device::QueryDSDepthRectificationEnabled
[C#]
PXCMCapture.Device.QueryDSDepthRectificationEnabled
[Java]
PXCMCapture.Device.QueryDSDepthRectificationEnabled
Syntax
[C++]
pxcBool QueryDSDepthRectificationEnabled(void);
[C#]
Boolean QueryDSDepthRectificationEnabled();
[Java]
boolean QueryDSDepthRectificationEnabled();
Parameters
None
Description
The QueryDSDepthRectificationEnabled function returns the depth rectification
status.
Return Status
The depth rectification status.
246
2.11.6.5.3 QueryDSDisparityMultiplier
Namespace Hierarchy
[C++]
PXCCapture::Device::QueryDSDisparityMultiplier
[C#]
PXCMCapture.Device.QueryDSDisparityMultiplier
[Java]
PXCMCapture.Device.QueryDSDisparityMultiplier
Syntax
[C++]
pxcI32 QueryDSDisparityMultiplier(void);
[C#]
Int32 QueryDSDisparityMultiplier();
[Java]
int QueryDSDisparityMultiplier();
Parameters
None
Description
The QueryDSDisparityMultiplier function returns the disparity output scale factor.
The default value is 32.
Return Status
The disparity output scale factor, or PROPERTY_VALUE_INVALID if there is any error
in retrieving the value.
247
2.11.6.5.4 QueryDSDisparityOutputEnabled
Namespace Hierarchy
[C++]
PXCCapture::Device::QueryDSDisparityOutputEnabled
[C#]
PXCMCapture.Device.QueryDSDisparityOutputEnabled
[Java]
PXCMCapture.Device.QueryDSDisparityOutputEnabled
Syntax
[C++]
pxcBool QueryDSDisparityOutputEnabled(void);
[C#]
Boolean QueryDSDisparityOutputEnabled();
[Java]
boolean QueryDSDisparityOutputEnabled();
Parameters
None
Description
The QueryDSDisparityOutputEnabled function returns the disparity output mode.
If true, the output is the inverse distance. Otherwise, the output is the distance (Z).
Return Status
The disparity output mode.
248
2.11.6.5.5 QueryDSDisparityShift
Namespace Hierarchy
[C++]
PXCCapture::Device::QueryDSDisparityShift
[C#]
PXCMCapture.Device.QueryDSDisparityShift
[Java]
PXCMCapture.Device.QueryDSDisparityShift
Syntax
[C++]
pxcI32 QueryDSDisparityShift(void);
[C#]
Int32 QueryDSDisparityShift();
[Java]
int QueryDSDisparityShift();
Parameters
None
Description
The QueryDSDisparityShift function returns the disparity shift value, in millimeters.
Both the minimum depth value and the maximum depth value are shifted to enhance
the resolution of depth values in between.
Return Status
The disparity shift value, or PROPERTY_VALUE_INVALID if there is any error in
retrieving the value.
249
2.11.6.5.6 QueryDSEmitterEnabled
Namespace Hierarchy
[C++]
PXCCapture::Device::QueryDSEmitterEnabled
[C#]
PXCMCapture.Device.QueryDSEmitterEnabled
[Java]
PXCMCapture.Device.QueryDSEmitterEnabled
Syntax
[C++]
pxcBool QueryDSEmitterEnabled(void);
[C#]
Boolean QueryDSEmitterEnabled();
[Java]
boolean QueryDSEmitterEnabled();
Parameters
None
Description
The QueryDSEmitterEnabled function returns the infrared emitter status. If true, the
emitter is enabled.
Return Status
The emitter status.
250
2.11.6.5.7 QueryDSLeftRightCropping
Namespace Hierarchy
[C++]
PXCCapture::Device::QueryDSLeftRightCropping
[C#]
PXCMCapture.Device.QueryDSLeftRightCropping
[Java]
PXCMCapture.Device.QueryDSLeftRightCropping
Syntax
[C++]
pxcBool QueryDSLeftRightCropping(void);
[C#]
Boolean QueryDSLeftRightCropping();
[Java]
boolean QueryDSLeftRightCropping();
Parameters
None
Description
The QueryDSLeftRightCropping function returns the cropping mode for the left/
right images. If true, the left and right images are cropped to match the depth image
resolution.
Return Status
The left/right image cropping mode.
251
2.11.6.5.8 QueryDSLeftRightExposure
Namespace Hierarchy
[C++]
PXCCapture::Device::QueryDSLeftRightExposure
[C#]
PXCMCapture.Device.QueryDSLeftRightExposure
[Java]
PXCMCapture.Device.QueryDSLeftRightExposure
Syntax
[C++]
pxcI32 QueryDSLeftRightExposure(void);
[C#]
Int32 QueryDSLeftRightExposure();
[Java]
int QueryDSLeftRightExposure();
Parameters
None
Description
The QueryDSLeftRightExposure function the left and right stream exposure value, in
milliseconds.
Return Status
The left and right stream exposure value, or PROPERTY_VALUE_INVALID if there is
any error in retrieving the value.
252
2.11.6.5.9 QueryDSLeftRightExposureInfo
Namespace Hierarchy
[C++]
PXCCapture::Device::QueryDSLeftRightExposureInfo
[C#]
PXCMCapture.Device.QueryDSLeftRightExposureInfo
[Java]
PXCMCapture.Device.QueryDSLeftRightExposureInfo
Syntax
[C++]
pxcI32 QueryDSLeftRightExposureInfo(void);
[C#]
Int32 QueryDSLeftRightExposureInfo();
[Java]
int QueryDSLeftRightExposureInfo();
Parameters
None
Description
The QueryDSLeftRightExposureInfo function returns the property value range and
other useful information. See the PropertyInfo structure for details.
Return Status
The PropertyInfo structure instance. If any error, the structure is filled with
PROPERTY_VALUE_INVALID.
253
2.11.6.5.10 QueryDSLeftRightGain
Namespace Hierarchy
[C++]
PXCCapture::Device::QueryDSLeftRightGain
[C#]
PXCMCapture.Device.QueryDSLeftRightGain
[Java]
PXCMCapture.Device.QueryDSLeftRightGain
Syntax
[C++]
pxcI32 QueryDSLeftRightGain(void);
[C#]
Int32 QueryDSLeftRightGain();
[Java]
int QueryDSLeftRightGain();
Parameters
None
Description
The QueryDSLeftRightGain function returns the current depth stream gain
adjustment value, with negative values darker and positive value brighter, and zero as
normal.
Return Status
The gain value, or PROPERTY_VALUE_INVALID if there is any error in retrieving the
value.
254
2.11.6.5.11 QueryDSLeftRightGainInfo
Namespace Hierarchy
[C++]
PXCCapture::Device::QueryDSLeftRightGainInfo
[C#]
PXCMCapture.Device.QueryDSLeftRightGainInfo
[Java]
PXCMCapture.Device.QueryDSLeftRightGainInfo
Syntax
[C++]
pxcI32 QueryDSLeftRightGainInfo(void);
[C#]
Int32 QueryDSLeftRightGainInfo();
[Java]
int QueryDSLeftRightGainInfo();
Parameters
None
Description
The QueryDSLeftRightGainInfo function returns the gain value range and other
useful information. See the PropertyInfo structure for details.
Return Status
The PropertyInfo structure instance. If any error, the structure is filled with
PROPERTY_VALUE_INVALID.
255
2.11.6.5.12 QueryDSMinMaxZ
Namespace Hierarchy
[C++]
PXCCapture::Device::QueryDSMinMaxZ
[C#]
PXCMCapture.Device.QueryDSMinMaxZ
[Java]
PXCMCapture.Device.QueryDSMinMaxZ
Syntax
[C++]
PXCRangeF32 QueryDSMinMaxZ(void);
[C#]
PXCMRangeF32 QueryDSMinMaxZ();
[Java]
PXCMRangeF32 QueryDSMinMaxZ();
Parameters
None
Description
The QueryDSMinMaxZ function returns the minimum and maximum value of the
distance values.
Return Status
The distance value range, as in the RangeF32 structure. If any error, the structure is
filled with PROPERTY_VALUE_INVALID.
256
2.11.6.5.13 SetDSMinMaxZ
Namespace Hierarchy
[C++]
PXCCapture::Device::SetDSMinMaxZ
[C#]
PXCMCapture.Device.SetDSMinMaxZ
[Java]
PXCMCapture.Device.SetDSMinMaxZ
Syntax
[C++]
pxcStatus SetDSMinMaxZ(PXCRangeF32 range);
[C#]
pxcmStatus SetDSMinMaxZ(PXCMRangeF32 range);
[Java]
pxcmStatus SetDSMinMaxZ(PXCMRangeF32 range);
Parameters
range
Description
The SetDSMinMaxZ function sets the distance value minimum and maximum value
range.
Return Status
STATUS_NO_ERROR
STATUS_ITEM_UNAVAILABLE
STATUS_DEVICE_FAILED
2.11.6.5.14 SetDSLeftRightAutoExposure
Namespace Hierarchy
[C++]
PXCCapture::Device::SetDSLeftRightAutoExposure
257
[C#]
PXCMCapture.Device.SetDSLeftRightAutoExposure
[Java]
PXCMCapture.Device.SetDSLeftRightAutoExposure
Syntax
[C++]
pxcStatus
SetDSLeftRightAutoExposure(pxcBool auto);
[C#]
pxcmStatus SetDSLeftRightAutoExposure(Boolean auto);
[Java]
pxcmStatus SetDSLeftRightAutoExposure(boolean auto);
Parameters
auto
Description
The SetDSLeftRightAutoExposure function ensures/disables auto-exposure of the
left and right streams.
Return Status
STATUS_NO_ERROR
STATUS_ITEM_UNAVAILABLE
STATUS_DEVICE_FAILED
2.11.6.5.15 SetDSLeftRightCropping
Namespace Hierarchy
[C++]
PXCCapture::Device::SetDSLeftRightCropping
[C#]
PXCMCapture.Device.SetDSLeftRightCropping
[Java]
258
PXCMCapture.Device.SetDSLeftRightCropping
Syntax
[C++]
pxcStatus SetDSLeftRightCropping(pxcBool enable);
[C#]
pxcmStatus SetDSLeftRightCropping(Boolean enable);
[Java]
pxcmStatus SetDSLeftRightCropping(boolean enable);
Parameters
enable
Description
The SetDSLeftRightCropping function sets the left/right image cropping mode. If
set to true, the left/right images are cropped to match the resolution of the depth
image.
Return Status
STATUS_NO_ERROR
STATUS_ITEM_UNAVAILABLE
STATUS_DEVICE_FAILED
2.11.6.5.16 SetDSLeftRightExposure
Namespace Hierarchy
[C++]
PXCCapture::Device::SetDSLeftRightExposure
[C#]
PXCMCapture.Device.SetDSLeftRightExposure
[Java]
PXCMCapture.Device.SetDSLeftRightExposure
Syntax
259
[C++]
pxcStatus
SetDSLeftRightExposure(pxcI32 value);
[C#]
pxcmStatus SetDSLeftRightExposure(Int32 value);
[Java]
pxcmStatus SetDSLeftRightExposure(int value);
Parameters
value
Description
The SetDSLeftRightExposure function sets the left and right stream exposure value,
in milliseconds.
Return Status
STATUS_NO_ERROR
STATUS_ITEM_UNAVAILABLE
STATUS_DEVICE_FAILED
2.11.6.5.17 SetDSLeftRightGain
Namespace Hierarchy
[C++]
PXCCapture::Device::SetDSLeftRightGain
[C#]
PXCMCapture.Device.SetDSLeftRightGain
[Java]
PXCMCapture.Device.SetDSLeftRightGain
Syntax
[C++]
pxcStatus SetDSLeftRightGain(pxcI32 value);
[C#]
pxcmStatus SetDSLeftRightGain(Int32 value);
260
[Java]
pxcmStatus SetDSLeftRightGain(int value);
Parameters
value
Description
The SetDSLeftRightGain function sets the left and right stream gain adjustment
value, with negative values darker and positive value brighter, and zero as normal.
Return Status
STATUS_NO_ERROR
STATUS_ITEM_UNAVAILABLE
STATUS_DEVICE_FAILED
2.11.6.5.18 SetDSEnableEmitter
Namespace Hierarchy
[C++]
PXCCapture::Device::SetDSEnableEmitter
[C#]
PXCMCapture.Device.SetDSEnableEmitter
[Java]
PXCMCapture.Device.SetDSEnableEmitter
Syntax
[C++]
pxcStatus SetDSEnableEmitter(pxcBool enable);
[C#]
pxcmStatus SetDSEnableEmitter(Boolean enable);
[Java]
pxcmStatus SetDSEnableEmitter(boolean enable);
Parameters
261
enable
Description
The SetDSEnableEmitter function enables/disables the infrared emitter.
Return Status
STATUS_NO_ERROR
STATUS_ITEM_UNAVAILABLE
STATUS_DEVICE_FAILED
2.11.6.5.19 SetDSEnableDisparityOutput
Namespace Hierarchy
[C++]
PXCCapture::Device::SetDSEnableDisparityOutput
[C#]
PXCMCapture.Device.SetDSEnableDisparityOutput
[Java]
PXCMCapture.Device.SetDSEnableDisparityOutput
Syntax
[C++]
pxcStatus SetDSEnableDisparityOutput(pxcBool enable);
[C#]
pxcmStatus SetDSEnableDisparityOutput(Boolean enable);
[Java]
pxcmStatus SetDSEnableDisparityOutput(boolean enable);
Parameters
enable
Description
262
STATUS_ITEM_UNAVAILABLE
STATUS_DEVICE_FAILED
2.11.6.5.20 SetDSDisparityMultiplier
Namespace Hierarchy
[C++]
PXCCapture::Device::SetDSDisparityMultiplier
[C#]
PXCMCapture.Device.SetDSDisparityMultiplier
[Java]
PXCMCapture.Device.SetDSDisparityMultiplier
Syntax
[C++]
pxcStatus SetDSDisparityMultiplier(pxcI32 scale);
[C#]
pxcmStatus SetDSDisparityMultiplier(Int32 scale);
[Java]
pxcmStatus SetDSDisparityMultiplier(int scale);
Parameters
scale
Description
The SetDSDisparityMultiplier function sets the disparity output scale factor. The
default value is 32.
Return Status
263
STATUS_NO_ERROR
STATUS_ITEM_UNAVAILABLE
STATUS_DEVICE_FAILED
2.11.6.5.21 SetDSDisparityShift
Namespace Hierarchy
[C++]
PXCCapture::Device::SetDSDisparityShift
[C#]
PXCMCapture.Device.SetDSDisparityShift
[Java]
PXCMCapture.Device.SetDSDisparityShift
Syntax
[C++]
pxcStatus SetDSDisparityShift(pxcI32 value);
[C#]
pxcmStatus SetDSDisparityShift(Int32 value);
[Java]
pxcmStatus SetDSDisparityShift(int value);
Parameters
value
Description
The SetDSDisparityShift function sets the disparity shift value, in millimeters. Both
the minimum depth value and the maximum depth value are shifted to enhance the
resolution of depth values in between.
Return Status
264
STATUS_NO_ERROR
STATUS_ITEM_UNAVAILABLE
STATUS_DEVICE_FAILED
2.11.6.6 Properties
Description
deviceInfo (+JS,+UWP)
Sources (UWP)
Namespace Hierarchy
[C#]
PXCMCaptureManager.Device.deviceInfo
[JavaScript]
intel.realsense.Device.deviceInfo
[C#/UWP]
Intel.RealSense.Device.DeviceInfo
Syntax
[C#]
DeviceInfo deviceInfo {
get;
}
[JavaScript]
Data Type
{
deviceInfo
DeviceInfo
}
[C#/UWP]
DeviceInfo DeviceInfo {
get;
}
265
Description
The deviceInfo property returns the current device information as described in the
DeviceInfo structure.
Remarks
[C#]
Namespace Hierarchy
Intel.RealSense.Device.Sources
Syntax
IReadOnlyDictionary<StreamType,Object> Sources {
get;
}
Description
The Sources property returns all available stream sources as a dictionary, indexed by
the StreamType enumerator.
For a color source, the stream source is a PerceptionColorFrameSource instance.
For a depth source, the stream source is a PerceptionDepthFrameSource instance.
For an infrared source, the stream source is a PerceptionInfraredFrameSource
instance.
2.11.6.7 Static Functions
Description
FindAllAsync (UWP)
Namespace Hierarchy
Intel.RealSense.Device.FindAllAsync
Syntax
async Task<IReadOnlyList<Device>> FindAllAsync(SenseManager sm);
266
Parameters
sm
Description
The FindAllAsync function returns all available I/O devices.
This is an asynchronous function.
Return Status
The list of available device instances.
2.11.7 Image
Namespace Hierarchy
[C++]
PXCImage
[C#]
PXCMImage
[Java]
PXCMImage
Description
The Image interface manages image buffer access. The application uses the
CreateImage function to create an instance of the Image interface.
Remarks
The Image interface implements the following interfaces:
AddRef: You may use the AddRef function to preserve the Image instance without
making a copy.
Metadata: You may use the Metadata interface to retrieve any meta information
that goes with the image. You can use the QueryInstance function to retrieve an
instance of the Metadata interface.
267
Reference
[C++]
pxcimage.h
[C#/.NET4]
libpxcclr.cs.dll
[C#/Unity]
libpxcclr.unity.dll
[Java]
libpxcclr.java.jar
[Processing]
libpxcclr_processing
Runtime
[C++][C#][Java]
[C++]
PXCImage::ImageInfo iinfo;
memset(&iinfo,0,sizeof(iinfo));
iinfo.width=640;
iinfo.height=480;
iinfo.format=PXCImage::COLOR_FORMAT_RGB24;
PXCImage *image=session->CreateImage(&iinfo);
...
image->Release();
[C#]
PXCMImage.ImageInfo iinfo=new PXCMImage.ImageInfo() {
width=640, height=480, format=PXCMImage.ColorFormat.COLOR_FORMAT_RGB24
};
PXCMImage image=session.CreateImage(iinfo);
...
image.Dispose();
[Java]
PXCMImage.ImageInfo iinfo=new PXCMImage.ImageInfo();
iinfo.width=640;
iinfo.height=480;
268
iinfo.format=PXCMImage.ColorFormat.COLOR_FORMAT_RGB24;
PXCMImage image=session.CreateImage(iinfo);
...
image.close();
See Also
Constants
Member Functions
Properties (C#)
2.11.7.1 Constants
Description
CUID
NUM_OF_PLANES
METADATA_DEVICE_PROPERTIES
METADATA_DEVICE_PROJECTION
269
Member Functions
Description
AcquireAccess
ReleaseAccess
QueryInfo
QueryOptions
QueryTimeStamp
QueryStreamType
SetOptions
SetTimeStamp
SetStreamType
AddRef
CopyImage
ImportData
ExportData
2.11.7.2.1 AcquireAccess
Namespace Hierarchy
[C++]
PXCImage::AcquireAccess
[C#]
PXCMImage.AcquireAccess
[Java]
PXCMImage.AcquireAccess
Syntax
[C++]
pxcStatus AcquireAccess(Access access, PixelFormat format, Rotation
rotation, Option options, ImageData *data);
pxcStatus AcquireAccess(Access access, PixelFormat format, Option
options, ImageData *data);
pxcStatus AcquireAccess(Access access, PixelFormat format, ImageData
*data);
pxcStatus AcquireAccess(Access access, ImageData *data);
[C#]
pxcmStatus AcquireAccess(Access access,
rotation, Option options, out ImageData
pxcmStatus AcquireAccess(Access access,
options, out ImageData data);
pxcmStatus AcquireAccess(Access access,
data);
pxcmStatus AcquireAccess(Access access,
[Java]
pxcmStatus AcquireAccess(Access access, PixelFormat format, Rotation
rotation, Option options, ImageData data);
pxcmStatus AcquireAccess(Access access, PixelFormat format, Option
options, ImageData data);
pxcmStatus AcquireAccess(Access access, PixelFormat format, ImageData
data);
pxcmStatus AcquireAccess(Access access, ImageData data);
270
Parameters
access
format
rotation
options
data
Description
The AcquireAccess function locks the image buffer for exclusive access. If the
specified pixel format is not available for the image storage, the function creates an
internal copy that matches the pixel format. The function returns the internal data
buffer pointers in the output ImageData structure.
If the format parameter is NULL or omitted, the function returns the pixel format in
which the image was created.
Return Status
STATUS_NO_ERROR
STATUS_DEVICE_BUSY
STATUS_PARAM_UNSUPPORTED
Example
Example 56 shows how to get access to the image data.
Example 56: Access to the Image Data
[C++]
PXCImage::ImageData data;
271
Namespace Hierarchy
[C++]
PXCImage::AddRef
[C#]
PXCMImage.AddRef
[Java]
PXCMImage.AddRef
Syntax
[C++]
void AddRef(void);
[C#]
272
void AddRef();
[Java]
void AddRef();
Parameters
None
Description
The AddRef function increases the reference counter of the current instance.
The application can use this function to preserve the image instance without making a
copy. Then after use, the application must release the image instance.
Return Status
None
2.11.7.2.3 CopyImage
Namespace Hierarchy
[C++]
PXCImage::CopyImage
[C#]
PXCMImage.CopyImage
[Java]
PXCMImage.CopyImage
Syntax
[C++]
pxcStatus CopyImage(PXCImage *image);
[C#]
pxcmStatus CopyImage(PXCMImage image);
[Java]
pxcmStatus CopyImage(PXCMImage image);
Parameters
273
image
Description
The CopyImage function copies the source image to the image storage.
Return Status
STATUS_NO_ERROR
STATUS_PARAM_UNSUPPORTED
2.11.7.2.4 ExportData
Namespace Hierarchy
[C++]
PXCImage::ExportData
[C#]
PXCMImage.ExportData
[Java]
PXCMImage.ExportData
Syntax
[C++]
pxcStatus
ExportData(ImageData *data);
[C#]
pxcmStatus ExportData(ImageData data);
[Java]
pxcmStatus ExportData(ImageData data);
Parameters
data
Description
274
The ExportData function locks the image buffer, exports the data in the described
format and to the specified buffers, and then unlocks the image buffer.
Return Status
STATUS_NO_ERROR
STATUS_DEVICE_BUSY
STATUS_PARAM_UNSUPPORTED
2.11.7.2.5 ImportData
Namespace Hierarchy
[C++]
PXCImage::ImportData
[C#]
PXCMImage.ImportData
[Java]
PXCMImage.ImportData
Syntax
[C++]
pxcStatus ImportData(ImageData *data);
[C#]
pxcmStatus ImportData(ImageData data);
[Java]
pxcmStatus ImportData(ImageData data);
Parameters
data
Description
275
The ImportData function locks the image buffer, imports the data in the described
format and from the specified buffers, and then unlocks the image buffer.
Return Status
STATUS_NO_ERROR
STATUS_DEVICE_BUSY
STATUS_PARAM_UNSUPPORTED
2.11.7.2.6 QueryInfo
Namespace Hierarchy
[C++]
PXCImage::QueryInfo
[C#]
PXCMImage.QueryInfo
[Java]
PXCMImage.QueryInfo
Syntax
[C++]
ImageInfo QueryInfo(void);
[C#]
ImageInfo QueryInfo();
[Java]
ImageInfo QueryInfo();
Parameters
None
Description
The QueryInfo function returns the image properties.
276
Return Status
The ImageInfo structure
Remarks
[C#]
2.11.7.2.7 QueryOptions
Namespace Hierarchy
[C++]
PXCImage::QueryOptions
[C#]
PXCMImage.QueryOptions
[Java]
PXCMImage.QueryOptions
Syntax
[C++]
Option QueryOptions(void);
[C#]
Option QueryOptions();
[Java]
Option QueryOptions();
Parameters
None
Description
The QueryOptions function returns the image option flags.
Return Status
The image option flags as ImageOption.
277
Remarks
[C#]
2.11.7.2.8 QueryStreamType
Namespace Hierarchy
[C++]
PXCImage::QueryStreamType
[C#]
PXCMImage.QueryStreamType
[Java]
PXCMImage.QueryStreamType
Syntax
[C++]
StreamType QueryStreamType(void);
[C#]
StreamType QueryStreamType();
[Java]
StreamType QueryStreamType();
Parameters
None
Description
The QueryStreamType function returns the stream type of the image.
Return Status
The stream type.
Remarks
[C#]
278
279
2.11.7.2.9 QueryTimeStamp
Namespace Hierarchy
[C++]
PXCImage::QueryTimeStamp
[C#]
PXCMImage.QueryTimeStamp
[Java]
PXCMImage.QueryTimeStamp
Syntax
[C++]
pxcI64 QueryTimeStamp(void);
[C#]
Int64 QueryTimeStamp();
[Java]
long QueryTimeStamp();
Parameters
None
Description
The QueryTimeStamp function returns the image time stamp, in 100 ns.
Return Status
The time stamp value.
Remarks
[C#]
2.11.7.2.10 ReleaseAccess
Namespace Hierarchy
[C++]
PXCImage::ReleaseAccess
280
[C#]
PXCMImage.ReleaseAccess
[Java]
PXCMImage.ReleaseAccess
Syntax
[C++]
pxcStatus ReleaseAccess(ImageData *data);
[C#]
pxcmStatus ReleaseAccess(ImageData data);
[Java]
pxcmStatus ReleaseAccess(ImageData data);
Parameters
data
Description
The ReleaseAccess function releases the lock to the image storage.
Return Status
STATUS_NO_ERROR
2.11.7.2.11 SetOptions
Namespace Hierarchy
[C++]
PXCImage::SetOptions
[C#]
PXCMImage.SetOptions
[Java]
PXCMImage.SetOptions
Syntax
[C++]
281
Parameters
option
Description
The SetOptions function sets the image options.
Return Status
None
Remarks
[C#]
2.11.7.2.12 SetStreamType
Namespace Hierarchy
[C++]
PXCImage::SetStreamType
[C#]
PXCMImage.SetStreamType
[Java]
PXCMImage.SetStreamType
Syntax
[C++]
void SetTimeStamp(StreamType type);
[C#]
void SetTimeStamp(StreamType type);
282
[Java]
void SetTimeStamp(StreamType type);
Parameters
type
Description
The SetStreamType function sets the stream type value.
Return Status
None
Remarks
[C#]
2.11.7.2.13 SetTimeStamp
Namespace Hierarchy
[C++]
PXCImage::SetTimeStamp
[C#]
PXCMImage.SetTimeStamp
[Java]
PXCMImage.SetTimeStamp
Syntax
[C++]
void SetTimeStamp(pxcI64 ts);
[C#]
void SetTimeStamp(Int64 ts);
[Java]
void SetTimeStamp(long ts);
283
Parameters
ts
Description
The SetTimeStamp function sets the image time stamp.
Return Status
None
Remarks
[C++]
N/A
[C#]
N/A
[JavaScript]
N/A
[C#/UWP]
N/A
284
Property
Description
info
options
timeStamp
streamType
2.11.7.3.1 info
Namespace Hierarchy
Image.info
Syntax
ImageInfo info {
get;
}
Description
The imageInfo property gets the image data configuration information. See the
ImageInfo definition for details.
Remarks
The application can also use member function QueryInfo.
2.11.7.3.2 options
Namespace Hierarchy
Image.options
Syntax
Option options {
get; set;
}
Description
The options property gets/sets the image options. See the Option definition for
details.
Remarks
The application can also use member functions QueryOptions and SetOptions.
2.11.7.3.3 timeStamp
Namespace Hierarchy
285
Image.timeStamp
Syntax
Int64 timeStamp {
get; set;
}
Description
The timeStamp property gets/sets the image time stamp, unit in 100ns.
Remarks
The application can also use member functions QueryTimeStamp and
SetTimeStamp.
2.11.7.3.4 streamType
Namespace Hierarchy
Image.streamType
Syntax
StreamType streamType {
get; set;
}
Description
The streamType property gets/sets the image stream type value.
Remarks
The application can also use member functions QueryStreamType and
SetStreamType.
286
NativeTexturePlugin
Description
The NativeTexturePlugin interface provides member function to update
Texture2D texture with color and depth images in Unity. Unlike ToTexture2D, the
NativeTexturePlugin interface uploads BGRA image data to the GPU directly through
the graphics API.
Supports only Direct3D* 9, Direct3D* 11 and OpenGL* 2.0 in Unity 5.2.3p3 and
above.
You can use the Activate function to create an instance of the
NativeTexturePlugin interface.
Reference
libpxcclr.unity.dll
libpxccpp2c.dll (native graphics API implementation)
Examples
Example 57 shows how to update a Texture2D with a color image.
Example 57: Update the Texture2D with a Color image
287
See Also
Member Functions
Static Functions
288
Description
Namespace Hierarchy
NativeTexturePlugin.UpdateTextureNative
Syntax
void UpdateTextureNative(PXCMImage image, System.IntPtr
texture2DPtr);
Parameters
image
texture2DPtr
Description
The UpdateTextureNative function uploads the BGRA image data to GPU
directly through graphics API. Supports only Direct3D*9, Direct3D*11 and
OpenGL*2.0 on Unity* 5.2.3.p3 and above.
An instance of UpdateTextureNative class must be retrieved once using
Activate before calling UpdateTextureNative function.
The pointer to Texture2D passed must be of correct dimensions (width,
height) and must not change during runtime . The Texture2D must always be
created with TextureFormat.BGRA32.
Return Status
None
289
Static Functions
Description
Activate(Unity)
Namespace Hierarchy
NativeTexturePlugin.Activate
Syntax
static NativeTexturePlugin Activate();
Parameters
None
Description
The Activate function creates a NativeTexturePlugin Instance.
Internally, the function creates an empty gameObject with the name
"NativeTextureHandler" during play mode and adds the
NativeTexturePlugin component to it.
Return Status
The NativeTexturePlugin instance.
2.11.9 Metadata
Namespace Hierarchy
[C++]
PXCMetadata
[C#]
PXCMMetadata
[Java]
PXCMMetadata
290
Description
The Metadata interface manages the meta data storage. The Session, Image, Audio
and Photo implementations expose the Metadata interface.
Reference
[C++]
pxcmetadata.h
[C#/.NET4]
libpxcclr.cs.dll
[C#/Unity]
libpxcclr.unity.dll
[Java]
libpxcclr.java.jar
[Processing]
libpxcclr_processing
Runtime
[C++][C#][Java]
Description
CUID
291
Member Functions
Description
AttachBuffer
AttachSerializable
CreateSerializable
DetachMetadata
QueryBuffer
QueryBufferSize
QueryMetadata
QueryUID
2.11.9.2.1 AttachBuffer
Namespace Hierarchy
[C++]
PXCMetaData::AttachBuffer
[C#]
PXCMMetaData.AttachBuffer
[Java]
PXCMMetaData.AttachBuffer
Syntax
[C++]
pxcStatus AttachBuffer(pxcUID id, pxcBYTE *buffer, pxcI32 size);
[C#]
pxcmStatus AttachBuffer(Int32 id, Byte[] buffer);
[Java]
pxcmStatus AttachBuffer(int id, byte[] buffer);
Parameters
id
buffer
size
Description
The AttachBuffer function attaches a byte buffer to the meta data storage.
292
Return Status
STATUS_NO_ERROR
2.11.9.2.2 AttachSerializable
Namespace Hierarchy
[C++]
PXCMetaData::AttachSerializable
[C#]
PXCMMetaData.AttachSerializable
[Java]
PXCMMetaData.AttachSerializable
Syntax
[C++]
pxcStatus AttachSerializable(pxcUID id, PXCBase *serializable);
[C#]
pxcmStatus AttachSerializable(Int32 id, PXCMBase serializable);
[Java]
pxcmStatus AttachSerializable(int id, PXCMBase serializable);
Parameters
id
serializable
Description
The AttachSerializable function serializes the interface implementation and
attaches the serialized data to the meta data storage. The application can later
recreate the interface implementation from the serialized data.
Return Status
STATUS_NO_ERROR
293
2.11.9.2.3 CreateSerializable
Namespace Hierarchy
[C++]
PXCMetaData::CreateSerializable
[C#]
PXCMMetaData.CreateSerializable
[Java]
PXCMMetaData.CreateSerializable
Syntax
[C++]
pxcStatus CreateSerializable(pxcUID id, pxcUID cuid, void
**serializable);
[C#]
pxcmStatus CreateSerializable(Int32 id, Int32 cuid, out PXCMBase
serializable);
[Java]
pxcmStatus CreateSerializable(int id, PXCMBase serializable);
Parameters
id
cuid
serializable
Description
The CreateSerializable function recreates the interface implementation from the
serialized data in the metadata storage.
Return Status
STATUS_NO_ERROR
Remarks
[C++]
294
The application may use the CreateSerialize<T> template to enable type checking.
For example, the following statement recreates the interface Y implementation in
variable y:
pxcStatus sts=metadata->CreateSerializable<Y>(id,&y);
[C#]
The application may use the CreateSerialize<T> template to enable type checking.
For example, the following statement recreates the interface Y implementation in
variable y:
pxcmStatus sts=metadata.CreateSerializable<Y>(id, out y);
[Java]
The application must explicitly construct the returned instance using the default
constructor and then pass the instance to the function:
Y y=new Y();
pxcmStatus sts=metadata.CreateSerializable(id, y);
2.11.9.2.4 DetachMetaData
Namespace Hierarchy
[C++]
PXCMetaData::DetachMetadata
[C#]
PXCMMetaData.DetachMetadata
[Java]
PXCMMetaData.DetachMetadata
Syntax
[C++]
pxcStatus DetachMetadata(pxcUID id);
[C#]
pxcmStatus DetachMetadata(Int32 id);
[Java]
pxcmStatus DetachMetadata(int id);
Parameters
id
295
Description
The DetachMetadata function detaches the identified metadata.
Return Status
STATUS_NO_ERROR
STATUS_ITEM_UNAVAILABLE
2.11.9.2.5 QueryBuffer
Namespace Hierarchy
[C++]
PXCMetaData::QueryBuffer
[C#]
PXCMMetaData.QueryBuffer
[Java]
PXCMMetaData.QueryBuffer
Syntax
[C++]
pxcStatus QueryBuffer(pxcUID id, pxcBYTE *buffer, pxcI32 size);
[C#]
pxcmStatus QueryBuffer(Int32 id, out Byte[] buffer);
[Java]
pxcmStatus QueryBuffer(Int32 id, byte[] buffer);
Parameters
id
buffer
size
Description
296
The QueryBuffer function retrieves the byte buffer content from the metadata
storage. The application must allocate the buffer. The application can use the
QueryBufferSize function to get the buffer size.
Return Status
STATUS_NO_ERROR
STATUS_ITEM_UNAVAILABLE
2.11.9.2.6 QueryBufferSize
Namespace Hierarchy
[C++]
PXCMetaData::QueryBufferSize
[C#]
PXCMMetaData.QueryBufferSize
[Java]
PXCMMetaData.QueryBufferSize
Syntax
[C++]
pxcI32 QueryBufferSize(pxcUID id);
[C#]
Int32 QueryBufferSize(Int32 id);
[Java]
int QueryBufferSize(Int32 id);
Parameters
id
Description
The QueryBufferSize function retrieves the size of the byte buffer content from the
metadata storage.
Return Status
297
Namespace Hierarchy
[C++]
PXCMetaData::QueryMetaData
[C#]
PXCMMetaData.QueryMetaData
[Java]
PXCMMetaData.QueryMetaData
Syntax
[C++]
pxcStatus QueryMetadata(pxcI32 idx, pxcUID *id);
[C#]
pxcmStatus QueryMetadata(Int32 idx, out Int32 id);
[Java]
pxcmStatus QueryMetadata(int idx, int[] id);
Parameters
idx
id
Description
The QueryMetaData function enumerates all available meta data identifiers by
returning the meta data identifier of the given index.
Return Status
298
STATUS_NO_ERROR
STATUS_ITEM_UNAVAILABLE
2.11.9.2.8 QueryUID
Namespace Hierarchy
[C++]
PXCMetaData::QueryUID
[C#]
PXCMMetaData.QueryUID
[Java]
PXCMMetaData.QueryUID
Syntax
[C++]
pxcUID QueryUID(void);
[C#]
Int32 QueryUID();
[Java]
int QueryUID();
Parameters
None
Description
The QueryUID function returns a unique identifier for the next meta data item or zero
if the operation failed.
Return Status
The unique identifier value.
Remarks
[C++]
N/A
[C#]
N/A
[JavaScript]
N/A
[C#/UWP]
N/A
Description
uid
2.11.9.3.1 uid
Namespace Hierarchy
PXCMMetaData.uid
Syntax
Int32 uid {
get;
};
Description
The uid property returns a unique identifier for the next meta data item or zero if the
operation failed.
Remarks
The C# application can use function QueryUID.
2.11.10 PlatformCameraControl
Namespace Hierarchy
[C++]
PXCPlatformCameraControl
300
[C#]
PXCMPlatformCameraControl
[Java]
PXCMPlatformCameraControl
Description
The PlatformCameraControl interface provides member functions to perform the
platform camera snapshot operation.
You can use the QueryInstance function to retrieve an instance of the
PlatformCameraControl interface from an active R200 Enhanced Device instance.
You should not release the resulting PlatformCameraControl instance as the
QueryInstance function returns the Device object instance directly.
Reference
[C++]
pxcplatformcamera.h
[C#/.NET4]
libpxcclr.cs.dll
[C#/Unity]
libpxcclr.unity.dll
[Java]
libpxcclr.java.jar
[Processing]
libpxcclr_processing
Runtime
[C++][C#][Java]
[C++]
// sm is the SenseManager instance
PXCCapture::Device *device=sm->QueryCaptureManager()->QueryDevice();
301
PXCPlatformCameraControl *pcc=device>QueryInstance<PXCPlatformCameraControl>();
[C#]
// sm is the SenseManager instance
PXCMCapture.Device device=sm.captureManager.device;
PXCMPlatformCameraControl
pcc=device.QueryInstance<PXCMPlatformCameraControl>();
[Java]
// sm is the SenseManager instance
PXCMCapture.Device device=sm.QueryCaptureManager().QueryDevice();
PXCMPlatformCameraControl pcc=(PXCMPlatformCameraControl)
device.QueryInstance(PXCMPlatformCameraControl.CUID);
See Also
Constants
Callbacks and Delegates
Member Functions
302
Description
Handler
2.11.10.1.1 Handler
Namespace Hierarchy
[C++]
PXCPlatformCameraControl::Handler
[C#]
PXCMPlatformCameraControl.Handler
[Java]
PXCMPlatformCameraControl.Handler
Description
The Handler interface defines a set of callback functions/delegates for the snapshot
operation. You must implement the interface and pass as an argument to the
TakePhoto function.
Examples
Example 59 shows how to take a snapshot photo.
Example 59: Take a Snapshot Photo
[C++]
class MyHandler: public PXCPlatformCameraControl::Handler {
public:
virtual void PXCAPI OnPlatformCameraSample(PXCCapture::Sample& sample)
{
}
virtual void PXCAPI OnPlatformCameraError() {
}
};
// pcc is a PXCPlatformCameraControl interface
// Retrieve the photo configuration
PXCCapture::Device::StreamProfile profile={};
pcc->EnumPhotoProfile(0, &profile);
// Take a photo
303
MyHandler handler;
pcc->TakePhoto(profile, &hanlder);
[C#]
static void OnPlatformCameraSample(PXCMCapture.Sample sample) {
}
static void OnPlatformCameraError() {
}
// pcc is a PXCMPlatformCameraControl interface
// Retrieve the photo configuration
PXCMCapture.Device.StreamProfile profile;
pcc.EnumPhotoProfile(0, out profile);
// Take a photo
PXCMPlatformCameraHandler handler=new PXCMPlatformCameraHandler() {
onPlatformCameraSample=OnPlatformCameraSample,
onPlatformCameraError=OnPlatformCameraError
};
pcc.TakePhoto(profile, hanlder);
[Java]
class MyHandler impements PXCMPlatformCameraControl.Handler {
public void OnPlatformCameraSample(PXCMCapture.Sample sample) {
}
public void OnPlatformCameraError() {
}
};
// pcc is a PXCMPlatformCameraControl interface
// Retrieve the photo configuration
PXCMCapture.Device.StreamProfile profile=new
PXCMCapture.Device.StreamProfile();
pcc.EnumPhotoProfile(0, profile);
// Take a photo
MyHandler handler=new MyHandler();
pcc.TakePhoto(profile, hanlder);
See Also
Member Functions
304
305
Member Functions
Description
OnPlatformCameraSample
OnPlatformCameraError
Namespace Hierarchy
[C++]
PXCPlatformCameraControl::Handler::OnPlatformCameraSample
[C#]
PXCMPlatformCameraControl.Handler.OnPlatformCameraSample
[Java]
PXCMPlatformCameraControl.Handler.OnPlatformCameraSample
Syntax
[C++]
void OnPlatformCameraSample(Sample& sample);
[C#]
delegate void OnPlatformCameraSample(Sample sample);
[Java]
delegate void OnPlatformCameraSample(Sample sample);
Parameters
sample
Description
The OnPlatformCameraSample function is invoked when the platform camera
delivers the snapshot sample.
The application should not perform any lengthy operation in the callback function.
Return Status
None
Remarks
The sample instances is internally managed. Do not release the sample instance or
any image instances.
Namespace Hierarchy
[C++]
PXCPlatformCameraControl::Handler::OnPlatformCameraError
306
[C#]
PXCMPlatformCameraControl.Handler.OnPlatformCameraError
[Java]
PXCMPlatformCameraControl.Handler.OnPlatformCameraError
Syntax
[C++]
void OnPlatformCameraError(void);
[C#]
delegate void OnPlatformCameraError();
[Java]
void OnPlatformCameraError();
Parameters
None
Description
The OnPlatformCameraError function is invoked when there is any error during the
platform camera operations.
The application should not perform any lengthy operation in the callback function.
Return Status
None
2.11.10.2 Constants
307
Constant
Description
CUID
308
Member Functions
Description
EnumPhotoProfile
TakePhoto
CreatePhotoProjection
2.11.10.3.1 CreatePhotoProjection
Namespace Hierarchy
[C++]
PXCPlatformCameraControl::CreatePhotoProjection
[C#]
PXCMPlatformCameraControl.CreatePhotoProjection
[Java]
PXCMPlatformCameraControl.CreatePhotoProjection
Syntax
[C++]
PXCProjection* CreatePhotoProjection(StreamProfile& profile);
[C#]
PXCMProjection CreatePhotoProjection(StreamProfile profile);
[Java]
PXCMProjection CreatePhotoProjection(StreamProfile profile);
Parameters
profile
Description
The CreatePhotoProjection function returns the Projection instance that is
associated with the snapshot photo(s).
You must release the Projection instance after use.
Return Status
The Projection instance or NULL/null if there is any error.
2.11.10.3.2 EnumPhotoProfile
Namespace Hierarchy
[C++]
PXCPlatformCameraControl::EnumPhotoProfile
[C#]
309
PXCMPlatformCameraControl.EnumPhotoProfile
[Java]
PXCMPlatformCameraControl.EnumPhotoProfile
Syntax
[C++]
pxcStatus EnumPhotoProfile(pxcI32 index, StreamProfile* profile);
[C#]
pxcmStatus EnumPhotoProfile(Int32 index, out StreamProfile profile);
[Java]
pxcmStatus EnumPhotoProfile(int index, StreamProfile profile);
Parameters
index
profile
Description
The EnumPhotoProfile function enumerates all available snapshot configurations.
Return Status
STATUS_NO_ERROR
STATUS_ITEM_UNAVAILABLE
2.11.10.3.3 TakePhoto
Namespace Hierarchy
[C++]
PXCPlatformCameraControl::TakePhoto
[C#]
PXCMPlatformCameraControl.TakePhoto
[Java]
PXCMPlatformCameraControl.TakePhoto
310
Syntax
[C++]
pxcStatus TakePhoto(StreamProfile& profile, Handler* handler);
[C#]
pxcmStatus TakePhoto(StreamProfile profile, Handler handler);
[Java]
pxcmStatus TakePhoto(StreamProfile profile, Handler handler);
Parameters
profile
hanlder
Description
The TakePhoto function initiates the snapshot operation. When ready, the platform
camera delivers the snapshot sample through the Handler callback.
Return Status
STATUS_NO_ERROR
Examples
Example 60 shows how to take a snapshot photo.
Example 60: Take a Snapshot Photo
[C++]
class MyHandler: public PXCPlatformCameraControl::Handler {
public:
virtual void PXCAPI OnPlatformCameraSample(PXCCapture::Sample& sample)
{
}
virtual void PXCAPI OnPlatformCameraError() {
}
};
// pcc is a PXCPlatformCameraControl interface
// Retrieve the photo configuration
PXCCapture::Device::StreamProfile profile={};
pcc->EnumPhotoProfile(0, &profile);
311
// Take a photo
MyHandler handler;
pcc->TakePhoto(profile, &hanlder);
[C#]
static void OnPlatformCameraSample(PXCMCapture.Sample sample) {
}
static void OnPlatformCameraError() {
}
// pcc is a PXCMPlatformCameraControl interface
// Retrieve the photo configuration
PXCMCapture.Device.StreamProfile profile;
pcc.EnumPhotoProfile(0, out profile);
// Take a photo
PXCMPlatformCameraHandler handler=new PXCMPlatformCameraHandler() {
onPlatformCameraSample=OnPlatformCameraSample,
onPlatformCameraError=OnPlatformCameraError
};
pcc.TakePhoto(profile, hanlder);
[Java]
class MyHandler impements PXCMPlatformCameraControl.Handler {
public void OnPlatformCameraSample(PXCMCapture.Sample sample) {
}
public void OnPlatformCameraError() {
}
};
// pcc is a PXCMPlatformCameraControl interface
// Retrieve the photo configuration
PXCMCapture.Device.StreamProfile profile=new
PXCMCapture.Device.StreamProfile();
pcc.EnumPhotoProfile(0, profile);
// Take a photo
MyHandler handler=new MyHandler();
pcc.TakePhoto(profile, hanlder);
2.11.11 PowerState
Namespace Hierarchy
[C++]
PXCPowerState
[C#]
PXCMPowerState
312
[Java]
PXCMPowerState
Description
The PowerState interface manages the SDK implementation power state. Any SDK I/
O or algorithm module implementation that is power aware exposes this interface.
The Session also exposes this interface for application-level power state control,
which you can use the CreatePowerManager function to create an instance.
Reference
[C++]
pxcpowerstate.h
[C#/.NET4]
libpxcclr.cs.dll
[C#/Unity]
libpxcclr.unity.dll
[Java]
libpxcclr.java.jar
[Processing]
libpxcclr_processing
Runtime
[C++][C#][Java]
[C++]
// session is a PXCSession instance
PXCPowerState *ps=session->CreatePowerManager();
ps->SetState(PXCPowerState::STATE_BATTERY);
[C#]
// session is a PXCMSession instance
PXCMPowerState ps=session.CreatePowerManager();
ps.SetState(PXCMPowerState.PowerState.STATE_BATTERY);
[Java]
313
See Also
Constants
Member Functions
314
2.11.11.1 Constants
Description
CUID
Description
QueryState
SetState
QueryInactivityInterval
SetInactivityInterval
2.11.11.2.1 QueryInactivityInterval
Namespace Hierarchy
[C++]
PXCPowerState::QueryInactivityInterval
[C#]
PXCMPowerState.QueryInactivityInterval
[Java]
PXCMPowerState.QueryInactivityInterval
Syntax
[C++]
pxcI32 QueryInactivityInterval(void);
[C#]
Int32 QueryInactivityInterval();
[Java]
int QueryInactivityInterval();
Parameters
None
315
Description
The QueryInactivityInterval function returns the currently set algorithm inactivity
internal value.
Return Status
The current inactivity internal value, in second.
2.11.11.2.2 QueryState
Namespace Hierarchy
[C++]
PXCPowerState::QueryState
[C#]
PXCMPowerState.QueryState
[Java]
PXCMPowerState.QueryState
Syntax
[C++]
State QueryState(void);
[C#]
State QueryState();
[Java]
State QueryState();
Parameters
None
Description
The QueryState function returns the current power state of an SDK module.
Return Status
The current power state mode. See the State enumerator for details.
316
2.11.11.2.3 SetInactivityInterval
Namespace Hierarchy
[C++]
PXCPowerState::SetInactivityInterval
[C#]
PXCMPowerState.SetInactivityInterval
[Java]
PXCMPowerState.SetInactivityInterval
Syntax
[C++]
pxcStatus SetInactivityInterval(pxcI32 interval);
[C#]
pxcmStatus SetInactivityInterval(Int32 interval);
[Java]
pxcmStatus SetInactivityInterval(int interval);
Parameters
interval
Description
The SetInactivityInterval function sets the algorithm inactivity interval value. The
power state is switched to the power saving mode if there is extended period of
inactivity.
The inactivity definition is module specific. For example, for the hand module,
inactivity is defined as there is no hand in the scene. The SDK consolidate all running
module in-activities to determine the camera/device power state.
Return Status
STATUS_NO_ERROR
2.11.11.2.4 SetState
Namespace Hierarchy
[C++]
317
PXCPowerState::SetState
[C#]
PXCMPowerState.SetState
[Java]
PXCMPowerState.SetState
Syntax
[C++]
pxcStatus SetState(State state);
[C#]
pxcmStatus SetState(State state);
[Java]
pxcmStatus SetState(State state);
Parameters
state
Description
The SetState function sets the module power state.
The SetState function works only when an active device is available. For the
application that uses the SenseManager interface, the application can only use the
SetState function after the Init function.
Return Status
STATUS_NO_ERROR
STATUS_PARAM_UNSUPPORTED
2.11.12 Projection
Namespace Hierarchy
[C++]
PXCProjection
318
[C#]
PXCMProjection
[Java]
PXCMProjection
Description
The Projection interface provides functions to map or project among color, depth
and world coordinates.
The application can use the CreateProjection function to create an instance of the
Projection interface.
The Projection interface implements the Calibration interface. You can get
device calibration and transformation parameters from the Calibration interface.
Reference
[C++]
pxcprojection.h
[C#/.NET4]
libpxcclr.cs.dll
[C#/Unity]
libpxcclr.unity.dll
[Java]
libpxcclr.java.jar
[Processing]
libpxcclr_processing
Runtime
[C++][C#][Java]
[C++]
/* device is an instance of the PXCCapture::Device interface */
PXCProjection *projection=device->CreateProjection();
319
...
/* Release the interface */
projection->Release();
[C#]
/* device is an instance of the PXCMCapture.Device interface */
PXCMProjection projection=device.CreateProjection();
...
/* Dispose the interface */
projection.Dispose();
[Java]
/* device is an instance of the PXCMCapture.Device interface */
PXCMProjection projection=device.CreateProjection();
...
/* Release the interface */
projection.close();
See Also
Constants
Member Functions
320
2.11.12.1 Constants
Description
CUID
Description
MapColorToDepth
MapDepthToColor
ProjectDepthToCamera
ProjectColorToCamera
ProjectCameraToDepth
ProjectCameraToColor
QueryUVMap
QueryInvUVMap
QueryVertices
CreateColorImageMappedToDepth
CreateDepthImageMappedToColor
SelectOption
2.11.12.2.1 CreateColorImageMappedToDepth
Namespace Hierarchy
[C++]
PXCProjection::CreateColorImageMappedToDepth
[C#]
PXCMProjection.CreateColorImageMappedToDepth
[Java]
PXCMProjection.CreateColorImageMappedToDepth
321
Syntax
[C++]
PXCImage CreateColorImageMappedToDepth(PXCImage *depth, PXCImage *color);
[C#]
PXCMImage CreateColorImageMappedToDepth(PXCMImage depth, PXCMImage
color);
[Java]
PXCMImage CreateColorImageMappedToDepth(PXCMImage depth, PXCMImage
color);
Parameters
depth
color
Description
The CreateColorImageMappedToDepth function creates a color image that is spatially
aligned with, and the same size as the depth image. Each input color image pixels are
mapped to the output color image.
Return Status
The created color image instance. The application must release the instance after
use.
2.11.12.2.2 CreateDepthImageMappedToColor
Namespace Hierarchy
[C++]
PXCProjection::CreateDepthImageMappedToColor
[C#]
PXCMProjection.CreateDepthImageMappedToColor
[Java]
PXCMProjection.CreateDepthImageMappedToColor
Syntax
[C++]
322
Parameters
depth
color
Description
The CreateDepthImageMappedToColor function creates a depth image that is
spatially aligned with, and the same size as the color image. Each input depth image
pixels are mapped to the output depth image.
Return Status
The created depth image instance. The application must release the instance after
use.
2.11.12.2.3 MapColorToDepth
Namespace Hierarchy
[C++]
PXCProjection::MapColorToDepth
[C#]
PXCMProjection.MapColorToDepth
[Java]
PXCMProjection.MapColorToDepth
Syntax
[C++]
pxcStatus MapColorToDepth(PXCImage *depth, pxcI32 npoints, PXCPointF32
*pos_ij, PXCPointF32 *pos_uv);
[C#]
323
Parameters
depth
npoints
pos_ij
pos_uv
Description
The MapColorToDepth function maps an array of color coordinates to depth
coordinates.
If the function fails to map certain coordinates, for example, some color value is
floored or saturated, the function returns (-1,-1) in the depth coordinates to
indicate the failure.
Return Status
STATUS_NO_ERROR
324
2.11.12.2.4 MapDepthToColor
Namespace Hierarchy
[C++]
PXCProjection::MapDepthToColor
[C#]
PXCMProjection.MapDepthToColor
[Java]
PXCMProjection.MapDepthToColor
Syntax
[C++]
pxcStatus MapDepthToColor(pxcI32 npoints, PXCPoint3DF32 *pos_uvz,
PXCPointF32 *pos_ij);
[C#]
pxcmStatus MapDepthToColor(PXCMPoint3DF32[] pos_uvz, PXCMPointF32[]
pos_ij);
[Java]
pxcmStatus MapDepthToColor(PXCMPoint3DF32[] pos_uvz, PXCMPointF32[]
pos_ij);
Parameters
npoints
pos_uvz
pos_ij
Description
The MapDepthToColor function maps an array of depth coordinates to color
coordinates.
If the function fails to map certain coordinates, for example, some depth value is
floored or saturated, the function returns (-1,-1) in the color coordinates to indicate
the failure.
Return Status
325
STATUS_NO_ERROR
2.11.12.2.5 ProjectCameraToColor
Namespace Hierarchy
[C++]
PXCProjection::ProjectCameraToColor
[C#]
PXCMProjection.ProjectCameraToColor
[Java]
PXCMProjection.ProjectCameraToColor
Syntax
[C++]
pxcStatus ProjectCameraToColor(pxcI32 npoints, PXCPoint3DF32 *pos3d,
PXCPointF32 *pos_ij);
[C#]
pxcmStatus ProjectCameraToColor(PXCMPoint3DF32[] pos3d, PXCMPointF32[]
pos_ij);
[Java]
pxcmStatus ProjectCameraToColor(PXCMPoint3DF32[] pos3d, PXCMPointF32[]
pos_ij);
Parameters
npoints
pos3d
pos_ij
Description
326
2.11.12.2.6 ProjectCameraToDepth
Namespace Hierarchy
[C++]
PXCProjection::ProjectCameraToDepth
[C#]
PXCMProjection.ProjectCameraToDepth
[Java]
PXCMProjection.ProjectCameraToDepth
Syntax
[C++]
pxcStatus ProjectCameraToDepth(pxcI32 npoints, PXCPoint3DF32 *pos3d,
PXCPointF32 *pos_uv);
[C#]
pxcmStatus ProjectCameraToDepth(PXCMPoint3DF32[] pos3d, PXCMPointF32[]
pos_uv);
[Java]
pxcmStatus ProjectCameraToDepth(PXCMPoint3DF32[] pos3d, PXCMPointF32[]
pos_uv);
Parameters
327
npoints
pos3d
pos_uv
Description
The ProjectCameraToDepth function projects an array of world coordinates to the
depth image coordinates.
If the function fails to project certain coordinates, for example, some world coordinate
value is floored or saturated, the function returns (-1,-1) in the depth coordinates to
indicate the failure.
The world coordinates uses the camera coordinate system. The values are in mm.
Return Status
STATUS_NO_ERROR
2.11.12.2.7 ProjectColorToCamera
Namespace Hierarchy
[C++]
PXCProjection::ProjectColorToCamera
[C#]
PXCMProjection.ProjectColorToCamera
[Java]
PXCMProjection.ProjectColorToCamera
Syntax
[C++]
pxcStatus ProjectColorToCamera(pxcI32 npoints, PXCPoint3DF32 *pos_ijz,
PXCPoint3DF32 *pos3d);
[C#]
pxcmStatus ProjectColorToCamera(PXCMPoint3DF32[] pos_ijz,
PXCMPoint3DF32[] pos3d);
[Java]
328
Parameters
npoints
pos_ijz
pos3d
Description
The ProjectColorToCamera function projects color image coordinates to the world
coordinates.
The world coordinates uses the camera coordinate system. The values are in mm.
Return Status
STATUS_NO_ERROR
2.11.12.2.8 ProjectDepthToCamera
Namespace Hierarchy
[C++]
PXCProjection::ProjectDepthToCamera
[C#]
PXCMProjection.ProjectDepthToCamera
[Java]
PXCMProjection.ProjectDepthToCamera
Syntax
[C++]
pxcStatus ProjectDepthToCamera(pxcI32 npoints, PXCPoint3DF32 *pos_uvz,
PXCPoint3DF32 *pos3d);
[C#]
pxcmStatus ProjectDepthToCamera(PXCMPoint3DF32[] pos_uvz,
PXCMPoint3DF32[] pos3d);
329
[Java]
pxcmStatus ProjectDepthToCamera(PXCMPoint3DF32[] pos_uvz,
PXCMPoint3DF32[] pos3d);
Parameters
npoints
pos_uvz
pos3d
Description
The ProjectDepthToCamera function projects depth image coordinates to the world
coordinates.
The world coordinates uses the camera coordinate system. The values are in mm.
Return Status
STATUS_NO_ERROR
2.11.12.2.9 QueryInvUVMap
Namespace Hierarchy
[C++]
PXCProjection::QueryInvUVMap
[C#]
PXCMProjection.QueryInvUVMap
[Java]
PXCMProjection.QueryInvUVMap
Syntax
[C++]
pxcStatus QueryInvUVMap(PXCImage *depth, PXCPointF32 *inv_uvmap);
[C#]
pxcmStatus QueryInvUVMap(PXCMImage depth, PXCMPointF32[] inv_uvmap);
330
[Java]
pxcmStatus QueryInvUVMap(PXCMImage depth, PXCMPointF32[] inv_uvmap);
Parameters
depth
uvmap
Description
The QueryInvUVMap function calculates the Inverse UV map from the depth image.
The Inverse UV map is a PointF32 array of size color width*height. Each pixel value
is a pair of resolution-normalized multipliers that can be used to map the color
coordinates to the depth coordinates as follows:
u
v
where (i,j) is the color pixel, and (u,v) is the mapped depth pixel.
Return Status
STATUS_NO_ERROR
2.11.12.2.10 QueryUVMap
Namespace Hierarchy
[C++]
PXCProjection::QueryUVMap
[C#]
PXCMProjection.QueryUVMap
[Java]
PXCMProjection.QueryUVMap
Syntax
[C++]
pxcStatus QueryUVMap(PXCImage *depth, PXCPointF32 *uvmap);
[C#]
331
Parameters
depth
uvmap
Description
The QueryUVMap function calculates the UV map from the depth image. The UV map
is a PointF32 array of size depth width*height. Each pixel value is a pair of
resolution-normalized multipliers that can be used to map the depth coordinates to
the color coordinates as follows:
2.11.12.2.11 QueryVertices
Namespace Hierarchy
[C++]
PXCProjection::QueryVertices
[C#]
PXCMProjection.QueryVertices
[Java]
PXCMProjection.QueryVertices
Syntax
[C++]
pxcStatus QueryVertices(PXCImage *depth, PXCPoint3DF32 *vertices);
332
[C#]
pxcmStatus QueryVertices(PXCMImage depth, PXCMPoint3DF32[] vertices);
[Java]
pxcmStatus QueryVertices(PXCMImage depth, PXCMPoint3DF32[] vertices);
Parameters
depth
vertices
Description
The QueryVertices function calculates the vertices from the depth image. The
vertices contain the world coordinates in mm.
Return Status
STATUS_NO_ERROR
2.11.12.2.12 SelectOption
Namespace Hierarchy
[C++]
PXCProjection::SelectOption
[C#]
PXCMProjection.SelectOption
[Java]
PXCMProjection.SelectOption
Syntax
[C++]
PXCProjection SelectOption(ProjectionOption option);
[C#]
PXCMProjection SelectOption(ProjectionOption option);
[Java]
PXCMProjection SelectOption(ProjectionOption option);
333
Parameters
option
Description
The SelectOption function selects a different projection function implementation
with the specific options.
Do not release the returned Projection instance.
Return Status
The Projection instance.
Description
The SampleReader interface provides member functions to enable streaming raw
color and depth samples from the I/O device.
You can use the Activate function to create an instance of the SampleReader
interface.
Reference
Intel.Realsense
Examples
Example 63 shows how to stream a color stream.
Example 63: Configure and Stream a Color Stream
using Intel.RealSense;
// Create a SenseManager instance
SenseManager sm=SenseManager.CreateInstance();
334
See Also
Events
Member Functions
Properties
Static Functions
335
2.11.13.1 Events
Description
SampleArrived (UWP)
Namespace Hierarchy
Intel.RealSense.SampleReader.SampleArrived
Syntax
void SampleArrived(Object sender, SampleArrivedEventArgs args);
Parameters
sender
args
Description
The SampleArrived function is invoked when a camera sample is available.
Return Status
None
336
Namespace Hierarchy
Intel.RealSense.SampleArrivedEventArgs
Definition
class SampleArrivedEventArgs {
Sample Sample;
};
Description
The SampleArrivedEventArgs structure describes the SampleArrived event
parameters.
Members
Sample
Description
EnableStream[s] (UWP)
Namespace Hierarchy
Intel.RealSense.SampleReader.EnableStream
Intel.RealSense.SampleReader.EnableStreams
Syntax
void EnableStream(StreamType type, int width, int height,
Single fps, StreamOption options);
void EnableStream(StreamType type, int width, int height,
Single fps);
void EnableStreams(IReadOnlyDictionary<StreamType,
PerceptionVideoProfile> profiles);
337
Parameters
type
width
height
fps
options
profiles
Description
The EnableStream[s] function activates single or multiple synchronized
stream reads in the SenseManager pipeline.
If you use this function to enable multiple streams, the SDK synchronizes all
streams and deliver the samples at the same time.
Create multiple SampleReader instances if you need to read unaligned
samples from different streams.
Return Status
None
2.11.13.3 Properties
Description
sample (UWP)
paused (UWP)
Namespace Hierarchy
338
Intel.RealSense.SampleReader.Sample
Syntax
Sample Sample {
get
};
Description
The sample property returns the available sample (explicitly enabled by the
EnableStream function) from the capture device. If there is no sample
available, the property returns null.
2.11.13.3.2 paused (UWP)
Namespace Hierarchy
Intel.RealSense.SampleReader.Paused
Syntax
Boolean Paused {
get; set;
};
Description
The paused property pauses/resumes sample reading. If paused=false, the
SampleReader no longer accepts samples from the I/O device.
2.11.13.4 Static Functions
Description
Activate (UWP)
Namespace Hierarchy
Intel.RealSense.SampleReader.Activate
339
Syntax
static SampleReader Activate(SenseManager sm, StreamType type,
int width, int height, Single fps, StreamOption options);
static SampleReader Activate(SenseManager sm, StreamType type,
int width, int height, Single fps);
static SampleReader Activate(SenseManager sm);
Parameters
sm
type
width
height
fps
options
Description
The Activate function activates single or multiple stream reads in the
SenseManager pipeline.
Within the SampleReader instance, all initiated stream reads are synchronized.
To read unaligned streams, create multiple SampleReader instances and
enable a different stream for each SampleReader instance.
If you specify any stream configuration, the function invokes the
EnableStream function with the specified stream configuration.
Return Status
The SampleReader instance, or NULL/null if there is any error.
340
Description
The SenseManager helper interface provides a simple interface for some common
application usage cases, that is, one or more processing modules (such as hand
tracking, face analysis and voice recognition) connects directly to an I/O device (or a
playback file).
The general procedure for using the SenseManager interface is as follows:
Configure: The application uses the EnableXXXX set of functions (or the
CreateInstance function from the algorithm interface) to configure the
pipeline. For example, use the EnableStream function to specify a video
stream.
Initialize: The application calls the Init function to initialize the pipeline.
Run the pipeline: The application calls the StreamFrames function (or the
equivalent set of AcquireFrame/ReleaseFrame functions) to loop frames
among the pipeline components.
Handle events: Optionally, the application can override the callback/
delegate/event functions to handle events.
The application can use the CreateInstance function to create an instance of the
SenseManager interface.
Reference
[C++]
pxcsensemanager.h
341
[C#/.NET4]
libpxcclr.cs.dll
[C#/Unity]
libpxcclr.unity.dll
[Java]
libpxcclr.java.jar
[Processing]
libpxcclr_processing
[JavaScript]
realsense.js
[C#/UWP]
Intel.Realsense
Runtime
[C++][C#][Java][JavaScript]
[C++]
// Create a SenseManager instance
PXCSenseManager *sm=PXCSenseManager::CreateInstance();
// Enable the video stream
sm->EnableStream(PXCCapture::STREAM_TYPE_COLOR,0,0,0);
// Initialization
sm->Init();
// Stream data
while (sm->AcquireFrame(true)>=PXC_STATUS_NO_ERROR) {
// Get the sample data
PXCCapture::Sample *sample=sm->QuerySample();
.... // process image sample->color
// Resume next frame processing
sm->ReleaseFrame();
}
342
// Clean up
sm->Release();
[C#]
// Create a SenseManager instance
PXCMSenseManager sm=PXCMSenseManager.CreateInstance();
// Enable a video stream
sm.EnableStream(PXCMCapture.StreamType.STREAM_TYPE_COLOR,0,0,0);
// Initialize
sm.Init();
// Stream Data
while (sm.AcquireFrame(true).IsSuccessful()) {
// Get the sample data
PXCMCapture.Sample sample=sm.QuerySample();
.... // process image sample.color
// Resume next frame processing
sm.ReleaseFrame();
}
// Clean up
sm.Dispose();
[Java]
// Create a SenseManager instance
PXCMSenseManager sm=PXCMSenseManager.CreateInstance();
// Enable a video stream
sm.EnableStream(PXCMCapture.StreamType.STREAM_TYPE_COLOR,0,0,0);
// Initialize
sm.Init();
// Stream Data
while (sm.AcquireFrame(true).isSuccessful()) {
// Get the sample data
PXCMCapture.Sample sample=sm.QuerySample();
.... // process image sample.color
// Resume next frame processing
sm.ReleaseFrame();
}
// Clean up
sm.close();
[JavaScript]
343
To protect user privacy, it is not allowed to stream raw or processed images in JavaScript.
[C#/UWP]
using Intel.RealSense;
// Create a SenseManager instance
SenseManager sm=SenseManager.CreateInstance();
// Enable blob tracking
SampleReader reader=SampleReader.Activate(sm, StreamType.STREAM_TYPE_COLOR,
640, 480, 30);
// Initialize
sm.Init();
// Stream Data
while (sm.AcquireFrame(true)>=Status.STATUS_NO_ERROR) {
// Working on reader.Sample
....
// Resume next frame processing
sm.ReleaseFrame();
}
// Clean up
sm.Dispose();
Example 65: Configure and Perform Blob Tracking
[C++]
// Create a SenseManager instance
PXCSenseManager *sm=PXCSenseManager::CreateInstance();
// Enable blob tracking
sm->EnableBlob();
// Initialization
sm->Init();
// Stream data
while (sm->AcquireFrame(true)>=PXC_STATUS_NO_ERROR) {
// Get the blob data
PXCBlobModule *blob=sm->QueryBlob();
....
// Resume next frame processing
sm->ReleaseFrame();
}
// Clean up
sm->Release();
344
[C#]
// Create a SenseManager instance
PXCMSenseManager sm=PXCMSenseManager.CreateInstance();
// Enable blob tracking
sm.EnableBlob();
// Initialize
sm.Init();
// Stream Data
while (sm.AcquireFrame(true).IsSuccessful()) {
// Get the blob data
PXCMBlobModule blob=sm.QueryBlob();
....
// Resume next frame processing
sm.ReleaseFrame();
}
// Clean up
sm.Dispose();
[Java]
// Create a SenseManager instance
PXCMSenseManager sm=PXCMSenseManager.CreateInstance();
// Enable blob tracking
sm.EnableBlob();
// Initialize
sm.Init();
// Stream Data
while (sm.AcquireFrame(true).isSuccessful()) {
// Get the blob data
PXCMBlobModule blob=sm.QueryBlob();
....
// Resume next frame processing
sm.ReleaseFrame();
}
// Clean up
sm.close();
[JavaScript]
// name space shortcuts
var rs=intel.realsense;
var rsb=intel.realsense.blob;
345
346
[C#/UWP]
using Intel.RealSense;
using Intel.RealSense.Blob;
// Create a SenseManager instance
SenseManager sm=SenseManager.CreateInstance();
// Enable blob tracking
BlobModule blob=BlobModule.Activate(sm);
BlobData data=blob.CreateOutput();
// Initialize
sm.Init();
// Stream Data
while (sm.AcquireFrame(true)>=Status.STATUS_NO_ERROR) {
// Get the blob data
data.Update();
....
// Resume next frame processing
sm.ReleaseFrame();
}
// Clean up
sm.Dispose();
See Also
347
Constants
Callbacks and Delegates
Events
Member Functions Essentials
Member Functions (3D Scanning)
Member Functions (Blob Tracking)
Member Functions (Enhanced Video)
Member Functions (Face Tracking)
Member Functions (Hand Cursor)
Member Functions (Hand Tracking)
Member Functions (Object Recognition)
Member Functions (Object Tracking)
Member Functions (Person Tracking)
Member Functions (Scene Perception)
Member Functions (Stream Capture)
Member Functions (Touchless Controller)
Member Functions (User Segmentation)
Properties (C#)
Static Functions
348
2.11.14.1 Constants
Description
CUID
Description
Handler
2.11.14.2.1 Handler
Namespace Hierarchy
[C++]
PXCSenseManager::Handler
[C#]
PXCMSenseManager.Handler
[Java]
PXCMSenseManager.Handler
Description
The Handler interface is a set of callback functions/delegates to be used during the
SenseManager initialization and frame looping operations. The application must
implement the interface.
Examples
Example 66 shows how to create a handler.
Example 66: Create a Handler
[C++]
class MyHandler: public PXCSenseManager::Handler {
public:
virtual pxcStatus PXCAPI OnConnect(PXCCapture::Device *device, pxcBool
connected) {
return PXC_STATUS_DEVICE_FAILED;
}
349
See Also
Member Functions
350
Description
OnNewSample
OnModuleProcessedFrame
OnModuleSetProfile
OnConnect
OnStatus
Namespace Hierarchy
[C++]
PXCSenseManager::Handler::OnConnect
[C#]
PXCMSenseManager.Handler.onConnect
[Java]
PXCMSenseManager.Handler.onConnect
Syntax
[C++]
pxcStatus OnConnect(PXCCapture::Device *device, pxcBool connected);
[C#]
delegate pxcmStatus OnConnectDelegate(PXCMCapture.Device device, Boolean
connected);
[Java]
pxcmStatus OnConnect(PXCMCapture.Device device, boolean connected);
Parameters
351
device
connected
Description
The OnConenct function is invoked in the following cases:
During initialization (Init), when the SDK checks for each I/O device for a suitable
input device, the function is invoked when an I/O device is created
(connected=true) or skipped (connected=false). The SDK ignores the function
return code.
During streaming, when the I/O device is unplugged or replugged. The application
can use to display a message for device reconnection. If the function returns
STATUS_NO_ERROR, the SDK waits for device reconnection. Otherwise, the SDK
breaks the streaming loop with STATUS_DEVICE_LOST.
The application should not perform any lengthy operation in the callback function.
Return Status
STATUS_NO Continue the processing loop. In the case of device disconnection, wait for
_ERROR
the device to reconnect.
Any error
code
352
During streaming, any error code will abort the streaming loop.
Namespace Hierarchy
[C++]
PXCSenseManager::Handler::OnModuleProcessedFrame
[C#]
PXCMSenseManager.Handler.onModuleProcessedFrame
[Java]
PXCMSenseManager.Handler.onModuleProcessedFrame
Syntax
[C++]
pxcStatus OnModuleProcessedFrame(pxcUID mid, PXCBase *module, Sample
*sample);
[C#]
delegate pxcmStatus OnModuleProcessedFrameDelegate(Int32 mid, PXCMBase
module, Sample sample);
[Java]
pxcmStatus OnModuleProcessedFrame(int mid, PXCMBase module, Sample
sample);
Parameters
mid
module
sample
Description
The OnModuleProcessedFrame function is invoked when a module has completed its
processing of the current frame. The module output is ready at this point. You can use
this function to retrieve the module output.
If you use AcquireFrame/ReleaseFrame, or StreamFrames(true), the function is
invoked from the same thread. If you use StreamFrames(false), the function is
invoked from a dedicated thread.
You should not perform any lengthy operation in the callback function.
Return Status
353
STATUS_NO_ERROR
Remarks
The module instance is an object that SenseManager internally manages. Do not
release the module instance.
Namespace Hierarchy
[C++]
PXCSenseManager::Handler::OnModuleSetProfile
[C#]
PXCMSenseManager.Handler.onModuleSetProfile
[Java]
PXCMSenseManager.Handler.onModuleSetProfile
Syntax
[C++]
pxcStatus OnModuleSetProfile(pxcUID mid, PXCBase *object);
[C#]
delegate pxcmStatus OnModuleSetProfileDelegate(Int32 mid, PXCMBase
object);
[Java]
pxcmStatus OnModuleSetProfile(int mid, PXCMBase object);
Parameters
mid
object
Description
354
Remarks
The module instance is an object that SenseManager internally manages. Do not
release the module instance.
Namespace Hierarchy
[C++]
PXCSenseManager::Handler::OnNewSample
[C#]
PXCMSenseManager.Handler.onNewSample
[Java]
PXCMSenseManager.Handler.onNewSample
Syntax
[C++]
pxcStatus OnNewSample(pxcUID mid, Sample *sample);
[C#]
delegate pxcmStatus OnNewSampleDelegate(Int32 mid, Sample sample);
[Java]
delegate pxcmStatus OnNewSampleDelegate(Int32 mid, Sample sample);
Parameters
355
mid
sample
Description
The OnNewSample function is invoked when some image sample(s) is/are available
when requested from the EnableVideoStream[s] functions.
The application should not perform any lengthy operation in the callback function.
Return Status
STATUS_NO_ERROR
Remarks
The image sample instances are objects that SenseManager internally manages. Do
not release any sample instances.
Namespace Hierarchy
[C++]
PXCSenseManager::Handler::OnStatus
[C#]
PXCMSenseManager.Handler.onStatus
[Java]
PXCMSenseManager.Handler.onStatus
Syntax
[C++]
void OnStatus(pxcUID mid, pxcStatus status);
[C#]
delegate void OnStatusDelegate(Int32 mid, pxcmStatus status);
[Java]
void OnStatus(int mid, pxcmStatus status);
356
Parameters
mid
status
Description
The OnStatus function is invoked when there is any error or warning during
streaming. The module identifier indicates the module that issues the error or
warning.
The application should not perform any lengthy operation in the callback function.
Return Status
None
2.11.14.3 Events
Description
DeviceConnected (JS,UWP)
StatusChanged (JS,UWP)
Namespace Hierarchy
[JavaScript]
intel.realsense.SenseManager.onDeviceConnected
[C#/UWP]
Intel.RealSense.SenseManager.DeviceConnected
Syntax
[JavaScript]
357
Parameters
sender
connected
args
Description
The DeviceConencted function is invoked in the following cases:
During initialization (Init), when the SDK checks for each I/O device for a suitable
input device, the function is invoked when an I/O device is created
(connected=true) or skipped (connected=false).
During streaming, when the I/O device is unplugged or replugged. The application
can use to display a message for device reconnection.
The application should not perform any lengthy operation in the callback
function.
Return Status
None
358
Namespace Hierarchy
Intel.RealSense.DeviceConnectedEventArgs
Definition
class DeviceConnectedEventArgs {
Boolean Connected;
};
Description
The DeviceConnectedEventArgs structure describes the event parameters of the
OnConnect event.
Members
connect
Namespace Hierarchy
[JavaScript]
intel.realsense.SenseManager.onStatusChanged
[C#/UWP]
Intel.RealSense.SenseManager.StatusChanged
Syntax
[JavaScript]
function onStatusChanged(sender, status);
[C#/UWP]
void StatusChanged(Object sender, StatusChangedEventArgs args);
Parameters
359
sender
status
args
Description
The StatusChanged function is invoked when there is any error or warning during
streaming. The sender instance indicates where the error or warning is issued.
The application should not perform any lengthy operation in the callback function.
Return Status
None
Namespace Hierarchy
Intel.RealSense.StatusChangedEventArgs
Definition
class StatusChangedEventArgs {
Status Status;
};
Description
The StatusChangedEventArgs structure describes the event parameters of the
StatusChanged event.
Members
connect
360
Description
Init[Async] (+JS,+UWP)
AcquireFrame (+UWP)
ReleaseFrame (+UWP)
FlushFrame
Close[Down] (+JS,+UWP)
StreamFrames (+JS,+UWP)
IsConnected
QueryCaptureManager
QuerySession
EnableModule
QueryModule
PauseModule
Release (C++,JS)
Namespace Hierarchy
[C++]
PXCSenseManager::AcquireFrame
[C#]
PXCMSenseManager.AcquireFrame
[Java]
PXCMSenseManager.AcquireFrame
[C#/UWP]
Intel.RealSense.SenseManager.AcquireFrame
361
Syntax
[C++]
pxcStatus AcquireFrame(pxcBool ifall, pxcI32 timeout);
pxcStatus AcquireFrame(pxcBool ifall);
pxcStatus AcquireFrame(void);
[C#]
pxcmStatus AcquireFrame(Boolean ifall, Int32 timeout);
pxcmStatus AcquireFrame(Boolean ifall);
pxcmStatus AcquireFrame();
[Java]
pxcmStatus AcquireFrame(boolean ifall, int timeout);
pxcmStatus AcquireFrame(boolean ifall);
pxcmStatus AcquireFrame();
[C#/UWP]
Status AcquireFrame(boolean ifall, int timeout);
Status AcquireFrame(boolean ifall);
Parameters
ifall
timeout
Description
362
The AcquireFrame function waits until some data is available for processing. If
ifall=true, the function waits until all I/O requests are completed on the current
frame and all processing modules have completed processing the current frame of
data. If there are I/O requests for different data, such as color, depth, and/or audio
samples, the function will synchronize the reads of them and return only when all of
them are retrieved and processed.
This means that ifall=true will synchronize all I/Os to the same frame rate or
frequency.
If ifall=false, the function waits until any of the I/O requests or the processing
module operations is done. This is usually used when there are multiple I/O requests
of different frame rates or frequencies. After the function returns, the application can
use the QueryXXX set of functions to figure out which data is ready for processing. For
example, use the QueryBlob function to check if the blob tracking algorithm has
completed processing the current frame.
The application should invoke the ReleaseFrame function as soon as possible to
continue processing subsequent frames. The frame processing is paused between
the AcquireFrame function and the next ReleaseFrame function. The application
should not invoke any lengthy procedures between the AcquireFrame function and
the ReleaseFrame functions.
Although any further frame processing is paused after the AcquireFrame function,
the capture device continues to deliver new samples in parallel, in the live streaming
case or in the file playback case if realtime=true (default). Thus any lengthy
processing in between the AcquireFrame and ReleaseFrame functions may result in
frame loss. In the case of file playback, use SetRealtime(false) if repeatability is
needed in the file playback.
Return Status
363
STATUS_NO_ERROR
STATUS_EXEC_TIMEOUT
STATUS_DEVICE_LOST
STATUS_EXEC_INPROGRESS
Remarks
[C#/Unity]
Uni If used inside the Unity Update() function, it is recommended to use
ty AcquireFrame(false,0) to avoid impacting the Unity rendering performance.
Namespace Hierarchy
[C++]
PXCSenseManager::Close
[C#]
PXCMSenseManager.Close
[Java]
PXCMSenseManager.Close
[JavaScript]
intel.realsense.SenseManager.close
[C#/UWP]
Intel.RealSense.SenseManager.CloseDown
Syntax
[C++]
364
void Close(void);
[C#]
void Close();
[Java]
void Close();
[JavaScript]
function close();
[C#/UWP]
void CloseDown();
Parameters
None
Description
The Close[Down] function closes the streams and releases any processing module
instances.
Return Status
None
Remarks
[Java]
Do not confuse this Close function, which closes the streams only, with the close
function, which destroys the SenseManager instance.
2.11.14.4.3 EnableModule
Namespace Hierarchy
[C++]
PXCSenseManager::EnableModule
[C#]
PXCMSenseManager.EnableModule
[Java]
PXCMSenseManager.EnableModule
365
Syntax
[C++]
pxcStatus EnableModule(pxcUID mid, ImplDesc *mdesc);
[C#]
pxcmStatus EnableModule(Int32 mid, ImplDesc mdesc);
[Java]
pxcmStatus EnableModule(int mid, ImplDesc mdesc);
Parameters
mid
mdesc
Description
The EnableModule function creates an instance of the specified processing module
and inserts it to the processing pipeline.
This is the base function for inserting any modules. The application should use the
interface specific helper functions such as EnableHand and EnableFace.
Return Status
STATUS_NO_ERROR
Namespace Hierarchy
[C++]
PXCSenseManager::Init
[C#]
PXCMSenseManager.Init
[Java]
PXCMSenseManager.Init
[JavaScript]
intel.realsense.SenseManager.init
366
[C#/UWP]
Intel.RealSense.SenseManager.InitAsync
Syntax
[C++]
pxcStatus Init(Handler *handler);
pxcStatus Init(void);
[C#]
pxcmStatus Init(Handler handler);
pxcmStatus Init();
[Java]
pxcmStatus Init(Handler handler);
pxcmStatus Init();
[JavaScript]
function init();
[C#/UWP]
async Task<Status> InitAsync();
Parameters
[C++][C#][Java]
ha The optional set of callback or delegate functions.
nd
le
r
Description
The Init function configures the pipeline to be ready for processing.
Return Status
[C++][C#][Java][C#/UWP]
STATUS_NO_ERROR
STATUS_ITEM_UNAVAILABLE
[JavaScript]
367
See Also
Callbacks and Delegates
Events
2.11.14.4.5 IsConnected
Namespace Hierarchy
[C++]
PXCSenseManager::IsConnected
[C#]
PXCMSenseManager.IsConnected
[Java]
PXCMSenseManager.IsConnected
Syntax
[C++]
pxcBool IsConnected(void);
[C#]
Boolean IsConnected();
[Java]
boolean IsConnected();
Parameters
None
Description
The IsConnected function returns the input device connection status during
streaming. The connection status is valid only in between the Init function and the
Close function.
Return Status
368
true
false
2.11.14.4.6 PauseModule
Namespace Hierarchy
[C++]
PXCSenseManager::PauseModule
[C#]
PXCMSenseManager.PauseModule
[Java]
PXCMSenseManager.PauseModule
Syntax
[C++]
void PauseModule(pxcUID mid, pxcBool pause);
[C#]
void PauseModule(Int32 mid, Boolean pause);
[Java]
void PauseModule(int mid, boolean pause);
Parameters
mid
pause
Description
The PauseModule function pauses or resumes the module processing. If paused, the
pipeline no longer delivers any input samples to the module.
This is the base function for pausing/resuming any modules. The application
usually uses interface specific functions such as PauseHand and PauseFace.
369
Return Status
None
2.11.14.4.7 QuerySession
Namespace Hierarchy
[C++]
PXCSenseManager::QuerySession
[C#]
PXCSenseManager.QuerySession
[Java]
PXCSenseManager.QuerySession
Syntax
[C++]
PXCSession *QuerySession(void);
[C#]
PXCMSession QuerySession();
[Java]
PXCMSession QuerySession();
Parameters
None
Description
The QuerySession function returns the Session instance.
Return Status
The Session instance.
Remarks
C++
370
C#
Java
2.11.14.4.8 QueryCaptureManager
Namespace Hierarchy
[C++]
PXCSenseManager::QueryCaptureManager
[C#]
PXCMSenseManager.QueryCaptureManager
[Java]
PXCMSenseManager.QueryCaptureManager
Syntax
[C++]
PXCCaptureManager *QueryCaptureManager(void);
[C#]
PXCMCaptureManager QueryCaptureManager();
[Java]
PXCMCaptureManager QueryCaptureManager();
Parameters
None
Description
The QueryCaptureManager function returns the CaptureManager instance.
Return Status
The CaptureManager instance or NULL/null if the module is not initialized.
371
Remarks
[C++]
The returned instance is a SenseManager internally managed object. Do not release it.
[C#]
The returned instance is a SenseManager internally managed object. Do not release it.
The C# application can also use the property captureManager.
[Java]
The returned instance is a SenseManager internally managed object. Do not release it.
2.11.14.4.9 QueryModule
Namespace Hierarchy
[C++]
PXCSenseManager::QueryModule
[C#]
PXCMSenseManager.QueryModule
[Java]
PXCMSenseManager.QueryModule
Syntax
[C++]
PXCBase* QueryModule(pxcUID mid);
[C#]
PXCMBase QueryModule(Int32 mid);
[Java]
PXCMBase QueryModule(int mid);
Parameters
mid
Description
372
The QueryModule function returns the module instance when the module is not busy
processing any incoming data. There are two periods of time when a module is not
busy:
Setup: In between the EnableModule function call (or the equivalent interface
specific helper functions) and the first AcquireFrame function call, the
QueryModule function returns the module instance. The application can use the
module instance for additional setup operations.
Retrieve Data: In between the AcquireFrame function call and the ReleaseFrame
function call, the QueryModule function returns a valid module instance if the
module is completed processing the current frame of input data. The application
can use the module instance to retrieve processing results.
This is the base function for querying any module instance. The application can use
the interface specific helper functions to retrieve a specific interface instance, such as
QueryHand and QueryFace.
Return Status
The module instance, or NULL/null if the module is busy.
2.11.14.4.10 Release (C++,JS)
Namespace Hierarchy
[C++]
PXCSenseManager.Release
[JavaScript]
intel.realsense.SenseManager.release
Syntax
[C++]
void Release(void);
[JavaScript]
function release();
Parameters
None
Description
373
The Release function releases closes down the pipeline and release the
SenseManager instance.
Return Status
None
Namespace Hierarchy
[C++]
PXCSenseManager::ReleaseFrame
[C#]
PXCMSenseManager.ReleaseFrame
[Java]
PXCMSenseManager.ReleaseFrame
[C#/UWP]
Intel.RealSense.SenseManager.ReleaseFrame
Syntax
[C++]
void ReleaseFrame(void);
[C#]
void ReleaseFrame();
[Java]
void ReleaseFrame();
[C#/UWP]
void ReleaseFrame();
Parameters
None
Description
The ReleaseFrame function releases the lock on the current frame. The pipeline
continues to process subsequent frames.
374
Return Status
None
2.11.14.4.12 FlushFrame
Namespace Hierarchy
[C++]
PXCSenseManager::FlushFrame
[C#]
PXCMSenseManager.FlushFrame
[Java]
PXCMSenseManager.FlushFrame
Syntax
[C++]
void FlushFrame(void);
[C#]
void FlushFrame();
[Java]
void FlushFrame();
Parameters
None
Description
The FlushFrame function releases any internally cached frames. The subsequent
AcquireFrame function will return a newly captured frame.
Return Status
None
Namespace Hierarchy
[C++]
375
PXCSenseManager::StreamFrames
[C#]
PXCMSenseManager.StreamFrames
[Java]
PXCMSenseManager.StreamFrames
[JavaScript]
intel.realsense.SenseManager.streamFrames
[C#/UWP]
Intel.RealSense.SenseManager.StreamFrames
Syntax
[C++]
pxcStatus StreamFrames(pxcBool blocking);
[C#]
pxcmStatus StreamFrames(Boolean blocking);
[Java]
pxcmStatus StreamFrames(boolean blocking);
[JavaScript]
function streamFrames();
[C#/UWP]
Status StreamFrames();
Parameters
[C++][C#][Java]
blocking
Description
The StreamFrames function is a helper function that implements the AcquireFrame/
ReleaseFrame streaming loop in a separate thread.
The application can call the Close function to terminate the streaming loop at any
time and release the resources.
Return Status
376
[C++][C#][Java][C#/UWP]
STATUS_NO_ERROR
[JavaScript]
Remarks
[C++][C#][Java][C#/UWP]
If the application initiates the streaming loop through this function, the functions
AcquireFrame and ReleaseFrame will return errors to indicate the duplicated
invoking.
Description
Enable3DScan
Query3DScan
2.11.14.5.1 Enable3DScan
Namespace Hierarchy
[C++]
PXCSenseManager::Enable3DScan
[C#]
PXCMSenseManager.Enable3DScan
[Java]
PXCMSenseManager.Enable3DScan
Syntax
[C++]
pxcStatus Enable3DScan(pxcCHAR *name);
pxcStatus Enable3DScan();
377
[C#]
pxcmStatus Enable3DScan(String name);
pxcmStatus Enable3DScan();
[Java]
pxcmStatus Enable3DScan(String name);
pxcmStatus Enable3DScan();
Parameters
name
Description
The Enable3DScan function activates 3D scanning in the multimodal pipeline.
Return Status
STATUS_NO_ERROR
2.11.14.5.2 Query3DScan
Namespace Hierarchy
[C++]
PXCSenseManager::Query3DScan
[C#]
PXCMSenseManager.Query3DScan
[Java]
PXCMSenseManager.Query3DScan
Syntax
[C++]
PXC3DScan* Query3DScan(void);
[C#]
PXC3DScan Query3DScan();
[Java]
PXC3DScan Query3DScan();
378
Parameters
None
Description
The Query3DScan function returns the module instance when the module is not busy
processing any incoming data. There are two periods of time when a module is not
busy:
Setup: In between the Enable3DScan function call and the first AcquireFrame
function call, the Query3DScan function returns the module instance. The
application can use the module instance for additional setup operations.
Retrieve Data: In between the AcquireFrame function call and the ReleaseFrame
function call, the Query3DScan function returns a valid module instance if the
module is completed processing the current frame of input data. The application
can use the module instance to retrieve processing results.
Return Status
The module instance, or NULL/null if the module is busy.
2.11.14.6 Member Functions (Blob Tracking)
Description
EnableBlob
PauseBlob
QueryBlob
QueryBlobSample
2.11.14.6.1 EnableBlob
Namespace Hierarchy
[C++]
PXCSenseManager::EnableBlob
[C#]
PXCMSenseManager.EnableBlob
379
[Java]
PXCMSenseManager.EnableBlob
Syntax
[C++]
pxcStatus
pxcStatus
EnableBlob(pxcCHAR *name);
EnableBlob();
[C#]
pxcmStatus EnableBlob(String name);
pxcmStatus EnableBlob();
[Java]
pxcmStatus EnableBlob(string name);
pxcmStatus EnableBlob();
Parameters
name
Description
The EnableBlob function activates the blob tracking module in the pipeline.
Return Status
STATUS_NO_ERROR
2.11.14.6.2 PauseBlob
Namespace Hierarchy
[C++]
PXCSenseManager::PauseBlob
[C#]
PXCMSenseManager.PauseBlob
[Java]
PXCMSenseManager.PauseBlob
Syntax
[C++]
void PauseBlob(pxcBool pause);
380
[C#]
void PauseBlob(Boolean pause);
[Java]
void PauseBlob(boolean pause);
Parameters
pause
Description
The PauseBlob function pauses or resumes the blob tracking module. If paused, the
pipeline no longer delivers any input samples to the module.
Return Status
None
2.11.14.6.3 QueryBlob
Namespace Hierarchy
[C++]
PXCSenseManager::QueryBlob
[C#]
PXCMSenseManager.QueryBlob
[Java]
PXCMSenseManager.QueryBlob
Syntax
[C++]
PXCBlobModule* QueryBlob(void);
[C#]
PXCMBlobModule QueryBlob();
[Java]
PXCMBlobModule QueryBlob();
381
Parameters
None
Description
The QueryBlob function returns the module instance, BlobModule, when the module
is not busy processing any incoming data.
There are two periods of time when a module is not busy:
Setup: In between the EnableBlob function call and the first AcquireFrame
function call, the QueryBlob function returns the module instance. The application
can use the module instance for additional setup operations.
Retrieve Data: In between the AcquireFrame function call and the ReleaseFrame
function call, the QueryBlob function returns a valid module instance if the module
is completed processing the current frame of input data. The application can use
the module instance to retrieve processing results.
Return Status
The module instance, or NULL/null if the module is busy.
2.11.14.6.4 QueryBlobSample
Namespace Hierarchy
[C++]
PXCSenseManager::QueryBlobSample
[C#]
PXCMSenseManager.QueryBlobSample
[Java]
PXCMSenseManager.QueryBlobSample
Syntax
[C++]
Sample *QueryBlobSample(void);
[C#]
Sample QueryBlobSample();
[Java]
Sample QueryBlobSample();
382
Parameters
None
Description
The QueryBlobSample function returns the current images processed by the blob
tracking module.
Return Status
The Sample instance or NULL/null if the sample is not available.
Remarks
The returned sample is a SenseManager internally maintained object.
Do not release it.
2.11.14.7 Member Functions (Enhanced Video)
Description
EnableEnhancedVideo
PauseEnhancedVideo
QueryEnhancedVideo
Namespace Hierarchy
[C++]
PXCSenseManager::EnableEnhancedVideo
[C#]
PXCMSenseManager.EnableEnhancedVideo
[Java]
PXCMSenseManager.EnableEnhancedVideo
383
Syntax
[C++]
pxcStatus EnableEnhancedVideo(void);
[C#]
pxcmStatus EnableEnhancedVideo();
[Java]
pxcmStatus EnableEnhancedVideo();
Parameters
None
Description
The EnableEnhancedVideo function activates the enhanced video module in the
multimodal pipeline.
Return Status
STATUS_NO_ERROR
2.11.14.7.2 PauseEnhancedVideo
Namespace Hierarchy
[C++]
PXCSenseManager::PauseEnhancedVideo
[C#]
PXCMSenseManager.PauseEnhancedVideo
[Java]
PXCMSenseManager.PauseEnhancedVideo
Syntax
[C++]
void PauseEnhancedVideo(pxcBool pause);
[C#]
void PauseEnhancedVideo(Boolean pause);
[Java]
void PauseEnhancedVideo(Boolean pause);
384
Parameters
pause
Description
The PauseEnhancedVideo function pauses or resumes the Enhanced Videography
module. If paused, the pipeline no longer delivers any input samples to the module.
Return Status
None
2.11.14.7.3 QueryEnhancedVideo
Namespace Hierarchy
[C++]
PXCSenseManager::QueryEnhancedVideo
[C#]
PXCMSenseManager.QueryEnhancedVideo
[Java]
PXCMSenseManager.QueryEnhancedVideo
Syntax
[C++]
PXCEnhancedVideo* QueryEnhancedVideo(void);
[C#]
PXCMEnhancedVideo QueryEnhancedVideo();
[Java]
PXCMEnhancedVideo QueryEnhancedVideo();
Parameters
None
Description
385
Namespace Hierarchy
[C++]
PXCSenseManager::QueryEnhancedVideoSample
[C#]
PXCMSenseManager.QueryEnhancedVideoSample
[Java]
PXCMSenseManager.QueryEnhancedVideoSample
Syntax
[C++]
Sample *QueryEnhancedVideoSample(void);
[C#]
Sample QueryEnhancedVideoSample();
[Java]
Sample QueryEnhancedVideoSample();
Parameters
None
386
Description
The QueryEnhancedVideoSample function returns the current images processed by
the enhanced video module.
Return Status
The Sample instance or NULL/null if the sample is not available.
Remarks
The returned sample is a SenseManager internally maintained object.
Do not release it.
2.11.14.8 Member Functions (Face Tracking)
Description
EnableFace
PauseFace
QueryFace
QueryFaceSample
2.11.14.8.1 EnableFace
Namespace Hierarchy
[C++]
PXCSenseManager::EnableFace
[C#]
PXCMSenseManager.EnableFace
[Java]
PXCMSenseManager.EnableFace
Syntax
[C++]
pxcStatus EnableFace(pxcCHAR *name);
pxcStatus EnableFace(void);
387
[C#]
pxcmStatus EnableFace(String name);
pxcmStatus EnableFace();
[Java]
pxcmStatus EnableFace(string name);
pxcmStatus EnableFace();
Parameters
name
Description
The EnableFace function activates the face tracking module in the pipeline.
Return Status
STATUS_NO_ERROR
2.11.14.8.2 PauseFace
Namespace Hierarchy
[C++]
PXCSenseManager::PauseFace
[C#]
PXCMSenseManager.PauseFace
[Java]
PXCMSenseManager.PauseFace
Syntax
[C++]
void PauseFace(pxcBool pause);
[C#]
void PauseFace(Boolean pause);
[Java]
void PauseFace(boolean pause);
Parameters
388
pause
Description
The PauseFace function pauses or resumes the face tracking module. If paused, the
pipeline no longer delivers any input samples to the module.
Return Status
None
2.11.14.8.3 QueryFace
Namespace Hierarchy
[C++]
PXCSenseManager::QueryFace
[C#]
PXCMSenseManager.QueryFace
[Java]
PXCMSenseManager.QueryFace
Syntax
[C++]
PXCFaceModule* QueryFace(void);
[C#]
PXCMFaceModule QueryFace();
[Java]
PXCMFaceModule QueryFace();
Parameters
None
Description
389
The QueryFace function returns the module instance, FaceModule, when the module
is not busy processing any incoming data.
There are two periods of time when a module is not busy:
Setup: In between the EnableFace function call and the first AcquireFrame
function call, the QueryFace function returns the module instance. The application
can use the module instance for additional setup operations.
Retrieve Data: In between the AcquireFrame function call and the ReleaseFrame
function call, the QueryFace function returns a valid module instance if the module
is completed processing the current frame of input data. The application can use
the module instance to retrieve processing results.
Return Status
The module instance, or NULL/null if the module is busy.
2.11.14.8.4 QueryFaceSample
Namespace Hierarchy
[C++]
PXCSenseManager::QueryFaceSample
[C#]
PXCMSenseManager.QueryFaceSample
[Java]
PXCMSenseManager.QueryFaceSample
Syntax
[C++]
Sample *QueryFaceSample(void);
[C#]
Sample QueryFaceSample();
[Java]
Sample QueryFaceSample();
Parameters
None
390
Description
The QueryFaceSample function returns the current images processed by the face
module.
Return Status
The Sample instance or NULL/null if the sample is not available.
Remarks
The returned sample is a SenseManager internally maintained object.
Do not release it.
2.11.14.9 Member Functions (Hand Cursor)
Description
EnableHandCursor
PauseHandCursor
QueryHandCursor
QueryHandCursorSample
2.11.14.9.1 EnableHandCursor
Namespace Hierarchy
[C++]
PXCSenseManager::EnableHandCursor
[C#]
PXCMSenseManager.EnableHandCursor
[Java]
PXCMSenseManager.EnableHandCursor
Syntax
[C++]
pxcStatus
pxcStatus
EnableHandCursor(pxcCHAR *name);
EnableHandCursor();
[C#]
391
Parameters
name
Description
The EnableHand function activates the hand cursor module in the pipeline.
Return Status
STATUS_NO_ERROR
2.11.14.9.2 PauseHandCursor
Namespace Hierarchy
[C++]
PXCSenseManager::PauseHandCursor
[C#]
PXCMSenseManager.PauseHandCursor
[Java]
PXCMSenseManager.PauseHandCursor
Syntax
[C++]
void PauseHandCursor(pxcBool pause);
[C#]
void PauseHandCursor(Boolean pause);
[Java]
void PauseHandCursor(boolean pause);
Parameters
392
pause
Description
The PauseHandCursor function pauses or resumes the hand cursor module. If
paused, the pipeline no longer delivers any input samples to the module.
Return Status
None
2.11.14.9.3 QueryHandCursor
Namespace Hierarchy
[C++]
PXCSenseManager::QueryHandCursor
[C#]
PXCMSenseManager.QueryHandCursor
[Java]
PXCMSenseManager.QueryHandCursor
Syntax
[C++]
PXCHandCursorModule* QueryHandCursor(void);
[C#]
PXCMHandCursorModule QueryHandCursor();
[Java]
PXCMHandCursorModule QueryHandCursor();
Parameters
None
Description
393
Namespace Hierarchy
[C++]
PXCSenseManager::QueryHandCursorSample
[C#]
PXCMSenseManager.QueryHandCursorSample
[Java]
PXCMSenseManager.QueryHandCursorSample
Syntax
[C++]
Sample *QueryHandCursorSample(void);
[C#]
Sample QueryHandCursorSample();
[Java]
Sample QueryHandCursorSample();
Parameters
None
394
Description
The QueryHandCursorSample function returns the current images processed by the
hand cursor module.
Return Status
The Sample instance or NULL/null if the sample is not available.
Remarks
The returned sample is a SenseManager internally maintained object.
Do not release it.
2.11.14.10Member Functions (Hand Tracking)
Description
EnableHand
PauseHand
QueryHand
QueryHandSample
2.11.14.10.1 EnableHand
Namespace Hierarchy
[C++]
PXCSenseManager::EnableHand
[C#]
PXCMSenseManager.EnableHand
[Java]
PXCMSenseManager.EnableHand
Syntax
[C++]
pxcStatus
pxcStatus
395
EnableHand(pxcCHAR *name);
EnableHand();
[C#]
pxcmStatus EnableHand(String name);
pxcmStatus EnableHand();
[Java]
pxcmStatus EnableHand(string name);
pxcmStatus EnableHand();
Parameters
name
Description
The EnableHand function activates the hand tracking module in the pipeline.
Return Status
STATUS_NO_ERROR
2.11.14.10.2 PauseHand
Namespace Hierarchy
[C++]
PXCSenseManager::PauseHand
[C#]
PXCMSenseManager.PauseHand
[Java]
PXCMSenseManager.PauseHand
Syntax
[C++]
void PauseHand(pxcBool pause);
[C#]
void PauseHand(Boolean pause);
[Java]
void PauseHand(boolean pause);
Parameters
396
pause
Description
The PauseHand function pauses or resumes the hand tracking module. If paused, the
pipeline no longer delivers any input samples to the module.
Return Status
None
2.11.14.10.3 QueryHand
Namespace Hierarchy
[C++]
PXCSenseManager::QueryHand
[C#]
PXCMSenseManager.QueryHand
[Java]
PXCMSenseManager.QueryHand
Syntax
[C++]
PXCHandModule* QueryHand(void);
[C#]
PXCMHandModule QueryHand();
[Java]
PXCMHandModule QueryHand();
Parameters
None
Description
397
The QueryHand function returns the module instance, HandModule, when the module
is not busy processing any incoming data.
There are two periods of time when a module is not busy:
Setup: In between the EnableHand function call and the first AcquireFrame
function call, the QueryHand function returns the module instance. The application
can use the module instance for additional setup operations.
Retrieve Data: In between the AcquireFrame function call and the ReleaseFrame
function call, the QueryHand function returns a valid module instance if the module
is completed processing the current frame of input data. The application can use
the module instance to retrieve processing results.
Return Status
The module instance, or NULL/null if the module is busy.
2.11.14.10.4 QueryHandSample
Namespace Hierarchy
[C++]
PXCSenseManager::QueryHandSample
[C#]
PXCMSenseManager.QueryHandSample
[Java]
PXCMSenseManager.QueryHandSample
Syntax
[C++]
Sample *QueryHandSample(void);
[C#]
Sample QueryHandSample();
[Java]
Sample QueryHandSample();
Parameters
None
398
Description
The QueryHandSample function returns the current images processed by the hand
module.
Return Status
The Sample instance or NULL/null if the sample is not available.
Remarks
The returned sample is a SenseManager internally maintained object.
Do not release it.
2.11.14.11Member Functions (Object Recognition)
Description
EnableObjectRecognition
PauseObjectRecognition
QueryObjectRecognition
QueryObjectRecognitionSample
2.11.14.11.1 EnableObjectRecognition
Namespace Hierarchy
[C++]
PXCSenseManager::EnableObjectRecognition
[C#]
PXCMSenseManager.EnableObjectRecognition
[Java]
PXCMSenseManager.EnableObjectRecognition
Syntax
[C++]
pxcStatus EnableObjectRecognition(void);
[C#]
399
pxcmStatus EnableObjectRecognition();
[Java]
pxcmStatus EnableObjectRecognition();
Parameters
None
Description
The EnableObjectRecognition function activates object recognition in the
SenseManager pipeline.
Return Status
STATUS_NO_ERROR
2.11.14.11.2 PauseObjectRecognition
Namespace Hierarchy
[C++]
PXCSenseManager::PauseObjectRecognition
[C#]
PXCMSenseManager.PauseObjectRecognition
[Java]
PXCMSenseManager.PauseObjectRecognition
Syntax
[C++]
void PauseObjectRecognition(pxcBool pause);
[C#]
void PauseObjectRecognition(Boolean pause);
[Java]
void PauseObjectRecognition(boolean pause);
Parameters
400
pause
Description
The PauseObjectRecognition function pauses or resumes the object recognition
module. If paused, the pipeline no longer delivers any input samples to the module.
Return Status
None
2.11.14.11.3 QueryObjectRecognition
Namespace Hierarchy
[C++]
PXCSenseManager::QueryObjectRecognition
[C#]
PXCMSenseManager.QueryObjectRecognition
[Java]
PXCMSenseManager.QueryObjectRecognition
Syntax
[C++]
PXCObjectRecognitionModule* QueryObjectRecognition(void);
[C#]
PXCMObjectRecognitionModule QueryObjectRecognition();
[Java]
PXCMObjectRecognitionModule QueryObjectRecognition();
Parameters
None
Description
401
Namespace Hierarchy
[C++]
PXCSenseManager::QueryObjectRecognitionSample
[C#]
PXCMSenseManager.QueryObjectRecognitionSample
[Java]
PXCMSenseManager.QueryObjectRecognitionSample
Syntax
[C++]
Sample *QueryObjectRecognitionSample(void);
[C#]
Sample QueryObjectRecognitionSample();
[Java]
Sample QueryObjectRecognitionSample();
Parameters
None
402
Description
The QueryObjectRecognitionSample function returns the current images processed
by the object tracking module.
Return Status
The Sample instance or NULL/null if the sample is not available.
Remarks
The returned sample is a SenseManager internally maintained object.
Do not release it.
2.11.14.12Member Functions (Object Tracking)
Description
EnableTracker
PauseTracker
QueryTracker
QueryTrackerSample
2.11.14.12.1 EnableTracker
Namespace Hierarchy
[C++]
PXCSenseManager::EnableTracker
[C#]
PXCMSenseManager.EnableTracker
[Java]
PXCMSenseManager.EnableTracker
Syntax
[C++]
pxcStatus EnableTracker(void);
[C#]
403
pxcmStatus EnableTracker();
[Java]
pxcmStatus EnableTracker();
Parameters
None
Description
The EnableTracker function activates object tracking in the SenseManager pipeline.
Return Status
STATUS_NO_ERROR
2.11.14.12.2 PauseTracker
Namespace Hierarchy
[C++]
PXCSenseManager::PauseTracker
[C#]
PXCMSenseManager.PauseTracker
[Java]
PXCMSenseManager.PauseTracker
Syntax
[C++]
void PauseTracker(pxcBool pause);
[C#]
void PauseTracker(Boolean pause);
[Java]
void PauseTracker(boolean pause);
Parameters
404
pause
Description
The PauseTracker function pauses or resumes the object tracking module. If paused,
the pipeline no longer delivers any input samples to the module.
Return Status
None
2.11.14.12.3 QueryTracker
Namespace Hierarchy
[C++]
PXCSenseManager::QueryTracker
[C#]
PXCMSenseManager.QueryTracker
[Java]
PXCMSenseManager.QueryTracker
Syntax
[C++]
PXCTracker* QueryTracker(void);
[C#]
PXCMTracker QueryTracker();
[Java]
PXCMTracker QueryTracker();
Parameters
None
Description
405
The QueryTracker function returns the module instance when the module is not
busy processing any incoming data. There are two periods of time when a module is
not busy:
Setup: In between the EnableTracker function call and the first AcquireFrame
function call, the QueryTracker function returns the module instance. The
application can use the module instance for additional setup operations.
Retrieve Data: In between the AcquireFrame function call and the ReleaseFrame
function call, the QueryTracker function returns a valid module instance if the
module is completed processing the current frame of input data. The application
can use the module instance to retrieve processing results.
Return Status
The Tracker instance, or NULL/null if the module is busy.
2.11.14.12.4 QueryTrackerSample
Namespace Hierarchy
[C++]
PXCSenseManager::QueryTrackerSample
[C#]
PXCMSenseManager.QueryTrackerSample
[Java]
PXCMSenseManager.QueryTrackerSample
Syntax
[C++]
Sample *QueryTrackerSample(void);
[C#]
Sample QueryTrackerSample();
[Java]
Sample QueryTrackerSample();
Parameters
None
Description
406
Description
EnablePersonTracking
PausePersonTracking
QueryPersonTracking
QueryPersonTrackingSample
2.11.14.13.1 EnablePersonTracking
Namespace Hierarchy
[C++]
PXCSenseManager::EnablePersonTracking
[C#]
PXCMSenseManager.EnablePersonTracking
[Java]
PXCMSenseManager.EnablePersonTracking
Syntax
[C++]
pxcStatus EnablePersonTracking(void);
[C#]
pxcmStatus EnablePersonTracking();
[Java]
407
pxcmStatus EnablePersonTracking();
Parameters
None
Description
The EnablePersonTracking function activates person tracking in the SenseManager
pipeline.
Return Status
STATUS_NO_ERROR
2.11.14.13.2 PausePersonTracking
Namespace Hierarchy
[C++]
PXCSenseManager::PausePersonTracking
[C#]
PXCMSenseManager.PausePersonTracking
[Java]
PXCMSenseManager.PausePersonTracking
Syntax
[C++]
void PausePersonTracking(pxcBool pause);
[C#]
void PausePersonTracking(Boolean pause);
[Java]
void PausePersonTracking(boolean pause);
Parameters
pause
408
Description
The PausePersonTracking function pauses or resumes the Person Tracking module.
If paused, the pipeline no longer delivers any input samples to the module.
Return Status
None
2.11.14.13.3 QueryPersonTracking
Namespace Hierarchy
[C++]
PXCSenseManager::QueryPersonTracking
[C#]
PXCMSenseManager.QueryPersonTracking
[Java]
PXCMSenseManager.QueryPersonTracking
Syntax
[C++]
PXCPersonTrackingModule* QueryPersonTracking(void);
[C#]
PXCMPersonTrackingModule QueryPersonTracking();
[Java]
PXCMPersonTrackingModule QueryPersonTracking();
Parameters
None
Description
409
The QueryPersonTracking function returns the module instance when the module is
not busy processing any incoming data. There are two periods of time when a module
is not busy:
Setup: In between the EnablePersonTracking function call and the first
AcquireFrame function call, the QueryPersonTracking function returns the
module instance. The application can use the module instance for additional setup
operations.
Retrieve Data: In between the AcquireFrame function call and the ReleaseFrame
function call, the QueryPersonTracking function returns a valid module instance if
the module is completed processing the current frame of input data. The
application can use the module instance to retrieve processing results.
Return Status
The module instance, or NULL/null if the module is busy.
2.11.14.13.4 QueryPersonTrackingSample
Namespace Hierarchy
[C++]
PXCSenseManager::QueryPersonTrackingSample
[C#]
PXCMSenseManager.QueryPersonTrackingSample
[Java]
PXCMSenseManager.QueryPersonTrackingSample
Syntax
[C++]
Sample *QueryPersonTrackingSample(void);
[C#]
Sample QueryPersonTrackingSample();
[Java]
Sample QueryPersonTrackingSample();
Parameters
None
410
Description
The QueryPersonTrackingSample function returns the current images processed by
the person tracking module.
Return Status
The Sample instance or NULL/null if the sample is not available.
Remarks
The returned sample is a SenseManager internally maintained object.
Do not release it.
2.11.14.14Member Functions (Scene Perception)
Description
EnableScenePerception
PauseScenePerception
QuerySenePerception
QueryScenePerceptionSample
2.11.14.14.1 EnableScenePerception
Namespace Hierarchy
[C++]
PXCSenseManager::EnableScenePerception
[C#]
PXCMSenseManager.EnableScenePerception
[Java]
PXCMSenseManager.EnableScenePerception
Syntax
[C++]
pxcStatus EnableScenePerception(pxcCHAR *name);
pxcStatus EnableScenePerception();
[C#]
411
Parameters
name
Description
The EnableScenePerception function activates the Scene Perception module in the
pipeline.
Return Status
STATUS_NO_ERROR
2.11.14.14.2 PauseScenePerception
Namespace Hierarchy
[C++]
PXCSenseManager::PauseScenePerception
[C#]
PXCMSenseManager.PauseScenePerception
[Java]
PXCMSenseManager.PauseScenePerception
Syntax
[C++]
void PauseScenePerception(pxcBool pause);
[C#]
void PauseScenePerception(Boolean pause);
[Java]
void PauseScenePerception(boolean pause);
Parameters
412
pause
Description
The PauseScenePerception function pauses or resumes the Scene Perception
module. If paused, the pipeline no longer delivers any input samples to the module.
Return Status
None
2.11.14.14.3 QuerySenePerception
Namespace Hierarchy
[C++]
PXCSenseManager::QuerySenePerception
[C#]
PXCMSenseManager.QuerySenePerception
[Java]
PXCMSenseManager.QuerySenePerception
Syntax
[C++]
PXCScenePerception* QuerySenePerception(void);
[C#]
PXCMScenePerception QuerySenePerception();
[Java]
PXCMScenePerception QuerySenePerception();
Parameters
None
Description
413
Namespace Hierarchy
[C++]
PXCSenseManager::QueryScenePerceptionSample
[C#]
PXCMSenseManager.QueryScenePerceptionSample
[Java]
PXCMSenseManager.QueryScenePerceptionSample
Syntax
[C++]
Sample *QueryScenePerceptionSample(void);
[C#]
Sample QueryScenePerceptionSample();
[Java]
Sample QueryScenePerceptionSample();
Parameters
None
414
Description
The QueryScenePerceptionSample function returns the current images processed
by the scene perception module.
Return Status
The Sample instance or NULL/null if the sample is not available.
Remarks
The returned sample is a SenseManager internally maintained object.
Do not release it.
2.11.14.15Member Functions (Stream Capture)
Description
EnableStream[s]
QuerySample
2.11.14.15.1 EnableStream[s]
Namespace Hierarchy
[C++]
PXCSenseManager::EnableStream[s]
[C#]
PXCMSenseManager.EnableStream[s]
[Java]
PXCMSenseManager.EnableStream[s]
Syntax
[C++]
pxcStatus EnableStreams(DataDesc *ddesc);
pxcStatus EnableStream(StreamType stream, pxcI32 width, pxcI32 height,
pxcF32 fps, StreamOption options);
pxcStatus EnableStream(StreamType stream, pxcI32 width, pxcI32 height,
pxcF32 fps);
pxcStatus EnableStream(StreamType stream, pxcI32 width, pxcI32 height);
415
[C#]
pxcmStatus EnableStreams(DataDesc ddesc);
pxcmStatus EnableStream(StreamType stream, Int32 width, Int32 height,
Single fps, StreamOption options);
pxcmStatus EnableStream(StreamType stream, Int32 width, Int32 height,
Single fps);
pxcmStatus EnableStream(StreamType stream, Int32 width, Int32 height);
[Java]
pxcmStatus EnableStreams(DataDesc ddesc);
pxcmStatus EnableStream(StreamType stream, int width, int height, float
fps, EnumSet<StreamOption> options);
pxcmStatus EnableStream(StreamType stream, int width, int height, float
fps);
pxcmStatus EnableStream(StreamType stream, int width, int height);
Parameters
ddesc
stream
width
height
fps
options
Description
416
The EnableStream[s] function requests that the specified stream(s) be part of the
pipeline streaming. The application can call this function multiple times for different
streams.
The EnableStreams function behavior is different from the EnableStream function.
The former activates one or more aligned streams reads. If you specify more than 1
stream in the stream descriptor, the SenseManager interface delivers all streams
synchronized when invoking the OnNewSample callback function. The later activates
individual unaligned stream reads. If you call the EnableStream function multiple
times, you get multiple OnNewSample callbacks, each with the currently available
stream sample.
Use this function to explicitly request a stream or more streams for rendering or
processing. There is no need to call this function for any modality processing. When
the application uses the EnableModule function (or any algorithm specific helper
functions) to enable algorithm modalities, the SDK enables the corresponding
streams implicitly.
Return Status
STATUS_NO_ERROR
See Also
Capturing Individual Color or Depth Stream
Capturing Unaligned Color and Depth Streams
Capturing Aligned Color and Depth Streams
2.11.14.15.2 QuerySample
Namespace Hierarchy
[C++]
PXCSenseManager::QuerySample
[C#]
PXCMSenseManager.QuerySample
[Java]
PXCMSenseManager.QuerySample
Syntax
[C++]
Sample *QuerySample(pxcUID mid);
Sample *QuerySample(void);
417
[C#]
Sample QuerySample(Int32 mid);
Sample QuerySample();
[Java]
Sample QuerySample(int mid);
Sample QuerySample();
Parameters
mid
Description
The QuerySample function returns all image sample available, at this moment.
If the module identifier mid is omitted, the function returns a single Sample structure
that contains all available image instances from any explicitly requested streams via
the EnableStream[s] function(s).
If the module identifier mid is specified, the function returns available images only for
the specific module:
For algorithm modules, use the module interface identifier. For example, use
mid=PXCFaceModule::CUID to retrieve images processed by the face module.
For streams explicitly requested through multiple calls to the EnableStream[s]
functions, use mid=PXCCapture::CUID+0, PXCCapture::CUID+1, .... to retrieve the
images.
Return Status
The Sample instance or NULL/null if the sample is not available.
Remarks
The returned sample is a SenseManager internally maintained object.
Do not release it.
2.11.14.16Member Functions (Touchless Controller)
Description
2010-2016 Intel Corporation
interface.
2.11.14.16.1 EnableTouchlessController
Namespace Hierarchy
[C++]
PXCSenseManager::EnableTouchlessController
[C#]
PXCMSenseManager.EnableTouchlessController
[Java]
PXCMSenseManager.EnableTouchlessController
Syntax
[C++]
pxcStatus EnableTouchlessController();
[C#]
pxcmStatus EnableTouchlessController();
[Java]
pxcmStatus EnableTouchlessController();
Parameters
None
Description
The EnableTouchlessController function activates the touchless controller feature
in the multimodal pipeline.
Return Status
STATUS_NO_ERROR
419
2.11.14.16.2 PauseTouchlessController
Namespace Hierarchy
[C++]
PXCSenseManager::PauseTouchlessController
[C#]
PXCMSenseManager.PauseTouchlessController
[Java]
PXCMSenseManager.PauseTouchlessController
Syntax
[C++]
void PauseTouchlessController(pxcBool pause);
[C#]
void PauseTouchlessController(Boolean pause);
[Java]
void PauseTouchlessController(boolean pause);
Parameters
pause
Description
The PauseTouchlessController function pauses or resumes the touchless
controller feature.
Return Status
None
2.11.14.16.3 QueryTouchlessController
Namespace Hierarchy
[C++]
PXCSenseManager::QueryTouchlessController
[C#]
PXCMSenseManager.QueryTouchlessController
420
[Java]
PXCMSenseManager.QueryTouchlessController
Syntax
[C++]
PXCTouchlessController* QueryTouchlessController(void);
[C#]
PXCMTouchlessController QueryTouchlessController();
[Java]
PXCMTouchlessController QueryTouchlessController();
Parameters
None
Description
The QueryTouchlessController function returns the module instance when the
module is not busy processing any incoming data. There are two periods of time when
a module is not busy:
Setup: In between the EnableTouchlessController function call and the first
AcquireFrame function call, the QueryTouchlessController function returns the
module instance. The application can use the module instance for additional setup
operations.
Retrieve Data: In between the AcquireFrame function call and the ReleaseFrame
function call, the QueryTouchlessController function returns a valid module
instance if the module is completed processing the current frame of input data. The
application can use the module instance to retrieve processing results.
Return Status
The module instance, or NULL/null if the module is busy.
2.11.14.17Member Functions (User Segmentation)
421
Member Functions
Description
Enable3DSeg
Pause3DSeg
Query3DSeg
Query3DSegSample
2.11.14.17.1 Enable3DSeg
Namespace Hierarchy
[C++]
PXCSenseManager::Enable3DSeg
[C#]
PXCMSenseManager.Enable3DSeg
[Java]
PXCMSenseManager.Enable3DSeg
Syntax
[C++]
pxcStatus Enable3DSeg(pxcCHAR *name);
pxcStatus Enable3DSeg();
[C#]
pxcmStatus Enable3DSeg(String name);
pxcmStatus Enable3DSeg();
[Java]
pxcmStatus Enable3DSeg(String name);
pxcmStatus Enable3DSeg();
Parameters
name
Description
The Enable3DSeg function activates user segmentation in the multimodal pipeline.
Return Status
STATUS_NO_ERROR
422
2.11.14.17.2 Pause3DSeg
Namespace Hierarchy
[C++]
PXCSenseManager::Pause3DSeg
[C#]
PXCMSenseManager.Pause3DSeg
[Java]
PXCMSenseManager.Pause3DSeg
Syntax
[C++]
void Pause3DSeg(pxcBool pause);
[C#]
void Pause3DSeg(Boolean pause);
[Java]
void Pause3DSeg(boolean pause);
Parameters
pause
Description
The Pause3DSeg function pauses or resumes the user segmentation module. If
paused, the pipeline no longer delivers any input samples to the module.
Return Status
None
2.11.14.17.3 Query3DSeg
Namespace Hierarchy
[C++]
PXCSenseManager::Query3DSeg
[C#]
423
PXCMSenseManager.Query3DSeg
[Java]
PXCMSenseManager.Query3DSeg
Syntax
[C++]
PXC3DSeg* Query3DSeg(void);
[C#]
PXCM3DSeg Query3DSeg();
[Java]
PXCM3DSeg Query3DSeg();
Parameters
None
Description
The Query3DSeg function returns the module instance when the module is not busy
processing any incoming data. There are two periods of time when a module is not
busy:
Setup: In between the Enable3DSeg function call and the first AcquireFrame
function call, the Query3DSeg function returns the module instance. The application
can use the module instance for additional setup operations.
Retrieve Data: In between the AcquireFrame function call and the ReleaseFrame
function call, the Query3DSeg function returns a valid module instance if the module
is completed processing the current frame of input data. The application can use
the module instance to retrieve processing results.
Return Status
The module instance, or NULL/null if the module is busy.
2.11.14.17.4 Query3DSegSample
Namespace Hierarchy
[C++]
PXCSenseManager::Query3DSegSample
[C#]
424
PXCMSenseManager.Query3DSegSample
[Java]
PXCMSenseManager.Query3DSegSample
Syntax
[C++]
Sample *Query3DSegSample(void);
[C#]
Sample Query3DSegSample();
[Java]
Sample Query3DSegSample();
Parameters
None
Description
The Query3DSegSample function returns the current images processed by the user
segmentation module.
Return Status
The Sample instance or NULL/null if the sample is not available.
Remarks
The returned sample is a SenseManager internally maintained object.
Do not release it.
2.11.14.18Properties
425
Property
Description
captureManager (C#,JS,UWP)
session (C#,JS)
sample (UWP)
Namespace Hierarchy
[C#]
PXCMSenseManager.captureManager
[JavaScript]
intel.realsense.SenseManager.captureManager
[C#/UWP]
Intel.Realsense.SenseManager.CaptureManager
Syntax
[C#]
PXCMCaptureManager captureManager {
get;
}
[JavaScript]
Data Type
{
captureManager,
CaptureManager
};
[C#/UWP]
CaptureManager captureManager {
get;
}
Description
The captureManager property returns the CaptureManager instance.
Remarks
[C#]
Namespace Hierarchy
Intel.RealSense.SenseManager.Sample
Syntax
426
Sample Sample {
get
};
Description
The sample property returns the available sample from the capture device. If
there is no sample available, the property returns null.
2.11.14.18.3 session (C#,JS)
Namespace Hierarchy
[C#]
PXCMSenseManager.session
[JavaScript]
intel.realsense.SenseManager.session
Syntax
[C#]
PXCMSession session {
get;
}
[JavaScript]
Data Type
{
session,
Session
};
Description
The session property returns the Session instance.
Remarks
[C#]
2.11.14.19Static Functions
427
Static Functions
Description
CreateInstance (+JS,+UWP)
detectPlatform (JS)
Namespace Hierarchy
[C++]
PXCSenseManager::CreateInstance
[C#]
PXCMSenseManager.CreateInstance
[Java]
PXCMSenseManager.CreateInstance
[JavaScript]
intel.realsense.SenseManager.createInstance
[C#/UWP]
Intel.RealSense.SenseManager.CreateInstance
Syntax
[C++]
static PXCSenseManager* CreateInstance(void);
[C#]
static PXCMSenseManager CreateInstance();
[Java]
static PXCMSenseManager CreateInstance();
[JavaScript]
function createInstance();
[C#/UWP]
static SenseManager CreateInstance();
Parameters
None
Description
[C++][C#][Java]
428
Return Status
[C++][C#][Java][C#/UWP]
Namespace Hierarchy
intel.realsense.SenseManager.detectPlatform
Syntax
function detectPlatform(components, cameras);
Parameters
429
components
cameras
Description
The detectPlatform function checks the platform for the camera model, the
camera driver version, and the SDK runtime version. The function signals if
the platform is prepared to run your JavaScript application.
Specify the runtimes using the installer feature names as described in Installer
Feature Code, and the required cameras using the camera model strings as
described in Installer Options.
The function returns a set of flags to indicate if the platform is ready, and a
nextStep state of what the application needs to do next, as follows:
Flags
430
nextStep
Comment
isDCMUpdateNeeed
!isCameraReady &&
!isCheckNeeded
(isCameraReady &&
!isRuntimeInstalled
&&
!isDCMUpdateNeeded)
|| isCheckNeeded
isCameraReady &&
isRuntimeInstalled
&&
!isDCMUpdateNeeded
"ready": Continue to
The platform is
your application context. equipped with the right
camera, up-to-date
camera driver and SDK
runtimes to run your
application.
Return Status
The promise object contains the following flags:
isCameraReady
isDCMUpdateNeeded
isRuntimeInstalled
isCheckNeeded
nextStep
Example
Example 67 shows the platform detection logic for a blob tracking application.
Example 67: Platform Detection for Blob Tracking
431
See Also
Deploying JavaScript Applications
Description
The Session interface maintains the SDK context. The application can query and
create instances of I/O module and algorithm module implementations.
432
The Session implementation exposes the Metadata interface for centralized meta
data storage.
You can use the QuerySession function (or session in C# and JavaScript) to retrieve
an instance of the Session interface, as illustrated in Example 68.
Reference
[C++]
pxcsession.h
[C#/.NET4]
libpxcclr.cs.dll
[C#/Unity]
libpxcclr.unity.dll
[Java]
libpxcclr.java.jar
[Processing]
libpxcclr_processing
[JavaScript]
realsense.js
Runtime
[C++][C#][Java][JavaScript]
[C++]
PXCSenseManager *sm=PXCSenseManager::CreateInstance();
...
PXCSession::ImplVersion v=sm->QuerySession()->QueryVersion();
printf_s("SDK Version: %d.%d\n", v.major, v.minor);
...
sm->Release();
[C#]
PXCMSenseManager sm=PXCMSenseManager.CreateInstance();
...
PXCMSession.ImplVersion v=sm.session.version;
Console.WriteLine("SDK Version: {0}.{1}", v.major, v.minor);
433
...
sm.Dispose();
[Java]
PXCMSenseManager sm=PXCMSenseManager.CreateInstance();
...
PXCMSession.ImplVersion v=sm.session.version;
System.out.printf("SDK Version: %d.%d%n",v.major,v.minor);
...
sm.Dispose();
[JavaScript]
intel.realsense.SenseManager.createInstance().then(function(sm)) {
...
document.write("SDK Version: " + sm.session.version);
...
sm.release();
}
See Also
Constants
Member Functions
Properties (C#, JS)
Static Functions
434
2.11.15.1 Constants
Description
CUID
Description
CreateAudio
CreateImage
CreatePhoto
CreateImpl
CreateAudioSource
CreateCaptureManager
CreateSenseManager
CreatePowerManager
QueryModuleDesc (+JS)
LoadImplFromFile
QueryImpl
QueryImpls (JS)
Query an implementation.
QueryVersion
QueryCoordinateSystem
SetCoordinateSystem
UnloadImplFromFile
2.11.15.2.1 CreateAudio
Namespace Hierarchy
[C++]
PXCSession::CreateAudio
[C#]
PXCMSession.CreateAudio
435
[Java]
PXCMSession.CreateAudio
Syntax
[C++]
PXCAudio* CreateAudio(PXCAudio::AudioInfo *info, PXCAudio::AudioData
*data);
PXCAudio* CreateAudio(PXCAudio::AudioInfo *info);
[C#]
PXCMAudio CreateAudio(PXCMAudio.AudioInfo info, PXCMAudio.AudioData
data);
PXCMAudio CreateAudio(PXCMAudio.AudioInfo info);
[Java]
PXCMAudio CreateAudio(PXCMAudio.AudioInfo info, PXCMAudio.AudioData
data);
PXCMAudio CreateAudio(PXCMAudio.AudioInfo info);
Parameters
info
data
Description
The CreateAudio function creates an instance of the Audio interface, which manages
audio buffer access.
If data is specified, the SDK initializes the audio buffer with the specified data, by
taking the buffer pointers or the OS-specific surface handle, without copying any data.
The formats in the AudioData structure and in the AudioInfo structure must match.
If data is not specified, the SDK creates the audio buffer without initialization.
Return Status
436
[C++]
PXCAudio::AudioInfo ainfo;
memset(&ainfo,0,sizeof(ainfo));
ainfo.bufferSize=8820;
ainfo.format=PXCAudio::AUDIO_FORMAT_PCM;
ainfo.sampleRate=44100;
ainfo.nchannels=2;
//
//
//
//
PXCAudio *audio=session->CreateAudio(&ainfo);
...
audio->Release();
[C#]
PXCMAudio.AudioInfo ainfo=new PXCMAudio.AudioInfo() {
bufferSize=8820,
// max number of bytes
format=PXCMAudio.AudioFormat.AUDIO_FORMAT_PCM,
// audio sample
format
sampleRate=44100,
// sampling rate in Hz
nchannels=2,
// number of channels
};
PXCMAudio audio=session.CreateAudio(ainfo);
...
audio.Dispose();
[Java]
PXCMAudio.AudioInfo ainfo=new PXCMAudio.AudioInfo();
ainfo.bufferSize=8820,
// max number of bytes
ainfo.format=PXCMAudio.AudioFormat.AUDIO_FORMAT_PCM,
// audio sample
format
ainfo.sampleRate=44100,
// sampling rate in Hz
ainfo.nchannels=2,
// number of channels
PXCMAudio audio=session.CreateAudio(ainfo);
...
audio.close();
437
2.11.15.2.2 CreateAudioSource
Namespace Hierarchy
[C++]
PXCSession::CreateAudioSource
[C#]
PXCMSession.CreateAudioSource
[Java]
PXCMSession.CreateAudioSource
Syntax
[C++]
PXCAudioSource* CreateAudioSource(void);
[C#]
PXCMAudioSource CreateAudioSource();
[Java]
PXCMAudioSource CreateAudioSource();
Parameters
None
Description
The CreateAudioSource function creates an instance of the AudioSource interface.
Return Status
The AudioSource instance, or NULL/null if there is any error.
2.11.15.2.3 CreateCaptureManager
Namespace Hierarchy
[C++]
PXCSession::CreateCaptureManager
[C#]
PXCMSession.CreateCaptureManager
[Java]
PXCMSession.CreateCaptureManager
438
Syntax
[C++]
PXCCaptureManager* CreateCaptureManager(void);
[C#]
PXCMCaptureManager CreateCaptureManager();
[Java]
PXCMCaptureManager CreateCaptureManager();
Parameters
None
Description
The CreateCaptureManager function creates an instance of the CaptureManager
interface.
Return Status
The CaptureManager instance, or NULL/null if there is any error.
2.11.15.2.4 CreateImage
Namespace Hierarchy
[C++]
PXCSession::CreateImage
[C#]
PXCMSession.CreateImage
[Java]
PXCMSession.CreateImage
Syntax
[C++]
PXCImage* CreateImage(PXCImage::ImageInfo *info, PXCImage::ImageData
*data);
PXCImage* CreateImage(PXCImage::ImageInfo *info);
[C#]
PXCMImage CreateImage(PXCMImage.ImageInfo info, PXCMImage.ImageData
data);
PXCMImage CreateImage(PXCMImage.ImageInfo info);
439
[Java]
PXCMImage CreateImage(PXCMImage.ImageInfo info, PXCMImage.ImageData
data);
PXCMImage CreateImage(PXCMImage.ImageInfo info);
Parameters
info
data
Description
The CreateImage function creates an instance of the Image interface to manage
image buffer access.
If data is specified, the SDK initializes the image buffer with the specified data, by
taking the buffer pointers or the OS-specific surface handle, without copying any data.
The formats in the ImageInfo structure and in the ImageData structure must match.
If data is not specified, the SDK creates the image buffer without initialization.
Return Status
The Image instance, or NULL/null if there is any error.
Example
Example 70 shows how to create an image object.
Example 70: Create an Image Object
[C++]
PXCImage::ImageInfo iinfo;
memset(&iinfo,0,sizeof(iinfo));
iinfo.width=640;
iinfo.height=480;
iinfo.format=PXCImage::COLOR_FORMAT_RGB24;
PXCImage *image=session->CreateImage(&iinfo);
...
image->Release();
[C#]
PXCMImage.ImageInfo iinfo=new PXCMImage.ImageInfo() {
width=640, height=480, format=PXCMImage.ColorFormat.COLOR_FORMAT_RGB24
440
};
PXCMImage image=session.CreateImage(iinfo);
...
image.Dispose();
[Java]
PXCMImage.ImageInfo iinfo=new PXCMImage.ImageInfo();
iinfo.width=640;
iinfo.height=480;
iinfo.format=PXCMImage.ColorFormat.COLOR_FORMAT_RGB24;
PXCMImage image=session.CreateImage(iinfo);
...
image.close();
2.11.15.2.5 CreateImpl
Namespace Hierarchy
[C++]
PXCSession::CreateImpl
[C#]
PXCMSession.CreateImpl
[Java]
PXCMSession.CreateImpl
Syntax
[C++]
pxcStatus CreateImpl(ImplDesc *desc, pxcUID iuid, pxcUID cuid, void
**instance);
pxcStatus CreateImpl(pxcUID iuid, pxcUID cuid, void **instance);
pxcStatus CreateImpl(pxcUID cuid, void **instance);
pxcStatus CreateImpl(ImplDesc *desc, pxcUID cuid, void **instance);
[C#]
pxcmStatus
instance);
pxcmStatus
pxcmStatus
pxcmStatus
[Java]
pxcmStatus
pxcmStatus
pxcmStatus
pxcmStatus
441
Parameters
desc
iuid
cuid
instance
Description
The CreateImpl function creates an instance of the I/O module or the algorithm
module. The module descriptor can be a complete module descriptor returned from
the QueryImpl function, or a template, in which case the SDK creates an instance of
the first I/O or algorithm module matched.
Return Status
STATUS_NO_ERROR
STATUS_ITEM_UNAVAILABLE
Remarks
[C++]
The application may use the corresponding templates CreateImpl<T> to enable type
checking. For example, the following statement creates an instance (into variable y) of
interface Y:
pxcStatus sts=session->CreateImpl<Y>(&y);
[C#]
The application may use the corresponding templates CreateImpl<T> to enable type
checking. For example, the following statement creates an instance (into variable y) of
interface Y:
pxcmStatus sts=session.CreateImpl<Y>(out y);
[Java]
The application must explicitly construct the returned instance using the default
442
2.11.15.2.6 CreatePhoto
Namespace Hierarchy
[C++]
PXCSession::CreatePhoto
[C#]
PXCMSession.CreatePhoto
[Java]
PXCMSession.CreatePhoto
Syntax
[C++]
PXCPhoto* CreatePhoto(void);
[C#]
PXCMPhoto CreatePhoto();
[Java]
PXCMPhoto CreatePhoto();
Parameters
None
Description
The CreatePhoto function creates an instance of the Photo interface.
The photo image is uninitialized at this time. Use the Photo functions to set the photo
content.
You need to release the instance after use.
Return Status
The Photo instance, or NULL/null if there is any error.
443
2.11.15.2.7 CreatePowerManager
Namespace Hierarchy
[C++]
PXCSession::CreatePowerManager
[C#]
PXCMSession.CreatePowerManager
[Java]
PXCMSession.CreatePowerManager
Syntax
[C++]
PXCPowerState* CreatePowerManager(void);
[C#]
PXCMPowerState CreatePowerManager();
[Java]
PXCMPowerState CreatePowerManager();
Parameters
None
Description
The CreatePowerManager function creates an instance of the PowerState interface.
Return Status
The PowerState instance, or NULL/null if there is any error.
2.11.15.2.8 CreateSenseManager
Namespace Hierarchy
[C++]
PXCSession::CreateSenseManager
[C#]
PXCMSession.CreateSenseManager
[Java]
PXCMSession.CreateSenseManager
444
Syntax
[C++]
PXCSenseManager* CreateSenseManager(void);
[C#]
PXCMSenseManager CreateSenseManager();
[Java]
PXCMSenseManager CreateSenseManager();
Parameters
None
Description
The CreateSenseManager function creates an instance of the SenseManager
interface.
Return Status
The SenseManager instance, or NULL/null if there is any error.
2.11.15.2.9 LoadImplFromFile
Namespace Hierarchy
[C++]
PXCSession::LoadImplFromFile
[C#]
PXCMSession.LoadImplFromFile
[Java]
PXCMSession.LoadImplFromFile
Syntax
[C++]
pxcStatus LoadImplFromFile(pxcCHAR *fileName);
[C#]
pxcmStatus LoadImplFromFile(String fileName);
[Java]
pxcmStatus LoadImplFromFile(string fileName);
445
Parameters
filename
Description
The LoadImplFromFile function loads a module implementation from a shared
library at run time.
Return Status
STATUS_NO_ERROR
2.11.15.2.10 QueryCoordinateSystem
Namespace Hierarchy
[C++]
PXCSession::QueryCoordinateSystem
[C#]
PXCMSession.QueryCoordinateSystem
[Java]
PXCMSession.QueryCoordinateSystem
Syntax
[C++]
CoordinateSystem QueryCoordinateSystem(void);
[C#]
CoordinateSystem QueryCoordinateSystem();
[Java]
EnumSet<CoordinateSystem> QueryCoordinateSystem();
Parameters
None
Description
446
Namespace Hierarchy
[C++]
PXCSession::QueryImpl
[C#]
PXCMSession.QueryImpl
[Java]
PXCMSession.QueryImpl
Syntax
[C++]
pxcStatus QueryImpl(ImplDesc *template, pxcI32 idx, ImplDesc *desc);
[C#]
pxcmStatus QueryImpl(ImplDesc template, Int32 idx, out ImplDesc desc);
pxcmStatus QueryImpl(Int32 idx, out ImplDesc desc);
[Java]
pxcmStatus QueryImpl(ImplDesc template, int idx, ImplDesc desc);
pxcmStatus QueryImpl(int idx, ImplDesc desc);
Parameters
447
template
idx
desc
Description
The QueryImpl function enumerates available modules according to the search
criteria (the module descriptor template, template). If there are multiple matches, the
application needs to increase the idx number to retrieve additional matches, until the
function returns STATUS_ITEM_UNAVAILABLE.
Return Status
STATUS_NO_ERROR
STATUS_ITEM_UNAVAILABLE
Namespace Hierarchy
intel.realsense.Session.queryImpls
Syntax
function queryImpl(template);
Parameters
448
template
Description
The QueryImpls function enumerates available modules according to the search
criteria (the module descriptor template, template).
Return Status
The returned promise object contains:
sts
impls
Namespace Hierarchy
[C++]
PXCSession::QueryModuleDesc
[C#]
PXCMSession.QueryModuleDesc
[Java]
PXCMSession.QueryModuleDesc
[JavaScript]
intel.realsense.Session.queryModuleDesc
Syntax
[C++]
pxcStatus QueryModuleDesc(PXCBase *module, ImplDesc *mdesc);
[C#]
pxcmStatus QueryModuleDesc(PXCMBase module, out ImplDesc mdesc);
[Java]
pxcmStatus QueryModuleDesc(PXCMBase module, ImplDesc mdesc);
449
[JavaScript]
function queryModuleDesc(module);
Parameters
module
mdesc
Description
The QueryModuleDesc function returns the module implementation descriptor, in
the ImplDesc structure.
Return Status
[C++][C#][Java]
STATUS_NO_ERROR
STATUS_ITEM_UNAVAILABLE
[JavaScript]
mdesc
2.11.15.2.14 QueryVersion
Namespace Hierarchy
[C++]
PXCSession::QueryVersion
[C#]
PXCMSession.QueryVersion
[Java]
PXCMSession.QueryVersion
450
Syntax
[C++]
ImplVersion QueryVersion(void);
[C#]
ImplVersion QueryVersion();
[Java]
ImplVersion QueryVersion();
Parameters
None
Description
The QueryVersion function returns the SDK API version.
Return Status
The SDK version in the ImplVersion structure.
Remarks
[C#]
2.11.15.2.15 SetCoordinateSystem
Namespace Hierarchy
[C++]
PXCSession::SetCoordinateSystem
[C#]
PXCMSession.SetCoordinateSystem
[Java]
PXCMSession.SetCoordinateSystem
Syntax
[C++]
pxcStatus SetCoordinateSystem(CoordinateSystem value);
[C#]
451
Parameters
value
Description
The SetCoordinateSystem function sets the current camera coordinate system
value.
To change the coordinate system, you must call the SetCoordinateSystem
function before any camera device or the algorithm instance is created. In the case of
using the SenseManager interface, set the coordinate system right after creating the
SenseManager instance and before any EnableXXX functions. The behavior is
undefined if you change the coordinate system setting after the capture or algorithm
instances are created or in the middle of streaming.
Return Status
STATUS_NO_ERROR
2.11.15.2.16 UnloadImplFromFile
Namespace Hierarchy
[C++]
PXCSession::UnloadImplFromFile
[C#]
PXCMSession.UnloadImplFromFile
[Java]
PXCMSession.UnloadImplFromFile
Syntax
[C++]
pxcStatus UnloadImplFromFile(pxcCHAR *dllName);
[C#]
pxcmStatus UnloadImplFromFile(String dllName);
452
[Java]
pxcmStatus UnloadImplFromFile(string dllName);
Parameters
dllName
Description
The UnloadImplFromFile function removes a module implementation. The shared
library is unloaded from memory.
Return Status
STATUS_NO_ERROR
STATUS_ITEM_UNAVAILABLE
Description
version
2.11.15.3.1 version
Namespace Hierarchy
[C#]
Session.version
[JavaScript]
intel.realsense.Session.version
Syntax
[C#]
ImplVersion version {
get;
}
[JavaScript]
453
Data Type
{
version,
ImplVersion
Description
The version property gets the SDK version.
Remarks
[C#]
Description
CreateInstance
2.11.15.4.1 CreateInstance
Namespace Hierarchy
[C++]
PXCSession::CreateInstance
[C#]
PXCMSession.CreateInstance
[Java]
PXCMSession.CreateInstance
Syntax
[C++]
static PXCSession* CreateInstance(void);
[C#]
static PXCMSession CreateInstance();
[Java]
static PXCMSession CreateInstance();
454
Parameters
None
Description
The CreateInstance function creates an instance of the Session interface.
Return Status
The Session instance, or NULL/null if there is any error.
2.11.16 SyncPoint
Namespace Hierarchy
[C++]
PXCSyncPoint
[C#]
PXCMSyncPoint
[Java]
PXCMSyncPoint
Description
The SyncPoint interface manages the synchronization of any asynchronous execution.
The SP (Sync Point) is created by each SDK asynchronous function. The application must
release the SP after synchronization.
Reference
[C++]
pxcsyncpoint.h
[C#/.NET4]
libpxcclr.cs.dll
[C#/Unity]
libpxcclr.unity.dll
[Java]
libpxcclr.java.jar
[Processing]
455
libpxcclr_processing
Runtime
[C++][C#][Java]
Description
CUID
TIMEOUT_INFINITE
SYNCEX_LIMIT
Description
Synchronize
2.11.16.2.1 Synchronize
Namespace Hierarchy
[C++]
PXCSyncPoint::Synchronize
[C#]
PXCMSyncPoint.Synchronize
[Java]
PXCMSyncPoint.Synchronize
Syntax
[C++]
pxcStatus Synchronize(pxcI32 timeout);
456
pxcStatus Synchronize(void);
[C#]
pxcmStatus Synchronize(Int32 timeout);
pxcmStatus Synchronize();
[Java]
pxcmStatus Synchronize(int timeout);
pxcmStatus Synchronize();
Parameters
timeout
Description
The Synchronize function waits until an asynchronous execution is completed, or
returns due to time out.
If timeout is omitted, the function waits infinitely until an asynchronous execution is
completed.
Return Status
STATUS_EXEC_TIMEOUT
Other values
Description
SynchronizeEx
ReleaseSP
2.11.16.3.1 ReleaseSP
Namespace Hierarchy
[C++]
PXCSyncPoint::ReleaseSP
457
[C#]
PXCMSyncPoint.ReleaseSP
[Java]
PXCMSyncPoint.ReleaseSP
Syntax
[C++]
static void ReleaseSP(SyncPoint[] sps, pxcI32 startIndex, pxcI32 nitems);
[C#]
static void ReleaseSP(SyncPoint[] sps, Int32 startIndex, Int32 nitems);
static void ReleaseSP(SyncPoint[] sps);
[Java]
static void ReleaseSP(SyncPoint[] sps, int startIndex, int nitems);
static void ReleaseSP(SyncPoint[] sps);
Parameters
sps
startIndex
nitems
Description
The ReleaseSP function resets an SP array by releasing each array element. If
startIndex and nitems are omitted, the function works on the entire array.
The SP array object is not released.
Return Status
None
Remarks
[C++]
If an SP array element is not NULL, the function uses the Release function to release it.
The application must zero the SP array for any newly-allocated SP array as follows:
SyncPoint **sps=new SyncPoint*[4];
memset(sps,0,sizeof(sps));
458
[Java]
The function constructs each array element, if not already constructed. The application
can use this function to initialize a newly allocated SP array.
2.11.16.3.2 SynchronizeEx
Namespace Hierarchy
[C++]
PXCSyncPoint::SynchronizeEx
[C#]
PXCMSyncPoint.SynchronizeEx
[Java]
PXCMSyncPoint.SynchronizeEx
Syntax
[C++]
static
pxcHDL
static
pxcI32
static
static
[C#]
static pxcmStatus
timeout);
static pxcmStatus
static pxcmStatus
static pxcmStatus
[Java]
static
static
static
static
pxcmStatus
pxcmStatus
pxcmStatus
pxcmStatus
SynchronizeEx(SyncPoint[]
SynchronizeEx(SyncPoint[]
SynchronizeEx(SyncPoint[]
SynchronizeEx(SyncPoint[]
Parameters
459
n1
sps
n2
objs
idx
timeout
Description
The SynchronizeEx function SynchronizeEx waits until one or all of the sync points
signals, or times out.
If idx is provided, the function returns if any of the sync points signals. If idx is not
provided, the function returns after all sync points signal.
If timeout is not provided, the function waits infinitely until one or all of the sync
points signals.
If multiple sync points signal, the function only returns the smallest index of sync
point that signals. The application needs to loop through the status of all sync points
to cover all signaled sync points.
There is a limit to how many SPs the function can wait on. The limit is specified as
SYNCEX_LIMIT, and is OS-specific.
Return Status
460
STATUS_PARAM_UNSUPPORTED
STATUS_TIMEOUT
STATUS_NO_ERROR
Other values
Remarks
[C#]
2.11.17 VideoModule
Namespace Hierarchy
[C++]
PXCVideoModule
[C#]
PXCMVideoModule
[Java]
PXCMVideoModule
Description
The VideoModule interface exposes video module common methods.
Reference
[C++]
461
pxcvideomodule.h
[C#/.NET4]
libpxcclr.cs.dll
[C#/Unity]
libpxcclr.unity.dll
[Java]
libpxcclr.java.jar
[Processing]
libpxcclr_processing
Runtime
[C++][C#][Java]
[C++]
// face is a PXCFaceModule instance
PXCVideoModule *module=face->QueryInstance<PXCVideoModule>();
[C#]
// face is a PXCMFaceModule instance
PXCMVideoModule module=face.QueryInstance<PXCMVideoModule>();
[Java]
// face is a PXCMFaceModule instance
PXCMVideoModule module=(PXCMVideoModule)
face.QueryInstance(PXCMVideoModule.CUID);
See Also
Constants
Member Functions
462
2.11.17.1 Constants
Description
CUID
DEVCAP_LIMIT
Description
ProcessImageAsync
ProcessSample
SetProjection
SetGPUExec
2.11.17.2.1 ProcessImageAsync
Namespace Hierarchy
[C++]
PXCVideoModule::ProcessImageAsync
[C#]
PXCMVideoModule.ProcessImageAsync
[Java]
PXCMVideoModule.ProcessImageAsync
Syntax
[C++]
pxcStatus ProcessImageAsync(PXCImage *images[], SyncPoint **sp);
[C#]
pxcmStatus ProcessImageAsync(PXCMImage[] images, out SyncPoint sp);
[Java]
pxcmStatus ProcessImageAsync(PXCMImage[] images, SyncPoint sp);
463
Parameters
images
sp
Description
The ProcessImageAsync function feeds the input streams to the video module for
processing. The array of the input streams must be big enough to provide the
required streams and in the right order as reported by the algorithm configuration.
This function is asynchronous. The intermediate processing results are not available
until after the application synchronizes the SP.
Return Status
STATUS_NO_ERROR
Remarks
The application that uses the SenseManager interface to manage the multimodal
pipeline does not use this function. The SenseManager interface internally invokes
this function for algorithm data processing.
2.11.17.2.2 ProcessSample
Namespace Hierarchy
[C++]
PXCVideoModule::ProcessSample
[C#]
PXCMVideoModule.ProcessSample
[Java]
PXCMVideoModule.ProcessSample
Syntax
[C++]
pxcStatus ProcessSample(Sample *sample);
[C#]
pxcmStatus ProcessSample(Sample sample);
464
[Java]
pxcmStatus ProcessSample(Sample sample);
Parameters
sample
Description
The ProcessSample function feeds the input streams to the video module for
processing.
This function blocks until the video module processing is completed.
Return Status
STATUS_NO_ERROR
Remarks
The application that uses the SenseManager interface to manage the multimodal
pipeline does not need to use this function.
2.11.17.2.3 QueryCaptureProfile
Namespace Hierarchy
[C++]
PXCVideoModule::QueryCaptureProfile
[C#]
PXCMVideoModule.QueryCaptureProfile
[Java]
PXCMVideoModule.QueryCaptureProfile
Syntax
[C++]
pxcStatus
pxcStatus
[C#]
pxcmStatus QueryCaptureProfile(Int32 index, out DataDesc inputs);
pxcmStatus QueryCaptureProfile(out DataDesc inputs);
465
[Java]
pxcmStatus QueryCaptureProfile(int index, DataDesc inputs);
pxcmStatus QueryCaptureProfile(DataDesc inputs);
Parameters
index
inputs
Description
The QueryCaptureProfile function enumerates all available configuration
parameters for configuring the video module inputs.
If index is omitted, the function returns the current working configuration parameters.
Return Status
STATUS_NO_ERROR
STATUS_ITEM_UNAVAILABLE
Remarks
The application that uses the SenseManager interface to manage the multimodal
pipeline does not use this function. The SenseManager interface internally invokes
this function for algorithm data processing.
466
2.11.17.2.4 SetCaptureProfile
Namespace Hierarchy
[C++]
PXCVideoModule::SetCaptureProfile
[C#]
PXCMVideoModule.SetCaptureProfile
[Java]
PXCMVideoModule.SetCaptureProfile
Syntax
[C++]
pxcStatus
SetCaptureProfile(DataDesc *inputs);
[C#]
pxcmStatus SetCaptureProfile(DataDesc inputs);
[Java]
pxcmStatus SetCaptureProfile(DataDesc inputs);
Parameters
inputs
Description
The SetCaptureProfile function sets the video module configuration parameters.
Return Status
STATUS_NO_ERROR
Remarks
The application that uses the SenseManager interface to manage the multimodal
pipeline does not use this function. The SenseManager interface internally invokes
this function for algorithm data processing.
2.11.17.2.5 SetGPUExec
Namespace Hierarchy
467
[C++]
PXCVideoModule::SetGPUExec
[C#]
PXCMVideoModule.SetGPUExec
[Java]
PXCMVideoModule.SetGPUExec
Syntax
[C++]
void SetGPUExec(bool enable, int32_t taskId);
void SetGPUExec(bool enable);
void SetGPUExec();
[C#]
void SetGPUExec(Boolean enable, Int32 taskId);
void SetGPUExec(Boolean enable);
void SetGPUExec();
[Java]
void SetGPUExec(boolean enable, int taskId);
void SetGPUExec(boolean enable);
void SetGPUExec();
Parameters
enable
taskId
Description
The SetGPUExec function fine-tunes the algorithm GPU optimization behavior. By
default, the algorithm module enables all GPU optimizations. The function can be
used to move certain GPU executions to CPU.
Return Status
None
2.11.17.2.6 SetProjection
Namespace Hierarchy
[C++]
468
PXCVideoModule::SetProjection
[C#]
PXCMVideoModule.SetProjection
[Java]
PXCMVideoModule.SetProjection
Syntax
[C++]
void SetProjection(PXCProjection *projection);
[C#]
void SetProjection(PXCMProjection projection);
[Java]
void SetProjection(PXCMProjection rojection);
Parameters
projection
Description
The SetProjection function sets the Projection instance for the video module
algorithm.
Return Status
None
2.12
Structure Reference
This section describes the structure definitions of the Intel RealSense SDK essential
interfaces.
Naming Conventions
For C++, C# and Java, this manual uses [M] (where M stands for "managed") in the interface
names to represent interfaces that are available in a managed environment (such as C# and
Java). For example, Capture represents the C++ interface PXCCapture and the C#, and Java
interface PXCMCapture.
The manual uses additional markings after the interface or method names as follows:
469
Marking
Example
Comment
None
Base
(C++)
PXCBase.Release
(C#)
PXCMBase.Dispose
(C#.NET4)
PXCMImage.ImageData.ToBitmap
(Unity)
(Java)
PXCMBase.close
(Processing) PXCMImage.ImageData.ToPImage
(JS)
PXCMSession.QueryImpls
(+JS)
PXCMSession.QueryModelDesc
(UWP)
SampleReader.EnableStream[s]
(+UWP)
SenseManager.CreateInstance
2.12.1 Box3DF32
Namespace Hierarchy
[C++]
PXCBox3DF32
[C#]
PXCMBox3DF32
[Java]
PXCMPoint3DF32
Definition
[C++]
470
struct PXCBox3DF32 {
PXCPoint3DF32 centerOffset;
PXCPoint3DF32 dimension;
};
[C#]
class PXCMBox3DF32 {
PXCMPoint3DF32 centerOffset;
PXCMPoint3DF32 dimension;
};
[Java]
class PXCMPoint3DF32 {
PXCMPoint3DF32 centerOffset;
PXCMPoint3DF32 dimension;
};
Description
The Box3DF32 structure defines a 3D box.
Members
centerOffset
dimension
2.12.2 DataDesc
Namespace Hierarchy
[C++]
PXCVideoModule::DataDesc
[C#]
PXCMVideoModule.DataDesc
[Java]
PXCMVideoModule.DataDesc
Definition
[C++]
struct DataDesc {
StreamDescSet streams;
DeviceCap
devCaps[];
DeviceInfo
deviceInfo;
};
471
[C#]
class DataDesc {
StreamDescSet streams;
DeviceCap[]
devCaps;
DeviceInfo
deviceInfo;
};
[Java]
class DataDesc {
StreamDescSet streams;
DeviceCap[]
devCaps;
DeviceInfo
deviceInfo;
};
Description
The DataDesc structure describes the video stream I/O data needs for a processing
module. Unused fields must be set to zero.
Constructors
The default constructor value initializes all field values.
Members
streams
devCaps
deviceInfo
Description of the requested device information. Any nonzero values are matched. See the DeviceInfo structure for
definitions.
2.12.3 DeviceCap
Namespace Hierarchy
[C++]
PXCVideoModule::DeviceCap
[C#]
PXCMVideoModule.DeviceCap
472
[Java]
PXCMVideoModule.DeviceCap
Definition
[C++]
struct DeviceCap {
Property label;
pxcF32
value;
};
[C#]
struct DeviceCap {
Property label;
Single
value;
};
[Java]
class DeviceCap {
Property label;
float
value;
};
Description
The DeviceCap structure describes a device property and its value.
Members
label
value
473
[JavaScript]
intel.realsense.DeviceInfo
[C#/UWP]
Intel.RealSense.DeviceInfo
Definition
[C++]
struct DeviceInfo {
pxcCHAR
pxcCHAR
pxcCHAR
pxcI32
PXCPointF32
DeviceModel
DeviceOrientation
StreamType
pxcI32
pxcI32
Rotation
ConnectionType
};
[C#]
class DeviceInfo {
String
String
String
Int32[]
PXCMPointF32
DeviceModel
DeviceOrientation
StreamType
Int32
Int32
Rotation
ConnectionType
};
[Java]
class DeviceInfo {
string
string
string
int[]
PXCMPointF32
DeviceModel
DeviceOrientation
StreamType
int
474
name[224];
serial[32];
did[256];
firmware[4];
location;
model;
orientation;
streams;
didx;
duid;
rotation;
connectionType;
name;
serial;
did;
firmware;
location;
model;
orientation;
streams;
didx;
duid;
rotation;
connectionType;
name;
serial;
did;
firmware;
location;
model;
orientation;
streams;
didx;
int
Rotation
ConnectionType
duid;
rotation;
connectionType;
};
[JavaScript]
Data Type
{
name,
string
serial,
string
did,
string
firmware,
number array
location,
PointF32
model,
DeviceModel
orientation,
DeviceOrientation
streams,
StreamType
didx,
number
duid,
number
connectionType,
ConnectionType
}
[C#/UWP]
class DeviceInfo {
String
String
String
Int32[]
Point
DeviceModel
DeviceOrientation
Rotation
ConnectionType
};
Name;
Serial;
DeviceId;
Firmware;
Location;
Model;
Orientation;
Rotation;
connectionType;
Description
The DeviceInfo structure provides the capture device information.
Members
475
name/Name
serial/Serial
did/DeviceId
firmware/Firmware
location/Location
orientation/
Orientation
streams
didx
duid
connectionType
Example
Example 72 shows how to enumerate device information.
Example 72: Enumerate Device Information
[C++]
// PXCCapture *capture;
for (int i=0;;i++) {
PXCCapture::DeviceInfo dinfo;
if (capture->QueryDeviceIfo(i,&dinfo)<PXC_STATUS_NO_ERROR) break;
wprintf_s(L"device[%d]: %s\n", i, dinfo.name);
}
[C#]
// PXCMCapture capture;
for (int i=0;;i++) {
PXCMCapture.DeviceInfo dinfo;
476
2.12.5 ImageData
Namespace Hierarchy
[C++]
PXCImage::ImageData
[C#]
PXCMImage.ImageData
[Java]
PXCMImage.ImageData
Definition
[C++]
struct ImageData {
PixelFormat format;
pxcI32
pitches[4];
pxcBYTE
*planes[4];
};
[C#]
struct ImageData {
PixelFormat
format;
477
Int32[]
IntPtr[]
pitches;
planes;
};
[Java]
struct ImageData {
PixelFormat
format;
int[]
pitches;
};
Description
The ImageData structure describes image storage details.
Members
format
planes
pitches
Remarks
[C#]
The planes field points to array of pointers to the image buffers in the unmanaged
memory. The application can use marhsal copy or the provided member functions to
access to the image buffers.
[Java]
The application must use the provided member functions to access to the image
buffers.
See Also
Member Functions
2.12.5.1 Member Functions
478
Member Functions
Description
ToByteArray
ToFloatArray
ToShortArray
FromByteArray
FromFloatArray
FromShortArray
ToBitmap
ToWriteableBitmap
Namespace Hierarchy
[C#]
PXCMImage.ImageData.FromByteArray
[Java]
PXCMImage.ImageData.FromByteArray
Syntax
[C#]
void FromByteArray(Int32 index, Byte[] src);
[Java]
void FromByteArray(int index, byte[] src);
Parameters
index
src
Description
The FromByteArray function imports from the source byte array to the image data
plane.
Return Status
479
None
2.12.5.1.2 FromFloatArray (C#,Java)
Namespace Hierarchy
[C#]
PXCMImage.ImageData.FromFloatArray
[Java]
PXCMImage.ImageData.FromFloatArray
Syntax
[C#]
void FromFloatArray(Int32 plane, Single[] src);
[Java]
void FromFloatArray(int plane, float[] src);
Parameters
plane
src
Description
The FromFloatArray function imports the source data array to the image plane.
Return Status
None
2.12.5.1.3 FromPImage (Processing)
Namespace Hierarchy
PXCMImage.ImageData.FromPImage
Syntax
void FromPImage(int index, PImage src);
480
Parameters
index
src
Description
The FromPImage function imports from a source image instance. The image format
must be RGB.
The application must use AcquireAccess(..., COLOR_FORMAT_RGB32, ...) to
force conversion of any native color format to the RGB32 color format before using
this function.
Return Status
None
2.12.5.1.4 FromShortArray (C#,Java)
Namespace Hierarchy
[C#]
PXCMImage.ImageData.FromShortArray
[Java]
PXCMImage.ImageData.FromShortArray
Syntax
[C#]
void FromShortArray(Int32 plane, Int16[] src);
[Java]
void FromShortArray(int plane, short[] src);
Parameters
plane
src
Description
481
The FromShortArray function imports the source data array to the data plane.
Return Status
None
2.12.5.1.5 FromTexture2D (Unity)
Namespace Hierarchy
PXCMImage.ImageData.FromTexture2D
Syntax
void FromTexture2D(Int32 plane, Texture2D texture);
Parameters
plane
texture
Description
The FromTexture2D function imports from a source Texture2D instance. The texture
image must be in the format of TextureFormat.RGBA32.
The application must run this function in the Unity main thread.
The application must use AcquireAccess(..., COLOR_FORMAT_RGB32, ...) to
force conversion of any native color format to the RGB32 color format before using
this function.
Return Status
None
2.12.5.1.6 FromUShortArray (C#)
Namespace Hierarchy
482
PXCMImage.ImageData.FromUShortArray
Syntax
void FromUShortArray(Int32 plane, UInt16[] src);
Parameters
plane
src
Description
The FromUShortArray function imports the source data array to the data plane.
Return Status
None
2.12.5.1.7 ToBitmap (C# .NET4)
Namespace Hierarchy
PXCMImage.ImageData.ToBitmap
Syntax
System.Drawing.Bitmap ToBitmap(Int32 plane, Int32 width, Int32
height);
System.Drawing.Bitmap ToBitmap(Int32 plane, System.Drawing.Bitmap
bitmap);
Parameters
plane
width, height
bitmap
Description
483
The application may convert any native color format to one of above formats as
follows:
PXCMImage.ImageData data;
image.AcquireAccess(PXCMImage.Access.ACCESS_READ,
PXCMImage.PixelFormat.PIXEL_FORMAT_DEPTH, out data);
Bitmap bitmap=data.ToBitmap(...);
...
image.ReleaseAccess(data);
Return Status
The System.Drawing.Bitmap bitmap instance, or null if there is any error.
2.12.5.1.8 ToByteArray (C#,Java)
Namespace Hierarchy
[C#]
PXCMImage.ImageData.ToByteArray
[Java]
PXCMImage.ImageData.ToByteArray
Syntax
[C#]
Byte[] ToByteArray(Int32 plane, Int32 size);
Byte[] ToByteArray(Int32 plane, Byte[] dest);
[Java]
byte[] ToByteArray(int plane, int size);
byte[] ToByteArray(int plane, byte[] dest);
484
Parameters
plane
size
dest
Description
The ToByteArray function retrieves a copy of the image data plane as a byte array.
Return Status
The byte array instance, or null if there is any error.
2.12.5.1.9 ToFloatArray (C#,Java)
Namespace Hierarchy
[C#]
PXCMImage.ImageData.ToFloatArray
[Java]
PXCMImage.ImageData.ToFloatArray
Syntax
[C#]
Single[] ToFloatArray(Int32 plane, Int32 size);
Single[] ToFloatArray(Int32 plane, Single[] dest);
[Java]
float[] ToFloatArray(int plane, int size);
float[] ToFloatArray(int plane, float[] dest);
Parameters
485
plane
size
dest
Description
The ToFloatArray function retrieves a copy of the image plane as a float array.
Return Status
The float array instance, or null if there is any error.
2.12.5.1.10 ToPImage (Processing)
Namespace Hierarchy
PXCMImage.ImageData.ToPImage
Syntax
PImage ToPImage(int index, PImage dest);
Parameters
index
dest
Description
The ToPImage function exports the image data object to an application created
PImage instance.
The image format must be RGB.
The application must use AcquireAccess(..., COLOR_FORMAT_RGB32, ...) to
force conversion of any native color format to the RGB32 color format before using
this function.
Return Status
The PImage instance, or null if there is any error.
486
Namespace Hierarchy
[C#]
PXCMImage.ImageData.ToShortArray
[Java]
PXCMImage.ImageData.ToShortArray
Syntax
[C#]
Int16[] ToShortArray(Int32 plane, Int32 size);
Int16[] ToShortArray(Int32 plane, Int16[] dest);
[Java]
short[] ToShortArray(int plane, int size);
short[] ToShortArray(int plane, short[] dest);
Parameters
plane
size
dest
Description
The ToShortArray function retrieves a copy of the image plane as a short array.
Return Status
The short array instance, or null if there is any error.
2.12.5.1.12 ToTexture2D (Unity)
Namespace Hierarchy
PXCMImage.ImageData.ToTexture2D
Syntax
Texture2D ToTexture2D(Int32 plane, Int32 width, Int32 height);
487
Parameters
plane
width, height
texture
Description
The ToTexture2D function exports the image data object to an application created or
internally allocated Texture2D instance.
The texture is in the format of TextureFormat.RGBA32.
The application must run this function in the Unity main thread.
The application must use AcquireAccess(..., COLOR_FORMAT_RGB32, ...) to
force conversion of any native color format to the RGB32 color format before using
this function.
Return Status
The Texture2D instance, or null if there is any error.
2.12.5.1.13 ToUShortArray (C#)
Namespace Hierarchy
PXCMImage.ImageData.ToUShortArray
Syntax
UInt16[] ToUShortArray(Int32 plane, Int32 size);
UInt16[] ToUShortArray(Int32 plane, UInt16[] dest);
Parameters
488
plane
size
dest
Description
The ToUShortArray function retrieves a copy of the image plane as an unsigned short
array.
Return Status
The unsigned short array instance, or null if there is any error.
2.12.5.1.14 ToWriteableBitmap (C# .NET4)
Namespace Hierarchy
PXCMImage.ImageData.ToWriteableBitmap
Syntax
System.Windows.Media.Imaging.WritableBitmap ToWriteableBitmap(Int32
width, Int32 height, Double dpiX, Double dpiY);
System.Windows.Media.Imaging.WritableBitmap ToWriteableBitmap(Int32
plane, Int32 width, Int32 height, Double dpiX, Double dpiY);
Parameters
plane
width, height
dpiX, dpiY
Description
489
data object. The bitmap directly refers to image data in the image data object. The
application must maintain the life cycle of the image data object before the bitmap is
disposed.
The following color formats are supported by the .NET 4.0 framework natively:
COLOR_FORMAT_RGB32
COLOR_FORMAT_RGB24
COLOR_FORMAT_DEPTH
COLOR_FORMAT_DEPTH_RAW
The application may convert any native color format to one of above formats as
follows:
PXCMImage.ImageData data;
image.AcquireAccess(PXCMImage.Access.ACCESS_READ,
PXCMImage.ColorFormat.COLOR_FORMAT_DEPTH, out data);
Bitmap bitmap=data.ToWriteableBitmap(...);
...
image.ReleaseAccess(data);
Return Status
The System.Windows.Media.Imaging.WritableBitmap bitmap instance, or null if
there is any error.
2.12.6 ImageInfo
Namespace Hierarchy
[C++]
PXCImage::ImageInfo
[C#]
PXCMImage.ImageInfo
[Java]
PXCMImage.ImageInfo
Definition
[C++]
struct ImageInfo {
pxcI32 width;
pxcI32 height;
PixelFormat format;
};
490
[C#]
class ImageInfo {
Int32 width;
Int32 height;
PixelFormat format;
};
[Java]
class ImageInfo {
int width;
int height;
PixelFormat format;
};
Description
The ImageInfo structure defines the essential properties of an image storage.
Members
width
height
format
Definition
[C++]
struct ImplDesc {
ImplGroup
group;
491
ImplSubgroup
pxcUID
pxcUID
ImplVersion
pxcI32
pxcI32
pxcUID
pxcCHAR
subgroup;
algorithm;
iuid;
version;
merit;
vendor;
cuids[4];
friendlyName[256];
};
[C#]
class ImplDesc {
ImplGroup
ImplSubgroup
Int32
Int32
ImplVersion
Int32
Int32
Int32[]
String
};
group;
subgroup;
algorithm;
iuid;
version;
merit;
vendor;
cuids;
friendlyName;
[Java]
class ImplDesc {
EnumSet<ImplGroup>
EnumSet<ImplSubgroup>
int
int
ImplVersion
int
int
int[]
string
};
group;
subgroup;
algorithm;
iuid;
version;
merit;
vendor;
cuids;
friendlyName;
[JavaScript]
Data Type
492
group,
ImplGroup
subgroup,
ImplSubgroup
algorithm,
number
iuid,
number
version,
ImplVersion
merit,
number
vendor,
number
cuids,
number array
friendlyName,
string
};
Description
The ImplDesc structure describes a module implementation. The application can use
this structure as a template to search for modules. In this case, zero in a structure field
will match any values. A bit-pattern in a bit-ORed field will match any bit patterns that
are a superset.
Members
group
subgroup
algorithm
iuid
version
merit
vendor
cuids
friendlyName
Remarks
493
The group and subgroup values uniquely identify an SDK interface. The iuid value
uniquely identifies a module implementation that implements a particular SDK
interface. Thus within an SDK session, the following combinations uniquely identify a
module implementation:
(1)group, subgroup, and iuid
(2)cuid and iuid
Here cuid refers to the identifier of the primary interface implemented by the
module.
Example
Example 73 shows how to enumerate all module information.
Example 73: Enumerate All Modules
[C++]
// session is a PXCSession instance
for (int i=0;;i++) {
PXCSession::ImplDesc desc;
if (session->QueryImpl(0,i,&desc)<PXC_STATUS_NO_ERROR) break;
wprintf_s(L"module[%d]: name=%s\n", i, desc.friendlyName);
...
}
[C#]
// session is a PXCMSession instance
for (int i=0;;i++) {
PXCMSession.ImplDesc desc;
if (session.QueryImpl(i,out desc)<pxcmStatus.PXCM_STATUS_NO_ERROR)
break;
Console.WriteLn("module{0}: name={1}", i, desc.friendlyName);
}
[Java]
// session is a PXCMSession instance
for (i=0;;i++) {
PXCMSession.ImplDesc desc=new PXCMSession.ImplDesc();
if (session.getValue().QueryImpl(i,desc)
<pxcmStatus.PXCM_STATUS_NO_ERROR) break;
System.out.printf("module%d: name=%s", i, desc.friendlyName);
}
[JavaScript]
// session is a Session instance
var models=session.queryImpls(null);
document.write("modules: " + models);
494
Definition
[C++]
struct ImplVersion {
pxcI16 major;
pxcI16 minor;
};
[C#]
struct ImplVersion {
Int16 major;
Int16 minor;
};
[Java]
class ImplVersion {
short major;
short minor;
};
[JavaScript]
Data Type
{
major,
number
minor,
number
};
Description
The ImplVersion structure defines the SDK API or module implementation version
numbers.
495
Members
major
minor
Definition
[C++]
struct PXCPoint3DF32 {
pxcF32 x;
pxcF32 y;
pxcF32 z;
};
[C#]
struct PXCMPoint3DF32 {
Single x;
Single y;
Single z;
};
[Java]
class PXCMPoint3DF32 {
float x;
float y;
float z;
};
[JavaScript]
Data Type
{
x,
496
number
y,
number
z,
number
Description
The Point3DF32 structure defines the coordinates of a 3D point.
Members
x
Type Conversion
[C#]
Unity
Definition
[C++]
struct PXCPoint4DF32 {
pxcF32 x;
pxcF32 y;
pxcF32 z;
pxcF32 w;
497
};
[C#]
struct PXCMPoint4DF32 {
Single x;
Single y;
Single z;
Single w;
};
[Java]
class PXCMPoint4DF32 {
float x;
float y;
float z;
float w;
};
[JavaScript]
Data Type
{
x,
number
y,
number
z,
number
w,
number
Description
The Point4DF32 structure defines a 4D rotation represented as a quaternion. See
this link for more details.
Members
x
Type Conversion
[C#]
498
Unit You can implicitly cast the Point4DF32 structure from/to Quaternion.
y
Definition
[C++]
struct PXCPointF32 {
pxcF32 x;
pxcF32 y;
};
[C#]
struct PXCMPointF32 {
Single x;
Single y;
};
[Java]
class PXCMPointF32 {
float x;
float y;
};
[JavaScript]
Data Type
{
x,
number
y,
number
Description
499
Type Conversion
[C++]
N/A
[C#]
Uni You can implicitly cast the PointF32 structure from/to Vector2.
ty
[Java]
N/A
Definition
[C++]
struct PXCPointI32 {
pxcI32 x;
pxcI32 y;
};
[C#]
struct PXCMPointI32 {
Int32 x;
Int32 y;
};
500
[Java]
class PXCMPointI32 {
int x;
int y;
};
[JavaScript]
Data Type
{
x,
number
y,
number
Description
The PointI32 structure defines a coordinates of an image pixel.
Members
x
2.12.13 PropertyInfo
Namespace Hierarchy
[C++]
PXCCapture::Device::PropertyInfo
[C#]
PXCMCapture.Device.PropertyInfo
[Java]
PXCMCapture.Device.PropertyInfo
Definition
[C++]
struct PropertyInfo {
PXCRangeF32 range;
pxcF32
step;
pxcF32
defaultValue;
pxcBool
automatic;
};
501
[C#]
class PropertyInfo {
PXCMRangeF32 range;
Single
step;
Single
defaultValue;
Boolean
automatic;
};
[Java]
class PropertyInfo {
PXCMRangeF32 range;
float
step;
float
defaultValue;
boolean
automatic;
};
Description
The PropertyInfo structure describes the video stream configuration parameters.
Members
range
step
defaultValue
automatic
2.12.14 RangeF32
Namespace Hierarchy
[C++]
PXCRangeF32
[C#]
PXCMRangeF32
[Java]
PXCMRangeF32
Definition
[C++]
struct PXCRangeF32 {
502
pxcF32 min;
pxcF32 max;
};
[C#]
struct PXCMRangeF32 {
Single min;
Single max;
};
[Java]
class PXCMRangeF32 {
float min;
float max;
};
Description
The RangeF32 structure defines a value range.
Field Definition
min
max
2.12.15 RatioI32
Namespace Hierarchy
[C++]
PXCRatioI32
[C#]
PXCMRatioI32
[Java]
PXCMRatioI32
Definition
[C++]
struct PXCRatioI32 {
pxcI32 denominator;
pxcI32 numerator;
};
[C#]
struct PXCMRatioI32 {
503
Int32 denominator;
Int32 numerator;
};
[Java]
class PXCMRatioI32 {
int denominator;
int numerator;
};
Description
The RatioI32 structure describes a fraction number.
Members
numerator
denominator
2.12.16 RectF32
Namespace Hierarchy
[C++]
PXCRectF32
[C#]
PXCMRectF32
[Java]
PXCMRectF32
Definition
[C++]
struct PXCRectF32 {
pxcF32 x;
pxcF32 y;
pxcF32 w;
pxcF32 h;
};
[C#]
struct PXCMRectF32 {
Single x;
Single y;
Single w;
Single h;
504
};
[Java]
class PXCMRectF32 {
float x;
float y;
float w;
float h;
};
Description
The RectF32 structure defines a rectangular region.
Members
x
Definition
[C++]
struct PXCRectI32 {
pxcI32 x;
pxcI32 y;
pxcI32 w;
505
pxcI32 h;
};
[C#]
struct PXCMRectI32 {
Int32 x;
Int32 y;
Int32 w;
Int32 h;
};
[Java]
class PXCMRectI32 {
int x;
int y;
int w;
int h;
};
[JavaScript]
Data Type
{
x,
number
y,
number
w,
number
h,
number
Description
The RectI32 structure defines a rectangular region.
Members
506
Definition
[C++]
struct Sample {
PXCImage *color;
PXCImage *depth;
PXCImage *ir;
PXCImage *left;
PXCImage *right;
};
[C#]
class Sample {
PXCMImage color;
PXCMImage depth;
PXCMImage ir;
PXCMImage left;
PXCMImage right;
};
[Java]
class Sample {
PXCMImage color;
PXCMImage depth;
PXCMImage ir;
PXCMImage left;
PXCMImage right;
};
[C#/UWP]
class Sample {
Windows.Media.VideoFrame Color;
Windows.Media.VideoFrame Depth;
Windows.Media.VideoFrame IR;
};
507
Description
The Sample structure holds an array of images from multiple streams. The structure
provides constructors/functions to clean up the image instances or to access the
image instance by stream type.
Constructors
The default constructor sets all image instances to NULL/null. There is no destructor.
The application can call the ReleaseImages function to release the image instances
when needed.
Members
color/Color
depth/Depth
ir/IR
left, right
See Also
Member Functions
2.12.18.1 Member Functions
Description
ReleaseImages
operator[]
Access to the structure field by the stream type, for C++ and C#.
get, set
2.12.18.1.1 ReleaseImages
Namespace Hierarchy
[C++]
PXCCapture::Sample::ReleaseImages
[C#]
PXCMCapture.Sample.ReleaseImages
508
[Java]
PXCMCapture.Sample.ReleaseImages
Syntax
[C++]
void ReleaseImages(void);
[C#]
void ReleaseImages();
[Java]
void ReleaseImages();
Parameters
None
Description
The ReleaseImages function releases all valid image instances and then sets them to
NULL/null.
Return Status
None
2.12.18.1.2 operator[] (C++,C#)
Namespace Hierarchy
[C++]
PXCCapture::Sample::operator[]
[C#]
PXCMCapture.Sample.operator[]
Syntax
[C++]
PXCImage*& operator[](StreamType type);
[C#]
PXCMImage this(StreamType type) {
get; set;
};
509
Parameters
type
Description
The operator[] provides access to the structure fields by the stream type.
Return Status
The image instance of the specified stream type.
2.12.18.1.3 get (Java)
Namespace Hierarchy
PXCMCapture.Sample.get
Syntax
PXCMImage get(StreamType type);
Parameters
type
Description
The get function provides access to the structure fields by the stream type.
Return Status
The image instance of the specified stream type.
2.12.18.1.4 set (Java)
Namespace Hierarchy
510
PXCMCapture.Sample.set
Syntax
PXCMImage set(StreamType type, PXCMImage image);
Parameters
type
image
Description
The set function sets the source image instance to the structure fields by the stream
type.
Return Status
The image instance of the specified stream type.
2.12.19 SizeI32
Namespace Hierarchy
[C++]
PXCSizeI32
[C#]
PXCMSizeI32
[Java]
PXCMSizeI32
Definition
[C++]
struct PXCSizeI32 {
pxcI32 width;
pxcI32 height;
};
[C#]
struct PXCMSizeI32 {
Int32 width;
511
Int32 height;
};
[Java]
class PXCMSizeI32 {
int width;
int height;
};
Description
The SizeI32 structure defines the size of a rectangle.
Members
width
height
2.12.20 StreamCalibration
Namespace Hierarchy
[C++]
PXCCalibration::StreamCalibration
[C#]
PXCMCalibration.StreamCalibration
[Java]
PXCMCalibration.StreamCalibration
Definition
[C++]
struct StreamCalibration {
PXCPointF32 focalLength;
PXCPointF32 principalPoint;
pxcF32
radialDistortion[3];
pxcF32
tangentialDistortion[2];
PXCCapture::DeviceModel model;
};
[C#]
struct StreamCalibration {
PXCMPointF32 focalLength;
PXCMPointF32 principalPoint;
Single[]
radialDistortion;
Single[]
tangentialDistortion;
512
PXCMCapture.DeviceModel model;
};
[Java]
struct StreamCalibration {
PXCMPointF32 focalLength;
PXCMPointF32 principalPoint;
float[]
radialDistortion;
float[]
tangentialDistortion;
PXCMCapture.DeviceModel model;
};
Description
513
u
v
x z
y z
u (1 k1 r 2
k2 r 4
k3 r 6 )
v (1 k1 r 2
k2 r 4
k3 r 6 )
2 p1 u v
p2 ( r 2
2u 2 )
2 p2 u v
p1 (r 2
2v 2 )
fx u
px
fy *v
py
v2
u
v
x z
y z
u (1 k1 r 2
k2 r 4
k3 r 6 )
v (1 k1 r 2
k2 r 4
k3 r 6 )
2 p1 u v
p2 ( r 2
2u 2 )
2 p2 u v
p1 (r 2
2v 2 )
fx u
px
fy *v
py
v2
Members
514
focalLength
principalPoint
radialDistortion
2.12.21 StreamDesc
Namespace Hierarchy
[C++]
PXCVideoModule::StreamDesc
[C#]
PXCMVideoModule.StreamDesc
[Java]
PXCMVideoModule.StreamDesc
Definition
[C++]
struct StreamDesc {
PXCSizeI32
sizeMin;
PXCSizeI32
sizeMax;
PXCRangeF32 frameRate;
StreamOption options;
pxcI32
propertySet;
};
[C#]
struct StreamDesc {
PXCMSizeI32 sizeMin;
PXCMSizeI32 sizeMax;
515
PXCMRangeF32 frameRate;
StreamOption options;
Int32
propertySet;
};
[Java]
class StreamDesc {
PXCMSizeI32 sizeMin;
PXCMSizeI32 sizeMax;
PXCMRangeF32 frameRate;
EnumSet<StreamOption> options;
int
propertySet;
};
Description
The StreamDesc structure describes the stream characteristics of a modules I/O data
requirements. Unused fields should be set to zero.
Members
sizeMin
sizeMax
frameRate
options
propertySet
16
MEDIAN
Hand tracking
16
21
MEDIAN
Face tracking
16
21
Coarse
User segmentation
16
Finest
3D scanning
2.12.22 StreamDescSet
Namespace Hierarchy
516
[C++]
PXCVideoModule::StreamDescSet
[C#]
PXCMVideoModule.StreamDescSet
[Java]
PXCMVideoModule.StreamDescSet
Definition
[C++]
struct StreamDescSet {
StreamDesc color;
StreamDesc depth;
StreamDesc ir;
};
[C#]
struct StreamDescSet {
StreamDesc color;
StreamDesc depth;
StreamDesc ir;
};
[Java]
struct StreamDescSet {
StreamDesc color;
StreamDesc depth;
StreamDesc ir;
};
Description
The StreamDescSet structure manages multiple StreamDesc structures and provides
access to them by the stream type.
Members
sizeMin
sizeMax
frameRate
Member Functions
Description
operator[]
Access to the structure field by the stream type, for C++ and C#.
get, set
Namespace Hierarchy
[C++]
PXCVideoModule::StreamDescSet::operator[]
[C#]
PXCMVideoModule.StreamDescSet.operator[]
Syntax
[C++]
StreamDesc& operator[](StreamType type);
[C#]
StreamDesc this(StreamType type) {
get; set;
};
Parameters
type
Description
This operator[] operator provides access to the structure fields by the stream type.
Return Status
The StreamDesc instance of the specified stream type.
2.12.22.1.2 get (Java)
Namespace Hierarchy
PXCMVideoModule.StreamDescSet.get
Syntax
518
Parameters
type
Description
The get function provides access to the structure fields by the stream type.
Return Status
The StreamDesc instance of the specified stream type.
2.12.22.1.3 set (Java)
Namespace Hierarchy
PXCMVideoModule.StreamDescSet.set
Syntax
StreamDesc set(StreamType type, StreamDesc desc);
Parameters
type
desc
Description
The set function sets the source StreamDesc instance to the structure fields by the
stream type.
Return Status
519
2.12.23 StreamProfile
Namespace Hierarchy
[C++]
PXCCapture::Device::StreamProfile
[C#]
PXCMCapture.Device.StreamProfile
[Java]
PXCMCapture.Device.StreamProfile
Definition
[C++]
struct StreamProfile {
ImageInfo
imageInfo;
PXCRangeF32 frameRate;
StreamOption options;
};
[C#]
class StreamProfile {
ImageInfo
imageInfo;
PXCMRangeF32 frameRate;
StreamOption options;
};
[Java]
class StreamProfile {
ImageInfo
imageInfo;
PXCMRangeF32 frameRate;
StreamOption options;
};
Description
The StreamProfile structure describes the video stream configuration parameters.
Members
520
imageInfo
frameRate
options
2.12.24 StreamProfileSet
Namespace Hierarchy
[C++]
PXCCapture::Device::StreamProfileSet
[C#]
PXCMCapture.Device.StreamProfileSet
[Java]
PXCMCapture.Device.StreamProfileSet
Definition
[C++]
struct StreamProfileSet {
StreamProfile color;
StreamProfile depth;
StreamProfile ir;
StreamProfile left;
StreamProfile right;
};
[C#]
class StreamProfileSet {
StreamProfile color;
StreamProfile depth;
StreamProfile ir;
StreamProfile left;
StreamProfile right;
};
[Java]
class StreamProfileSet {
StreamProfile color;
StreamProfile depth;
StreamProfile ir;
StreamProfile left;
521
StreamProfile right;
};
Description
The StreamProfileSet structure is a collection of stream configuration parameters.
Members
color
depth
ir
left
right
See Also
Member Functions
2.12.24.1 Member Functions
Description
operator[]
Access to the structure field by the stream type, for C++ and C#.
get, set
Namespace Hierarchy
[C++]
PXCCapture::Device::StreamProfileSet::operator[]
[C#]
PXCMCapture.Device.StreamProfileSet.operator[]
Syntax
[C++]
StreamProfile& operator[](StreamType type);
[C#]
StreamProfile this(StreamType type) {
get; set;
};
522
Parameters
type
Description
This operator[] provides access to the StreamProfile fields by the stream type.
Return Status
The StreamProfile instance of the specified stream type.
2.12.24.1.2 get (Java)
Namespace Hierarchy
PXCMCapture.Device.StreamProfileSet.get
Syntax
StreamProfile get(StreamType type);
Parameters
type
Description
The get function provides access to the StreamProfile structure fields by the
stream type.
Return Status
The StreamProfile instance of the specified stream type.
2.12.24.1.3 set (Java)
Namespace Hierarchy
523
PXCMCapture.Device.StreamProfileSet.set
Syntax
StreamProfile set(StreamType type, StreamProfile profile);
Parameters
type
profile
Description
The set function sets the source profile to the structure fields by the stream type.
Return Status
The StreamProfile instance of the specified stream type.
2.12.25 StreamTransform
Namespace Hierarchy
[C++]
PXCCalibration::StreamTransform
[C#]
PXCMCalibration.StreamTransform
[Java]
PXCMCalibration.StreamTransform
Definition
[C++]
struct StreamTransform {
pxcF32 translation[3];
pxcF32 rotation[3][3];
};
[C#]
struct StreamTransform {
Single[]
translation;
524
Single[,]
rotation;
};
[Java]
struct StreamTransform {
float[]
translation;
float[,]
rotation;
};
Description
The StreamTransform structure describes the stream rotation and translation
parameters.
Members
2.13
translation
rotation
Enumerator Reference
This section describes the enumerator definitions of the Intel RealSense SDK essential
interfaces.
Naming Conventions
For C++, C# and Java, this manual uses [M] (where M stands for "managed") in the interface
names to represent interfaces that are available in a managed environment (such as C# and
Java). For example, Capture represents the C++ interface PXCCapture and the C#, and Java
interface PXCMCapture.
The manual uses additional markings after the interface or method names as follows:
525
Marking
Example
Comment
None
Base
(C++)
PXCBase.Release
(C#)
PXCMBase.Dispose
(C#.NET4)
PXCMImage.ImageData.ToBitmap
(Unity)
(Java)
PXCMBase.close
(Processing) PXCMImage.ImageData.ToPImage
(JS)
PXCMSession.QueryImpls
(+JS)
PXCMSession.QueryModelDesc
(UWP)
SampleReader.EnableStream[s]
(+UWP)
SenseManager.CreateInstance
Description
526
Read access.
ACCESS_WRITE
Write access.
ACCESS_READ_WRITE
Description
The ConnectionType enumerator itemizes the I/O device connection types.
Name/Description
CONNECTION_TYPE_UNKNOWN
527
2.13.3 CoordinateSystem
Namespace Hierarchy
[C++]
PXCSession::CoordinateSystem
[C#]
PXCMSession.CoordinateSystem
[Java]
PXCMSession.CoordinateSystem
Description
The CoordinateSystem enumerator itemizes supported camera coordinate systems.
Use the bit-ORed values to represent groups of coordinate systems.
Name/Description
528
COORDINATE_SYSTEM_FRONT_DEFAULT
COORDINATE_SYSTEM_REAR_DEFAULT
COORDINATE_SYSTEM_REAR_OPENCV
529
[Java]
PXCMCapture.DeviceModel
[JavaScript]
intel.realsense.DeviceModel
[C#/UWP]
Intel.RealSense.DeviceModel
Description
The DeviceModel enumerator itemizes supported camera models.
Name/Description
DEVICE_MODEL_GENERIC
DEVICE_MODEL_F200
DEVICE_MODEL_R200
DEVICE_MODEL_R200_ENHANCED
DEVICE_MODEL_SR300
530
PXCMCapture.DeviceOrientation
[Java]
PXCMCapture.DeviceOrientation
[JavaScript]
intel.realsense.DeviceOrientation
[C#/UWP]
Intel.RealSense.DeviceOrientation
Description
The DeviceOrientation enumerator itemizes supported camera orientations.
Name/Description
DEVICE_ORIENTATION_ANY
DEVICE_ORIENTATION_FRONT_FACING
DEVICE_ORIENTATION_REAR_FACING
Description
The ImplGroup enumerator itemizes algorithm implementations into major groups. It
can also be used as bit-ORed values to represent groups of algorithms.
531
Name/Description
IMPL_GROUP_ANY
Any algorithm.
IMPL_GROUP_CORE
IMPL_GROUP_UTILITIES
IMPL_GROUP_SENSOR
IMPL_GROUP_OBJECT_RECOGNITION
IMPL_GROUP_SPEECH_RECOGNITION
IMPL_GROUP_PHOTOGRAPHY
IMPL_GROUP_USER
User-defined algorithms.
Description
The ImplSubgroup enumerator itemizes algorithm implementations into minor
groups. It can also be used as bit-ORed values to represent groups of algorithms.
Name/Description
532
IMPL_SUBGROUP_ANY
Any algorithm.
IMPL_SUBGROUP_VIDEO_CAPTURE
IMPL_SUBGROUP_PULSE_ESTIMATION
IMPL_SUBGROUP_3DSCAN
IMPL_SUBGROUP_SCENE_PERCEPTION
IMPL_SUBGROUP_OBJECT_TRACKING
IMPL_SUBGROUP_SPEECH_SYNTHESIS
Photography modules
IMPL_SUBGROUP_ENHANCED_PHOTOGRAPH The enhanced photography algorithms.
Y
IMPL_SUBGROUP_ENHANCED_VIDEOGRAPH The enhanced videography algorithms.
Y
Remarks
See additional subgroup definitions in each module SDK interface definition.
533
2.13.8 IVCAMAccuracy
Namespace Hierarchy
[C++]
PXCCapture::Device::IVCAMAccuracy
[C#]
PXCMCapture.Device.IVCAMAccuracy
[Java]
PXCMCapture.Device.IVCAMAccuracy
Description
The IVCAMAccuracy enumerator itemizes supported camera accuracy settings.
Name/Description
IVCAM_ACCURACY_FINEST
IVCAM_ACCURACY_MEDIAN
IVCAM_ACCURACY_COARSE
2.13.9 MirrorMode
Namespace Hierarchy
[C++]
PXCCapture::Device::MirrorMode
[C#]
PXCMCapture.Device.MirrorMode
[Java]
PXCMCapture.Device.MirrorMode
534
Description
The MirrorMode enumerator itemizes supported power line frequency compensation
values.
Name/Description
MIRROR_MODE_DISABLED
MIRROR_MODE_HORIZONTAL
Description
The Option enumerator itemizes supported image options.
Name/Description
OPTION_ANY
Undefined/unknown/any option.
2.13.11 PixelFormat
Namespace Hierarchy
[C++]
PXCImage::PixelFormat
535
[C#]
PXCMImage.PixelFormat
[Java]
PXCMImage.PixelFormat
Description
The PixelFormat enumerator itemizes supported pixel formats.
Name/Description
536
PIXEL_FORMAT_YUY2
PIXEL_FORMAT_NV12
PIXEL_FORMAT_RGB32
PIXEL_FORMAT_RGB24
PIXEL_FORMAT_Y8
The 8-bit gray format. Also used for the 8-bit IR data.
See fourcc.org for the description and memory
layout.
PIXEL_FORMAT_DEPTH
Remarks
The image data are stored in the data planes planes[0-NUM_OF_PLANES]. For most
pixel formats, this is planes[0]. For NV12, the Y plane is stored in planes[0] and
interleaved UV is stored in planes[1].
See Also
Type Extension (C#,Java)
538
Description
ToString
2.13.11.1.1 ToString
Namespace Hierarchy
[C#]
PXCMImage.PixelFormat.ToString
[Java]
PXCMImage.PixelFormat.toString
Syntax
[C#]
String ToString();
[Java]
string toString();
Parameters
None
Description
The CreateOutput function returns the string representation of the pixel format.
Return Status
2.13.12 ProjectionOption
Namespace Hierarchy
[C++]
PXCProjection::ProjectionOption
[C#]
PXCMProjection.ProjectionOption
539
[Java]
PXCMProjection.ProjectionOption
Description
The ProjectionOption enumerator itemizes supported projection function
options.
Name/Description
PROJECTION_OPTION_DEFAULT
clipping.
2.13.13 PowerLineFrequency
Namespace Hierarchy
[C++]
PXCCapture::Device::PowerLineFrequency
[C#]
PXCMCapture.Device.PowerLineFrequency
[Java]
PXCMCapture.Device.PowerLineFrequency
Description
The PowerLineFrequency enumerator itemizes supported power line frequency
compensation values.
Name/Description
540
POWER_LINE_FREQUENCY_DISABLED
Disabled.
POWER_LINE_FREQUENCY_50HZ
POWER_LINE_FREQUENCY_60HZ
Description
[C++][C#][Java]
The Property enumerator itemizes supported device properties, for advanced usages,
where the device property values are negotiated between the I/O device and the
algorithm modules during the pipeline initialization.
In simple use cases, you can use the helper functions QueryXXX and SetXXX of the
Device interface to get/set device property values, without involving the Property
enumerator.
[C#/UWP]
The Property enumerator lists all the string representations of the supported device
properties. Use the
Windows.Devices.Perception.PerceptionControlSession.TrySetPropertyAsync
function to set any device property. All values must cast to the float data type.
Name/Description
[C++][C#][Java][C#/UWP]
541
[C++][C#][Java]
PROPERTY_DEVICE_ALLOW_PROFILE_CHANGE
[C#/UWP]
N/A
[C++][C#][Java]
PROPERTY_DEVICE_MIRROR
[C#/UWP]
N/A
PXC_STATUS_STREAM_CONFIG_CHA
NGED when the stream
configuration is changed.
542
[C++][C#][Java]
PROPERTY_COLOR_EXPOSURE
[C#/UWP]
"Intel.RealSense.ColorExposure"
[C++][C#][Java]
PROPERTY_COLOR_BRIGHTNESS
[C#/UWP]
"Intel.RealSense.ColorBrightness"
[C++][C#][Java]
PROPERTY_COLOR_CONTRAST
[C#/UWP]
"Intel.RealSense.ColorContrast"
[C++][C#][Java]
PROPERTY_COLOR_SATURATION
[C#/UWP]
"Intel.RealSense.ColorSaturation"
[C++][C#][Java]
PROPERTY_COLOR_HUE
[C#/UWP]
"Intel.RealSense.ColorHue"
The color camera hue, from 18,000 to 18,000 (representing 180 to 180 degrees.)
[C++][C#][Java]
PROPERTY_COLOR_GAMMA
[C#/UWP]
"Intel.RealSense.ColorGamma"
[C++][C#][Java]
PROPERTY_COLOR_WHITE_BALANCE
[C#/UWP]
"Intel.RealSense.ColorWhiteBalance"
[C++][C#][Java]
PROPERTY_COLOR_SHARPNESS
[C#/UWP]
"Intel.RealSense.ColorSharpness"
[C++][C#][Java]
PROPERTY_COLOR_GAIN
[C#/UWP]
"Intel.RealSense.ColorGain"
[C++][C#][Java]
PROPERTY_COLOR_BACK_LIGHT_COMPENSATION
[C#/UWP]
N/A
[C++][C#][Java]
PROPERTY_COLOR_FIELD_OF_VIEW
[C#/UWP]
N/A
[C++][C#][Java]
PROPERTY_COLOR_FOCAL_LENGTH
[C#/UWP]
N/A
[C++][C#][Java]
PROPERTY_COLOR_FOCAL_LENGTH_MM
[C#/UWP]
N/A
[C++][C#][Java]
PROPERTY_COLOR_PRINCIPAL_POINT
[C#/UWP]
N/A
543
[C#/UWP]
"Intel.RealSense.DepthLowConfidenceValue"
[C++][C#][Java]
PROPERTY_DEPTH_CONFIDENCE_THRESHOLD
[C#/UWP]
"Intel.RealSense.DepthConfidenceThreshold"
[C++][C#][Java]
PROPERTY_DEPTH_UNIT
[C#/UWP]
"Intel.RealSense.DepthUnit"
[C++][C#][Java]
PROPERTY_DEPTH_FIELD_OF_VIEW
[C#/UWP]
N/A
[C++][C#][Java]
PROPERTY_DEPTH_SENSOR_RANGE
[C#/UWP]
N/A
[C++][C#][Java]
PROPERTY_DEPTH_FOCAL_LENGTH
[C#/UWP]
N/A
544
[C++][C#][Java]
PROPERTY_DEPTH_PRINCIPAL_POINT
[C#/UWP]
N/A
545
[C++][C#][Java]
PROPERTY_IVCAM_ACCURACY
[C#/UWP]
"Intel.RealSense.SR300.Accuracy"
[C++][C#][Java]
PROPERTY_IVCAM_FILTER_OPTION
[C#/UWP]
"Intel.RealSense.SR300.FilterOption"
[C++][C#][Java]
PROPERTY_IVCAM_LASER_POWER
[C#/UWP]
"Intel.RealSense.SR300.LaserPower"
[C++][C#][Java]
PROEPRTY_IVCAM_MOTION_RANGE_TRADE_OFF
[C#/UWP]
"Intel.RealSense.SR300.MotionRangeTradeOff"
546
[C++][C#][Java]
PROPERTY_DS_COLOR_RECTIFICATION
[C#/UWP]
"Intel.RealSense.R200.ColorRectification"
[C++][C#][Java]
PROPERTY_DS_CROP
[C#/UWP]
"Intel.RealSense.R200.Crop"
[C++][C#][Java]
PROPERTY_DS_DEPTH_RECTIFICATION
[C#/UWP]
"Intel.RealSense.R200.DepthRectification"
[C++][C#][Java]
PROPERTY_DS_EMITTER
[C#/UWP]
"Intel.RealSense.R200.Emitter"
[C++][C#][Java]
PROPERTY_DS_DISPARITY_MULTIPLIER
[C#/UWP]
"Intel.RealSense.R200.DisparityMultiplier"
[C++][C#][Java]
PROPERTY_DS_DISPARITY_OUTPUT
[C#/UWP]
"Intel.RealSense.R200.DisparityOutput"
[C++][C#][Java]
PROPERTY_DS_DISPARITY_SHIFT
[C#/UWP]
"Intel.RealSense.R200.DisparityShift"
[C++][C#][Java]
PROPERTY_DS_LEFTRIGHT_GAIN
[C#/UWP]
"Intel.RealSense.R200.LeftRightGain"
[C++][C#][Java]
PROPERTY_DS_LR_THRESHOLD
[C#/UWP]
"Intel.RealSense.R200.LeftRightThreshold"
[C++][C#][Java]
PROPERTY_DS_MEDIAN_THRESHOLD
[C#/UWP]
"Intel.RealSense.R200.MedianThreshold"
[C++][C#][Java]
PROPERTY_DS_MIN_MAX_Z
[C#/UWP]
"Intel.RealSense.R200.MinMaxZ"
[C++][C#][Java]
PROPERTY_DS_NEIGHBOR_THRESHOLD
[C#/UWP]
"Intel.RealSense.R200.NeighborThreshold"
[C++][C#][Java]
Set the value to subtract when
PROPERTY_DS_ROBINS_MUNROE_MINUS_INCREMENT
estimating the median of the
[C#/UWP]
"Intel.RealSense.R200.RobinsMunroeMinusIncre correlation surface.
ment"
[C++][C#][Java]
Set the value to add when
PROPERTY_DS_ROBINS_MUNROE_PLUS_INCREMENT
estimating the median of the
[C#/UWP]
"Intel.RealSense.R200.RobinsMunroePlusIncrem correlation surface.
ent"
[C++][C#][Java]
PROPERTY_DS_SCORE_MAX_THRESHOLD
547
[C#/UWP]
"Intel.RealSense.R200.ScoreMaxThreshold"
[C++][C#][Java]
PROPERTY_DS_SCORE_MIN_THRESHOLD
[C#/UWP]
"Intel.RealSense.R200.ScoreMinThreshold"
[C++][C#][Java]
PROPERTY_DS_SECOND_PEAK_THRESHOLD
[C#/UWP]
"Intel.RealSense.R200.SecondPeakThreshold"
[C++][C#][Java]
Set parameter for determining how
PROPERTY_DS_TEXTURE_COUNT_THRESHOLD
much texture in the region is
[C#/UWP]
"Intel.RealSense.R200.TextureCountThreshold" sufficient to be judged a reliable
depth measurement.
[C++][C#][Java]
PROPERTY_DS_TEXTURE_DIFFERENCE_THRESHOLD
[C#/UWP]
"Intel.RealSense.R200.TextureDifferenceThres
hold"
Miscellaneous Properties
[C++][C#][Java]
PROPERTY_PROJECTION_SERIALIZABLE
[C#/UWP]
N/A
[C++][C#][Java]
PROPERTY_CUSTOMIZED
[C#/UWP]
N/A
Remarks
548
V
al
u
e
0
Name
Description
Skeleton
Raw
Raw +
Gradients
filter
Very
close
range
Close
range
Reports the depth data for high fidelity (high confidence) pixels only,
and all other pixels as invalid. For SR300, the depth range is up to 4m.
Raw depth image without any post-processing filters. For SR300, the
depth range is up to 4m.
Raw depth image with the gradient filter applied. For SR300, the depth
range is up to 4m.
Midrange
[Default]
Far range
Very far
range
Very low smoothing effect with high sharpness, accuracy levels, and low
noise artifacts. Good for any distances of up to 350mm for F200, and up
to 2m for SR300.
Low smoothing effect with high sharpness and accuracy levels. The
noise artifacts are optimized for distances between 350mm to 550mm
for F200, and up to 2m for SR300.
Moderate smoothing effect optimized for distances between 550mm to
850mm for F200 and up to 2m for SR300 to balance between good
sharpness level, high accuracy and moderate noise artifacts.
High smoothing effect for distances between 850mm to 1000mm for
F200 and up to 4m for SR300 bringing good accuracy with moderate
sharpness level.
Very high smoothing effect to bring moderate accuracy level for
distances above 1m for F200, and 0.8-2.5m (up to 4m) for SR300. Use
together with the MotionRangeTradeOff property to increase the
depth range.
Table 4: The Filter Option Table
2.13.15 Rotation
Namespace Hierarchy
[C++]
PXCImage::Rotation
[C#]
PXCMImage.Rotation
[Java]
PXCMImage.Rotation
Description
549
Name/Description
ROTATION_0_DEGREE
ROTATION_90_DEGREE
ROTATION_180_DEGREE
ROTATION_270_DEGREE
2.13.16 State
Namespace Hierarchy
[C++]
PXCPowerState::State
[C#]
PXCMPowerState.State
[Java]
PXCMPowerState.State
Description
The State enumerator itemizes application power state.
Name/Description
STATE_PERFORMANCE
STATE_BATTERY
Remarks
550
Regardless of power states, the application can expect the SDK modules to behave
the same from the SDK API point of view. For example, the application can expect an
asynchronous function to return immediately, regardless of the power state. The
synchronization of the computation result could take longer, or the quality of the
computation could be different due to the algorithms used in different power states.
Description
[C++]
Name/Description
551
Successful operation
STATUS_NO_ERROR
Programming errors
STATUS_HANDLE_INVALID
STATUS_ALLOC_FAILED
STATUS_PARAM_UNSUPPORTED
STATUS_ITEM_UNAVAILABLE
STATUS_INIT_FAILED
STATUS_STREAM_CONFIG_CHANGED
STATUS_CAPTURE_CONFIG_ALREADY_SET
552
STATUS_EXEC_ABORTED
STATUS_EXEC_INPROGRESS
STATUS_EXEC_TIMEOUT
553
STATUS_DEVICE_LOST
STATUS_DEVICE_BUSY
STATUS_FILE_READ_FAILED
STATUS_FILE_CLOSE_FAILED
554
STATUS_DATA_UNAVAILABLE
STATUS_DATA_NOT_INITIALIZED
STATUS_DATA_PENDING
STATUS_DATA_NOT_CHANGED
STATUS_PROCESS_FAILED
STATUS_NOT_MATCHING_CALIBRATION
See Also
Type Extension (C#, Java)
2.13.17.1 Type Extension (C#, Java)
Description
IsError
IsWarning
IsSuccessful
2.13.17.1.1 IsError
Namespace Hierarchy
[C#]
pxcmStatus.IsError
[Java]
pxcmStatus.isError
Syntax
[C#]
Boolean IsError();
[Java]
boolean isError();
Parameters
None
Description
The IsError function returns true if the status code describes an error (less than
pxcmStatus.PXCM_STATUS_NO_ERROR.)
Return Status
Boolean if the status code is an error.
555
2.13.17.1.2 IsSuccessful
Namespace Hierarchy
[C#]
pxcmStatus.IsSuccessful
[Java]
pxcmStatus.isSuccessful
Syntax
[C#]
Boolean IsSuccessful();
[Java]
boolean isSuccessful();
Parameters
None
Description
The IsSuccessful function returns true if the status code is not an error (greater than
or equal to pxcmStatus.PXCM_STATUS_NO_ERROR.)
Return Status
Boolean if the status code is not an error.
2.13.17.1.3 IsWarning
Namespace Hierarchy
[C#]
pxcmStatus.IsWarning
[Java]
pxcmStatus.isWarning
Syntax
[C#]
Boolean IsWarning();
[Java]
556
boolean isWarning();
Parameters
None
Description
The IsWarning function returns true if the status code describes a warning (greater
than pxcmStatus.PXCM_STATUS_NO_ERROR.)
Return Status
Boolean if the status code is a warning.
Description
The StreamOption enumerator itemizes supported stream options. You can use bitOR to specify multiple options.
Name/Description
557
STREAM_OPTION_ANY
No option specified.
STREAM_OPTION_UNRECTIFIED
STREAM_OPTION_DEPTH_CONFIDENCE
These flags are used to determine if the options are mandatory or optional.
STREAM_OPTION_OPTIONAL_MASK
STREAM_OPTION_MANDATORY_MASK
Description
558
The StreamType enumerator itemizes supported video stream types. The value can
be Bit-OR'ed to represent multiple stream combinations.
Name/Description
STREAM_TYPE_ANY
STREAM_TYPE_COLOR
STREAM_TYPE_DEPTH
STREAM_TYPE_IR
STREAM_TYPE_LEFT
STREAM_TYPE_RIGHT
See Also
Type Extension
2.13.19.1 Type Extension
Description
ToString
operator++ (C++)
ToIndex (C#,Java)
Namespace Hierarchy
559
[C#]
PXCMCapture.StreamType.ToString
[Java]
PXCMCapture.StreamType.toString
Syntax
[C#]
String ToString();
[Java]
string toString();
Parameters
None
Description
The ToString function returns the string representation of the stream type.
Return Status
The string representation.
2.13.19.1.2 ToIndex (C#,Java)
Namespace Hierarchy
[C#]
PXCMCapture.StreamType.ToIndex
[Java]
PXCMCapture.StreamType.toIndex
Syntax
[C#]
Int32 ToIndex();
[Java]
int
toIndex();
Parameters
560
None
Description
The ToIndex function returns the zero-based stream index of the current stream
type.
Return Status
The stream index value.
2.13.19.1.3 operator++ (C++)
Namespace Hierarchy
PXCCapture::StreamType::operator++
Syntax
StreamType &operator++();
StreamType operator++(pxcI32);
// ++StreamType
// StreamType++
Parameters
None
Description
The operator++ functions (both the prefix and postfix versions) provides a
convenient way of enumerating all stream types as follows:
for (PXCCapture::StreamType st=PXCCapture::STREAM_TYPE_COLOR;
st!=PXCCapture::STREAM_TYPE_ANY;st++) {
...
}
Return Status
The string representation.
561
2.14
Samples
The SDK samples are located in the following directories:
[C++]
$(RSSDK_DIR)/sample
[C#/.NET4]
$(RSSDK_DIR)/framework/CSharp
[C#/Unity]
$(RSSDK_DIR)/framework/Unity
[Java]
$(RSSDK_DIR)/framework/Java
[Processing]
$(RSSDK_DIR)/framework/Processing
[JavaScript]
$(RSSDK_DIR)/framework/JavaScript
[C#/UWP]
$(RSSDK_DIR)/framework/UWP
The samples are prefixed with the following abbreviations to identify the camera model they
work with:
DF
FF
RF
Locate the sample and copy the sample source to a writable directory. Most samples require
a writable sample directory for building or execution.
See the following build and execution instructions:
[C++]
Build the sample using one of the Microsoft* Visual Studio* solution files. Then execute
the sample within the IDE.
You can also run the pre-built samples under $(RSSDK_DIR)/bin/win32 or
$(RSSDK_DIR)/bin/x64.
[C#/.NET4]
Build the sample using one of the Microsoft* Visual Studio* solution files. Then execute
the sample within the IDE.
You can also run the pre-built samples under $(RSSDK_DIR)/bin/win32 or
$(RSSDK_DIR)/bin/x64.
562
[C#/Unity]
Locate the Unity* scene and run the sample within the Unity Editor.
[Java]
Set the JAVA_HOME environment variable to the Java JDK installation directory and run the
script run.bat.
[Processing]
Copy the $(RSSDK_DIR)/framework/Processing/libraries directory to your sketch
location. You can find your sketch location from File->Preference. Then click on the
Build the sample using the Microsoft* Visual Studio* solution file. Then execute the sample
within the IDE.
563
-csize
-dsize
sdname
nframes
listio
-record
file
-help
Example:
DF_CameraViewer nframes 200
564
Figure 14: The Camera Viewer Sample Showing Color and Depth Streams
565
The main window is shown in Figure 15. It contains the following components:
The Menu bar contains the following tabs:
o Device Select the imaging device.
o Color, Depth Select the color/depth stream resolutions.
o Mode Select the live (default) or playback mode.
o Command Start or stop streaming.
The Image Panels visualize the color, depth and vertices data as similar to Figure 16.
Click on the QueryInvUVMap button to show the inverse UV map data, if not shown
initially. The inverse UV map provides coordinates mapping from the color image to
the depth image.
Click on the QueryUVMap button to show the UV map data, if not shown initially. The
UV map provides coordinates mapping from the depth image to the color image.
Click on the QueryVertices button to show the vertices data, if not shown initially.
The vertices data is in the 3D space. For rendering simplicity, the sample projects it to
a 2D plane for visualization. The sample applies some lighting effect when you move
your mouse to give a pseudo 3D effect.
566
You can draw on any of the three panels: color, depth and vertices. The sample maps
the coordinates to the other panels and draws on them accordingly, with the
mapping/projection functions marked for such operation. See Figure 17 - Figure 19.
567
568
569
Figure 19: Project Camera Coordinates to Color and Depth Image Coordinates.
570
571
recording mode is selected, the sample will prompt for the playback or recording file
name.
C/D Sync (Sync SW) or No Sync: Select whether to use synchronous or asynchronous
color and depth streaming during visualization. The former synchronizes the color sample
with the corresponding depth sample, while the latter visualizing them in their own frame
rates.
Sync HW: Performs strong hardware-based synchronization on the enabled streams.
From the side buttons, you can choose the following options:
572
Color: Visualize the color stream in the main display. If picture-in-picture is enabled, the
stream previously displayed in the main display goes to the picture-in-picture display.
Depth: Visualize the depth stream in the main display. If picture-in-picture is enabled, the
stream previously displayed in the main display goes to the picture-in-picture display.
IR: Visualize the infrared stream in the main display. If picture-in-picture is enabled, the
stream previously displayed in the main display goes to the picture-in-picture display.
Scale: Scale the image to the size of the display window, or the actual size.
Mirror: Flip the image horizontally to show the camera view or the user view.
PIP: Open a picture-in-picture window to visualize the second stream in streaming. Multiple
573
The sample shows available camera devices in the top left box, where you can select the
device of interest.
You can select multiple streams of interest by clicking on the Color, Depth, or IR buttons.
Also select whether you want to visualize the streams synchronously or asynchronous using
the Multistream Sync selection box.
Click the Start button to start streaming. The sample shows the selected streams in the
display panel.
Click the Stop button to stop streaming.
574
Getting Started
1. Obtain a chart. If you have a Port3 test chart, go to the next step. If not, you will have to
create one.
2. Setup your test area. Position your camera 50 cm away from the test chart. Ensure that the
chart is parallel with the plane of the camera. If not parallel, test results can be skewed.
(You can use a box, a metallic frame, the test chart with included spacer, etc. to do this).
3. Launch the application. If the camera is loaded successfully, the Depth radio button will be
selectable. You will also see the camera under the Device drop down menu.
575
4. Select the Color radio button and click on Start Streaming to run video.
5. For landmark tracking, the program must know the location of the test chart. To do this,
you must outline the edges of the test chart. Drag your mouse cursor from one corner of
the chart to the other. When done, click on Set RGB Border. See Figure 24 for an
illustration.
Figure 24: Specifying the chart edges for the Depth video stream.
6. Ensure the fiducial markers have been located properly. You should see the black circles
outlined by red squares. You should also see the black crosshairs in the center of the black
circle markers. Look at Figure 25 for the proper alignment (left) and the improper
alignment (right). Improper alignment stems from poor lighting (for the RGB video) or from
the rounding error introduced during the edge selection. If the markers are not detected
properly, repeat step 5, but experiment with different selection sizes.
Figure 25: Left: Properly detected fiducial marker. Right: Detection Error
576
8. Now select the Depth radio button. The video will change to a depth-only view.
9. Specify the chart edges by dragging your mouse from one corner to the opposite corner.
Click on Set Depth Border (see Figure 74).
577
11. Notice that the fiducial markers are outlined in the white squares. The green squares are
578
an array of ROIs (Regions of Interest) that are used for the Uniformity test. Check that all
fiducial markers are properly aligned and that all green ROIs fall within the depth chart. If
not, repeat Step 9.
12. Click Run Tests to analyze data.
Tests
UV Map: Alignment Error
The UV Map aligns the RGB stream with the depth stream. This tests calculates the error in
this alignment. An example of this error can be visibly seen when using the test chart. See
Figure 29 for an example. Notice that the circular fiducial markers do not align. This is the UV
Map alignment error.
579
Appendices
This section includes additional SDK definitions.
580
3.1
581
pxcBool
pxcU16
pxcBYTE
pxcUID
16-bit unsigned
integer
32-bit integer
pxcCHAR
16-bit UNICODE
pxcF64
64-bit floating-point
pxcEnum
32-bit integer
pxcI32
32-bit integer
pxcF32
32-bit floating-point
pxcI16
16-bit integer
3.2
Naming Conventions
All classes, functions, and structures in the global name space use PXC or pxc as a
prefix.
Minimize creating classes, functions, and structures in the global name space. Put
classes, functions, and structures in their respective class scopes.
The class and function names start with a capital letter.
The variable names start with a lower-case letter.
If a class, function, or variable name contains multiple words, usually the SDK
capitalizes the first letter of the second word.
class MyClass: public PXCBase {
public:
struct MyStruct {
MyStruct *myField1;
pxcI32 myField2;
};
};
The macros and enumerator definitions use all capital letters with words
separated by an underline.
#define PXC_DEFINE_UID()
582
SDK interface must have a unique class identifier. Use the PXC_CUID_OVERWRITE
macro to define the class identifier.
Each SDK interface must contain pure virtual functions only, with or without default
implementation. No constructor or desctructor.
Do not use exception handling or dynamic cast in interface definitions or module
implementations, as these features do not reliably work across multiple compilers.
Most SDK functions should return a status code, Status, unless the functions are
simple enough that they return some internal variables without any processing.
virtual pxcStatus
virtual pxcI64
PXCAPI
PXCAPI
SetTimeStamp(pxcI64 ts)=0;
QueryTimeStamp(void)=0;
For bit-ORed field enumerators, the SDK usually defines them as enumerators
with inline helper functions for bit-OR operations. The helper functions are not
needed if the SDK uses the values directly without the bit-OR operations.
enum ImplGroup {
IMPL_GROUP_CORE = 0x80000000,
IMPL_GROUP_USER = 0x40000000,
};
__inline static ImplGroup operator|(ImplGroup a, ImplGroup b) {
return (ImplGroup)((int)a | (int)b);
}
For consistency, use the following two functions for module configuration
query and setup:
virtual pxcStatus PXCAPI QueryProfile(pxcI32 pidx, ProfileInfo
*pinfo);
virtual pxcStatus PXCAPI SetProfile(ProfileInfo *pinfo);
Language Limitations
Observe different language limitations to facilitate the porting to these
languages. Here are a few most common ones:
Java* (as well as Microsoft* .NET*) does not support unsigned data types.
Use unsigned data types unless absolutely necessary.
Java does not support returning primitive data types through reference in
function arguments. Avoid using the following function signature:
Avoid:
583
Any SDK function that performs anything more than trivial tasks should be
asynchronous. The function returns immediately with an SP.
Design asynchronous I/O functions so that the functions can be chained into an
asynchronous pipeline for better performance. A counter example is that if there are
multiple faces in a picture, it is not a good design if the asynchronous function only
detects a single face. The application must make multiple calls on the picture. The
application cannot determine beforehand how many loops are needed. Instead,
design the function to detect all faces at once. Any subsequent asynchronous
functions should also process all faces.
Asynchronous functions and asynchronous pipelines work best if, with any input
data, each function in the pipeline generates some output and can be processed by
subsequent functions. It is not a good design when an asynchronous function
requires more inputs (worse, irregular amount of inputs) to generate an output.
Consider a callback design for this type of pattern of operations.
3.3
Immediately following the header are multiple data chunks as follows. The chunk data
structure can contain any arbitrary data identified by the chunk identifier and the chunk size.
They can be configuration parameters as well as the image frame data. The order that the
trunk data present in the file is not important with the general rule that if there are
dependencies between two chunks, the dependent chunk should be placed later in the file.
struct ChunkData {
enum ChunkId {
CHUNK_DEVICEINFO
CHUNK_STREAMINFO
CHUNK_PROPERTIES
CHUNK_PROFILES
CHUNK_SERIALIZEABLE
584
=
=
=
=
=
1,
2,
3,
4,
5,
CHUNK_FRAME_META_DATA =
6,
CHUNK_FRAME_DATA
=
7,
CHUNK_IMAGE_META_DATA =
8,
CHUNK_FRAME_INDEXING
=
9,
}
chunkId;
// The chunk identifier
pxcI32
chunkSize;
// The chunk size in bytes-8.
pxcBYTE
chunkData[chunkSize]; // The chunk data buffer
} chunks[];
The image frame of any stream are recorded sequentially after the header and any chunks
needed for configurations as follows. The image data starts from ChunkFrameMetaData and
ends with ChunkFrameData. In between, there could be multiple data chunks that describe
the meta data of the image frame. The meta data should be interpreted as delta or changes
against what are defined in the file header section. This saves size if certain meta data are
common for all frames.
struct StreamFrame {
ChunkFrameMetaData frame_header;
// in no defined order
ChunkImageMetaData image_meta_data;
// there could be more chunks here.
ChunkFrameData
} frames[]
// if any.
frame_data;
585
};
struct ChunkProfiles {
ChunkId
chunkId=CHUNK_PROFILES;
pxcI32
chunkSize=sizeof(profiles);
StreamProfileSet profiles;
};
struct ChunkSerializeable {
ChunkId
chunkId=CHUNK_SERIALIZEABLE;
pxcI32
chunkSize=sizeof(sdata)+sizeof(sdp);
Property sdp;
// The device property this serializable corresponds
to
pxcBYTE
sdata[sdata_bytes];
};
struct ChunkFrameMetaData {
ChunkId
chunkId=CHUNK_FRAME_META_DATA;
pxcI32
chunkSize=sizeof(metaData);
struct {
pxcI32
syncId; // synchronization id for color/depth pairs.
StreamType streamType;
pxcI64
captureTimeStamp;
PXCImage::Option options;
pxcI32
reserved;
// optional field, chunkSize may reduce
if this field does not exist.
pxcI64
arrivalTimeStamp; // optional field, chunkSize may reduce
if this field does not exist.
} metaData;
};
struct ChunkImageMetaData {
ChunkId
chunkId=CHUNK_IMAGE_META_DATA;
pxcI32
chunkSize=sizeof(buffer)+sizeof(id);
pxcUID
id; // meta data identifier
pxcBYTE
buffer[chunkSize-sizeof(id)];
};
struct ChunkFrameDataUncompressed {
ChunkId
chunkId=CHUNK_FRAME_DATA;
pxcI32
chunkSize=sizeof(imageData);
struct {
pxcI32 pitches[PXCImage::NUM_OF_PLANES];
pxcBYTE plane0[pitches[0]*height];
...
pxcBYTE planeN[pitches[PXCImage::NUM_OF_PLANES-1]*height];
} imageData
};
struct ChunkFrameDataCompressed {
ChunkId
chunkId=CHUNK_FRAME_DATA;
pxcI32
chunkSize=sizeof(imageData);
struct {
586
587