-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFarbe.h
50 lines (37 loc) · 902 Bytes
/
Farbe.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
/*
* Farbe.h
*
* Created on: 01.02.2013
* Author: tmd
*/
#ifndef FARBE_H_
#define FARBE_H_
#include <stdio.h>
#include <iostream>
#include "opencv2/core/core.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/highgui/highgui.hpp"
using namespace std;
using namespace cv;
class Farbe{
public:
Farbe(); // DefaultKonstruktor;
Farbe(Mat img, Mat maske); // führt HSV-Transformation durch
virtual ~Farbe(); // DefaultDestruktor
void setFarbeHistogram(Mat img, Mat maske);
MatND getFarbeHistogram();
private:
// Variablen für die Berechnung der Histogramme
//int channels[2] = { 0, 1 };
int channels[2];
// Anzahl der bins für Hue und Saturation
int h_bins;
int s_bins;
int histSize[2];
// Werte, die die Farben annehmen können
float h_ranges[2];
float s_ranges[2];
const float* ranges[2];
MatND histogram;
};
#endif /* FARBE_H_ */