mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 09:30:25 +08:00
merged attention branch to trunk
git-svn-id: http://rtabmap.googlecode.com/svn/trunk/rtabmap@657 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
82
guilib/include/rtabmap/gui/DatabaseViewer.h
Normal file
82
guilib/include/rtabmap/gui/DatabaseViewer.h
Normal file
@@ -0,0 +1,82 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2011, Mathieu Labbe and IntRoLab - Universite de Sherbrooke
|
||||
*
|
||||
* This file is part of RTAB-Map.
|
||||
*
|
||||
* RTAB-Map is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* RTAB-Map is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with RTAB-Map. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef DATABASEVIEWER_H_
|
||||
#define DATABASEVIEWER_H_
|
||||
|
||||
#include "rtabmap/core/RtabmapExp.h" // DLL export/import defines
|
||||
|
||||
#include <QtGui/QMainWindow>
|
||||
#include <QtCore/QByteArray>
|
||||
#include <QtCore/QMap>
|
||||
#include <QtCore/QSet>
|
||||
#include <QtGui/QImage>
|
||||
#include <opencv2/core/core.hpp>
|
||||
#include <opencv2/features2d/features2d.hpp>
|
||||
#include <set>
|
||||
|
||||
class Ui_DatabaseViewer;
|
||||
class QGraphicsScene;
|
||||
class QGraphicsView;
|
||||
class QLabel;
|
||||
|
||||
namespace rtabmap
|
||||
{
|
||||
class Memory;
|
||||
}
|
||||
|
||||
class RTABMAP_EXP DatabaseViewer : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
DatabaseViewer(QWidget * parent = 0);
|
||||
virtual ~DatabaseViewer();
|
||||
bool openDatabase(const QString & path);
|
||||
|
||||
private slots:
|
||||
void openDatabase();
|
||||
void generateGraph();
|
||||
void generateLocalGraph();
|
||||
void sliderAValueChanged(int);
|
||||
void sliderBValueChanged(int);
|
||||
void sliderAMoved(int);
|
||||
void sliderBMoved(int);
|
||||
|
||||
private:
|
||||
void updateIds();
|
||||
QImage ipl2QImage(const IplImage *newImage);
|
||||
void drawKeypoints(const std::multimap<int, cv::KeyPoint> & refWords, QGraphicsScene * scene);
|
||||
void update(int value,
|
||||
QLabel * labelIndex,
|
||||
QLabel * labelActions,
|
||||
QLabel * labelParents,
|
||||
QLabel * labelChildren,
|
||||
QGraphicsView * view,
|
||||
QLabel * labelId);
|
||||
|
||||
private:
|
||||
Ui_DatabaseViewer * ui_;
|
||||
QMap<int, QByteArray> imagesMap_;
|
||||
QList<int> ids_;
|
||||
rtabmap::Memory * memory_;
|
||||
QString pathDatabase_;
|
||||
};
|
||||
|
||||
#endif /* DATABASEVIEWER_H_ */
|
||||
@@ -30,8 +30,6 @@
|
||||
|
||||
namespace rtabmap {
|
||||
class Camera;
|
||||
class Micro;
|
||||
class CameraMicro;
|
||||
class DBReader;
|
||||
}
|
||||
|
||||
@@ -93,14 +91,13 @@ private slots:
|
||||
void pauseDetection();
|
||||
void stopDetection();
|
||||
void generateMap();
|
||||
void generateLocalMap();
|
||||
void deleteMemory();
|
||||
void openWorkingDirectory();
|
||||
void updateEditMenu();
|
||||
void selectImages();
|
||||
void selectVideo();
|
||||
void selectStream();
|
||||
void selectMic();
|
||||
void selectAudioFile();
|
||||
void selectDatabase();
|
||||
void resetTheMemory();
|
||||
void dumpTheMemory();
|
||||
@@ -137,14 +134,12 @@ signals:
|
||||
void timeLimitChanged(float);
|
||||
void noMoreImagesReceived();
|
||||
void loopClosureThrChanged(float);
|
||||
void retrievalThrChanged(float);
|
||||
void twistReceived(float x, float y, float z, float roll, float pitch, float yaw, int row, int col);
|
||||
|
||||
private:
|
||||
void drawKeypoints(const std::multimap<int, cv::KeyPoint> & refWords, const std::multimap<int, cv::KeyPoint> & loopWords);
|
||||
void setupMainLayout(bool vertical);
|
||||
void updateSelectSourceImageMenu(int type);
|
||||
void updateSelectSourceAudioMenu(int type);
|
||||
void updateSelectSourceDatabase(bool used);
|
||||
|
||||
private:
|
||||
@@ -152,8 +147,6 @@ private:
|
||||
|
||||
State _state;
|
||||
rtabmap::Camera * _camera;
|
||||
rtabmap::Micro * _mic;
|
||||
rtabmap::CameraMicro * _cameraMic;
|
||||
rtabmap::DBReader * _dbReader;
|
||||
|
||||
SrcType _srcType;
|
||||
@@ -175,14 +168,10 @@ private:
|
||||
|
||||
PdfPlotCurve * _posteriorCurve;
|
||||
PdfPlotCurve * _likelihoodCurve;
|
||||
|
||||
UPlotCurve * _audioCurve;
|
||||
UPlotCurve * _audioCurveLoop;
|
||||
PdfPlotCurve * _rawLikelihoodCurve;
|
||||
|
||||
DetailedProgressDialog * _initProgressDialog;
|
||||
QActionGroup * _selectSourceImageGrp;
|
||||
QActionGroup * _selectSourceAudioGrp;
|
||||
|
||||
|
||||
QString _graphSavingFileName;
|
||||
QString _autoScreenCaptureFormat;
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
|
||||
#include <QtGui/QDialog>
|
||||
#include <QtCore/QModelIndex>
|
||||
#include <set>
|
||||
|
||||
#include "rtabmap/core/Parameters.h"
|
||||
|
||||
@@ -66,12 +67,6 @@ public:
|
||||
kSrcVideo
|
||||
};
|
||||
|
||||
enum SrcAudio {
|
||||
kSrcAudioUndef,
|
||||
kSrcAudioMicDevice,
|
||||
kSrcAudioFile
|
||||
};
|
||||
|
||||
public:
|
||||
static QString getIniFilePath();
|
||||
|
||||
@@ -108,7 +103,6 @@ public:
|
||||
// source panel
|
||||
double getGeneralInputRate() const;
|
||||
bool isSourceImageUsed() const;
|
||||
bool isSourceAudioUsed() const;
|
||||
bool isSourceDatabaseUsed() const;
|
||||
bool getGeneralAutoRestart() const;
|
||||
bool getGeneralCameraKeypoints() const;
|
||||
@@ -124,29 +118,22 @@ public:
|
||||
bool getSourceImagesRefreshDir() const; //Images group
|
||||
QString getSourceVideoPath() const; //Video group
|
||||
int getSourceUsbDeviceId() const; //UsbDevice group
|
||||
int getSourceAudioType() const; //Audio group
|
||||
QString getSourceAudioTypeStr() const; //Audio group
|
||||
int getSourceMicDevice() const; //Audio group
|
||||
int getSourceMicFs() const; //Audio group
|
||||
int getSourceMicSampleSize() const; //Audio group
|
||||
QString getSourceAudioPath() const; //Audio group
|
||||
bool getSourceAudioPlayWhileRecording() const; //Audio group
|
||||
QString getSourceDatabasePath() const; //Database group
|
||||
int getSourceDatabaseStartPos() const; //Database group
|
||||
|
||||
int getIgnoredDCComponents() const;
|
||||
|
||||
//
|
||||
bool isImagesKept() const;
|
||||
float getTimeLimit() const;
|
||||
int getMemoryType() const;
|
||||
|
||||
//specific
|
||||
bool isStatisticsPublished() const;
|
||||
double getLoopThr() const;
|
||||
double getRetrievalThr() const;
|
||||
double getVpThr() const;
|
||||
double getExpThr() const;
|
||||
|
||||
//
|
||||
void disableSourceAudio();
|
||||
void disableGeneralCameraKeypoints();
|
||||
|
||||
signals:
|
||||
@@ -156,11 +143,9 @@ signals:
|
||||
public slots:
|
||||
void setInputRate(double value);
|
||||
void setHardThr(int value);
|
||||
void setRetrievalThr(int value);
|
||||
void setAutoRestart(bool value);
|
||||
void setTimeLimit(float value);
|
||||
void selectSourceImage(Src src = kSrcUndef);
|
||||
void selectSourceAudio(SrcAudio = kSrcAudioUndef);
|
||||
void selectSourceDatabase(bool user = false);
|
||||
|
||||
private slots:
|
||||
@@ -182,6 +167,7 @@ private slots:
|
||||
void readSettingsEnd();
|
||||
void setupTreeView();
|
||||
void updateBasicParameter();
|
||||
void openDatabaseViewer();
|
||||
|
||||
protected:
|
||||
virtual void showEvent ( QShowEvent * event );
|
||||
|
||||
Reference in New Issue
Block a user