37 #if CV_MAJOR_VERSION > 3
38 #include <opencv2/videoio/videoio_c.h>
56 Camera(imageRate, localTransform),
57 rectifyImages_(rectifyImages),
61 if ( CV_MAJOR_VERSION < 3 || ( CV_MAJOR_VERSION > 3 && CV_MINOR_VERSION < 1 ))
63 UERROR(
" OpenCV %d.%d detected, Minimum OpenCV 3.2 Required ", CV_MAJOR_VERSION,CV_MINOR_VERSION);
84 capture_.set(CV_CAP_PROP_FOURCC, CV_FOURCC(
'Y',
'1',
'6',
' '));
86 capture_.set(CV_CAP_PROP_FRAME_WIDTH, 752);
87 capture_.set(CV_CAP_PROP_FRAME_HEIGHT, 480);
88 capture_.set(CV_CAP_PROP_CONVERT_RGB,
false);
95 unsigned int guid = (
unsigned int)
capture_.get(CV_CAP_PROP_GUID);
96 if (guid != 0 && guid != 0xffffffff)
103 if(!calibrationFolder.empty() && !
cameraName_.empty())
107 UWARN(
"Missing calibration files for camera \"%s\" in \"%s\" folder, you should calibrate the camera!",
112 UINFO(
"Stereo parameters: fx=%f cx=%f cy=%f baseline=%f",
123 UERROR(
"Parameter \"rectifyImages\" is set, but no stereo model is loaded or valid.");
145 cv::Mat
img, leftImage, interLeavedFrame, rightImage;
146 std::vector<cv::Mat> StereoFrames;
147 interLeavedFrame.create(480, 752, CV_8UC2);
154 interLeavedFrame.data =
img.data;
155 split(interLeavedFrame, StereoFrames);
156 leftImage=StereoFrames[0].clone();
157 rightImage=StereoFrames[1].clone();
175 ULOGGER_WARN(
"The camera must be initialized before requesting an image.");