AddObjectDialog.h
Go to the documentation of this file.
1 /*
2 Copyright (c) 2011-2014, Mathieu Labbe - IntRoLab - Universite de Sherbrooke
3 All rights reserved.
4 
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions are met:
7  * Redistributions of source code must retain the above copyright
8  notice, this list of conditions and the following disclaimer.
9  * Redistributions in binary form must reproduce the above copyright
10  notice, this list of conditions and the following disclaimer in the
11  documentation and/or other materials provided with the distribution.
12  * Neither the name of the Universite de Sherbrooke nor the
13  names of its contributors may be used to endorse or promote products
14  derived from this software without specific prior written permission.
15 
16 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
17 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
20 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27 
28 #ifndef ADDOBJECTDIALOG_H_
29 #define ADDOBJECTDIALOG_H_
30 
31 #include <QDialog>
32 #include <QtCore/QTimer>
33 #include <opencv2/features2d/features2d.hpp>
34 #include <opencv2/core/core.hpp>
35 
36 class Ui_addObjectDialog;
37 
38 namespace find_object {
39 
40 class ObjWidget;
41 class Camera;
42 class KeypointItem;
43 class Feature2D;
44 class ObjSignature;
45 
46 class AddObjectDialog : public QDialog {
47 
48  Q_OBJECT
49 
50 public:
51  AddObjectDialog(Camera * camera, const cv::Mat & image, bool mirrorView, QWidget * parent = 0, Qt::WindowFlags f = 0);
52  virtual ~AddObjectDialog();
53 
54  // ownership transferred to caller
55  void retrieveObject(ObjWidget ** widget, ObjSignature ** signature);
56 
57 private Q_SLOTS:
58  void update(const cv::Mat &);
59  void next();
60  void back();
61  void cancel();
62  void takePicture();
63  void updateNextButton();
64  void updateNextButton(const cv::Rect &);
65  void changeSelectionMode();
66 
67 protected:
68  virtual void closeEvent(QCloseEvent* event);
69 
70 private:
71  void setState(int state);
72  cv::Rect computeROI(const std::vector<cv::KeyPoint> & kpts);
73 private:
74  Ui_addObjectDialog * ui_;
78  cv::Mat cameraImage_;
79  cv::Rect roi_;
82 
84  int state_;
85 };
86 
87 } // namespace find_object
88 
89 #endif /* ADDOBJECTDIALOG_H_ */
Ui_addObjectDialog * ui_
void update(const cv::Mat &)
f
virtual void closeEvent(QCloseEvent *event)
AddObjectDialog(Camera *camera, const cv::Mat &image, bool mirrorView, QWidget *parent=0, Qt::WindowFlags f=0)
cv::Rect computeROI(const std::vector< cv::KeyPoint > &kpts)
void retrieveObject(ObjWidget **widget, ObjSignature **signature)


find_object_2d
Author(s): Mathieu Labbe
autogenerated on Mon Jun 10 2019 13:21:31