• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 众包
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
增强的一亩三分地
增强的一亩三分地
博客园          联系   管理     
OpenCV —— Calling Cameras
Before you call two or more camera You have got to ensure the cameras to use different HUB!
//Here hide some headers and common callings
int main()
{
    VideoCapture cap(0);
    while(1)
    {
        Mat frame;
        cap >> frame;
        imshow("camera",frame);
        if(waitKey(0) == 27)break;
    }
    return 0;
}
If you want to use more usb-cameras to show image,you just need to replace cap(0) with cap(1)(take two cameras for example).And you also need to call one more Mat variary to receive the data-stream.
posted on 2017-05-09 10:16  -leanard-  阅读(7)  评论(0)    收藏  举报  来源
刷新页面返回顶部
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3