3 #include <opencv2/core/core.hpp>
4 #include <opencv2/highgui/highgui.hpp>
5 #include <opencv2/features2d/features2d.hpp>
6 #include <opencv2/imgproc/imgproc.hpp>
13 const cv::Mat& intrinsic,
53 float xAngRAD = 0.0f, yAngRAD = 0.0f, zAngRAD = 0.0f;
68 std::vector<cv::Point2f> _lastRealGoodPts;
69 std::vector<cv::Point2f> _currRealGoodPts;
77 cv::Point2f r(2.f, 2.f);
78 for (
unsigned int i = 0; i < _lastRealGoodPts.size(); i++)
80 cv::Point2f p1 = _lastRealGoodPts[i] * scaleToGray;
81 cv::Point2f p2 = _currRealGoodPts[i] * scaleToGray;
82 cv::line(imageRgb, p1, p2, cv::Scalar(0, 255, 0));
83 cv::rectangle(imageRgb, (p1 - r) * scaleToGray, (p1 + r) * scaleToGray, CV_RGB(255, 0, 0));
87 cv::Mat Rx, Ry, Rz, Tcw;
113 const cv::Mat& intrinsic,
153 float xAngRAD, yAngRAD, zAngRAD;
160 std::vector<cv::Point2f> _lastRealGoodPts;
161 std::vector<cv::Point2f> _currRealGoodPts;
169 cv::Point2f r(2.f, 2.f);
170 for (
unsigned int i = 0; i < _lastRealGoodPts.size(); i++)
172 cv::Point2f p1 = _lastRealGoodPts[i] * scaleToGray;
173 cv::Point2f p2 = _currRealGoodPts[i] * scaleToGray;
174 cv::line(imageRgb, p1, p2, cv::Scalar(0, 255, 0));
175 cv::rectangle(imageRgb, (p1 - r) * scaleToGray, (p1 + r) * scaleToGray, CV_RGB(255, 0, 0));
179 cv::Mat Rx, Ry, Rz, Tcw;
std::vector< cv::Point2f > _lastGoodPts
std::vector< cv::KeyPoint > _lastKeyPts
std::vector< cv::Point2f > _currPts
bool findCameraOrientationDifferenceF2FHorizon(const SLVec3f &horizon, cv::Mat imageGray, cv::Mat &imageRgb, const cv::Mat &intrinsic, float scaleToGray, bool decorate)
std::vector< cv::Point2f > _lastPts
std::vector< uchar > _inliers
std::vector< cv::Point2f > _currGoodPts
bool findCameraOrientationDifferenceF2F(cv::Mat imageGray, cv::Mat &imageRgb, const cv::Mat &intrinsic, float scaleToGray, bool decorate)
std::vector< float > _err
static const float RAD2DEG
void log(const char *tag, const char *format,...)
logs a formatted string platform independently