-
Notifications
You must be signed in to change notification settings - Fork 0
/
Drop.h
61 lines (54 loc) · 1.1 KB
/
Drop.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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#pragma once
#include <vector>
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/opencv.hpp"
using namespace cv;
using namespace std;
class Drop
{
public:
Drop(void){
Drop::have_drop = false;
};
~Drop(void){};
int getXPos(){
return Drop::xPos;
};
int getYPos(){
return Drop::yPos;
};
Point2i getPos(){
return Drop::pos;
};
double getArea(){
return Drop::area;
};
double getPeri(){
return Drop::peri;
};
Rect getRect(){
return Drop::objBoundingRect;
};
vector<Point> getContour(){
return Drop::contour;
};
void setPara(Point2i pos, int x, int y, double area, double perimeter, vector<Point> contour, Rect objBoundingRect){
Drop::xPos = x;
Drop::yPos = y;
Drop::area = area;
Drop::peri = perimeter;
Drop::contour = contour;
Drop::pos = pos;
Drop::objBoundingRect = objBoundingRect;
};
bool have_drop;
//void haveDrop();
//bool checkDrop();
private:
int xPos, yPos;
Point2i pos;
double area, peri;
vector< Point > contour;
Rect objBoundingRect;
};