-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflycounter.h
More file actions
43 lines (34 loc) · 903 Bytes
/
flycounter.h
File metadata and controls
43 lines (34 loc) · 903 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
36
37
38
39
40
41
42
43
#ifndef FLYCOUNTER_H
#define FLYCOUNTER_H
#include "vials.h"
#include <opencv2/opencv.hpp>
typedef std::vector<Color> Colors;
class FlyCounter
{
protected:
int epsilon;
int minPoints;
int numberOfFlies;
int pixelsPerFly;
int threshold;
public:
FlyCounter();
/* External API */
int count(const cv::Mat& img, Vials& vials);
cv::Mat generateThresholdImage(const cv::Mat& img);
cv::Mat generateClusterImage(const cv::Mat& thresh, Vials &vials);
int countFlies(const cv::Mat & threshImg, Vials &vials);
/* Getters */
int getEpsilon();
int getMinPoints();
int getPixelsPerFly();
int getThreshold();
/* Setters */
void setEpsilon(int value);
void setMinPoints(int value);
void setPixelsPerFly(int value);
void setThreshold(int value);
/* Color Map */
static Colors COLORS;
};
#endif // FLYCOUNTER_H