DvsenseDriver  1.2.6
The SDK for dvsense products.
Loading...
Searching...
No Matches
ROI Configuration Usage Tutorial

This section describes ROI configuration. The DVS resolution is 1280 × 720 on DVSLume, DVSLume-G1, and DVSync, while DM3 provides a 320 × 320 event resolution. Their ROI limits therefore differ.

Introduction to ROI

Product Maximum x / width Maximum y / height
DVSLume, DVSLume-G1, DVSync 1280 720
DM3 320 320

x and y specify the top-left coordinate; width and height specify the ROI size. The values must satisfy x + width <= sensor_width and y + height <= sensor_height. DM3 also exposes enable and mode (ROI/RONI). Read the complete parameter set, defaults, and ranges from getAllParamInfo() instead of hard-coding sensor dimensions.

iamge_roi

ROI API Sample

Use dvsense::DvsCamera::getTool for regular event cameras. For DVSync, obtain the ROI tool through dvsense::FusionCamera::getTool; parameter operations are otherwise the same:

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

After obtaining the ROI operation pointer, configure its parameters as shown below:

int value;
bool ret = roi_tool->setParam("x", 10);
bool ret = roi_tool->getParam("x", value);
bool ret = roi_tool->setParam("y", 10);
bool ret = roi_tool->getParam("y", value);
bool ret = roi_tool->setParam("width", 100);
bool ret = roi_tool->getParam("width", value);
bool ret = roi_tool->setParam("height", 100);
bool ret = roi_tool->getParam("height", value);