FireSight.cpp
static int uiVideo(const char * pipelinePath, ArgMap &argMap) {
  VideoCapture cap(0); // open the default camera
  if(!cap.isOpened()) {  // check if we succeeded
    LOGERROR("Could not open camera");
    exit(-1);
  }

  namedWindow("image",1);

  Pipeline pipeline(pipelinePath, Pipeline::PATH);

  for(;;) {
    Mat frame;
    cap >> frame; // get a new frame from camera

    json_t *pModel = pipeline.process(frame, argMap);

    // Display pipeline output
    imshow("image", frame);
    if(waitKey(30) >= 0) break;

    // Free model
    json_decref(pModel);
  }

  return 0;
}
/**
 * Video capture example of FireSight lib_firesight library use
 */
Video capture example of FireSight lib_firesight library use
Video capture example of FireSight lib_firesight library use
static int uiVideo(const char * pipelinePath, ArgMap &argMap) {
  VideoCapture cap(0); 
  if(!cap.isOpened()) {  
    LOGERROR("Could not open camera");
    exit(-1);
  }
  namedWindow("image",1);
  Pipeline pipeline(pipelinePath, Pipeline::PATH);
  for(;;) {
    Mat frame;
    cap >> frame; 
    json_t *pModel = pipeline.process(frame, argMap);
    imshow("image", frame);
    if(waitKey(30) >= 0) break;
    json_decref(pModel);
  }
  return 0;
}
static int uiVideo ( const char * pipelinePath , ArgMap & argMap ) { VideoCapture cap ( 0 ) ; if ( ! cap . isOpened ( ) ) { LOGERROR ( " " ) ; exit ( -1 ) ; } namedWindow ( " " , 1 ) ; Pipeline pipeline ( pipelinePath , Pipeline :: PATH ) ; for ( ; ; ) { Mat frame ; cap >> frame ; json_t * pModel = pipeline . process ( frame , argMap ) ; imshow ( " " , frame ) ; if ( waitKey ( 30 ) >= 0 ) break ; json_decref ( pModel ) ; } return 0 ; }
Video capture example of FireSight lib_firesight library use
Video capture example of FireSight lib_firesight library use
// open the default camera // check if we succeeded // get a new frame from camera // Display pipeline output // Free model