Added find_object namespace, updated license/copyright in source files

git-svn-id: http://find-object.googlecode.com/svn/trunk/find_object@380 620bd6b2-0a58-f614-fd9a-1bd335dccda9
This commit is contained in:
matlabbe 2014-08-06 13:43:29 +00:00
parent 7b3d4460e9
commit 26213d87c0
47 changed files with 1276 additions and 182 deletions

View File

@ -1,3 +1,30 @@
/*
Copyright (c) 2011-2014, 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 <COPYRIGHT HOLDER> 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.
*/
#include <QtGui/QApplication> #include <QtGui/QApplication>
#include <QtCore/QDir> #include <QtCore/QDir>
#include <QtCore/QFile> #include <QtCore/QFile>
@ -11,6 +38,8 @@
#include "find_object/JsonWriter.h" #include "find_object/JsonWriter.h"
#include "find_object/utilite/ULogger.h" #include "find_object/utilite/ULogger.h"
using namespace find_object;
bool running = true; bool running = true;
#ifdef WIN32 #ifdef WIN32

View File

@ -1,6 +1,29 @@
/* /*
* Copyright (C) 2011, Mathieu Labbe - IntRoLab - Universite de Sherbrooke Copyright (c) 2011-2014, 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 <COPYRIGHT HOLDER> 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.
*/
#include <stdio.h> #include <stdio.h>
@ -23,6 +46,8 @@
#include "find_object/ObjWidget.h" #include "find_object/ObjWidget.h"
#include "find_object/QtOpenCV.h" #include "find_object/QtOpenCV.h"
using namespace find_object;
void showUsage() void showUsage()
{ {
printf("\n"); printf("\n");

View File

@ -1,6 +1,29 @@
/* /*
* Copyright (C) 2011, Mathieu Labbe - IntRoLab - Universite de Sherbrooke Copyright (c) 2011-2014, 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 <COPYRIGHT HOLDER> 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 CAMERA_H_ #ifndef CAMERA_H_
#define CAMERA_H_ #define CAMERA_H_
@ -12,6 +35,8 @@
#include <QtCore/QTimer> #include <QtCore/QTimer>
#include <QtGui/QImage> #include <QtGui/QImage>
namespace find_object {
class CameraTcpServer; class CameraTcpServer;
class FINDOBJECT_EXP Camera : public QObject { class FINDOBJECT_EXP Camera : public QObject {
@ -50,4 +75,6 @@ private:
CameraTcpServer * cameraTcpServer_; CameraTcpServer * cameraTcpServer_;
}; };
} // namespace find_object
#endif /* CAMERA_H_ */ #endif /* CAMERA_H_ */

View File

@ -1,10 +1,29 @@
/* /*
* DetectionInfo.h Copyright (c) 2011-2014, Mathieu Labbe - IntRoLab - Universite de Sherbrooke
* All rights reserved.
* Created on: 2014-08-03
* Author: mathieu
*/
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 <COPYRIGHT HOLDER> 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 DETECTIONINFO_H_ #ifndef DETECTIONINFO_H_
#define DETECTIONINFO_H_ #define DETECTIONINFO_H_
@ -15,6 +34,8 @@
#include <opencv2/features2d/features2d.hpp> #include <opencv2/features2d/features2d.hpp>
#include <vector> #include <vector>
namespace find_object {
class DetectionInfo class DetectionInfo
{ {
public: public:
@ -136,5 +157,6 @@ inline QDataStream & operator>>(QDataStream &in, DetectionInfo & info)
return in; return in;
} }
} // namespace find_object
#endif /* DETECTIONINFO_H_ */ #endif /* DETECTIONINFO_H_ */

View File

@ -1,9 +1,29 @@
/* /*
* FindObject.h Copyright (c) 2011-2014, Mathieu Labbe - IntRoLab - Universite de Sherbrooke
* All rights reserved.
* Created on: 2014-07-30
* Author: mathieu 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 <COPYRIGHT HOLDER> 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 FINDOBJECT_H_ #ifndef FINDOBJECT_H_
#define FINDOBJECT_H_ #define FINDOBJECT_H_
@ -23,6 +43,8 @@
#include <opencv2/opencv.hpp> #include <opencv2/opencv.hpp>
#include <vector> #include <vector>
namespace find_object {
class ObjSignature; class ObjSignature;
class Vocabulary; class Vocabulary;
class KeypointDetector; class KeypointDetector;
@ -70,4 +92,6 @@ private:
DescriptorExtractor * extractor_; DescriptorExtractor * extractor_;
}; };
} // namespace find_object
#endif /* FINDOBJECT_H_ */ #endif /* FINDOBJECT_H_ */

View File

@ -1,21 +1,29 @@
/* /*
* Copyright (C) 2010-2011, Mathieu Labbe and IntRoLab - Universite de Sherbrooke Copyright (c) 2011-2014, Mathieu Labbe - IntRoLab - Universite de Sherbrooke
* All rights reserved.
* This file is part of RTAB-Map.
* Redistribution and use in source and binary forms, with or without
* RTAB-Map is free software: you can redistribute it and/or modify modification, are permitted provided that the following conditions are met:
* it under the terms of the GNU General Public License as published by * Redistributions of source code must retain the above copyright
* the Free Software Foundation, either version 3 of the License, or notice, this list of conditions and the following disclaimer.
* (at your option) any later version. * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* RTAB-Map is distributed in the hope that it will be useful, documentation and/or other materials provided with the distribution.
* but WITHOUT ANY WARRANTY; without even the implied warranty of * Neither the name of the Universite de Sherbrooke nor the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the names of its contributors may be used to endorse or promote products
* GNU General Public License for more details. derived from this software without specific prior written permission.
*
* You should have received a copy of the GNU General Public License THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* along with RTAB-Map. If not, see <http://www.gnu.org/licenses/>. 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 <COPYRIGHT HOLDER> 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 FINDOBJECTEXP_H #ifndef FINDOBJECTEXP_H
#define FINDOBJECTEXP_H #define FINDOBJECTEXP_H

View File

@ -1,15 +1,37 @@
/* /*
* JsonWriter.h Copyright (c) 2011-2014, Mathieu Labbe - IntRoLab - Universite de Sherbrooke
* All rights reserved.
* Created on: 2014-08-03
* Author: mathieu 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 <COPYRIGHT HOLDER> 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 JSONWRITER_H_ #ifndef JSONWRITER_H_
#define JSONWRITER_H_ #define JSONWRITER_H_
#include "find_object/DetectionInfo.h" #include "find_object/DetectionInfo.h"
namespace find_object {
class JsonWriter class JsonWriter
{ {
public: public:
@ -17,5 +39,7 @@ public:
static void write(const DetectionInfo & info, const QString & path); static void write(const DetectionInfo & info, const QString & path);
}; };
} // namespace find_object
#endif /* JSONWRITER_H_ */ #endif /* JSONWRITER_H_ */

View File

@ -1,6 +1,29 @@
/* /*
* Copyright (C) 2011, Mathieu Labbe - IntRoLab - Universite de Sherbrooke Copyright (c) 2011-2014, 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 <COPYRIGHT HOLDER> 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 MAINWINDOW_H_ #ifndef MAINWINDOW_H_
#define MAINWINDOW_H_ #define MAINWINDOW_H_
@ -18,11 +41,19 @@
#include <opencv2/opencv.hpp> #include <opencv2/opencv.hpp>
namespace rtabmap
{
class PdfPlotCurve;
}
class Ui_mainWindow; class Ui_mainWindow;
class QLabel;
namespace find_object {
class ObjWidget; class ObjWidget;
class Camera; class Camera;
class ParametersToolBox; class ParametersToolBox;
class QLabel;
class AboutDialog; class AboutDialog;
class TcpServer; class TcpServer;
class KeypointDetector; class KeypointDetector;
@ -30,11 +61,6 @@ class DescriptorExtractor;
class Vocabulary; class Vocabulary;
class FindObject; class FindObject;
namespace rtabmap
{
class PdfPlotCurve;
}
class FINDOBJECT_EXP MainWindow : public QMainWindow class FINDOBJECT_EXP MainWindow : public QMainWindow
{ {
Q_OBJECT Q_OBJECT
@ -107,4 +133,6 @@ private:
cv::Mat sceneImage_; cv::Mat sceneImage_;
}; };
} // namespace find_object
#endif /* MainWindow_H_ */ #endif /* MainWindow_H_ */

View File

@ -1,6 +1,29 @@
/* /*
* Copyright (C) 2011, Mathieu Labbe - IntRoLab - Universite de Sherbrooke Copyright (c) 2011-2014, 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 <COPYRIGHT HOLDER> 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 OBJWIDGET_H_ #ifndef OBJWIDGET_H_
#define OBJWIDGET_H_ #define OBJWIDGET_H_
@ -11,8 +34,6 @@
#include <QtGui/QWidget> #include <QtGui/QWidget>
#include <QtCore/QMultiMap> #include <QtCore/QMultiMap>
class KeypointItem;
class ImageKptsView;
class QAction; class QAction;
class QMenu; class QMenu;
class QGraphicsView; class QGraphicsView;
@ -21,6 +42,11 @@ class QGraphicsRectItem;
class QGraphicsItem; class QGraphicsItem;
class QLabel; class QLabel;
namespace find_object {
class KeypointItem;
class ImageKptsView;
class FINDOBJECT_EXP ObjWidget : public QWidget class FINDOBJECT_EXP ObjWidget : public QWidget
{ {
Q_OBJECT Q_OBJECT
@ -113,5 +139,6 @@ private:
QPoint mouseCurrentPos_; QPoint mouseCurrentPos_;
}; };
} // namespace find_object
#endif /* OBJWIDGET_H_ */ #endif /* OBJWIDGET_H_ */

View File

@ -1,6 +1,29 @@
/* /*
* Copyright (C) 2011, Mathieu Labbe - IntRoLab - Universite de Sherbrooke Copyright (c) 2011-2014, 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 <COPYRIGHT HOLDER> 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 QTOPENCV_H #ifndef QTOPENCV_H
#define QTOPENCV_H #define QTOPENCV_H
@ -10,6 +33,8 @@
#include <QtGui/QImage> #include <QtGui/QImage>
#include <opencv2/core/core.hpp> #include <opencv2/core/core.hpp>
namespace find_object {
// Convert OpenCV matrix to QImage // Convert OpenCV matrix to QImage
FINDOBJECT_EXP QImage cvtCvMat2QImage(const cv::Mat & image, bool isBgr = true); FINDOBJECT_EXP QImage cvtCvMat2QImage(const cv::Mat & image, bool isBgr = true);
@ -22,4 +47,6 @@ FINDOBJECT_EXP QImage cvtIplImage2QImage(const IplImage * image);
// Convert QImage to IplImage // Convert QImage to IplImage
FINDOBJECT_EXP IplImage * cvtQImage2IplImage(const QImage & image); FINDOBJECT_EXP IplImage * cvtQImage2IplImage(const QImage & image);
} // namespace find_object
#endif // QTOPENCV_H #endif // QTOPENCV_H

View File

@ -1,6 +1,29 @@
/* /*
* Copyright (C) 2011, Mathieu Labbe - IntRoLab - Universite de Sherbrooke Copyright (c) 2011-2014, 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 <COPYRIGHT HOLDER> 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 SETTINGS_H_ #ifndef SETTINGS_H_
#define SETTINGS_H_ #define SETTINGS_H_
@ -12,6 +35,8 @@
#include <QtCore/QByteArray> #include <QtCore/QByteArray>
#include <opencv2/features2d/features2d.hpp> #include <opencv2/features2d/features2d.hpp>
namespace find_object {
class KeypointDetector; class KeypointDetector;
class DescriptorExtractor; class DescriptorExtractor;
class GPUFeature2D; class GPUFeature2D;
@ -280,4 +305,6 @@ private:
GPUFeature2D * gpuFeature2D_; GPUFeature2D * gpuFeature2D_;
}; };
} // namespace find_object
#endif /* SETTINGS_H_ */ #endif /* SETTINGS_H_ */

View File

@ -1,9 +1,29 @@
/* /*
* TCPServer.h Copyright (c) 2011-2014, Mathieu Labbe - IntRoLab - Universite de Sherbrooke
* All rights reserved.
* Created on: 2014-05-05
* Author: mathieu 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 <COPYRIGHT HOLDER> 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 TCPSERVER_H_ #ifndef TCPSERVER_H_
#define TCPSERVER_H_ #define TCPSERVER_H_
@ -14,6 +34,8 @@
#include <QtNetwork/QTcpServer> #include <QtNetwork/QTcpServer>
namespace find_object {
class QNetworkSession; class QNetworkSession;
class FINDOBJECT_EXP TcpServer : public QTcpServer class FINDOBJECT_EXP TcpServer : public QTcpServer
@ -33,4 +55,6 @@ private Q_SLOTS:
void addClient(); void addClient();
}; };
} // namespace find_object
#endif /* TCPSERVER_H_ */ #endif /* TCPSERVER_H_ */

View File

@ -1,11 +1,36 @@
/* /*
* Copyright (C) 2011, Mathieu Labbe - IntRoLab - Universite de Sherbrooke Copyright (c) 2011-2014, 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 <COPYRIGHT HOLDER> 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.
*/
#include "AboutDialog.h" #include "AboutDialog.h"
#include "ui_aboutDialog.h" #include "ui_aboutDialog.h"
#include <opencv2/core/version.hpp> #include <opencv2/core/version.hpp>
namespace find_object {
AboutDialog::AboutDialog(QWidget * parent) : AboutDialog::AboutDialog(QWidget * parent) :
QDialog(parent) QDialog(parent)
{ {
@ -20,3 +45,4 @@ AboutDialog::~AboutDialog()
delete ui_; delete ui_;
} }
}

View File

@ -1,6 +1,29 @@
/* /*
* Copyright (C) 2011, Mathieu Labbe - IntRoLab - Universite de Sherbrooke Copyright (c) 2011-2014, 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 <COPYRIGHT HOLDER> 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 ABOUTDIALOG_H_ #ifndef ABOUTDIALOG_H_
#define ABOUTDIALOG_H_ #define ABOUTDIALOG_H_
@ -10,6 +33,8 @@
class Ui_aboutDialog; class Ui_aboutDialog;
namespace find_object {
class AboutDialog : public QDialog class AboutDialog : public QDialog
{ {
Q_OBJECT Q_OBJECT
@ -23,5 +48,6 @@ private:
Ui_aboutDialog * ui_; Ui_aboutDialog * ui_;
}; };
} // namespace find_object
#endif /* ABOUTDIALOG_H_ */ #endif /* ABOUTDIALOG_H_ */

View File

@ -1,6 +1,29 @@
/* /*
* Copyright (C) 2011, Mathieu Labbe - IntRoLab - Universite de Sherbrooke Copyright (c) 2011-2014, 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 <COPYRIGHT HOLDER> 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.
*/
#include "find_object/Camera.h" #include "find_object/Camera.h"
#include "find_object/Settings.h" #include "find_object/Settings.h"
@ -22,6 +45,8 @@
#include <opencv2/imgproc/imgproc.hpp> #include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp> #include <opencv2/highgui/highgui.hpp>
namespace find_object {
AddObjectDialog::AddObjectDialog(Camera * camera, const cv::Mat & image, bool mirrorView, QWidget * parent, Qt::WindowFlags f) : AddObjectDialog::AddObjectDialog(Camera * camera, const cv::Mat & image, bool mirrorView, QWidget * parent, Qt::WindowFlags f) :
QDialog(parent, f), QDialog(parent, f),
camera_(camera), camera_(camera),
@ -413,3 +438,5 @@ cv::Rect AddObjectDialog::computeROI(const std::vector<cv::KeyPoint> & kpts)
return roi; return roi;
} }
} // namespace find_object

View File

@ -1,6 +1,29 @@
/* /*
* Copyright (C) 2011, Mathieu Labbe - IntRoLab - Universite de Sherbrooke Copyright (c) 2011-2014, 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 <COPYRIGHT HOLDER> 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 ADDOBJECTDIALOG_H_ #ifndef ADDOBJECTDIALOG_H_
#define ADDOBJECTDIALOG_H_ #define ADDOBJECTDIALOG_H_
@ -11,6 +34,9 @@
#include <opencv2/core/core.hpp> #include <opencv2/core/core.hpp>
class Ui_addObjectDialog; class Ui_addObjectDialog;
namespace find_object {
class ObjWidget; class ObjWidget;
class Camera; class Camera;
class KeypointItem; class KeypointItem;
@ -59,4 +85,6 @@ private:
int state_; int state_;
}; };
} // namespace find_object
#endif /* ADDOBJECTDIALOG_H_ */ #endif /* ADDOBJECTDIALOG_H_ */

View File

@ -1,6 +1,29 @@
/* /*
* Copyright (C) 2011, Mathieu Labbe - IntRoLab - Universite de Sherbrooke Copyright (c) 2011-2014, 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 <COPYRIGHT HOLDER> 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.
*/
#include "find_object/Camera.h" #include "find_object/Camera.h"
#include "find_object/Settings.h" #include "find_object/Settings.h"
@ -13,6 +36,8 @@
#include "utilite/UDirectory.h" #include "utilite/UDirectory.h"
#include "CameraTcpServer.h" #include "CameraTcpServer.h"
namespace find_object {
Camera::Camera(QObject * parent) : Camera::Camera(QObject * parent) :
QObject(parent), QObject(parent),
currentImageIndex_(0), currentImageIndex_(0),
@ -264,3 +289,5 @@ void Camera::updateImageRate()
} }
} }
} // namespace find_object

View File

@ -1,10 +1,29 @@
/* /*
* CameraTcpClient.cpp Copyright (c) 2011-2014, Mathieu Labbe - IntRoLab - Universite de Sherbrooke
* All rights reserved.
* Created on: 2014-07-31
* Author: mathieu
*/
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 <COPYRIGHT HOLDER> 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.
*/
#include "find_object/Settings.h" #include "find_object/Settings.h"
#include "find_object/utilite/ULogger.h" #include "find_object/utilite/ULogger.h"
@ -13,6 +32,8 @@
#include <QtNetwork/QNetworkInterface> #include <QtNetwork/QNetworkInterface>
#include <QtCore/QDataStream> #include <QtCore/QDataStream>
namespace find_object {
CameraTcpServer::CameraTcpServer(quint16 port, QObject *parent) : CameraTcpServer::CameraTcpServer(quint16 port, QObject *parent) :
QTcpServer(parent), QTcpServer(parent),
blockSize_(0) blockSize_(0)
@ -162,3 +183,5 @@ void CameraTcpServer::connectionLost()
sender()->deleteLater(); sender()->deleteLater();
blockSize_ = 0; // reset blockSize_ = 0; // reset
} }
} // namespace find_object

View File

@ -1,9 +1,29 @@
/* /*
* CameraTcpClient.h Copyright (c) 2011-2014, Mathieu Labbe - IntRoLab - Universite de Sherbrooke
* All rights reserved.
* Created on: 2014-07-31
* Author: mathieu 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 <COPYRIGHT HOLDER> 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 CAMERATCPCLIENT_H_ #ifndef CAMERATCPCLIENT_H_
#define CAMERATCPCLIENT_H_ #define CAMERATCPCLIENT_H_
@ -11,6 +31,8 @@
#include <QtNetwork/QTcpServer> #include <QtNetwork/QTcpServer>
#include <opencv2/opencv.hpp> #include <opencv2/opencv.hpp>
namespace find_object {
class CameraTcpServer : public QTcpServer class CameraTcpServer : public QTcpServer
{ {
Q_OBJECT; Q_OBJECT;
@ -36,4 +58,6 @@ private:
QVector<cv::Mat> images_; QVector<cv::Mat> images_;
}; };
} // namespace find_object
#endif /* CAMERATCPCLIENT_H_ */ #endif /* CAMERATCPCLIENT_H_ */

View File

@ -1,9 +1,29 @@
/* /*
* FindObject.cpp Copyright (c) 2011-2014, Mathieu Labbe - IntRoLab - Universite de Sherbrooke
* All rights reserved.
* Created on: 2014-07-30
* Author: mathieu 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 <COPYRIGHT HOLDER> 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.
*/
#include "find_object/FindObject.h" #include "find_object/FindObject.h"
#include "find_object/Settings.h" #include "find_object/Settings.h"
@ -20,6 +40,8 @@
#include <QtGui/QGraphicsRectItem> #include <QtGui/QGraphicsRectItem>
#include <stdio.h> #include <stdio.h>
namespace find_object {
FindObject::FindObject(QObject * parent) : FindObject::FindObject(QObject * parent) :
QObject(parent), QObject(parent),
vocabulary_(new Vocabulary()), vocabulary_(new Vocabulary()),
@ -1014,3 +1036,5 @@ bool FindObject::detect(const cv::Mat & image, DetectionInfo & info)
return success; return success;
} }
} // namespace find_object

View File

@ -1,10 +1,29 @@
/* /*
* JsonWriter.cpp Copyright (c) 2011-2014, Mathieu Labbe - IntRoLab - Universite de Sherbrooke
* All rights reserved.
* Created on: 2014-08-03
* Author: mathieu
*/
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 <COPYRIGHT HOLDER> 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.
*/
#include "find_object/JsonWriter.h" #include "find_object/JsonWriter.h"
#include "find_object/utilite/ULogger.h" #include "find_object/utilite/ULogger.h"
@ -16,6 +35,8 @@
#include <json/writer.h> #include <json/writer.h>
#endif #endif
namespace find_object {
bool JsonWriter::available() bool JsonWriter::available()
{ {
#ifdef WITH_JSONCPP #ifdef WITH_JSONCPP
@ -104,3 +125,5 @@ void JsonWriter::write(const DetectionInfo & info, const QString & path)
UERROR("Not built with JSON support!"); UERROR("Not built with JSON support!");
#endif #endif
} }
} // namespace find_object

View File

@ -1,6 +1,29 @@
/* /*
* Copyright (C) 2011, Mathieu Labbe - IntRoLab - Universite de Sherbrooke Copyright (c) 2011-2014, 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 <COPYRIGHT HOLDER> 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.
*/
#include "KeypointItem.h" #include "KeypointItem.h"
@ -8,6 +31,8 @@
#include <QtGui/QBrush> #include <QtGui/QBrush>
#include <QtGui/QGraphicsScene> #include <QtGui/QGraphicsScene>
namespace find_object {
KeypointItem::KeypointItem(int id, qreal x, qreal y, int r, const QString & info, const QColor & color, QGraphicsItem * parent) : KeypointItem::KeypointItem(int id, qreal x, qreal y, int r, const QString & info, const QColor & color, QGraphicsItem * parent) :
QGraphicsEllipseItem(x, y, r, r, parent), QGraphicsEllipseItem(x, y, r, r, parent),
info_(info), info_(info),
@ -99,3 +124,5 @@ void KeypointItem::focusOutEvent ( QFocusEvent * event )
this->hideDescription(); this->hideDescription();
QGraphicsEllipseItem::focusOutEvent(event); QGraphicsEllipseItem::focusOutEvent(event);
} }
} // namespace find_object

View File

@ -1,6 +1,29 @@
/* /*
* Copyright (C) 2011, Mathieu Labbe - IntRoLab - Universite de Sherbrooke Copyright (c) 2011-2014, 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 <COPYRIGHT HOLDER> 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 KEYPOINTITEM_H_ #ifndef KEYPOINTITEM_H_
#define KEYPOINTITEM_H_ #define KEYPOINTITEM_H_
@ -10,6 +33,8 @@
#include <QtGui/QPen> #include <QtGui/QPen>
#include <QtGui/QBrush> #include <QtGui/QBrush>
namespace find_object {
class KeypointItem : public QGraphicsEllipseItem class KeypointItem : public QGraphicsEllipseItem
{ {
public: public:
@ -35,5 +60,6 @@ private:
int id_; int id_;
}; };
} // namespace find_object
#endif /* KEYPOINTITEM_H_ */ #endif /* KEYPOINTITEM_H_ */

View File

@ -1,6 +1,29 @@
/* /*
* Copyright (C) 2011, Mathieu Labbe - IntRoLab - Universite de Sherbrooke Copyright (c) 2011-2014, 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 <COPYRIGHT HOLDER> 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.
*/
#include "find_object/MainWindow.h" #include "find_object/MainWindow.h"
#include "find_object/Camera.h" #include "find_object/Camera.h"
@ -48,6 +71,8 @@
#include "utilite/UDirectory.h" #include "utilite/UDirectory.h"
namespace find_object {
// Camera ownership transferred // Camera ownership transferred
MainWindow::MainWindow(FindObject * findObject, Camera * camera, QWidget * parent) : MainWindow::MainWindow(FindObject * findObject, Camera * camera, QWidget * parent) :
QMainWindow(parent), QMainWindow(parent),
@ -1223,3 +1248,5 @@ void MainWindow::notifyParametersChanged(const QStringList & paramChanged)
ui_->actionCamera_from_directory_of_images->setChecked(!Settings::getCamera_5mediaPath().isEmpty() && UDirectory::exists(Settings::getCamera_5mediaPath().toStdString()) && !Settings::getCamera_6useTcpCamera()); ui_->actionCamera_from_directory_of_images->setChecked(!Settings::getCamera_5mediaPath().isEmpty() && UDirectory::exists(Settings::getCamera_5mediaPath().toStdString()) && !Settings::getCamera_6useTcpCamera());
ui_->actionCamera_from_TCP_IP->setChecked(Settings::getCamera_6useTcpCamera()); ui_->actionCamera_from_TCP_IP->setChecked(Settings::getCamera_6useTcpCamera());
} }
} // namespace find_object

View File

@ -1,9 +1,29 @@
/* /*
* ObjSignature.h Copyright (c) 2011-2014, Mathieu Labbe - IntRoLab - Universite de Sherbrooke
* All rights reserved.
* Created on: 2014-07-30
* Author: mathieu 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 <COPYRIGHT HOLDER> 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 OBJSIGNATURE_H_ #ifndef OBJSIGNATURE_H_
#define OBJSIGNATURE_H_ #define OBJSIGNATURE_H_
@ -13,6 +33,8 @@
#include <QtCore/QMultiMap> #include <QtCore/QMultiMap>
#include <QtCore/QRect> #include <QtCore/QRect>
namespace find_object {
class ObjSignature { class ObjSignature {
public: public:
ObjSignature(int id, const cv::Mat & image, const QString & filename) : ObjSignature(int id, const cv::Mat & image, const QString & filename) :
@ -57,4 +79,6 @@ private:
QString descriptorType_; QString descriptorType_;
}; };
} // namespace find_object
#endif /* OBJSIGNATURE_H_ */ #endif /* OBJSIGNATURE_H_ */

View File

@ -1,6 +1,29 @@
/* /*
* Copyright (C) 2011, Mathieu Labbe - IntRoLab - Universite de Sherbrooke Copyright (c) 2011-2014, 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 <COPYRIGHT HOLDER> 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.
*/
#include "find_object/Settings.h" #include "find_object/Settings.h"
#include "find_object/utilite/ULogger.h" #include "find_object/utilite/ULogger.h"
@ -30,6 +53,8 @@
#include <stdio.h> #include <stdio.h>
namespace find_object {
ObjWidget::ObjWidget(QWidget * parent) : ObjWidget::ObjWidget(QWidget * parent) :
QWidget(parent), QWidget(parent),
id_(0), id_(0),
@ -746,3 +771,5 @@ void ObjWidget::setupGraphicsView()
} }
} }
} // namespace find_object

View File

@ -1,6 +1,29 @@
/* /*
* Copyright (C) 2011, Mathieu Labbe - IntRoLab - Universite de Sherbrooke Copyright (c) 2011-2014, 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 <COPYRIGHT HOLDER> 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.
*/
#include "find_object/Settings.h" #include "find_object/Settings.h"
@ -15,6 +38,8 @@
#include <QtGui/QMessageBox> #include <QtGui/QMessageBox>
#include <stdio.h> #include <stdio.h>
namespace find_object {
ParametersToolBox::ParametersToolBox(QWidget *parent) : ParametersToolBox::ParametersToolBox(QWidget *parent) :
QToolBox(parent) QToolBox(parent)
{ {
@ -578,3 +603,5 @@ void ParametersToolBox::changeParameter(const int & value)
Q_EMIT parametersChanged(paramChanged); Q_EMIT parametersChanged(paramChanged);
} }
} }
} // namespace find_object

View File

@ -1,6 +1,29 @@
/* /*
* Copyright (C) 2011, Mathieu Labbe - IntRoLab - Universite de Sherbrooke Copyright (c) 2011-2014, 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 <COPYRIGHT HOLDER> 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 PARAMETERSTOOLBOX_H_ #ifndef PARAMETERSTOOLBOX_H_
#define PARAMETERSTOOLBOX_H_ #define PARAMETERSTOOLBOX_H_
@ -10,6 +33,8 @@
class QVBoxLayout; class QVBoxLayout;
class QAbstractButton; class QAbstractButton;
namespace find_object {
class ParametersToolBox: public QToolBox class ParametersToolBox: public QToolBox
{ {
Q_OBJECT Q_OBJECT
@ -45,4 +70,6 @@ private:
void updateParametersVisibility(); void updateParametersVisibility();
}; };
} // namespace find_object
#endif /* PARAMETERSTOOLBOX_H_ */ #endif /* PARAMETERSTOOLBOX_H_ */

View File

@ -1,11 +1,36 @@
/* /*
* Copyright (C) 2011, Mathieu Labbe - IntRoLab - Universite de Sherbrooke Copyright (c) 2011-2014, 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 <COPYRIGHT HOLDER> 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.
*/
#include "find_object/QtOpenCV.h" #include "find_object/QtOpenCV.h"
#include <opencv2/core/core_c.h> #include <opencv2/core/core_c.h>
#include <stdio.h> #include <stdio.h>
namespace find_object {
QImage cvtCvMat2QImage(const cv::Mat & image, bool isBgr) QImage cvtCvMat2QImage(const cv::Mat & image, bool isBgr)
{ {
QImage qtemp; QImage qtemp;
@ -129,3 +154,5 @@ IplImage * cvtQImage2IplImage(const QImage & image)
} }
return iplTmp; return iplTmp;
} }
} // namespace find_object

View File

@ -1,6 +1,29 @@
/* /*
* Copyright (C) 2011, Mathieu Labbe - IntRoLab - Universite de Sherbrooke Copyright (c) 2011-2014, 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 <COPYRIGHT HOLDER> 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.
*/
#include "RectItem.h" #include "RectItem.h"
@ -8,6 +31,8 @@
#include <QtGui/QBrush> #include <QtGui/QBrush>
#include <QtGui/QGraphicsScene> #include <QtGui/QGraphicsScene>
namespace find_object {
RectItem::RectItem(int id, const QRectF &rect, QGraphicsItem * parent) : RectItem::RectItem(int id, const QRectF &rect, QGraphicsItem * parent) :
QGraphicsRectItem(rect, parent), QGraphicsRectItem(rect, parent),
placeHolder_(0), placeHolder_(0),
@ -126,3 +151,5 @@ void RectItem::focusOutEvent ( QFocusEvent * event )
this->hideDescription(); this->hideDescription();
QGraphicsRectItem::focusOutEvent(event); QGraphicsRectItem::focusOutEvent(event);
} }
} // namespace find_object

View File

@ -1,6 +1,29 @@
/* /*
* Copyright (C) 2011, Mathieu Labbe - IntRoLab - Universite de Sherbrooke Copyright (c) 2011-2014, 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 <COPYRIGHT HOLDER> 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 RECTITEM_H_ #ifndef RECTITEM_H_
#define RECTITEM_H_ #define RECTITEM_H_
@ -10,6 +33,8 @@
#include <QtGui/QPen> #include <QtGui/QPen>
#include <QtGui/QBrush> #include <QtGui/QBrush>
namespace find_object {
class RectItem : public QObject, public QGraphicsRectItem class RectItem : public QObject, public QGraphicsRectItem
{ {
Q_OBJECT; Q_OBJECT;
@ -39,5 +64,6 @@ private:
int id_; int id_;
}; };
} // namespace find_object
#endif /* RECTITEM_H_ */ #endif /* RECTITEM_H_ */

View File

@ -1,6 +1,29 @@
/* /*
* Copyright (C) 2011, Mathieu Labbe - IntRoLab - Universite de Sherbrooke Copyright (c) 2011-2014, 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 <COPYRIGHT HOLDER> 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.
*/
#include "find_object/Camera.h" #include "find_object/Camera.h"
#include "find_object/Settings.h" #include "find_object/Settings.h"
@ -17,6 +40,8 @@
#define VERBOSE 0 #define VERBOSE 0
namespace find_object {
ParametersMap Settings::defaultParameters_; ParametersMap Settings::defaultParameters_;
ParametersMap Settings::parameters_; ParametersMap Settings::parameters_;
ParametersType Settings::parametersType_; ParametersType Settings::parametersType_;
@ -924,3 +949,5 @@ void DescriptorExtractor::compute(const cv::Mat & image,
gpuFeature2D_->computeDescriptors(image, keypoints, descriptors); gpuFeature2D_->computeDescriptors(image, keypoints, descriptors);
} }
} }
} // namespace find_object

View File

@ -1,10 +1,29 @@
/* /*
* TCPServer.cpp Copyright (c) 2011-2014, Mathieu Labbe - IntRoLab - Universite de Sherbrooke
* All rights reserved.
* Created on: 2014-05-05
* Author: mathieu
*/
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 <COPYRIGHT HOLDER> 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.
*/
#include "find_object/TcpServer.h" #include "find_object/TcpServer.h"
#include "find_object/utilite/ULogger.h" #include "find_object/utilite/ULogger.h"
@ -12,6 +31,8 @@
#include <QtNetwork/QTcpSocket> #include <QtNetwork/QTcpSocket>
#include <QtGui/QTransform> #include <QtGui/QTransform>
namespace find_object {
TcpServer::TcpServer(quint16 port, QObject * parent) : TcpServer::TcpServer(quint16 port, QObject * parent) :
QTcpServer(parent) QTcpServer(parent)
{ {
@ -80,3 +101,5 @@ void TcpServer::addClient()
QTcpSocket * client = this->nextPendingConnection(); QTcpSocket * client = this->nextPendingConnection();
connect(client, SIGNAL(disconnected()), client, SLOT(deleteLater())); connect(client, SIGNAL(disconnected()), client, SLOT(deleteLater()));
} }
} // namespace find_object

View File

@ -1,9 +1,29 @@
/* /*
* Vocabulary.cpp Copyright (c) 2011-2014, Mathieu Labbe - IntRoLab - Universite de Sherbrooke
* All rights reserved.
* Created on: 2014-05-09
* Author: mathieu 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 <COPYRIGHT HOLDER> 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.
*/
#include "find_object/Settings.h" #include "find_object/Settings.h"
@ -11,6 +31,8 @@
#include <QtCore/QVector> #include <QtCore/QVector>
#include <stdio.h> #include <stdio.h>
namespace find_object {
Vocabulary::Vocabulary() Vocabulary::Vocabulary()
{ {
} }
@ -211,3 +233,5 @@ void Vocabulary::search(const cv::Mat & descriptors, cv::Mat & results, cv::Mat
} }
} }
} }
} // namespace find_object

View File

@ -1,9 +1,29 @@
/* /*
* Vocabulary.h Copyright (c) 2011-2014, Mathieu Labbe - IntRoLab - Universite de Sherbrooke
* All rights reserved.
* Created on: 2014-05-09
* Author: mathieu 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 <COPYRIGHT HOLDER> 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 VOCABULARY_H_ #ifndef VOCABULARY_H_
#define VOCABULARY_H_ #define VOCABULARY_H_
@ -12,6 +32,8 @@
#include <QtCore/QVector> #include <QtCore/QVector>
#include <opencv2/opencv.hpp> #include <opencv2/opencv.hpp>
namespace find_object {
class Vocabulary { class Vocabulary {
public: public:
Vocabulary(); Vocabulary();
@ -32,4 +54,6 @@ private:
QVector<int> notIndexedWordIds_; QVector<int> notIndexedWordIds_;
}; };
} // namespace find_object
#endif /* VOCABULARY_H_ */ #endif /* VOCABULARY_H_ */

View File

@ -42,10 +42,10 @@
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_2"> <layout class="QHBoxLayout" name="horizontalLayout_2">
<item> <item>
<widget class="ObjWidget" name="cameraView" native="true"/> <widget class="find_object::ObjWidget" name="cameraView" native="true"/>
</item> </item>
<item> <item>
<widget class="ObjWidget" name="objectView" native="true"/> <widget class="find_object::ObjWidget" name="objectView" native="true"/>
</item> </item>
</layout> </layout>
</item> </item>
@ -98,7 +98,7 @@
</widget> </widget>
<customwidgets> <customwidgets>
<customwidget> <customwidget>
<class>ObjWidget</class> <class>find_object::ObjWidget</class>
<extends>QWidget</extends> <extends>QWidget</extends>
<header>find_object/ObjWidget.h</header> <header>find_object/ObjWidget.h</header>
<container>1</container> <container>1</container>

View File

@ -100,7 +100,7 @@
</layout> </layout>
</item> </item>
<item> <item>
<widget class="ObjWidget" name="imageView_source" native="true"/> <widget class="find_object::ObjWidget" name="imageView_source" native="true"/>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
@ -276,7 +276,7 @@
<number>0</number> <number>0</number>
</property> </property>
<item> <item>
<widget class="ParametersToolBox" name="toolBox"> <widget class="find_object::ParametersToolBox" name="toolBox">
<property name="currentIndex"> <property name="currentIndex">
<number>0</number> <number>0</number>
</property> </property>
@ -787,13 +787,13 @@
</widget> </widget>
<customwidgets> <customwidgets>
<customwidget> <customwidget>
<class>ObjWidget</class> <class>find_object::ObjWidget</class>
<extends>QWidget</extends> <extends>QWidget</extends>
<header>find_object/ObjWidget.h</header> <header>find_object/ObjWidget.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget> <customwidget>
<class>ParametersToolBox</class> <class>find_object::ParametersToolBox</class>
<extends>QToolBox</extends> <extends>QToolBox</extends>
<header>ParametersToolBox.h</header> <header>ParametersToolBox.h</header>
<container>1</container> <container>1</container>

View File

@ -1,3 +1,29 @@
/*
Copyright (c) 2011-2014, 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 <COPYRIGHT HOLDER> 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.
*/
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>

View File

@ -1,9 +1,29 @@
/* /*
* TCPClient.cpp Copyright (c) 2011-2014, Mathieu Labbe - IntRoLab - Universite de Sherbrooke
* All rights reserved.
* Created on: 2014-05-05
* Author: mathieu 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 <COPYRIGHT HOLDER> 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.
*/
#include "TcpClient.h" #include "TcpClient.h"
#include "find_object/DetectionInfo.h" #include "find_object/DetectionInfo.h"
@ -12,6 +32,8 @@
#include <QtCore/QPointF> #include <QtCore/QPointF>
#include <QtCore/QTime> #include <QtCore/QTime>
using namespace find_object;
TcpClient::TcpClient(QObject *parent) : TcpClient::TcpClient(QObject *parent) :
QTcpSocket(parent), QTcpSocket(parent),
blockSize_(0) blockSize_(0)

View File

@ -1,9 +1,29 @@
/* /*
* TCPClient.h Copyright (c) 2011-2014, Mathieu Labbe - IntRoLab - Universite de Sherbrooke
* All rights reserved.
* Created on: 2014-05-05
* Author: mathieu 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 <COPYRIGHT HOLDER> 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 TCPCLIENT_H_ #ifndef TCPCLIENT_H_
#define TCPCLIENT_H_ #define TCPCLIENT_H_

View File

@ -1,9 +1,29 @@
/* /*
* main.cpp Copyright (c) 2011-2014, Mathieu Labbe - IntRoLab - Universite de Sherbrooke
* All rights reserved.
* Created on: 2014-05-05
* Author: mathieu 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 <COPYRIGHT HOLDER> 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.
*/
#include <QtNetwork/QNetworkInterface> #include <QtNetwork/QNetworkInterface>
#include <QtCore/QCoreApplication> #include <QtCore/QCoreApplication>

View File

@ -1,10 +1,29 @@
/* /*
* ImagesTcpServer.cpp Copyright (c) 2011-2014, Mathieu Labbe - IntRoLab - Universite de Sherbrooke
* All rights reserved.
* Created on: 2014-05-21
* Author: mathieu
*/
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 <COPYRIGHT HOLDER> 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.
*/
#include "find_object/Settings.h" #include "find_object/Settings.h"
#include "find_object/QtOpenCV.h" #include "find_object/QtOpenCV.h"
@ -14,6 +33,8 @@
#include <QtNetwork/QTcpSocket> #include <QtNetwork/QTcpSocket>
#include <QtGui/QTransform> #include <QtGui/QTransform>
using namespace find_object;
ImagesTcpServer::ImagesTcpServer(float hz, const QString & path, QObject * parent) : ImagesTcpServer::ImagesTcpServer(float hz, const QString & path, QObject * parent) :
QTcpSocket(parent) QTcpSocket(parent)
{ {

View File

@ -1,9 +1,29 @@
/* /*
* ImagesTcpServer.h Copyright (c) 2011-2014, Mathieu Labbe - IntRoLab - Universite de Sherbrooke
* All rights reserved.
* Created on: 2014-05-21
* Author: mathieu 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 <COPYRIGHT HOLDER> 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 IMAGESTCPSERVER_H_ #ifndef IMAGESTCPSERVER_H_
#define IMAGESTCPSERVER_H_ #define IMAGESTCPSERVER_H_
@ -29,7 +49,7 @@ Q_SIGNALS:
void connectionLost(); void connectionLost();
private: private:
Camera camera_; find_object::Camera camera_;
}; };
#endif /* TCPCLIENT_H_ */ #endif /* TCPCLIENT_H_ */

View File

@ -1,9 +1,29 @@
/* /*
* main.cpp Copyright (c) 2011-2014, Mathieu Labbe - IntRoLab - Universite de Sherbrooke
* All rights reserved.
* Created on: 2014-05-05
* Author: mathieu 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 <COPYRIGHT HOLDER> 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.
*/
#include <QtNetwork/QNetworkInterface> #include <QtNetwork/QNetworkInterface>
#include <QtCore/QCoreApplication> #include <QtCore/QCoreApplication>

View File

@ -1,9 +1,29 @@
/* /*
* TcpResponse.cpp Copyright (c) 2011-2014, Mathieu Labbe - IntRoLab - Universite de Sherbrooke
* All rights reserved.
* Created on: 2014-05-05
* Author: mathieu 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 <COPYRIGHT HOLDER> 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.
*/
#include "TcpResponse.h" #include "TcpResponse.h"

View File

@ -1,9 +1,29 @@
/* /*
* TCPResponse.h Copyright (c) 2011-2014, Mathieu Labbe - IntRoLab - Universite de Sherbrooke
* All rights reserved.
* Created on: 2014-05-05
* Author: mathieu 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 <COPYRIGHT HOLDER> 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 TCPRESPONSE_H_ #ifndef TCPRESPONSE_H_
#define TCPRESPONSE_H_ #define TCPRESPONSE_H_
@ -20,7 +40,7 @@ class TcpResponse : public QTcpSocket
Q_OBJECT; Q_OBJECT;
public: public:
TcpResponse(QObject * parent = 0); TcpResponse(QObject * parent = 0);
const DetectionInfo & info() const {return info_;} const find_object::DetectionInfo & info() const {return info_;}
bool dataReceived() const {return dataReceived_;} bool dataReceived() const {return dataReceived_;}
private Q_SLOTS: private Q_SLOTS:
@ -33,7 +53,7 @@ Q_SIGNALS:
private: private:
quint16 blockSize_; quint16 blockSize_;
DetectionInfo info_; find_object::DetectionInfo info_;
bool dataReceived_; bool dataReceived_;
}; };

View File

@ -1,9 +1,29 @@
/* /*
* main.cpp Copyright (c) 2011-2014, Mathieu Labbe - IntRoLab - Universite de Sherbrooke
* All rights reserved.
* Created on: 2014-05-05
* Author: mathieu 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 <COPYRIGHT HOLDER> 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.
*/
#include <QtNetwork/QNetworkInterface> #include <QtNetwork/QNetworkInterface>
#include <QtCore/QCoreApplication> #include <QtCore/QCoreApplication>
@ -13,6 +33,8 @@
#include "TcpResponse.h" #include "TcpResponse.h"
#include "find_object/JsonWriter.h" #include "find_object/JsonWriter.h"
using namespace find_object;
void showUsage() void showUsage()
{ {
printf("\ntcpRequest [options] --scene image.png --out # --in #\n" printf("\ntcpRequest [options] --scene image.png --out # --in #\n"