Fixed wrong stamp republished (double precision issue, #48). Fixed region selection with SuperPoint.
This commit is contained in:
@@ -28,8 +28,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#ifndef CAMERA_H_
|
||||
#define CAMERA_H_
|
||||
|
||||
#include <find_object/Header.h>
|
||||
#include "find_object/FindObjectExp.h" // DLL export/import defines
|
||||
|
||||
#include <opencv2/highgui/highgui.hpp>
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QTimer>
|
||||
@@ -57,7 +57,7 @@ public:
|
||||
|
||||
Q_SIGNALS:
|
||||
void imageReceived(const cv::Mat & image);
|
||||
void imageReceived(const cv::Mat & image, const QString & frameId, double stamp, const cv::Mat & depth, float depthConstant);
|
||||
void imageReceived(const cv::Mat & image, const find_object::Header & header, const cv::Mat & depth, float depthConstant);
|
||||
void finished();
|
||||
|
||||
public Q_SLOTS:
|
||||
|
||||
@@ -28,11 +28,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#ifndef FINDOBJECT_H_
|
||||
#define FINDOBJECT_H_
|
||||
|
||||
#include <find_object/Header.h>
|
||||
#include "find_object/FindObjectExp.h" // DLL export/import defines
|
||||
|
||||
#include "find_object/DetectionInfo.h"
|
||||
#include "find_object/Settings.h"
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QString>
|
||||
#include <QtCore/QMap>
|
||||
@@ -92,10 +92,10 @@ public Q_SLOTS:
|
||||
void addObjectAndUpdate(const cv::Mat & image, int id=0, const QString & filePath = QString());
|
||||
void removeObjectAndUpdate(int id);
|
||||
void detect(const cv::Mat & image); // emit objectsFound()
|
||||
void detect(const cv::Mat & image, const QString & frameId, double stamp, const cv::Mat & depth, float depthConstant); // emit objectsFound()
|
||||
void detect(const cv::Mat & image, const find_object::Header & header, const cv::Mat & depth, float depthConstant); // emit objectsFound()
|
||||
|
||||
Q_SIGNALS:
|
||||
void objectsFound(const find_object::DetectionInfo &, const QString &, double, const cv::Mat &, float);
|
||||
void objectsFound(const find_object::DetectionInfo &, const find_object::Header &, const cv::Mat &, float);
|
||||
|
||||
private:
|
||||
void clearVocabulary();
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
Copyright (c) 2011-2021, Mathieu Labbe - IntRoLab - Universite de Sherbrooke
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
* Neither the name of the Universite de Sherbrooke nor the
|
||||
names of its contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
|
||||
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef INCLUDE_FIND_OBJECT_HEADER_H_
|
||||
#define INCLUDE_FIND_OBJECT_HEADER_H_
|
||||
|
||||
#include <bits/stdint-uintn.h>
|
||||
#include <QString>
|
||||
|
||||
namespace find_object {
|
||||
|
||||
class Header {
|
||||
public:
|
||||
Header() :
|
||||
sec_(0),
|
||||
nsec_(0)
|
||||
{
|
||||
}
|
||||
Header(const char * frameId, uint64_t sec, uint64_t nsec) :
|
||||
frameId_(frameId),
|
||||
sec_(sec),
|
||||
nsec_(nsec)
|
||||
{
|
||||
}
|
||||
QString frameId_;
|
||||
uint64_t sec_;
|
||||
uint64_t nsec_;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* INCLUDE_FIND_OBJECT_HEADER_H_ */
|
||||
@@ -31,6 +31,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include "find_object/FindObjectExp.h" // DLL export/import defines
|
||||
|
||||
#include "find_object/DetectionInfo.h"
|
||||
#include "find_object/Header.h"
|
||||
|
||||
#include <QMainWindow>
|
||||
#include <QtCore/QSet>
|
||||
@@ -80,7 +81,7 @@ public Q_SLOTS:
|
||||
void stopProcessing();
|
||||
void pauseProcessing();
|
||||
void update(const cv::Mat & image);
|
||||
void update(const cv::Mat & image, const QString & frameId, double stamp, const cv::Mat & depth, float depthConstant);
|
||||
void update(const cv::Mat & image, const find_object::Header & header, const cv::Mat & depth, float depthConstant);
|
||||
|
||||
private Q_SLOTS:
|
||||
void loadSession();
|
||||
@@ -114,7 +115,7 @@ private Q_SLOTS:
|
||||
void rectHovered(int objId);
|
||||
|
||||
Q_SIGNALS:
|
||||
void objectsFound(const find_object::DetectionInfo &, const QString & frameId, double stamp, const cv::Mat & depth, float depthConstant);
|
||||
void objectsFound(const find_object::DetectionInfo &, const find_object::Header & header, const cv::Mat & depth, float depthConstant);
|
||||
|
||||
private:
|
||||
bool loadSettings(const QString & path);
|
||||
|
||||
Reference in New Issue
Block a user