31 #if CV_MAJOR_VERSION > 3
32 #include <opencv2/videoio/videoio_c.h>
33 #if CV_MAJOR_VERSION > 4
34 #include <opencv2/videoio/legacy/constants_c.h>
46 Camera(imageRate, localTransform),
47 _rectifyImages(rectifyImages),
49 _usbDevice(usbDevice),
57 const std::string & filePath,
61 Camera(imageRate, localTransform),
63 _rectifyImages(rectifyImages),
76 bool CameraVideo::init(
const std::string & calibrationFolder,
const std::string & cameraName)
108 unsigned int guid = (
unsigned int)
_capture.get(CV_CAP_PROP_GUID);
109 if (guid != 0 && guid != 0xffffffff)
116 if(!calibrationFolder.empty() && !
_guid.empty())
120 UWARN(
"Missing calibration files for camera \"%s\" in \"%s\" folder, you should calibrate the camera!",
121 _guid.c_str(), calibrationFolder.c_str());
125 UINFO(
"Camera parameters: fx=%f fy=%f cx=%f cy=%f",
148 UERROR(
"Parameter \"rectifyImages\" is set, but no camera model is loaded or valid.");
189 UERROR(
"Camera has been disconnected!");
194 ULOGGER_WARN(
"The camera must be initialized before requesting an image.");