Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: no matching function for call to ‘format(cv::Mat&, const char [4])’ #32

Open
loseyourself-gan opened this issue Mar 11, 2021 · 1 comment

Comments

@loseyourself-gan
Copy link

/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 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 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

@HeYijia
Copy link
Owner

HeYijia commented Mar 31, 2021

I fixed the bug and tested with opencv3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants