-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathanalyse.h
52 lines (47 loc) · 1.37 KB
/
analyse.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
#ifndef ANALYSE_H
#define ANALYSE_H
#include <QMainWindow>
#include <QDebug>
#include <QFileDialog>
#include <highgui.h>
#include <cv.h>
#include <QMessageBox>
#include <QFile>
#include <QTextStream>
#include <iostream>
#include <array>
#include <ml.h>
#include <vector>
#include <stdexcept>
#include <algorithm>
#include <iterator>
using std::cout;
using std::array;
using std::endl;
using std::vector;
class analyse
{
public:
analyse();
static vector<IplImage *> process(IplImage* img, bool debug = false);
static int analyseV(IplImage* img);
static IplImage* analyseHist(IplImage* channel, int *ptr_max_index);
static IplImage* splictB(const IplImage *img);
static IplImage* splictS(const IplImage *img);
static IplImage* splictG(const IplImage *img);
static void formIE(const IplImage *Is, IplImage *Ig, IplImage *IE, int T);
static void fillHole(IplImage* hole);
static int Otsu(IplImage* src);
static int Otsu2(IplImage* src);
inline static void showImg(IplImage* img, char *s);
static IplImage* analyseCoutours(IplImage* img);
static IplImage* flood(IplImage* img, IplImage* im, int &isalot);
static IplImage* cvtIm2Waterseed(IplImage* img);
static cv::Mat water(IplImage* BW2, IplImage* imcopy);
};
inline void analyse::showImg(IplImage *img, char *s)
{
cvNamedWindow(s, 0);
cvShowImage(s, img);
}
#endif // ANALYSE_H