svo_edgelet
svo_edgelet copied to clipboard
error: no matching function for call to ‘format(cv::Mat&, const char [4])’
/home/ubuntu/svo_edgelet-master/src/feature_detection.cpp: In function ‘void svo::feature_detection::saveMatToCsv(cv::Mat, std::string)’: /home/ubuntu/svo_edgelet-master/src/feature_detection.cpp:28:39: error: no matching function for call to ‘format(cv::Mat&, const char [4])’ 28 | outputFile <<cv::format(data,"CSV")<<endl; | ^ In file included from /usr/local/include/opencv4/opencv2/core.hpp:3302, from /usr/local/include/opencv4/opencv2/opencv.hpp:52, from /home/ubuntu/svo_edgelet-master/include/svo/global.h:28, from /home/ubuntu/svo_edgelet-master/include/svo/feature_detection.h:20, from /home/ubuntu/svo_edgelet-master/src/feature_detection.cpp:17: /usr/local/include/opencv4/opencv2/core/operations.hpp:430:19: note: candidate: ‘cv::String cv::format(const char*, ...)’ 430 | CV_EXPORTS String format( const char* fmt, ... ) CV_FORMAT_PRINTF(1, 2); | ^~~~~~ /usr/local/include/opencv4/opencv2/core/operations.hpp:430:39: note: no known conversion for argument 1 from ‘cv::Mat’ to ‘const char*’ 430 | CV_EXPORTS String format( const char* fmt, ... ) CV_FORMAT_PRINTF(1, 2); | ~~~~~~~~~~~~^~~ /usr/local/include/opencv4/opencv2/core/operations.hpp:435:16: note: candidate: ‘cv::Ptrcv::Formatted cv::format(cv::InputArray, cv::Formatter::FormatType)’ 435 | Ptr<Formatted> format(InputArray mtx, Formatter::FormatType fmt) | ^~~~~~ /usr/local/include/opencv4/opencv2/core/operations.hpp:435:61: note: no known conversion for argument 2 from ‘const char [4]’ to ‘cv::Formatter::FormatType’ 435 | Ptr<Formatted> format(InputArray mtx, Formatter::FormatType fmt) | ~~~~~~~~~~~~~~~~~~~~~~^~~ /home/ubuntu/svo_edgelet-master/src/feature_detection.cpp: In member function ‘virtual void svo::feature_detection::EdgeDetector::detect(svo::Frame*, const ImgPyr&, double, svo::Features&)’: /home/ubuntu/svo_edgelet-master/src/feature_detection.cpp:545:15: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vectorsvo::feature_detection::Edgelete::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 545 | int a = (n>edge_list.size())? edge_list.size():n; | ~^~~~~~~~~~~~~~~~~ make[2]: *** [CMakeFiles/svo.dir/build.make:303:CMakeFiles/svo.dir/src/feature_detection.cpp.o] 错误 1 make[1]: *** [CMakeFiles/Makefile2:179:CMakeFiles/svo.dir/all] 错误 2 make: *** [Makefile:84:all] 错误 2
I fixed the bug and tested with opencv3.