-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathHistogram.h
More file actions
27 lines (21 loc) · 716 Bytes
/
Histogram.h
File metadata and controls
27 lines (21 loc) · 716 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
#ifndef Histogram_H_
#define Histogram_H_
#include <iostream>
#include <vector>
using namespace std;
#include "Image.h"
class Histogram {
private:
vector<int> histogram;
int resolution;
int considerationFactor; // Effects number of thresholds found
public:
// Smoothness factor smoothens the histogram
Histogram(Image const &I1, int smooth_factor = 3,
int considerationFactor = 10);
void renderHistogram(char const *fileName); // Draws the histogram
vector<int> getDistribution(); // returns a vector of histogram
vector<int> findThresholds(); // Finds and returns thresholds, effected by
// smoothness and considerationFactor
};
#endif