Rev 3 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3 | Rev 5 | ||
---|---|---|---|
1 | /*------------------------------------------------------------------------------------------*\
|
1 | /*------------------------------------------------------------------------------------------*\
|
2 | This file contains material supporting chapter 1 of the cookbook:
|
2 | This file contains material supporting chapter 1 of the cookbook:
|
3 | Computer Vision Programming using the OpenCV Library.
|
3 | Computer Vision Programming using the OpenCV Library.
|
4 | by Robert Laganiere, Packt Publishing, 2011.
|
4 | by Robert Laganiere, Packt Publishing, 2011.
|
5 | 5 | ||
6 | This program is free software; permission is hereby granted to use, copy, modify,
|
6 | This program is free software; permission is hereby granted to use, copy, modify,
|
7 | and distribute this source code, or portions thereof, for any purpose, without fee,
|
7 | and distribute this source code, or portions thereof, for any purpose, without fee,
|
8 | subject to the restriction that the copyright notice may not be removed
|
8 | subject to the restriction that the copyright notice may not be removed
|
9 | or altered from any source or altered source distribution.
|
9 | or altered from any source or altered source distribution.
|
10 | The software is released on an as-is basis and without any warranties of any kind.
|
10 | The software is released on an as-is basis and without any warranties of any kind.
|
11 | In particular, the software is not guaranteed to be fault-tolerant or free from failure.
|
11 | In particular, the software is not guaranteed to be fault-tolerant or free from failure.
|
12 | The author disclaims all warranties with regard to this software, any use,
|
12 | The author disclaims all warranties with regard to this software, any use,
|
13 | and any consequent failure, is purely the responsibility of the user.
|
13 | and any consequent failure, is purely the responsibility of the user.
|
14 |
|
14 |
|
15 | Copyright (C) 2010-2011 Robert Laganiere, www.laganiere.name
|
15 | Copyright (C) 2010-2011 Robert Laganiere, www.laganiere.name
|
16 | \*------------------------------------------------------------------------------------------*/
|
16 | \*------------------------------------------------------------------------------------------*/
|
17 | #ifndef MAINWINDOW_H
|
17 | #ifndef MAINWINDOW_H
|
18 | #define MAINWINDOW_H
|
18 | #define MAINWINDOW_H
|
19 | 19 | ||
20 | #include <QtGui/QMainWindow>
|
20 | #include <QtGui/QMainWindow>
|
21 | #include <QFileDialog>
|
21 | #include <QFileDialog>
|
22 | #include <opencv2/core/core.hpp>
|
22 | #include <opencv2/core/core.hpp>
|
23 | #include <opencv2/highgui/highgui.hpp>
|
23 | #include <opencv2/highgui/highgui.hpp>
|
- | 24 | #include <opencv2/imgproc/imgproc.hpp>
|
|
24 | 25 | ||
25 | namespace Ui
|
26 | namespace Ui
|
26 | {
|
27 | {
|
27 | class MainWindow; |
28 | class MainWindow; |
28 | }
|
29 | }
|
29 | 30 | ||
30 | class MainWindow : public QMainWindow |
31 | class MainWindow : public QMainWindow |
31 | {
|
32 | {
|
32 | Q_OBJECT |
33 | Q_OBJECT |
33 | 34 | ||
34 | public: |
35 | public: |
35 | MainWindow(QWidget *parent = 0); |
36 | MainWindow(QWidget *parent = 0); |
36 | ~MainWindow(); |
37 | ~MainWindow(); |
37 | 38 | ||
38 | private: |
39 | private: |
39 | Ui::MainWindow *ui; |
40 | Ui::MainWindow *ui; |
40 | cv::Mat image; // the image variable |
41 | cv::Mat image; // the image variable |
41 | 42 | ||
42 | private slots: |
43 | private slots: |
43 | void on_pushButton_2_clicked(); |
44 | void on_pushButton_2_clicked(); |
44 | void on_pushButton_clicked(); |
45 | void on_pushButton_clicked(); |
45 | }; |
46 | }; |
46 | 47 | ||
47 | #endif // MAINWINDOW_H
|
48 | #endif // MAINWINDOW_H
|
48 | 49 |