我使用OpenCV
for 在新窗口中显示立体相机的左右图像。现在我想在 Oculus Rift 上看到同样的东西,但是当我连接 Oculus 时,图像并没有变得Characteristic Circled image
合适lens inside the Oculus
......我需要自己处理图像吗?不是自动的吗?
这是显示窗口的代码:
cap >> frame; //cap= camera 1 & cap2=camera 2
cap.read(frame);
sz1 = frame.size();
//second camera
cap2 >> frame2;
cap2.read(frame2);
sz2 = frame2.size();
cv::Mat bothFrames(sz2.height, sz2.width + sz1.width, CV_8UC3);
// Move right boundary to the left.
bothFrames.adjustROI(0, 0, 0, -sz1.width);
frame2.copyTo(bothFrames);
// Move the left boundary to the right, right boundary to the right.
bothFrames.adjustROI(0, 0, -sz2.width, sz1.width);
frame.copyTo(bothFrames);
// restore original ROI.
bothFrames.adjustROI(0, 0, sz2.width, 0);
cv::imencode(".jpg", bothFrames, buf, params);
我还有一个问题。我正在尝试将 OVR 库添加到我的代码中,但出现错误“系统模糊符号”,因为 OVR 库中的某些类使用了相同的命名空间...当我添加
#include "OVR.h"
using namespace OVR;
-.-”