OpenCV3 打开摄像头无法显示画面问题
opencv吧
全部回复
仅看楼主
level 1
243125132 楼主
编程环境:Win10+OpenCV3.1+Qt5.7.1
使用3D双目相机,免装驱动,设备管理器有该相机,
编译通过,运行程序,弹出的窗口一片黑,无画面,代码如下

#include <opencv2/opencv.hpp>#
include
using namespace std;using namespace cv;
int main() {
Mat frame;
VideoCapture camera(0);
if(!camera.isOpened())
{
cout<<"open camera failed"<>frame;
if(frame.empty())
{
cout<<"frame is empty"<
2017年10月31日 13点10分 1
1