cannot compile vision_utils
followed the steps as described in the README file.
However make
ends with an error :
In file included from /usr/include/c++/4.8/algorithm:62:0,
from /home/datchuth/local_libs/vision_utils/src/vision_utils.h:18,
from /home/datchuth/local_libs/vision_utils/src/vision_utils.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h: In instantiation of ‘_RandomAccessIterator std::__unguarded_partition(_RandomAccessIterator, _RandomAccessIterator, const _Tp&, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<cv::KeyPoint*, std::vector<cv::KeyPoint> >; _Tp = cv::KeyPoint; _Compare = vision_utils::retainBest(KeyPointVector&, int)::__lambda1]’:
/usr/include/c++/4.8/bits/stl_algo.h:2296:78: required from ‘_RandomAccessIterator std::__unguarded_partition_pivot(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<cv::KeyPoint*, std::vector<cv::KeyPoint> >; _Compare = vision_utils::retainBest(KeyPointVector&, int)::__lambda1]’
/usr/include/c++/4.8/bits/stl_algo.h:2394:62: required from ‘void std::__introselect(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<cv::KeyPoint*, std::vector<cv::KeyPoint> >; _Size = long int; _Compare = vision_utils::retainBest(KeyPointVector&, int)::__lambda1]’
/usr/include/c++/4.8/bits/stl_algo.h:5427:44: required from ‘void std::nth_element(_RAIter, _RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<cv::KeyPoint*, std::vector<cv::KeyPoint> >; _Compare = vision_utils::retainBest(KeyPointVector&, int)::__lambda1]’
/home/datchuth/local_libs/vision_utils/src/vision_utils.cpp:211:85: required from here
/usr/include/c++/4.8/bits/stl_algo.h:2263:35: error: no match for call to ‘(vision_utils::retainBest(KeyPointVector&, int)::__lambda1) (cv::KeyPoint&, const cv::KeyPoint&)’
while (__comp(*__first, __pivot))
^
/home/datchuth/local_libs/vision_utils/src/vision_utils.cpp:211:14: note: candidates are:
[](cv::KeyPoint& a, cv::KeyPoint& b) { return a.response > b.response; });
^
In file included from /usr/include/c++/4.8/algorithm:62:0,
from /home/datchuth/local_libs/vision_utils/src/vision_utils.h:18,
from /home/datchuth/local_libs/vision_utils/src/vision_utils.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:2263:35: note: bool (*)(cv::KeyPoint&, cv::KeyPoint&) <conversion>
while (__comp(*__first, __pivot))
^
/usr/include/c++/4.8/bits/stl_algo.h:2263:35: note: candidate expects 3 arguments, 3 provided
/home/datchuth/local_libs/vision_utils/src/vision_utils.cpp:211:48: note: vision_utils::retainBest(KeyPointVector&, int)::__lambda1
[](cv::KeyPoint& a, cv::KeyPoint& b) { return a.response > b.response; });
^
/home/datchuth/local_libs/vision_utils/src/vision_utils.cpp:211:48: note: no known conversion for argument 2 from ‘const cv::KeyPoint’ to ‘cv::KeyPoint&’
In file included from /usr/include/c++/4.8/algorithm:62:0,
from /home/datchuth/local_libs/vision_utils/src/vision_utils.h:18,
from /home/datchuth/local_libs/vision_utils/src/vision_utils.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:2266:34: error: no match for call to ‘(vision_utils::retainBest(KeyPointVector&, int)::__lambda1) (const cv::KeyPoint&, cv::KeyPoint&)’
while (__comp(__pivot, *__last))
^
/home/datchuth/local_libs/vision_utils/src/vision_utils.cpp:211:14: note: candidates are:
[](cv::KeyPoint& a, cv::KeyPoint& b) { return a.response > b.response; });
^
In file included from /usr/include/c++/4.8/algorithm:62:0,
from /home/datchuth/local_libs/vision_utils/src/vision_utils.h:18,
from /home/datchuth/local_libs/vision_utils/src/vision_utils.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:2266:34: note: bool (*)(cv::KeyPoint&, cv::KeyPoint&) <conversion>
while (__comp(__pivot, *__last))
^
/usr/include/c++/4.8/bits/stl_algo.h:2266:34: note: candidate expects 3 arguments, 3 provided
/home/datchuth/local_libs/vision_utils/src/vision_utils.cpp:211:48: note: vision_utils::retainBest(KeyPointVector&, int)::__lambda1
[](cv::KeyPoint& a, cv::KeyPoint& b) { return a.response > b.response; });
^
/home/datchuth/local_libs/vision_utils/src/vision_utils.cpp:211:48: note: no known conversion for argument 1 from ‘const cv::KeyPoint’ to ‘cv::KeyPoint&’
Any idea of how I could solve this ?
Thanks for the help !
Edited by Dinesh Atchuthan