-
Notifications
You must be signed in to change notification settings - Fork 7
/
RR_Lib.h
27 lines (27 loc) · 1.54 KB
/
RR_Lib.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include "opencv2/opencv.hpp"
namespace RRLib {
//----------------------------------------------
// Check if rotated box contained in image region
//----------------------------------------------
bool boxInRange(cv::Mat& img, cv::RotatedRect& r);
//----------------------------------------------
// Check if rotated box contained in rectangular region
//----------------------------------------------
bool boxInRange(cv::Rect r, cv::RotatedRect& rr);
//----------------------------------------------------------
// Extracts rotated region and returns it as dst image
//----------------------------------------------------------
void getRotRectImg(cv::RotatedRect rr, cv::Mat &img, cv::Mat& dst);
//----------------------------------------------------------
// Copies image region (src_roi) from src image, to rotated region on image dst
//----------------------------------------------------------
void copyToRotRectImg(cv::Rect src_roi, cv::RotatedRect rr, cv::Mat &src, cv::Mat& dst);
//----------------------------------------------------------
// Copies image src, to rotated region on image dst
//----------------------------------------------------------
void copyToRotRectImg(cv::RotatedRect rr, cv::Mat &src, cv::Mat& mask, cv::Mat& dst);
//----------------------------------------------------------
// Draws rotated rectangle
//----------------------------------------------------------
void drawRR(cv::Mat &img, cv::RotatedRect rr, cv::Scalar color, int width);
}