tum-vision / fastfusion

Volumetric 3D Mapping in Real-Time on a CPU
GNU General Public License v2.0
559 stars 173 forks source link

error in make phase #30

Open GuangfuWang opened 4 years ago

GuangfuWang commented 4 years ago

when i try to run make cmd in Ubuntu 16.04,the following errors are shown. I do not know why this happen. My OpenCV version is 3.4.8 /home/ubuntu/fastfusion/src/auxiliary/plywriter.cpp: In function ‘bool writePLYBinary(const string&, const cv::Mat&, cv::Mat, const cv::Mat&, const cv::Mat&)’: /home/ubuntu/fastfusion/src/auxiliary/plywriter.cpp:172:63: error: ‘type’ is not a member of ‘cv::DataType<cv::Vec<float, 3> >’ cv::Mat _posImage(disparityImage.rows,disparityImage.cols,cv::DataType<cv:: ^ /home/ubuntu/fastfusion/src/auxiliary/plywriter.cpp: In function ‘bool writePLY(const string&, const cv::Mat&, cv::Mat, const cv::Mat&, const cv::Mat&)’: /home/ubuntu/fastfusion/src/auxiliary/plywriter.cpp:380:63: error: ‘type’ is not a member of ‘cv::DataType<cv::Vec<float, 3> >’

sachinkum0009 commented 4 years ago

Same error on my Ubuntu 16.04. Does anyone has solution for it?

greatwallet commented 4 years ago

Add #define OPENCV_TRAITS_ENABLE_DEPRECATED in fastfusion/src/auxiliary/plywriter.h before #include<opencv2/opencv.hpp> should work.

If similar error happens afterwards in another file, do the same thing in the corresponding header file.