z6娱乐

z6娱乐

Depth Preset 更新

1. 主张

Gemini 330 新增了支持深度Preset 的更新,, ,,,由于相机自带的Preset存放有限;;;;;因而我们支持3个Optional Depth Preset的更新,, ,,,用户能够凭据自身的具体利用场景在z6娱乐提供的Depth Preset release 页面去下载对应的Preset 更新到相机进行使用,以便提供对应场景的更好深度机能。。。。。


2. 合用领域

合用于Gemini 330 系列固件版本1.4.60及以上的所有产品,, ,,,SDK版本要求2.3.x及以上版本.


3. 若何更新Preset

3.1 若何通过Orbbec Viewer 更新Preset?

① 相机衔接Orbbec Viewer 后点击Device Control,, ,,,点击Optional depth preset 的Update 按钮,, ,,,选择必要加载的Preset 文件,, ,,,把稳:一次最多同时支持3个Preset 的加载,, ,,,加载后点击Update 即可更新到Device Preset 中,, ,,,同时会显示在Optional depth preset 列表钟祝。。。。

image.png


更新成功:

image.png

② Optional depth preset 最大支持同时加载3个Preset 的更新,, ,,,每次更新将覆盖代替之前的Optional depth preset


异常处置:

①若是导入存在沉复Preset ,, ,,,会提醒存在沉复配置,, ,,,一样仅生效一个

image.png

②固件版本不支持或如导入机械不匹配:会提醒"Error! The depth preset file are invalid ,Please select again"

image.png


3.2 若何通过SDK更新Preset??? ?? ?

参考sample:https://github.com/orbbec/OrbbecSDK_v2/blob/main/examples/2.device.optional_depth_presets_update/device.optional_depth_presets_update.cpp

/// 1.Create a context to access the connected devices
std::shared_ptr<ob::Context> context = std::make_shared<ob::Context>();

#if defined(__linux__)
// On Linux, it is recommended to use the libuvc backend for device access as v4l2 is not always reliable on some systems for preset update.
context->setUvcBackendType(OB_UVC_BACKEND_TYPE_LIBUVC);
#endif

/// 2. Access the connected devices
auto deviceList = context->queryDeviceList();
std::shared_ptr<ob::Device> device;
if (deviceList->getCount() > 0) {
    device = deviceList->getDevice(0);
}

/// 3. update optional depth presets
// Enter your preset file path, please enter 1-3
std::vector<std::string> pathList = {
    "/home/user/preset1.bin",
    "/home/user/preset2.bin",
    "/home/user/preset3.bin"
};

uint8_t index = 0;
uint8_t count = static_cast<uint8_t>(pathList.size());

// OB_PATH_MAX is defined as 1024
char(*filePaths)[OB_PATH_MAX] = new char[count][OB_PATH_MAX];

// copy paths
for(const auto &path: pathList) {
  strcpy(filePaths[index++], path.c_str());
}

// update optional depth presets
try {
    device->updateOptionalDepthPresets(filePaths, count, [&](OBFwUpdateState state, const char *message, uint8_t percent) {
    std::cout << "Message: " << message 
              << " percent: " << percent << "%" << std::endl;
  });

  // No exception if the upgrade is successful
  delete[] filePaths;
  filePaths = nullptr;
}
catch(ob::Error &e) {
  // Receive an exception if an error occurs
  std::cerr << "Error message: " << e.what() << "\n" << std::endl;
  delete[] filePaths;
  filePaths = nullptr;
}


【网站地图】【sitemap】