The original SVO cannot been used for live camera.(It’s too difficult to rearrange its code for live camera with plain cmake, and with ROS the program always crashed.)
So we choose the improved version svo_edgelet. But it is base on OpenCV 2.4.X, when using OpenCV 3.4.X the compiling error occurs. We don’t considered using OpenCV 2.4.X as a good solution, so we make some changes to the code to adapt it to OpenCV 3.4.X.
We need to modify the following four places.
-
In feature_detection.cpp line28, change
cv::format(data,"CSV")
tocv::format(data,cv::Formatter::FMT_CSV)
, according to this qiita page. -
In precomp.hpp line52, delete
#include "opencv2/core/internal.hpp"
and add#include "opencv2/opencv.hpp"
. -
In five-point.cpp, there is outdated using of transforming
CvMat*
toMat
. Change all thecv::Mat(CvMat*)
format intocv::cvarrToMat(CvMat*)
, according to this stackoverflow page or this csdn blog. -
In modelest.cpp line191, according to this stackoverflow page. The
CV_IMPLEMENT_QSORT
function is out of date, so we can change it into
static void icvSortDistances(int *array, size_t total, int)
{
std::sort(&array[0], &array[total]);
}
Also you can directly git clone https://github.com/feketerigo96/feketerigo96.github.io.git