Subversion Repositories OpenCV2-Cookbook

Rev

Rev 3 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
3 PointedEar 1
/*------------------------------------------------------------------------------------------*\
2
   This file contains material supporting chapter 3 of the cookbook:  
3
   Computer Vision Programming using the OpenCV Library.
4
   by Robert Laganiere, Packt Publishing, 2011.
5
 
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,
8
   subject to the restriction that the copyright notice may not be removed
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.
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,
13
   and any consequent failure, is purely the responsibility of the user.
14
 
15
   Copyright (C) 2010-2011 Robert Laganiere, www.laganiere.name
16
\*------------------------------------------------------------------------------------------*/
17
 
18
#ifndef MAINWINDOW_H
19
#define MAINWINDOW_H
20
 
21
#include <QMainWindow>
22
#include <QFileDialog>
23
#include <QColorDialog>
24
 
25
//OpenCV
5 PointedEar 26
#include <opencv/cv.h>
27
#include <opencv/highgui.h>
3 PointedEar 28
 
29
//color detector, controller
30
#include "colorDetectController.h"
31
#include "colordetector.h"
32
 
33
namespace Ui {
34
    class MainWindow;
35
}
36
 
37
class MainWindow : public QMainWindow {
38
    Q_OBJECT
39
public:
40
    MainWindow(QWidget *parent = 0);
41
    ~MainWindow();
42
 
43
protected:
44
    void changeEvent(QEvent *e);
45
    void displayMat(const cv::Mat& img);
46
 
47
    //Main Image
48
    //cv::Mat img_mat;
49
 
50
private:
51
    Ui::MainWindow *ui;
52
 
53
private slots:
54
    void on_pushButton_color_clicked();
55
    void processColorDetection();
56
    void on_verticalSlider_Threshold_valueChanged(int value);
57
 
58
    void setColor();
59
    void setImage();
60
 
61
 
62
};
63
 
64
#endif // MAINWINDOW_H