<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

           

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

           

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

           

          創(chuàng)建pipeline,進行流配置

          // Create a pipeline to open the Infrared stream after connecting the device
          pipeline = ob_create_pipeline(&error);
          check_error(error);

          // Create config to configure the resolution, frame rate, and format of the Infrared stream
          ob_config *config = ob_create_config(&error);
          check_error(error);

          // Configure the infrared stream
          // Please adjust the sensor according to the actual product, some device types only have OB_SENSOR_IR_LEFT and OB_SENSOR_IR_RIGHT.
          ob_stream_profile      *ir_profile = NULL;
          ob_stream_profile_list *profiles   = ob_pipeline_get_stream_profile_list(pipeline, OB_SENSOR_IR, &error);
          check_error(error);

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

          // Find the corresponding profile according to the specified format, first look for the y16 format
          ir_profile = ob_stream_profile_list_get_video_stream_profile(profiles, 640, OB_HEIGHT_ANY, OB_FORMAT_Y16, 30, &error);
          // If the specified format is not found, search for the default profile to open the stream
          if(error) {
              ir_profile = ob_stream_profile_list_get_profile(profiles, OB_PROFILE_DEFAULT, &error);
              ob_delete_error(error);
              error = nullptr;
          }

          // enable stream
          ob_config_enable_stream(config, ir_profile, &error);
          check_error(error)

           

          通過config開啟pipeline

          // Start the pipeline with config
          ob_pipeline_start_with_config(pipeline, config, &error);
          check_error(error)

           

          釋放相關資源

          // stop the pipeline
          ob_pipeline_stop(pipeline, &error);
          check_error(error);

          // destroy the window
          delete win;

          // destroy profile
          ob_delete_stream_profile(ir_profile, &error);
          check_error(error);

          // destroy profile list
          ob_delete_stream_profile_list(profiles, &error);
          check_error(error);

          // destroy the pipeline
          ob_delete_pipeline(pipeline, &error);
          check_error(error);

           

          預期輸出:

          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>

                国产精品 视频瘾无码 | 欧美精品久久久久久久免费软件 | 日韩欧美一区二区三区在线观看 | 美女扣逼 | 国产精品igao视频网网址男男 | 国内自拍视频网站 | 床戏做爰无遮挡摸亲胸视频 | 日本少妇激三级做爰在线 | 九色蝌蚪9l视频蝌蚪9l视频 | 天天日天天射天天舔 |