You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
770 B
C

4 years ago
#ifndef PagicUtils_h__
#define PagicUtils_h__
#include <vector>
#include <opencv2/opencv.hpp>
using std::vector;
using namespace cv;
#define M_LOW_TOLERANCE 0.000001
#define M_TOLERANCE 0.00001
#define M_HIGHT_TOLERANCE 0.0001
namespace pagic
{
double distance(const vector<Point2d>& tarPosVec, const vector<Point2d>& tempPosVec);
void xmirror(vector<Point2d>& vec);
void ymirror(vector<Point2d>& vec);
void resample(vector<Point2d>& tarPosVec, int n);
double pathLength(const vector<Point2d>& posVec);
Point2d lerpWeight(Point2d p0, Point2d p1, double w);
Point2d lerpDis(Point2d p0, Point2d p1, double d);
void resample(vector<Point2d>& posVec,
const vector<int>& cornerIdxVec,
const vector<int>& segmentSampleNumVec);
}
#endif // PagicUtils_h__