-
Notifications
You must be signed in to change notification settings - Fork 3
/
Car.hpp
32 lines (23 loc) · 800 Bytes
/
Car.hpp
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
#pragma once
#include <iostream>
#include <string>
#include <opencv2/opencv.hpp>
using namespace cv;
using namespace std;
class Car
{
private:
Rect r;
Mat im;
double v;
double ts; //TimeStamp: Last update time
public:
Car(Rect re, Mat i, double t) : r(re), im(i(re)), v(0), ts(t) {};
Car& operator=(const Car& c);
int area();
Point2f pos();
double velocity();
void plot(Mat& f, int);
bool onScene(Mat& f, double time);
bool match(Car& c); //Assume function is being called from the 'newest' car.
};