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.
39 lines
1.2 KiB
C
39 lines
1.2 KiB
C
|
5 years ago
|
#ifndef cvdrawutils_h__
|
||
|
|
#define cvdrawutils_h__
|
||
|
|
|
||
|
|
#include <opencv2/opencv.hpp>
|
||
|
|
#include <opencv2/opencv_modules.hpp>
|
||
|
|
#include <vector>
|
||
|
|
#include "pointpair.h"
|
||
|
|
|
||
|
|
using std::vector;
|
||
|
|
using namespace cv;
|
||
|
|
|
||
|
|
Scalar getRandomColor();
|
||
|
|
|
||
|
|
Mat getColorCanvas(const Mat& img, float resizeFactor = 1.);
|
||
|
|
|
||
|
|
Mat drawPoints(const Mat& img, const vector<Point>& pointVec, int grayVal = 255, int xRadius = 0, int yRadius = 0);
|
||
|
|
|
||
|
|
Mat drawPointsWithKeyPoints(const Mat& img, const vector<Point>& pointVec);
|
||
|
|
|
||
|
|
Mat drawLines(const Mat& img, const vector<PointfPair>& segPointVec);
|
||
|
|
|
||
|
|
Mat drawLines(const Mat& img, const vector<PointPair>& segPointVec);
|
||
|
|
|
||
|
|
void drawLine(Mat& canvas, const Vec4f& l, const Scalar& color);
|
||
|
|
|
||
|
|
void drawPoint(Mat& canvas, int x, int y, const Scalar& color, int size = 1);
|
||
|
|
|
||
|
|
void drawRotateRect(Mat& canvas, const RotatedRect& rr, const Scalar& color, int angleLen = 30);
|
||
|
|
|
||
|
|
Mat highlightRoi(const Mat& roiImg, const Rect& r, const vector<Point2f>& roiVertexes);
|
||
|
|
|
||
|
|
void drawPointDir(Mat& canvas, const Point& p, float angle, const Scalar& color,
|
||
|
|
const Scalar& centerColor, int len = 5, int thick = 1);
|
||
|
|
|
||
|
|
void drawPatternPose(Mat& canvas, const Size& templateSize, const Vec4f& pose, const Scalar& color);
|
||
|
|
|
||
|
|
|
||
|
|
#endif // cvdrawutils_h__
|