Jetson TK1 @ubuntu14.04 opencv 雙目相機

#確保兩個相機通過USB/microUSB接入board

#include <highgui.h>

#include <cxcore.h>

using namespace cv;

int main()
{
   VideoCapture cap_l(1);
   if(!cap_l.isOpened())
   {
      return -1;
   }


   VideoCapture cap_r(2);
   if(!cap_r.isOpened())
   {
      return -1;
   }
   
   Mat frame_l, frame_r;
   bool stop = false;

   

    while(!stop)

   {
cap_l>>frame_l;
imshow("camer_l",frame_l);

cap_r>>frame_r;
imshow("camer_r",frame_r);

if(waitKey(30) >= 0)
  stop = true;
   }
   return 0;
}
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章