43     if( !cap.initializeVideo() )
 
   45         std::cerr << 
"Cannot open camera video capture" << std::endl;
 
   46         std::cerr << 
"See verbosity level for more details." << std::endl;
 
   50     std::cout << 
"Connected to camera sn: " << cap.getSerialNumber() << std::endl;
 
   57     uint64_t lastFrameTs = 0;
 
   61     cap.enableAecAgcSensLogging(
false);
 
   64     uint16_t not_a_new_frame = 0;
 
   65     int frame_timeout_msec = 100;
 
   84                 double elapsed_sec = now - lastTime;
 
   86                 std::cout << 
"[System] Frame period: " << elapsed_sec << 
"sec - Freq: " << 1./elapsed_sec << 
" Hz" << std::endl;
 
   90                 double frame_dT = 
static_cast<double>(frame.
timestamp-lastFrameTs)/1e9;
 
   91                 std::cout << 
"[Camera] Frame period: " << frame_dT << 
"sec - Freq: " << 1./frame_dT << 
" Hz" << std::endl;
 
  106                     cap.setColorBars(0,
true);
 
  108                     cap.setColorBars(0,
false);
 
  133             std::cout << 
"Not a new frame #" << not_a_new_frame << std::endl;
 
  135             if( not_a_new_frame>=(1000/frame_timeout_msec)) 
 
  137                 cap.saveAllISPRegisters(
"ov580_lr_"+std::to_string(f_count)+
"_not_a_new _frame.csv");
 
  138                 cap.saveAllSensorsRegisters(
"ov4689_lr_"+std::to_string(f_count)+
"_not_a_new _frame.csv");
 
  139                 std::cout<<
" Save Data for f_count "<<f_count<<std::endl;
 
  141                 std::cout << 
"Camera connection lost. Closing..." << std::endl;
 
  148         int key = cv::waitKey( 5 );
 
  149         if(key==
'q' || key==
'Q') 
 
  155     cap.enableAecAgcSensLogging(
true);
 
The VideoCapture class provides image grabbing functions and settings control for all the Stereolabs ...
 
uint64_t getSteadyTimestamp()
Get the current system clock as steady clock, so with no jumps even if the system time changes.
 
@ FPS_60
60 Frames per second. Not available for RESOLUTION::HD2K and RESOLUTION::HD1080.
 
The Frame struct containing the acquired video frames.
 
uint64_t timestamp
Timestamp in nanoseconds.
 
uint16_t height
Frame height.
 
uint16_t width
Frame width.
 
uint8_t * data
Frame data in YUV 4:2:2 format.
 
The camera configuration parameters.
 
RESOLUTION res
Camera resolution.
 
FPS fps
Frames per second.
 
sl_oc::video::VideoParams params