0

OpenCVステレオカメラからの左右の画像を新しいウィンドウに表示するために使用します。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 ライブラリ内の一部のクラスが同じ名前空間を使用していたため、「System Ambibuous Symbol」というエラーが発生しました...このエラーは、

#include "OVR.h"
using namespace OVR;

---」

4

1 に答える 1