双目摄像头资料
2 E币
成为会员,免费下载资料
文件大小:1.98 MB
上传者:david
时间:2019-03-25 20:24:18
下载量:64
[attach]11314[/attach]
摄像头 分辨率 640x480
uvc
[attach]11315[/attach]
[attach]11316[/attach]
资料:
open cv 使用双目摄像头代码参考
[code]
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
using namespace cv;
using namespace std;
using namespace ml;
int main()
{
VideoCapture Camera(1);
if (!Camera.isOpened())
{
cout << "Could not open the Camera " << endl;
return -1;
}
Mat Fream;
Mat DoubleImage;
while (true)
{
Camera >> Fream;
if (Fream.empty()) break;
resize(Fream, DoubleImage, Size(640, 240), (0, 0), (0, 0), INTER_AREA);
imshow("【双目视图】", DoubleImage);
Mat LeftImage = DoubleImage(Rect(0, 0, 320, 240));
Mat RightImage = DoubleImage(Rect(320, 0, 320, 240));
imshow("【左视图】", LeftImage);
imshow("【右视图】", RightImage);
char key = waitKey(30);
char c = cvWaitKey(30);
if (c == 27)//Esc键退出
{
break;
}
}
return 0;
}
[/code]
摄像头 分辨率 640x480
uvc
[attach]11315[/attach]
[attach]11316[/attach]
资料:
open cv 使用双目摄像头代码参考
[code]
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
using namespace cv;
using namespace std;
using namespace ml;
int main()
{
VideoCapture Camera(1);
if (!Camera.isOpened())
{
cout << "Could not open the Camera " << endl;
return -1;
}
Mat Fream;
Mat DoubleImage;
while (true)
{
Camera >> Fream;
if (Fream.empty()) break;
resize(Fream, DoubleImage, Size(640, 240), (0, 0), (0, 0), INTER_AREA);
imshow("【双目视图】", DoubleImage);
Mat LeftImage = DoubleImage(Rect(0, 0, 320, 240));
Mat RightImage = DoubleImage(Rect(320, 0, 320, 240));
imshow("【左视图】", LeftImage);
imshow("【右视图】", RightImage);
char key = waitKey(30);
char c = cvWaitKey(30);
if (c == 27)//Esc键退出
{
break;
}
}
return 0;
}
[/code]
展开》
折叠》