Table of Contents
Principle of HDR mode of iToF(indirect Time-of-Flight)
Please refer to the application note “TN05-Understanding High Dynamic Range (HDR) mode of indirect Time-of-Flight (iToF)” for understanding the 3D camera principles of HDR technology.
Demonstration of DS86 HDR function
Test with various reflectivity objects
(1) Target objects and their characteristics description:
Miscellaneous complex objects, including cardboard boxes (with transparent tape and white labels), rolls of transparent film, white envelopes, black notebooks, black network cables, black power adapters, black angefinders (with high reflectivity acrylic screens), etc. Black objects have low reflectivity, white objects have high reflectivity, and acrylic screens and transparent film rolls have even higer reflectivity.
(2) The camera is approximately 0.75-0.9m away from the target objects.
(3) Power on the camera for preheating 20 minutes before the test.
(4) Room temperature of 22°C, indoor light at 200lux.
(5) Display of test result:
Camera setting | Depth map of the target objec[0.75m, 0.9m] | Point cloud map (with RGB alignment) |
ExposureTime:2000us HDR: ON | View point cloud details | |
ExposureTime:2000us HDR: OFF | View point cloud details |
(6) Test result description
HDR function off: When the camera exposure time is set to 2000us, high reflectivity surfaces such as transparent film rolls, acrylic screens, and transparent tape on cardboard boxes, white envelopes, and white labels show significant exposure saturation.
HDR function on: When the camera exposure time is set to 2000us, objects with both high and low reflectivity in the target area are well imaged, with only slight exposure saturation in the area of the transparent film roll directly facing the camera.
Testing car wheel
(1) Target objects and its characteristics description:
Car tires and wheels have significantly different reflectivity. Black tires have low reflectivity and are difficult to image, while metal wheels have high reflectivity and are prone to exposure saturation.
(2) The camera is approximately 1m away from the target objects.
(3) Power on the camera for preheating 20 minutes before the test.
(4) Room temperature of 22°C, outdoor light at 50000lux.
(5) Display of test result:
Comparison test result at 1m away from the wheel:
Camera setting | Depth map, distance of 1 meter | Point cloud map |
ExposureTime: 2000us Confidence Filter: 9 HDR: ON | View point cloud details | |
ExposureTime: 2000us Confidence Filter: 9 HDR: OFF | View poind cloud details |
(6) Test result description:
The closer the test distance, the more easily high reflectivity objects become exposed saturation.
With HDR off, most of the wheel area is exposed at adistance of 1m.
With HDR on, the wheel can be completely imaged at 1m without exposure saturation.
Defects of HDR fuction
(1) The principle of HDR involves fusing multiple frames with different exposure times (long expsure and short exposure) to obtain an HDR image, which inevitably extends the time required to obtain a frame of image. Thus, in HDR mode, the camera’s frame rate will decrease, and latency will increase.
(2) Due to the principle of ToF, the accuracy and precision of distance measurement for the same object will vary slightiy under different exposure times, particularly under short exposure mode where accuracy and precision decreases. Therefore, objects on the same plane in HDR mode may show layering effects. As shown in the following case:
Due to the defects of HDR function, it is recommended not to enable HDR function in actual measurenment, but to meet the scene requirements by adjusting the appropriate frame rate and exposure time. Please refer to the application note “AN04- Introduction to exposure time and frame rate in Vzense 3D Time of Flight (ToF) camera“.
Implementation method of HDR function
Implement HDR function in ScepterGUITool
In ScepterGUITool, HDR can be simply enabled or disabled through the HDR switch, as shown below:
Implement HDR function by using the SDK
Sample code:
BaseSDK/Windows/Samples/Base/NYX650/ToFExposureTimeOfHDRSetGet.
1. The enable of HDR API interface are:
//enable or disable the HDR function
ScStatus scSetHDRModeEnabled(ScDeviceHandle device, bool bEnabled);
//get the status of HDR function
ScStatus scGetHDRModeEnabled(ScDeviceHandle device, bool* bEnabled);
Example of set HDR mode status:
ScDeviceHandle deviceHandle = 0;
ScStatus status = SC_OTHERS;
bool bHDREnable = 0;
//open device
status = scOpenDeviceByIP(pDeviceListInfo[0].ip, &deviceHandle);
//enable HDR
bHDREnable = True;
status = scSetHDRModeEnabled(deviceHandle, bHDREnable);
Example of get HDR mode status:
ScDeviceHandle deviceHandle = 0;
ScStatus status = SC_OTHERS;
bool bHDREnable = 0;
//open device
status = scOpenDeviceByIP(pDeviceListInfo[0].ip, &deviceHandle);
//get the status of HDR mode
status = scGetHDRModeEnabled(deviceHandle, &bHDREnable);
cout << "HDR States: " << bHDREnable << endl;
2. Get the count of frame in HDR mode API interface is:
//Get the count of frame in HDR mode.
ScStatus scGetFrameCountOfHDRMode(ScDeviceHandle device, int32_t* pCount);
3. The exposure time of tof sensor with the frameIndex in HDR mode API interface are:
//Set the exposure time of depth sensor with the frameIndex in HDR mode.
ScStatus scSetExposureTimeOfHDR(ScDeviceHandle device, uint8_t frameIndex, int32_t exposureTime);
//Get the exposure time of depth sensor with the frameIndex in HDR mode.
ScStatus scGetExposureTimeOfHDR(ScDeviceHandle device, uint8_t frameIndex, int32_t* pExposureTime);
4. The maximum exposure time of tof sensor with the frameIndex in HDR mode API interface is:
//Get the maximum exposure time of depth sensor with the frameIndex in HDR mode.
ScStatus scGetMaxExposureTimeOfHDR(ScDeviceHandle device, uint8_t frameIndex, int32_t* pMaxExposureTime)
Some versions of the DS86/DS87 series 3D Time of Flight (ToF) cameras have HDR enabled by default, which means HDR is activated every time the device is powered on. If you need to disable HDR, you can use the method described above to call the API interface to disable HDR after device open.