-
Notifications
You must be signed in to change notification settings - Fork 0
/
ImageProcessor.h
41 lines (29 loc) · 1.12 KB
/
ImageProcessor.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
#ifndef IMAGE_PROCESSOR_H
#define IMAGE_PROCESSOR_H
#include "WPILib.h"
#include "Vision/RGBImage.h"
#include "Vision/BinaryImage.h"
class ImageProcessor {
public:
typedef enum {
GREEN,
BLUE
} simple_threshold;
ImageProcessor();
virtual ~ImageProcessor();
BinaryImage * Process(ColorImage * image);
BinaryImage * GetThresholdImage() const;
BinaryImage * GetConvexHullImage() const;
BinaryImage * GetFilteredImage() const;
void SetThreshold(const Threshold &threshold);
void SetThreshold(simple_threshold threshold);
void SetParticleCriteria(const ParticleFilterCriteria2 &particleCriteria);
void WriteImages(const char * baseFilename) const;
private:
BinaryImage * thresholdImage;
BinaryImage * convexHullImage;
BinaryImage * filteredImage;
Threshold threshold;
ParticleFilterCriteria2 particleCriteria;
};
#endif /* IMAGE_PROCESSOR_H */