-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmorphological.h
45 lines (37 loc) · 968 Bytes
/
morphological.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
#ifndef MORPHOLOGICAL_H
#define MORPHOLOGICAL_H
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
using namespace cv;
#include <QDialog>
namespace Ui {
class morphological;
}
class morphological : public QDialog
{
Q_OBJECT
public:
explicit morphological(QWidget *parent = 0);
~morphological();
Mat morpho_image;
morphological* get_currentui();
void show_picture();
Mat getEdges(Mat morpho_image);
void applyThreshold(cv::Mat& result);
void set_threshold(int thres);
Mat getCorners(const cv::Mat &image);
void drawOnImage(const cv::Mat& binary,cv::Mat& image);
private slots:
void on_comboBox_activated(int index);
private:
Ui::morphological *ui;
// threshold to produce binary image
int threshold;
// structuring elements used in corner detection
Mat cross;
Mat diamond;
Mat square;
Mat x;
};
#endif // MORPHOLOGICAL_H