<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 雙路紅外流示例代碼-Double Infrared Viewer

          # 雙紅外示例-DoubleInfraredViewer

           

          支持設(shè)備:僅支持Gemini 330系列,Gemini 2 XL,Gemini 2 VL

           

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

           

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

           

          創(chuàng)建pipeline和config

          // 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);

           

          獲取左IR流配置

          // Configure the infrared stream(IR_LEFT)
          ob_stream_profile      *ir_left_profile  = NULL;
          ob_stream_profile_list *ir_left_profiles = ob_pipeline_get_stream_profile_list(pipeline, OB_SENSOR_IR_LEFT, &error);
          check_error(error);

          if(ir_left_profiles == nullptr) {
              printf("The obtained IR(Left) resolution list is NULL. For monocular structured light devices, try opening the IR data stream using the IR example. ");
              return 0;
          }

          // Find the corresponding profile according to the specified format, first look for the y16 format
          ir_left_profile = ob_stream_profile_list_get_profile(ir_left_profiles, OB_PROFILE_DEFAULT, &error);
          check_error(error);

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

           

          獲取右IR流配置

          // Configure the infrared stream(IR_RIGHT)
          ob_stream_profile      *ir_right_profile  = NULL;
          ob_stream_profile_list *ir_right_profiles = ob_pipeline_get_stream_profile_list(pipeline, OB_SENSOR_IR_RIGHT, &error);
          check_error(error);

          // Find the corresponding profile according to the specified format, first look for the y16 format
          ir_right_profile = ob_stream_profile_list_get_profile(ir_right_profiles, OB_PROFILE_DEFAULT, &error);
          check_error(error);

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

           

          通過config開啟pipeline

          ob_pipeline_start_with_config(pipeline, config, &error);
          check_error(error)

           

          獲取左右IR幀數(shù)據(jù)

          ob_frame *ir_left_frame = ob_frameset_get_frame(frameset, OB_FRAME_IR_LEFT, &error);
          check_error(error);

          ob_frame *ir_right_frame = ob_frameset_get_frame(frameset, OB_FRAME_IR_RIGHT, &error);
          check_error(error);

           

          // 停止 pipeline

          ob_pipeline_stop(pipeline, &error);
          check_error(error);

           

           

           

          釋放相關(guān)資源

          // destroy the window
          delete win;

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

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

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

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

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

           

          預(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>

                日本三级韩国三级国产三级 | 伦伦影院午夜理伦片 | 双乳奶水饱满少妇呻呻吟 | 五十多岁农村妇女形象 | 一道本一区二区免费在线观看 | 自拍毛片在线观看 | 国产精品成人免费一区久久羞羞 | 国产又大又硬又爽免费视频试 | 国产一级粉嫩xxxx | 国产suv精品一区二区三区 |