• <rt id="2awkm"><noscript id="2awkm"></noscript></rt>
      <rt id="2awkm"><noscript id="2awkm"></noscript></rt>
    • <dfn id="2awkm"></dfn>
      <menu id="2awkm"><acronym id="2awkm"></acronym></menu>
      
      
      <rt id="2awkm"></rt><dfn id="2awkm"><code id="2awkm"></code></dfn>
    • <dd id="2awkm"><s id="2awkm"></s></dd>
      <tbody id="2awkm"></tbody>
    • <dfn id="2awkm"></dfn>
      <menu id="2awkm"><noscript id="2awkm"></noscript></menu>

      C++ 流對齊處理單元示例代碼-Align Filter Viewer

      # 流對齊處理單元-AlignFilterViewer

       

      支持設(shè)備: Gemini 330系列相機(jī),例如:Gemini G335

       

      功能描述:演示傳感器數(shù)據(jù)流同步對齊的操作,顯示對齊后的圖像,并通過ESC_KEY鍵退出程序

       

      >本示例基于C++ hign Level API進(jìn)行演示

       

      創(chuàng)建pipeline

      ob::Pipeline pipe;

       

      開啟color流

      auto colorProfiles = pipe.getStreamProfileList(OB_SENSOR_COLOR);
      if(colorProfiles) {
          colorProfile = colorProfiles->getVideoStreamProfile(1280, OB_HEIGHT_ANY, OB_FORMAT_RGB, 30);
      }
      config->enableStream(colorProfile);

       

      開啟深度流

      auto                                    depthProfiles = pipe.getStreamProfileList(OB_SENSOR_DEPTH);
      std::shared_ptr<ob::VideoStreamProfile> depthProfile  = nullptr;
      if(depthProfiles) {
      depthProfile = depthProfiles->getVideoStreamProfile(640, OB_HEIGHT_ANY, OB_FORMAT_Y16, 30);
      //depthProfile = std::const_pointer_cast<ob::StreamProfile>(depthProfiles->getProfile(OB_PROFILE_DEFAULT))->as<ob::VideoStreamProfile>();
      }
      config->enableStream(depthProfile);

       

      設(shè)置對齊模式

      /* Config depth align to color or color align to depth.
      OBStreamType align_to_stream = OB_STREAM_DEPTH; */
      OBStreamType align_to_stream = OB_STREAM_COLOR;
      ob::Align align(align_to_stream);

       

      開啟pipeline

      pipe.start(config);

       

      獲取幀數(shù)據(jù)

      auto colorFrame = frameSet->colorFrame();
      auto depthFrame = frameSet->depthFrame();

       

      進(jìn)行對齊處理

      aif(align_to_stream == OB_STREAM_COLOR) {
          app.resize(colorFrame->width(), colorFrame->height());
      }
      else {
          app.resize(depthFrame->width(), depthFrame->height());
      }

       

      關(guān)閉pipeline

      pipe.stop();

      預(yù)期輸出:

      image.png 


      • <rt id="2awkm"><noscript id="2awkm"></noscript></rt>
        <rt id="2awkm"><noscript id="2awkm"></noscript></rt>
      • <dfn id="2awkm"></dfn>
        <menu id="2awkm"><acronym id="2awkm"></acronym></menu>
        
        
        <rt id="2awkm"></rt><dfn id="2awkm"><code id="2awkm"></code></dfn>
      • <dd id="2awkm"><s id="2awkm"></s></dd>
        <tbody id="2awkm"></tbody>
      • <dfn id="2awkm"></dfn>
        <menu id="2awkm"><noscript id="2awkm"></noscript></menu>
        无码国产精品一区二区色情八戒 | 久久国产一片免费观看 | 免费草逼视频网站 | 国产一级特黄 | 理论片一级 |