<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++ 后處理示例代碼-Post Processing

          # 后處理示例-PostProcessing

           

          支持設備: Gemini 330系列相機,例如:Gemini G335

           

          功能描述:演示進行后處理操作,顯示經(jīng)過后處理的圖像,并通過ESC_KEY鍵退出程序

           

          >本示例基于C++ high Level API進行演示

           

          獲取pipeline,進行流配置

          // Create a pipeline with default device
          ob::Pipeline pipe;

          // Get all stream profiles of the depth camera, including stream resolution, frame rate, and frame format
          auto profiles = pipe.getStreamProfileList(OB_SENSOR_DEPTH);

          std::shared_ptr<ob::VideoStreamProfile> depthProfile = nullptr;
          try {
              // Find the corresponding profile according to the specified format, first look for the y16 format
              depthProfile = profiles->getVideoStreamProfile(640, OB_HEIGHT_ANY, OB_FORMAT_Y16, 30);
          }
          catch(ob::Error &e) {
              // If the specified format is not found, search for the default profile to open the stream
              depthProfile = std::const_pointer_cast<ob::StreamProfile>(profiles->getProfile(OB_PROFILE_DEFAULT))->as<ob::VideoStreamProfile>();
          }

          // By creating config to configure which streams to enable or disable for the pipeline, here the depth stream will be enabled
          std::shared_ptr<ob::Config> config = std::make_shared<ob::Config>();
          config->enableStream(depthProfile);

           

          獲取深度后處理過濾器列表

          auto obFilterList = pipe.getDevice()->getSensor(OB_SENSOR_DEPTH)->getRecommendedFilters();

          std::shared_ptr<ob::DecimationFilter> decFilter;
          for(int i = 0; i < obFilterList->count(); i++) {
              auto postProcessorfilter =obFilterList->getFilter(i);
              std::cout << "Depth recommended post processor filter type: " << postProcessorfilter->type() << std::endl;
              if(postProcessorfilter->is<ob::DecimationFilter>()) {
                  decFilter = postProcessorfilter->as<ob::DecimationFilter>();
              }
          }

           

          開啟pipeline

          pipe.start(config);

          預期輸出:

          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蝌蚪91PORNY 国语 | 91成人小视频 | 成人毛片影院 | 久久人色| 污到你下面流水的视频 | 好大好长好紧爽小a | 久久久岛国 | 中文字幕精品人妻在线 |