Hi,
I prepared a C# code to get Aligned/synced depth and rgb images from an Astra2 camera.
In the OrbbecViewer I see an option Under Depth Advanced Controls to set the Deph Unit to 0.1 mm.
How to set this by using OrbbecSDK_CSharp?
I coudl not find any methiod in config or pipeline.
I set the piplene on the following way:
Pipeline pipeline = new(); StreamProfile colorProfile = pipeline.GetStreamProfileList(SensorType.OB_SENSOR_COLOR).GetVideoStreamProfile(width: 1920, height: 1080, Orbbec.Format.OB_FORMAT_RGB, fps: 30); StreamProfile depthProfile = pipeline.GetStreamProfileList(SensorType.OB_SENSOR_DEPTH).GetVideoStreamProfile(width: 1600, height: 1200, Orbbec.Format.OB_FORMAT_Y16, fps: 30); StreamProfile accelProfile = pipeline.GetStreamProfileList(SensorType.OB_SENSOR_ACCEL).GetAccelStreamProfile(AccelFullScaleRange.OB_ACCEL_FS_UNKNOWN,AccelSampleRate.OB_SAMPLE_RATE_100_HZ); StreamProfile gyroProfile = pipeline.GetStreamProfileList(SensorType.OB_SENSOR_GYRO).GetGyroStreamProfile(GyroFullScaleRange.OB_GYRO_FS_UNKNOWN,GyroSampleRate.OB_SAMPLE_RATE_100_HZ); Config config = new(); config.EnableStream(colorProfile); config.EnableStream(depthProfile); config.EnableStream(accelProfile); config.EnableStream(gyroProfile); config.SetAlignMode(AlignMode.ALIGN_D2C_SW_MODE); pipeline.EnableFrameSync(); pipeline.Start(config);
Is the next code returns the current value of depth unit? (Current value is 1 )
float depthValueScale = depthFrame.GetValueScale();