mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 09:30:25 +08:00
fix build errors with opencv2, added Transform::getClosestTransform() function for convenience.
This commit is contained in:
@@ -30,6 +30,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include <rtabmap/utilite/UConversion.h>
|
||||
#if CV_MAJOR_VERSION > 3
|
||||
#include <opencv2/videoio/videoio_c.h>
|
||||
#if CV_MAJOR_VERSION > 4
|
||||
#include <opencv2/videoio/legacy/constants_c.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
namespace rtabmap
|
||||
@@ -131,13 +134,13 @@ bool CameraVideo::init(const std::string & calibrationFolder, const std::string
|
||||
{
|
||||
if(_model.isValidForProjection())
|
||||
{
|
||||
_capture.set(cv::CAP_PROP_FRAME_WIDTH, _model.imageWidth());
|
||||
_capture.set(cv::CAP_PROP_FRAME_HEIGHT, _model.imageHeight());
|
||||
_capture.set(CV_CAP_PROP_FRAME_WIDTH, _model.imageWidth());
|
||||
_capture.set(CV_CAP_PROP_FRAME_HEIGHT, _model.imageHeight());
|
||||
}
|
||||
else if(_width > 0 && _height > 0)
|
||||
{
|
||||
_capture.set(cv::CAP_PROP_FRAME_WIDTH, _width);
|
||||
_capture.set(cv::CAP_PROP_FRAME_HEIGHT, _height);
|
||||
_capture.set(CV_CAP_PROP_FRAME_WIDTH, _width);
|
||||
_capture.set(CV_CAP_PROP_FRAME_HEIGHT, _height);
|
||||
}
|
||||
}
|
||||
if(_rectifyImages && !_model.isValidForRectification())
|
||||
|
||||
Reference in New Issue
Block a user