<blockquote id="76sxc"></blockquote>
<cite id="76sxc"><track id="76sxc"></track></cite>
<legend id="76sxc"></legend>

  • <blockquote id="76sxc"><p id="76sxc"></p></blockquote>
    <sub id="76sxc"><p id="76sxc"></p></sub>

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

          # 流對(duì)齊處理單元-AlignFilterViewer

           

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

           

          功能描述:演示傳感器數(shù)據(jù)流同步對(duì)齊的操作,顯示對(duì)齊后的圖像,并通過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è)置對(duì)齊模式

          /* 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)行對(duì)齊處理

          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 


          <blockquote id="76sxc"></blockquote>
          <cite id="76sxc"><track id="76sxc"></track></cite>
          <legend id="76sxc"></legend>

        1. <blockquote id="76sxc"><p id="76sxc"></p></blockquote>
          <sub id="76sxc"><p id="76sxc"></p></sub>

                大鸡吧在线播放 | 自拍偷拍欧美激情 | 91福利网 | 乱伦大杂烩视频 | 亚洲午夜精品视频 | 嗯啊不要在线 | 中国性xxxxx摘花过程 | 潘金莲一级淫片aaaa | 日韩av导航 | 操逼逼逼逼视频 |