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

          # 紅外示例-InfraredViewer

          功能描述:演示獲取紅外相機(jī)圖像,顯示紅外圖像,并通過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);

           

          開啟pipeline

          pipe.start(config);

           

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

          auto frameSet = pipe.waitForFrames(100);

           

           

          停止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午夜影院 | 日韩精品成人在线视频 | 色女仆影院 | 婷婷五月AV蜜桃久久 | 暖暖av| 97成人资源站 | 爱爱网成人免费视频 |