Hello everyone,
I compiled everything just like mentioned steps in readme.md. but I've got build error according below:
[ 62%] Building CXX object CMakeFiles/DynaSLAM.dir/src/MapDrawer.cc.o
[ 62%] Building CXX object CMakeFiles/DynaSLAM.dir/src/KeyFrameDatabase.cc.o
[ 65%] Building CXX object CMakeFiles/DynaSLAM.dir/src/PnPsolver.cc.o
[ 68%] Building CXX object CMakeFiles/DynaSLAM.dir/src/Geometry.cc.o
In file included from /usr/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarraytypes.h:1777:0,
from /usr/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarrayobject.h:18,
from /home/navid/DynaSLAM/include/Conversion.h:17,
from /home/navid/DynaSLAM/src/Conversion.cc:9:
/usr/lib/python2.7/dist-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
#warning "Using deprecated NumPy API, disable it by "
^
In file included from /usr/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarraytypes.h:1777:0,
from /usr/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarrayobject.h:18,
from /home/navid/DynaSLAM/include/Conversion.h:17,
from /home/navid/DynaSLAM/include/MaskNet.h:26,
from /home/navid/DynaSLAM/src/MaskNet.cc:9:
/usr/lib/python2.7/dist-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
#warning "Using deprecated NumPy API, disable it by "
^
/home/navid/DynaSLAM/src/Conversion.cc: In member function ‘cv::UMatData* DynaSLAM::NumpyAllocator::allocate(int, const int*, int, void*, size_t*, int, cv::UMatUsageFlags) const’:
/home/navid/DynaSLAM/src/Conversion.cc:158:25: error: ‘CV_MAX_DIM’ was not declared in this scope
npy_intp _sizes[CV_MAX_DIM+1];
^
/home/navid/DynaSLAM/src/Conversion.cc:161:13: error: ‘_sizes’ was not declared in this scope
_sizes[i] = sizes[i];
^
/home/navid/DynaSLAM/src/Conversion.cc:166:13: error: ‘_sizes’ was not declared in this scope
_sizes[dims++] = cn;
^
In file included from /home/navid/DynaSLAM/include/Conversion.h:17:0,
from /home/navid/DynaSLAM/src/Conversion.cc:9:
/home/navid/DynaSLAM/src/Conversion.cc:168:47: error: ‘_sizes’ was not declared in this scope
PyObject* o = PyArray_SimpleNew(dims, sizes, typenum);
^
/usr/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarrayobject.h:135:40: note: in definition of macro ‘PyArray_SimpleNew’
PyArray_New(&PyArray_Type, nd, dims, typenum, NULL, NULL, 0, 0, NULL)
^
In file included from /usr/local/include/opencv4/opencv2/core.hpp:54:0,
from /usr/local/include/opencv4/opencv2/imgproc.hpp:46,
from /usr/local/include/opencv4/opencv2/imgproc/imgproc.hpp:48,
from /home/navid/DynaSLAM/include/Conversion.h:14,
from /home/navid/DynaSLAM/src/Conversion.cc:9:
/home/navid/DynaSLAM/src/Conversion.cc:172:23: error: ‘CV_StsError’ was not declared in this scope
CV_Error(CV_StsError, ("The numpy array of typenum=%d, ndims=%d can not be created", typenum, dims));
^
/home/navid/DynaSLAM/src/Conversion.cc: At global scope:
/home/navid/DynaSLAM/src/Conversion.cc:205:16: error: cannot declare variable ‘DynaSLAM::g_numpyAllocator’ to be of abstract type ‘DynaSLAM::NumpyAllocator’
NumpyAllocator g_numpyAllocator;
^
/home/navid/DynaSLAM/src/Conversion.cc:74:7: note: because the following virtual functions are pure within ‘DynaSLAM::NumpyAllocator’:
class NumpyAllocator : public MatAllocator
^
In file included from /usr/local/include/opencv4/opencv2/core.hpp:59:0,
from /usr/local/include/opencv4/opencv2/imgproc.hpp:46,
from /usr/local/include/opencv4/opencv2/imgproc/imgproc.hpp:48,
from /home/navid/DynaSLAM/include/Conversion.h:14,
from /home/navid/DynaSLAM/src/Conversion.cc:9:
/usr/local/include/opencv4/opencv2/core/mat.hpp:475:23: note: virtual cv::UMatData* cv::MatAllocator::allocate(int, const int*, int, void*, size_t*, cv::AccessFlag, cv::UMatUsageFlags) const
virtual UMatData* allocate(int dims, const int* sizes, int type,
^
/usr/local/include/opencv4/opencv2/core/mat.hpp:477:18: note: virtual bool cv::MatAllocator::allocate(cv::UMatData*, cv::AccessFlag, cv::UMatUsageFlags) const
virtual bool allocate(UMatData* data, AccessFlag accessflags, UMatUsageFlags usageFlags) const = 0;
^
/home/navid/DynaSLAM/src/Conversion.cc: In member function ‘cv::Mat DynaSLAM::NDArrayConverter::toMat(const PyObject*)’:
/home/navid/DynaSLAM/src/Conversion.cc:244:17: error: ‘CV_MAX_DIM’ was not declared in this scope
if(ndims >= CV_MAX_DIM)
^
/home/navid/DynaSLAM/src/Conversion.cc:249:14: error: ‘CV_MAX_DIM’ was not declared in this scope
int size[CV_MAX_DIM+1];
^
/home/navid/DynaSLAM/src/Conversion.cc:257:9: error: ‘size’ was not declared in this scope
size[i] = (int)_sizes[i];
^
/home/navid/DynaSLAM/src/Conversion.cc:258:9: error: ‘step’ was not declared in this scope
step[i] = (size_t)_strides[i];
^
/home/navid/DynaSLAM/src/Conversion.cc:261:23: error: ‘step’ was not declared in this scope
if( ndims == 0 || step[ndims-1] > elemsize ) {
^
/home/navid/DynaSLAM/src/Conversion.cc:262:9: error: ‘size’ was not declared in this scope
size[ndims] = 1;
^
/home/navid/DynaSLAM/src/Conversion.cc:267:23: error: ‘step’ was not declared in this scope
if( ndims >= 2 && step[0] < step[1] )
^
/home/navid/DynaSLAM/src/Conversion.cc:269:19: error: ‘size’ was not declared in this scope
std::swap(size[0], size[1]);
^
/home/navid/DynaSLAM/src/Conversion.cc:274:23: error: ‘size’ was not declared in this scope
if( ndims == 3 && size[2] <= CV_CN_MAX && step[1] == elemsizesize[2] )
^
/home/navid/DynaSLAM/src/Conversion.cc:274:47: error: ‘step’ was not declared in this scope
if( ndims == 3 && size[2] <= CV_CN_MAX && step[1] == elemsizesize[2] )
^
/home/navid/DynaSLAM/src/Conversion.cc:285:20: error: ‘size’ was not declared in this scope
m = Mat(ndims, size, type, PyArray_DATA(o), step);
^
/home/navid/DynaSLAM/src/Conversion.cc:285:49: error: ‘step’ was not declared in this scope
m = Mat(ndims, size, type, PyArray_DATA(o), step);
^
In file included from /home/navid/DynaSLAM/src/Conversion.cc:9:0:
/home/navid/DynaSLAM/include/Conversion.h: At global scope:
/home/navid/DynaSLAM/include/Conversion.h:25:18: warning: ‘DynaSLAM::opencv_error’ defined but not used [-Wunused-variable]
static PyObject* opencv_error = 0;
^
/home/navid/DynaSLAM/src/Conversion.cc:61:18: warning: ‘PyObject* DynaSLAM::failmsgp(const char*, ...)’ defined but not used [-Wunused-function]
static PyObject* failmsgp(const char fmt, ...)
^
/home/navid/DynaSLAM/src/Conversion.cc:16:13: warning: ‘void DynaSLAM::init()’ defined but not used [-Wunused-function]
static void init()
^
CMakeFiles/DynaSLAM.dir/build.make:518: recipe for target 'CMakeFiles/DynaSLAM.dir/src/Conversion.cc.o' failed
make[2]: *** [CMakeFiles/DynaSLAM.dir/src/Conversion.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/home/navid/DynaSLAM/src/MaskNet.cc: In member function ‘cv::Mat DynaSLAM::SegmentDynObject::GetSegmentation(cv::Mat&, std::__cxx11::string, std::__cxx11::string)’:
/home/navid/DynaSLAM/src/MaskNet.cc:58:43: error: ‘CV_LOAD_IMAGE_UNCHANGED’ was not declared in this scope
cv::Mat seg = cv::imread(dir+"/"+name,CV_LOAD_IMAGE_UNCHANGED);
^
/home/navid/DynaSLAM/src/MaskNet.cc:62:125: warning: ISO C++ forbids converting a string constant to ‘char’ [-Wwrite-strings]
PyObject* py_mask_image = PyObject_CallMethod(this->net, const_cast<char*>(this->get_dyn_seg.c_str()),"(O)",py_image);
^
In file included from /usr/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarrayobject.h:27:0,
from /home/navid/DynaSLAM/include/Conversion.h:17,
from /home/navid/DynaSLAM/include/MaskNet.h:26,
from /home/navid/DynaSLAM/src/MaskNet.cc:9:
/usr/lib/python2.7/dist-packages/numpy/core/include/numpy/__multiarray_api.h: At global scope:
/usr/lib/python2.7/dist-packages/numpy/core/include/numpy/__multiarray_api.h:1448:1: warning: ‘int _import_array()’ defined but not used [-Wunused-function]
_import_array(void)
^
In file included from /home/navid/DynaSLAM/include/MaskNet.h:26:0,
from /home/navid/DynaSLAM/src/MaskNet.cc:9:
/home/navid/DynaSLAM/include/Conversion.h:25:18: warning: ‘DynaSLAM::opencv_error’ defined but not used [-Wunused-variable]
static PyObject* opencv_error = 0;
^
/home/navid/DynaSLAM/include/Conversion.h:27:12: warning: ‘int DynaSLAM::failmsg(const char*, ...)’ declared ‘static’ but never defined [-Wunused-function]
static int failmsg(const char fmt, ...);
^
/home/navid/DynaSLAM/include/Conversion.h:45:18: warning: ‘PyObject DynaSLAM::failmsgp(const char*, ...)’ declared ‘static’ but never defined [-Wunused-function]
static PyObject* failmsgp(const char fmt, ...);
^
CMakeFiles/DynaSLAM.dir/build.make:542: recipe for target 'CMakeFiles/DynaSLAM.dir/src/MaskNet.cc.o' failed
make[2]: *** [CMakeFiles/DynaSLAM.dir/src/MaskNet.cc.o] Error 1
In file included from /home/navid/DynaSLAM/src/Frame.cc:10:0:
/home/navid/DynaSLAM/include/Frame.h: In copy constructor ‘ORB_SLAM2::Frame::Frame(const ORB_SLAM2::Frame&)’:
/home/navid/DynaSLAM/include/Frame.h:173:9: warning: ‘ORB_SLAM2::Frame::mnScaleLevels’ will be initialized after [-Wreorder]
int mnScaleLevels;
^
/home/navid/DynaSLAM/include/Frame.h:131:13: warning: ‘cv::Mat ORB_SLAM2::Frame::mImRGB’ [-Wreorder]
cv::Mat mImRGB;
^
/home/navid/DynaSLAM/src/Frame.cc:28:1: warning: when initialized here [-Wreorder]
Frame::Frame(const Frame &frame)
^
In file included from /home/navid/DynaSLAM/src/Frame.cc:10:0:
/home/navid/DynaSLAM/include/Frame.h:175:11: warning: ‘ORB_SLAM2::Frame::mfLogScaleFactor’ will be initialized after [-Wreorder]
float mfLogScaleFactor;
^
/home/navid/DynaSLAM/include/Frame.h:130:13: warning: ‘cv::Mat ORB_SLAM2::Frame::mImGray’ [-Wreorder]
cv::Mat mImGray;
^
/home/navid/DynaSLAM/src/Frame.cc:28:1: warning: when initialized here [-Wreorder]
Frame::Frame(const Frame &frame)
^
In file included from /home/navid/DynaSLAM/src/Frame.cc:10:0:
/home/navid/DynaSLAM/include/Frame.h:177:19: warning: ‘ORB_SLAM2::Frame::mvInvScaleFactors’ will be initialized after [-Wreorder]
vector mvInvScaleFactors;
^
/home/navid/DynaSLAM/include/Frame.h:129:13: warning: ‘cv::Mat ORB_SLAM2::Frame::mImMask’ [-Wreorder]
cv::Mat mImMask;
^
/home/navid/DynaSLAM/src/Frame.cc:28:1: warning: when initialized here [-Wreorder]
Frame::Frame(const Frame &frame)
^
In file included from /home/navid/DynaSLAM/src/Frame.cc:10:0:
/home/navid/DynaSLAM/include/Frame.h:179:19: warning: ‘ORB_SLAM2::Frame::mvInvLevelSigma2’ will be initialized after [-Wreorder]
vector mvInvLevelSigma2;
^
/home/navid/DynaSLAM/include/Frame.h:128:10: warning: ‘bool ORB_SLAM2::Frame::mIsKeyFrame’ [-Wreorder]
bool mIsKeyFrame;
^
/home/navid/DynaSLAM/src/Frame.cc:28:1: warning: when initialized here [-Wreorder]
Frame::Frame(const Frame &frame)
^
In file included from /home/navid/DynaSLAM/src/Frame.cc:10:0:
/home/navid/DynaSLAM/include/Frame.h:128:10: warning: ‘ORB_SLAM2::Frame::mIsKeyFrame’ will be initialized after [-Wreorder]
bool mIsKeyFrame;
^
/home/navid/DynaSLAM/include/Frame.h:127:13: warning: ‘cv::Mat ORB_SLAM2::Frame::mImDepth’ [-Wreorder]
cv::Mat mImDepth;
^
/home/navid/DynaSLAM/src/Frame.cc:28:1: warning: when initialized here [-Wreorder]
Frame::Frame(const Frame &frame)
^
In file included from /home/navid/DynaSLAM/src/Frame.cc:10:0:
/home/navid/DynaSLAM/include/Frame.h: In constructor ‘ORB_SLAM2::Frame::Frame(const cv::Mat&, const cv::Mat&, const cv::Mat&, const double&, ORB_SLAM2::ORBextractor, ORB_SLAM2::ORBVocabulary*, cv::Mat&, cv::Mat&, const float&, const float&)’:
/home/navid/DynaSLAM/include/Frame.h:129:13: warning: ‘ORB_SLAM2::Frame::mImMask’ will be initialized after [-Wreorder]
cv::Mat mImMask;
^
/home/navid/DynaSLAM/include/Frame.h:95:20: warning: ‘ORB_SLAM2::ORBVocabulary* ORB_SLAM2::Frame::mpORBvocabulary’ [-Wreorder]
ORBVocabulary* mpORBvocabulary;
^
/home/navid/DynaSLAM/src/Frame.cc:154:1: warning: when initialized here [-Wreorder]
Frame::Frame(const cv::Mat &imGray, const cv::Mat &imDepth, const cv::Mat &imMask, const double &timeStamp, ORBextractor* extractor, ORBVocabulary* voc,
^
In file included from /home/navid/DynaSLAM/src/Frame.cc:10:0:
/home/navid/DynaSLAM/include/Frame.h:130:13: warning: ‘ORB_SLAM2::Frame::mImGray’ will be initialized after [-Wreorder]
cv::Mat mImGray;
^
/home/navid/DynaSLAM/include/Frame.h:101:12: warning: ‘double ORB_SLAM2::Frame::mTimeStamp’ [-Wreorder]
double mTimeStamp;
^
/home/navid/DynaSLAM/src/Frame.cc:154:1: warning: when initialized here [-Wreorder]
Frame::Frame(const cv::Mat &imGray, const cv::Mat &imDepth, const cv::Mat &imMask, const double &timeStamp, ORBextractor* extractor, ORBVocabulary* voc,
^
In file included from /home/navid/DynaSLAM/src/Frame.cc:10:0:
/home/navid/DynaSLAM/include/Frame.h:128:10: warning: ‘ORB_SLAM2::Frame::mIsKeyFrame’ will be initialized after [-Wreorder]
bool mIsKeyFrame;
^
/home/navid/DynaSLAM/include/Frame.h:127:13: warning: ‘cv::Mat ORB_SLAM2::Frame::mImDepth’ [-Wreorder]
cv::Mat mImDepth;
^
/home/navid/DynaSLAM/src/Frame.cc:154:1: warning: when initialized here [-Wreorder]
Frame::Frame(const cv::Mat &imGray, const cv::Mat &imDepth, const cv::Mat &imMask, const double &timeStamp, ORBextractor* extractor, ORBVocabulary* voc,
^
In file included from /home/navid/DynaSLAM/src/Frame.cc:10:0:
/home/navid/DynaSLAM/include/Frame.h: In constructor ‘ORB_SLAM2::Frame::Frame(const cv::Mat&, const cv::Mat&, const cv::Mat&, const cv::Mat&, const double&, ORB_SLAM2::ORBextractor*, ORB_SLAM2::ORBVocabulary*, cv::Mat&, cv::Mat&, const float&, const float&)’:
/home/navid/DynaSLAM/include/Frame.h:129:13: warning: ‘ORB_SLAM2::Frame::mImMask’ will be initialized after [-Wreorder]
cv::Mat mImMask;
^
/home/navid/DynaSLAM/include/Frame.h:95:20: warning: ‘ORB_SLAM2::ORBVocabulary* ORB_SLAM2::Frame::mpORBvocabulary’ [-Wreorder]
ORBVocabulary* mpORBvocabulary;
^
/home/navid/DynaSLAM/src/Frame.cc:236:1: warning: when initialized here [-Wreorder]
Frame::Frame(const cv::Mat &imGray, const cv::Mat &imDepth, const cv::Mat &imMask, const cv::Mat &imRGB,
^
In file included from /home/navid/DynaSLAM/src/Frame.cc:10:0:
/home/navid/DynaSLAM/include/Frame.h:130:13: warning: ‘ORB_SLAM2::Frame::mImGray’ will be initialized after [-Wreorder]
cv::Mat mImGray;
^
/home/navid/DynaSLAM/include/Frame.h:101:12: warning: ‘double ORB_SLAM2::Frame::mTimeStamp’ [-Wreorder]
double mTimeStamp;
^
/home/navid/DynaSLAM/src/Frame.cc:236:1: warning: when initialized here [-Wreorder]
Frame::Frame(const cv::Mat &imGray, const cv::Mat &imDepth, const cv::Mat &imMask, const cv::Mat &imRGB,
^
In file included from /home/navid/DynaSLAM/src/Frame.cc:10:0:
/home/navid/DynaSLAM/include/Frame.h:128:10: warning: ‘ORB_SLAM2::Frame::mIsKeyFrame’ will be initialized after [-Wreorder]
bool mIsKeyFrame;
^
/home/navid/DynaSLAM/include/Frame.h:127:13: warning: ‘cv::Mat ORB_SLAM2::Frame::mImDepth’ [-Wreorder]
cv::Mat mImDepth;
^
/home/navid/DynaSLAM/src/Frame.cc:236:1: warning: when initialized here [-Wreorder]
Frame::Frame(const cv::Mat &imGray, const cv::Mat &imDepth, const cv::Mat &imMask, const cv::Mat &imRGB,
^
/home/navid/DynaSLAM/src/Geometry.cc: In member function ‘std::vectorDynaSLAM::Geometry::DynKeyPoint DynaSLAM::Geometry::ExtractDynPoints(const std::vector<ORB_SLAM2::Frame>&, const ORB_SLAM2::Frame&)’:
/home/navid/DynaSLAM/src/Geometry.cc:337:21: warning: unused variable ‘xIndex’ [-Wunused-variable]
int xIndex = minIdx.x;
^
/home/navid/DynaSLAM/src/Geometry.cc: In member function ‘cv::Mat DynaSLAM::Geometry::RegionGrowing(const cv::Mat&, int&, int&, const float&)’:
/home/navid/DynaSLAM/src/Geometry.cc:1045:45: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
while(pixdist < reg_maxdist && reg_size < im.total())
^
CMakeFiles/Makefile2:178: recipe for target 'CMakeFiles/DynaSLAM.dir/all' failed
make[1]: *** [CMakeFiles/DynaSLAM.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
Please help me to solve....