DvsenseDriver  1.2.5
The SDK for dvsense products.
Loading...
Searching...
No Matches
Bias Configuration Usage Tutorial

This section describes event-sensor Bias configuration. DVSLume, DVSLume-G1, and DVSync use the same IMX636 parameter set. DM3 features a genx320 sensor and exposes different parameter names and ranges.

Introduction to Bias

Bias values are offsets relative to the default hardware values, and the default offset is 0. Prefer getAllParamInfo() to obtain the parameters and limits exposed by the connected device.

DVSLume, DVSLume-G1, and DVSync

Parameter Minimum Maximum Default offset
bias_fo -20 0 0
bias_hpf 0 120 0
bias_diff_on -80 145 0
bias_diff -25 23 0
bias_diff_off -30 200 0
bias_refr -20 235 0

DM3 (genx320)

Parameter Minimum Maximum Default offset
bias_pr_hv0 -61 66 0
bias_fo_hv0 -39 88 0
bias_hpf_lv0 0 127 0
bias_diff_on_lv0 -24 103 0
bias_diff_lv0 -51 76 0
bias_diff_off_lv0 -19 108 0
bias_refr_lv0 -82 45 0

Changing contrast thresholds can substantially increase the event rate and may cause memory buildup or latency. Keep bias_pr_hv0 and bias_diff_lv0 at their defaults unless sensor-level tuning is required.

Bias API Sample

Obtaining a Bias Handle

Use dvsense::DvsCamera::getTool for regular event cameras. For DVSync, obtain the Bias tool through dvsense::FusionCamera::getTool instead:

#include "DvsenseDriver/camera/DvsCamera.hpp"
std::shared_ptr<dvsense::CameraTool> bias = device_->getTool(dvsense::ToolType::TOOL_BIAS);
@ TOOL_BIAS
Definition ToolInfo.h:28

After obtaining the Bias tool, use the parameter names for the connected sensor:

int value;
// DVSLume, DVSLume-G1, DVSync
bool ret = bias->getParam("bias_diff_on", value);
ret = bias->setParam("bias_diff_on", 10);
// DM3
ret = bias->getParam("bias_diff_on_lv0", value);
ret = bias->setParam("bias_diff_on_lv0", 10);

Retrieving Parameter Information

const std::vector<BasicParameterInfo> param_info = bias->getAllParamInfo();

The retrieved parameter information type is dvsense::BasicParameterInfo, which includes basic parameter information such as the parameter name, description, and type.

Defining Specific Parameter Types Based on Basic Parameter Information

Refer to dvsense::ToolParameterType for parameter types. Below is an example for dvsense::ToolParameterType::INT:

{
bool ret = bias->getParamInfo(info.name, int_info);
}
@ INT
Definition ToolInfo.h:59
The detailed information of the integer parameter.
Definition ToolInfo.h:98

Reading and Setting Parameters

Use dvsense::CameraTool::getParam and dvsense::CameraTool::setParam to read from and set specific parameters:

int value;
bool ret = bias->getParam(int_info.name, value);
bool ret = bias->setParam(int_info.name, value);