zdzhaoyong / GSLAM

A General Simultaneous Localization and Mapping Framework which supports feature based or direct method and different sensors including monocular camera, RGB-D sensors or any other input types can be handled.
BSD 2-Clause "Simplified" License
1.03k stars 269 forks source link

Error when compile the project #4

Closed xav12358 closed 6 years ago

xav12358 commented 6 years ago

Hello, when I try to compile the project I get that error:

/home/xxx/Bureau/developpement/SLAM/GSLAM/GSLAM/plugins/cfg/../../core/GImage.h: In member function ‘GSLAM::GImage::operator cv::Mat() const’:
/home/xxx/Bureau/developpement/SLAM/GSLAM/GSLAM/plugins/cfg/../../core/GImage.h:281:37: error: no matching function for call to ‘cv::UMatData::UMatData()’
             cv::UMatData* u=new cv::UMatData;

I am on ubuntu 16.04 with Opencv 3.2.

zdzhaoyong commented 6 years ago

Sorry that GSLAM is never tested with OpenCV Version 3.2. Try to modify GImage.h

#if defined(HAS_OPENCV) || defined(HAS_OPENCV3)
#include <opencv2/core/core.hpp>
#endif

to

#include <opencv2/core/core.hpp>

if it still does not work, find the header with struct UMatData manually and add it to GImage.h.

xav12358 commented 6 years ago

Indeed it still doesn't work.

For me the problem doesn't come from the location of the structure. The only contructor available in UMatData is :+1: UMatData(const MatAllocator* allocator);

So it tries to find a contructor like cv::UMatData::UMatData() and it is not implemented.

What is the version of Opencv you use?

zdzhaoyong commented 6 years ago

We are still using OpenCV 2.4.9... Sorry for the inconvenience and we will make it works with new OpenCV versions.