Commit 47d7ad2e authored by Vadim Pisarevsky's avatar Vadim Pisarevsky

Merge pull request #163 from mshabunin/fix-cvv-build-only

Fixed cvv module build
parents 219fbc00 63a8a60b
......@@ -5,7 +5,7 @@ endif()
# we need C++11 and want warnings:
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wextra -pedantic")
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wshadow)
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wshadow -Wmissing-declarations)
# Qt5
set(CMAKE_AUTOMOC ON)
......
#ifndef __OPENCV_CVV_HPP__
#define __OPENCV_CVV_HPP__
/**
@defgroup cvv GUI for Interactive Visual Debugging of Computer Vision Programs
Namespace for all functions is **cvv**, i.e. *cvv::showImage()*.
Compilation:
- For development, i.e. for cvv GUI to show up, compile your code using cvv with
*g++ -DCVVISUAL_DEBUGMODE*.
- For release, i.e. cvv calls doing nothing, compile your code without above flag.
See cvv tutorial for a commented example application using cvv.
*/
#include <opencv2/cvv/call_meta_data.hpp>
#include <opencv2/cvv/debug_mode.hpp>
#include <opencv2/cvv/dmatch.hpp>
#include <opencv2/cvv/filter.hpp>
#include <opencv2/cvv/final_show.hpp>
#include <opencv2/cvv/show_image.hpp>
#endif //__OPENCV_CVV_HPP__
/**
@defgroup cvv GUI for Interactive Visual Debugging of Computer Vision Programs
Namespace for all functions is **cvv**, i.e. *cvv::showImage()*.
Compilation:
- For development, i.e. for cvv GUI to show up, compile your code using cvv with
*g++ -DCVVISUAL_DEBUGMODE*.
- For release, i.e. cvv calls doing nothing, compile your code without above flag.
See cvv tutorial for a commented example application using cvv.
*/
#include <opencv2/cvv/call_meta_data.hpp>
#include <opencv2/cvv/debug_mode.hpp>
#include <opencv2/cvv/dmatch.hpp>
#include <opencv2/cvv/filter.hpp>
#include <opencv2/cvv/final_show.hpp>
#include <opencv2/cvv/show_image.hpp>
#ifdef __OPENCV_BUILD
#error this is a compatibility header which should not be used inside the OpenCV library
#endif
#include "opencv2/cvv.hpp"
......@@ -3,8 +3,8 @@
#include <string>
#include "opencv2/core/core.hpp"
#include "opencv2/features2d/features2d.hpp"
#include "opencv2/core.hpp"
#include "opencv2/features2d.hpp"
#include "call_meta_data.hpp"
#include "debug_mode.hpp"
......@@ -21,7 +21,7 @@ namespace cvv
namespace impl
{
void debugDMatch(cv::InputArray img1, std::vector<cv::KeyPoint> keypoints1,
CV_EXPORTS void debugDMatch(cv::InputArray img1, std::vector<cv::KeyPoint> keypoints1,
cv::InputArray img2, std::vector<cv::KeyPoint> keypoints2,
std::vector<cv::DMatch> matches, const CallMetaData &data,
const char *description, const char *view,
......
......@@ -3,7 +3,7 @@
#include <string>
#include "opencv2/core/core.hpp"
#include "opencv2/core.hpp"
#include "call_meta_data.hpp"
#include "debug_mode.hpp"
......@@ -21,7 +21,7 @@ namespace cvv
namespace impl
{
// implementation outside API
void debugFilter(cv::InputArray original, cv::InputArray result,
CV_EXPORTS void debugFilter(cv::InputArray original, cv::InputArray result,
const CallMetaData &data, const char *description,
const char *view);
} // namespace impl
......
#ifndef CVVISUAL_FINAL_SHOW_HPP
#define CVVISUAL_FINAL_SHOW_HPP
#include "opencv2/core.hpp"
#include "debug_mode.hpp"
namespace cvv
......@@ -11,7 +12,7 @@ namespace cvv
namespace impl
{
void finalShow();
CV_EXPORTS void finalShow();
}
/** @brief Passes the control to the debug-window for a last time.
......
......@@ -3,7 +3,7 @@
#include <string>
#include "opencv2/core/core.hpp"
#include "opencv2/core.hpp"
#include "call_meta_data.hpp"
#include "debug_mode.hpp"
......@@ -21,7 +21,7 @@ namespace cvv
namespace impl
{
// implementation outside API
void showImage(cv::InputArray img, const CallMetaData &data,
CV_EXPORTS void showImage(cv::InputArray img, const CallMetaData &data,
const char *description, const char *view);
} // namespace impl
......
......@@ -3,9 +3,11 @@
#include <iostream>
// library includes
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/features2d/features2d.hpp>
#include <opencv2/imgproc.hpp>
#include <opencv2/features2d.hpp>
#include <opencv2/imgproc/types_c.h>
#include <opencv2/videoio.hpp>
#include <opencv2/videoio/videoio_c.h>
#define CVVISUAL_DEBUGMODE
#include <opencv2/cvv/debug_mode.hpp>
......@@ -14,6 +16,7 @@
#include <opencv2/cvv/dmatch.hpp>
#include <opencv2/cvv/final_show.hpp>
using namespace cv;
template<class T> std::string toString(const T& p_arg)
{
......@@ -83,7 +86,7 @@ main(int argc, char** argv)
cv::Mat prevDescriptors;
int maxFeatureCount = 500;
cv::ORB detector(maxFeatureCount);
Ptr<ORB> detector = ORB::create(maxFeatureCount);
cv::BFMatcher matcher(cv::NORM_HAMMING);
......@@ -105,7 +108,7 @@ main(int argc, char** argv)
// detect ORB features
std::vector<cv::KeyPoint> keypoints;
cv::Mat descriptors;
detector(imgGray, cv::noArray(), keypoints, descriptors);
detector->detectAndCompute(imgGray, cv::noArray(), keypoints, descriptors);
printf("%d: detected %zd keypoints\n", imgId, keypoints.size());
// match them to previous image (if available)
......
#ifndef CVVISUAL_EXTENSION_API_HPP
#define CVVISUAL_EXTENSION_API_HPP
#include <opencv2/core/core.hpp>
#include <opencv2/core.hpp>
#include <QString>
#include <QWidget>
......
......@@ -3,8 +3,8 @@
#include <utility>
#include <algorithm>
#include <opencv2/core/core.hpp>
#include <opencv2/features2d/features2d.hpp>
#include <opencv2/core.hpp>
#include <opencv2/features2d.hpp>
#include <QVBoxLayout>
#include <QStringList>
......@@ -128,7 +128,7 @@ void RawviewGroupSubtable::customMenuRequested(QPoint location)
{
menu->addAction(new QAction("Show selected rows in view", this));
}
auto formats = RawviewTableRow::getAvailableTextFormats();
for (auto format : formats)
{
......
......@@ -10,6 +10,8 @@
#include "../qtutil/util.hpp"
#include "../stfl/stringutils.hpp"
#include <set>
namespace cvv
{
namespace gui
......
......@@ -4,8 +4,8 @@
#include <vector>
#include <utility>
#include <opencv2/core/core.hpp>
#include <opencv2/features2d/features2d.hpp>
#include <opencv2/core.hpp>
#include <opencv2/features2d.hpp>
#include <QTableWidget>
#include <QString>
......
......@@ -5,8 +5,8 @@
#include <QString>
#include "opencv2/core/core.hpp"
#include "opencv2/features2d/features2d.hpp"
#include "opencv2/core.hpp"
#include "opencv2/features2d.hpp"
#include "opencv2/cvv/call_meta_data.hpp"
......
......@@ -4,7 +4,7 @@
#include <memory>
#include <vector>
#include "opencv2/core/core.hpp"
#include "opencv2/core.hpp"
#include "call.hpp"
#include "../controller/view_controller.hpp"
......
......@@ -5,7 +5,7 @@
#include "call.hpp"
#include "opencv2/core/core.hpp"
#include "opencv2/core.hpp"
namespace cvv
{
......
......@@ -5,8 +5,8 @@
#include <utility>
#include <type_traits>
#include "opencv2/core/core.hpp"
#include "opencv2/features2d/features2d.hpp"
#include "opencv2/core.hpp"
#include "opencv2/features2d.hpp"
#include "call.hpp"
......
......@@ -5,7 +5,7 @@
#include <QString>
#include "opencv2/core/core.hpp"
#include "opencv2/core.hpp"
namespace cvv
{
......
......@@ -5,7 +5,7 @@
#include <vector>
#include <chrono>
#include "opencv2/core/core.hpp"
#include "opencv2/core.hpp"
#include <QWidget>
#include <QCheckBox>
......
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/core.hpp>
#include <opencv2/imgproc.hpp>
#include <opencv2/imgproc/types_c.h>
#include <unordered_map>
......
......@@ -10,7 +10,7 @@
#include <QObject>
#include <QString>
#include "opencv2/core/core.hpp"
#include "opencv2/core.hpp"
#include "../filterfunctionwidget.hpp"
#include "../../util/observer_ptr.hpp"
......
#include <opencv2/core/core.hpp>
#include <opencv2/core.hpp>
#include <Qt>
#include "QLabel"
......
#include "sobelfilterwidget.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/imgproc.hpp"
#include "opencv2/imgproc/types_c.h"
#include <QVBoxLayout>
#include <QLabel>
......
......@@ -9,7 +9,7 @@
#include <QString>
// OCV
#include "opencv2/core/core.hpp"
#include "opencv2/core.hpp"
// cvv
#include "signalslot.hpp"
......
......@@ -12,7 +12,7 @@
#include <QPushButton>
// OCV
#include "opencv2/core/core.hpp"
#include "opencv2/core.hpp"
// CVV
#include "signalslot.hpp"
......
......@@ -123,10 +123,10 @@ cv::Mat Histogram::drawHist(const std::vector<cv::Mat>& channelHists, cv::Size h
int thickness = 1;
for (int binTextId = 0; binTextId < binCount; binTextId += binTextStep)
{
auto text = QString::number(binTextId).toStdString();
auto textSize = cv::getTextSize(text, fontFace, fontScale, thickness, NULL);
auto text = QString::number(binTextId).toLatin1();
auto textSize = cv::getTextSize(text.data(), fontFace, fontScale, thickness, NULL);
auto textPt = cv::Point(std::max(0, binWidth * binTextId - textSize.width/2), histSize.height);
cv::putText(histMat, text, textPt, fontFace, fontScale, textColor, thickness);
cv::putText(histMat, text.data(), textPt, fontFace, fontScale, textColor, thickness);
auto linePt1 = cv::Point(binWidth * binTextId, 0);
auto linePt2 = cv::Point(binWidth * binTextId, histSize.height - textSize.height);
cv::line(histMat, linePt1, linePt2, textColor);
......
......@@ -3,9 +3,8 @@
#include <QWidget>
#include <opencv2/core/core.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/opencv.hpp>
#include <opencv2/core.hpp>
#include <opencv2/imgproc.hpp>
#include "zoomableimage.hpp"
......
......@@ -5,7 +5,7 @@
#include <QColor>
#include "opencv2/core/core.hpp"
#include "opencv2/core.hpp"
namespace cvv
{
......
......@@ -9,8 +9,8 @@
#include <QWidget>
#include <QGraphicsScene>
#include "opencv2/core/core.hpp"
#include "opencv2/features2d/features2d.hpp"
#include "opencv2/core.hpp"
#include "opencv2/features2d.hpp"
#include "keypointsettings.hpp"
#include "../zoomableimage.hpp"
......
......@@ -9,8 +9,8 @@
#include <QWidget>
#include "opencv2/core/core.hpp"
#include "opencv2/features2d/features2d.hpp"
#include "opencv2/core.hpp"
#include "opencv2/features2d.hpp"
#include "matchsettings.hpp"
#include "cvvkeypoint.hpp"
......
......@@ -3,7 +3,7 @@
#include <vector>
#include "opencv2/features2d/features2d.hpp"
#include "opencv2/features2d.hpp"
#include "keypointvaluechooser.hpp"
#include "keypointsettings.hpp"
......
......@@ -3,7 +3,7 @@
#include <vector>
#include "opencv2/features2d/features2d.hpp"
#include "opencv2/features2d.hpp"
#include "matchsettings.hpp"
......
#ifndef CVVISUAL_KEY_POINT_INTERVALL_SELECTOR
#define CVVISUAL_KEY_POINT_INTERVALL_SELECTOR
#include "opencv2/features2d/features2d.hpp"
#include "opencv2/features2d.hpp"
#include "keypointselection.hpp"
#include "keypointvaluechooser.hpp"
......
......@@ -5,7 +5,7 @@
#include "../../util/util.hpp"
#include "opencv2/features2d/features2d.hpp"
#include "opencv2/features2d.hpp"
#include "keypointselectionselector.hpp"
#include "keypointsettingsselector.hpp"
......
......@@ -3,7 +3,7 @@
#include <vector>
#include "opencv2/features2d/features2d.hpp"
#include "opencv2/features2d.hpp"
#include "keypointselection.hpp"
#include "keypointvaluechooser.hpp"
......
......@@ -3,7 +3,7 @@
#include <QFrame>
#include "opencv2/features2d/features2d.hpp"
#include "opencv2/features2d.hpp"
namespace cvv{ namespace qtutil{
......
......@@ -3,7 +3,7 @@
#include <vector>
#include "opencv2/features2d/features2d.hpp"
#include "opencv2/features2d.hpp"
#include "keypointselection.hpp"
#include "../registerhelper.hpp"
......
......@@ -3,7 +3,7 @@
#include <vector>
#include "opencv2/features2d/features2d.hpp"
#include "opencv2/features2d.hpp"
#include "keypointsettings.hpp"
#include "../registerhelper.hpp"
......
......@@ -5,7 +5,7 @@
#include <QPushButton>
#include "opencv2/features2d/features2d.hpp"
#include "opencv2/features2d.hpp"
#include "keypointsettings.hpp"
namespace cvv{ namespace qtutil{
......
......@@ -4,7 +4,7 @@
#include <QWidget>
#include <QComboBox>
#include "opencv2/features2d/features2d.hpp"
#include "opencv2/features2d.hpp"
namespace cvv{ namespace qtutil{
......
#ifndef CVVISUAL_MATCH_INTERVALL_SELECTOR
#define CVVISUAL_MATCH_INTERVALL_SELECTOR
#include "opencv2/features2d/features2d.hpp"
#include "opencv2/features2d.hpp"
#include "matchselection.hpp"
#include "../intervallselector.hpp"
......
......@@ -3,7 +3,7 @@
#include <QCheckBox>
#include "opencv2/features2d/features2d.hpp"
#include "opencv2/features2d.hpp"
#include "matchselectionselector.hpp"
#include "matchsettingsselector.hpp"
......
......@@ -3,7 +3,7 @@
#include <vector>
#include "opencv2/features2d/features2d.hpp"
#include "opencv2/features2d.hpp"
#include "matchselection.hpp"
#include "../portionselector.hpp"
......
......@@ -8,8 +8,8 @@
#include <QGraphicsScene>
#include <QGraphicsProxyWidget>
#include "opencv2/core/core.hpp"
#include "opencv2/features2d/features2d.hpp"
#include "opencv2/core.hpp"
#include "opencv2/features2d.hpp"
#include "cvvmatch.hpp"
#include "cvvkeypoint.hpp"
#include "zoomableproxyobject.hpp"
......
......@@ -3,7 +3,7 @@
#include <QFrame>
#include "opencv2/features2d/features2d.hpp"
#include "opencv2/features2d.hpp"
namespace cvv{ namespace qtutil{
......
......@@ -3,7 +3,7 @@
#include <vector>
#include "opencv2/features2d/features2d.hpp"
#include "opencv2/features2d.hpp"
#include "matchselection.hpp"
#include "../registerhelper.hpp"
......
......@@ -3,7 +3,7 @@
#include <vector>
#include "opencv2/features2d/features2d.hpp"
#include "opencv2/features2d.hpp"
#include "matchsettings.hpp"
#include "../registerhelper.hpp"
......
......@@ -5,7 +5,7 @@
#include <QPushButton>
#include "opencv2/features2d/features2d.hpp"
#include "opencv2/features2d.hpp"
#include "matchsettings.hpp"
#include "cvvmatch.hpp"
......
......@@ -3,8 +3,8 @@
#include <vector>
#include <opencv2/core/core.hpp>
#include <opencv2/features2d/features2d.hpp>
#include <opencv2/core.hpp>
#include <opencv2/features2d.hpp>
#include <QMainWindow>
#include <QString>
......
......@@ -3,7 +3,7 @@
#include <QWidget>
#include "opencv2/features2d/features2d.hpp"
#include "opencv2/features2d.hpp"
#include "matchmanagement.hpp"
#include "keypointmanagement.hpp"
......
......@@ -5,7 +5,7 @@
#include <functional>
#include <stdexcept>
#include "opencv2/core/core.hpp"
#include <opencv2/core.hpp>
// QT
#include <QObject>
......
#ifndef CVVISUAL_TYPES_HPP
#define CVVISUAL_TYPES_HPP
#include "opencv2/core/core.hpp"
#include <opencv2/core.hpp>
namespace cvv
......
......@@ -5,8 +5,6 @@
#include <thread>
#include <functional>
#include <opencv/highgui.h>
#include <QDesktopServices>
#include <QUrl>
#include <QSettings>
......
......@@ -9,8 +9,9 @@
#include <QPixmap>
#include <QSet>
#include "opencv2/core/core.hpp"
#include "opencv2/opencv.hpp"
#include "opencv2/core.hpp"
#include "opencv2/imgproc.hpp"
#include "opencv2/features2d.hpp"
namespace cvv
......
......@@ -12,6 +12,7 @@
#include "types.hpp"
#include <iostream>
#include <sstream>
/**
* @brief Puts a value into a stringstream. (used to print char and uchar as a
......
......@@ -12,7 +12,7 @@
#include <QTimer>
#include <QScrollBar>
#include "opencv2/core/core.hpp"
#include "opencv2/core.hpp"
#include "util.hpp"
#include "../util/util.hpp"
......
......@@ -6,7 +6,7 @@
#include <QWidget>
#include <QDoubleSpinBox>
#include "opencv2/core/core.hpp"
#include "opencv2/core.hpp"
#include "zoomableimage.hpp"
#include "util.hpp"
......
......@@ -3,7 +3,7 @@
#include <QWidget>
#include "opencv2/core/core.hpp"
#include "opencv2/core.hpp"
#include "filter_view.hpp"
......
......@@ -5,7 +5,7 @@
#include <unordered_map>
#include <vector>
#include "opencv2/core/core.hpp"
#include "opencv2/core.hpp"
#include <QApplication>
#include <QGridLayout>
......
......@@ -7,7 +7,7 @@
#include <QWidget>
#include <vector>
#include <opencv2/core/core.hpp>
#include <opencv2/core.hpp>
namespace cvv
{
......
......@@ -6,7 +6,7 @@
#include <QHBoxLayout>
#include <QGridLayout>
#include <opencv2/core/core.hpp>
#include <opencv2/core.hpp>
#include "../qtutil/accordion.hpp"
#include "../qtutil/zoomableimageoptpanel.hpp"
......
......@@ -4,7 +4,7 @@
#include <QString>
#include <QWidget>
#include <opencv2/core/core.hpp>
#include <opencv2/core.hpp>
#include "../qtutil/zoomableimage.hpp"
#include "../util/observer_ptr.hpp"
......@@ -44,12 +44,12 @@ signals:
* @param parent of this QWidget.
**/
ImageView(const cv::Mat &image, QWidget *parent = nullptr);
/**
* @brief Shows the full image.
*/
void showFullImage();
private:
util::ObserverPtr<qtutil::ZoomableImage> image;
};
......@@ -57,4 +57,3 @@ signals:
} // namespaces
#endif
......@@ -3,8 +3,8 @@
#include <vector>
#include "opencv2/core/core.hpp"
#include "opencv2/features2d/features2d.hpp"
#include "opencv2/core.hpp"
#include "opencv2/features2d.hpp"
#include "../qtutil/matchview/matchmanagement.hpp"
#include "../qtutil/matchview/keypointmanagement.hpp"
......
......@@ -5,8 +5,8 @@
#include <QWidget>
#include <vector>
#include <opencv2/core/core.hpp>
#include <opencv2/features2d/features2d.hpp>
#include <opencv2/core.hpp>
#include <opencv2/features2d.hpp>
#include "../impl/match_call.hpp"
......
......@@ -3,8 +3,8 @@
#include <vector>
#include "opencv2/core/core.hpp"
#include "opencv2/features2d/features2d.hpp"
#include "opencv2/core.hpp"
#include "opencv2/features2d.hpp"
#include "../qtutil/matchview/matchmanagement.hpp"
#include "match_view.hpp"
......
......@@ -3,8 +3,8 @@
#include <vector>
#include <opencv2/core/core.hpp>
#include <opencv2/features2d/features2d.hpp>
#include <opencv2/core.hpp>
#include <opencv2/features2d.hpp>
#include <QWidget>
#include <QString>
......@@ -74,7 +74,7 @@ public:
* @param parent of this QWidget.
*/
Rawview(const impl::MatchCall &call, QWidget *parent = nullptr)
: Rawview(call.keyPoints1(), call.keyPoints2(),
: Rawview(call.keyPoints1(), call.keyPoints2(),
call.matches(), call.usesTrainDescriptor())
{
setParent(parent);
......@@ -87,11 +87,11 @@ public:
* menus?
*/
bool doesShowShowInViewMenu();
virtual std::vector<cv::DMatch> getMatchSelection();
virtual std::vector<cv::KeyPoint> getKeyPointSelection();
signals:
/**
* @brief Requests to update the left footer of the window that displays
......@@ -119,7 +119,7 @@ signals:
* @param keyPoints seleted single key points
*/
void keyPointsSelected(const std::vector<cv::KeyPoint> &keyPoints);
public slots:
/**
......@@ -138,11 +138,11 @@ public slots:
*/
void selectKeyPoints(const std::vector<cv::KeyPoint> &keyPoints);
virtual void setMatchSelection(std::vector<cv::DMatch> matches);
virtual void setKeyPointSelection(std::vector<cv::KeyPoint> keyPoints);
/**
* @brief Issues the matchesSelected and the keyPointsSelected signal.
* It uses the referenced key points (via the given matches) to find the
......@@ -150,7 +150,7 @@ public slots:
* @param matches the user selected matches.
*/
void matchesKeyPointsSelected(const std::vector<cv::DMatch> &matches);
private slots:
void filterQuery(QString query);
......@@ -170,7 +170,7 @@ private:
gui::RawviewTable *table;
bool showShowInViewMenu = false;
bool usesTrainDescriptor = true;
void initEngine();
};
}
......
......@@ -3,7 +3,7 @@
#include <QWidget>
#include "opencv2/core/core.hpp"
#include "opencv2/core.hpp"
#include "filter_view.hpp"
#include "../impl/filter_call.hpp"
......
......@@ -3,8 +3,8 @@
#include <vector>
#include "opencv2/core/core.hpp"
#include "opencv2/features2d/features2d.hpp"
#include "opencv2/core.hpp"
#include "opencv2/features2d.hpp"
#include "../qtutil/matchview/matchmanagement.hpp"
#include "../qtutil/matchview/keypointmanagement.hpp"
......
......@@ -11,7 +11,7 @@
#include <iostream>
#include <string>
#include <opencv2/ts/ts.hpp>
#include <opencv2/cvv/cvv.hpp>
#include <opencv2/ts.hpp>
#include <opencv2/cvv.hpp>
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment