• <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++ 紅外流示例代碼-Infrared Stream Viewer

      # 紅外示例-InfraredViewer

      功能描述:演示獲取紅外相機(jī)圖像,顯示紅外圖像,并通過(guò)ESC_KEY鍵退出程序

       

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

       

      創(chuàng)建Pipeline, 配置流信息

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

      // Get all stream profiles of the infrared camera, including stream resolution, frame rate, and frame format
      // Please adjust the sensor according to the actual product, some device types only have OB_SENSOR_IR_LEFT and OB_SENSOR_IR_RIGHT.
      auto profiles = pipe.getStreamProfileList(OB_SENSOR_IR);

      if(profiles == nullptr) {
          std::cerr
              << "The obtained IR resolution list is NULL. For binocular structured light devices, try using the doubleIr example to turn on the ir data stream. "
              << std::endl;
          return 0;
      }

      std::shared_ptr<ob::VideoStreamProfile> irProfile = nullptr;
      try {
          // Find the corresponding profile according to the specified format, first look for the y16 format
          irProfile = profiles->getVideoStreamProfile(640, 480, OB_FORMAT_Y8, 30);
      }
      catch(ob::Error &e) {
          // If the specified format is not found, search for the default profile to open the stream
          irProfile = 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 infrared stream will be enabled
      std::shared_ptr<ob::Config> config = std::make_shared<ob::Config>();
      config->enableStream(irProfile);

       

      開(kāi)啟pipeline

      pipe.start(config);

       

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

      auto frameSet = pipe.waitForFrames(100);

       

       

      停止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>
        tk调教折磨高潮 | 五月丁香啪啪综合网 | 精品无码三级在线观看视频 | 国产在线观看av黑料在线不打烊 | 日韩在线高清视频 |