1. 程式人生 > >【OpenCV筆記二】OpenCV呼叫Mac攝像頭

【OpenCV筆記二】OpenCV呼叫Mac攝像頭

#include <opencv2/highgui.hpp>
#include <opencv2/opencv.hpp>
#include <stdio.h>

using namespace cv;

int main(int argc, char** argv)
{   
  VideoCapture capture(0);
  while(1){
    Mat frame;
    capture >> frame;
    printf("Camera capture....\n");
    imshow("讀取視訊",frame);
    waitKey(30);
  }
  
  return 0;
}