-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathImageProcessor.hpp
More file actions
35 lines (31 loc) · 894 Bytes
/
Copy pathImageProcessor.hpp
File metadata and controls
35 lines (31 loc) · 894 Bytes
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
28
29
30
31
32
33
34
35
#ifndef IMAGE_PROCESSOR_HPP
#define IMAGE_PROCESSOR_HPP
#include<opencv2/opencv.hpp>
#include<iostream>
class ImageProcessor {
private:
cv::BackgroundSubtractorMOG2 bg;
cv::Mat lambda; //used to get changes in perspective
cv::Mat frame;
public:
ImageProcessor();
~ImageProcessor();
cv::Mat AcquireForeground(cv::Mat &frame);
void PrintText(cv::Mat &frame, std::string text, cv::Point position);
void InsertInterestArea(cv::Mat &frame, cv::Rect interestArea);
void PrepareFrame(cv::Mat &frame,
cv::Rect cropArea,
cv::Point2f p0,
cv::Point2f p1,
cv::Point2f p2,
cv::Point2f p3);
void RotateImage(cv::Mat &frame);
protected:
void PerspectiveTransform(cv::Mat &frame,
cv::Point2f p0,
cv::Point2f p1,
cv::Point2f p2,
cv::Point2f p3);
void CropImage(cv::Mat &frame, cv::Rect cropArea);
};
#endif