Fixed or disabled some warnings in several cvv, ovis and sfm modules

pull/1793/head
Maksim Shabunin 6 years ago
parent c0ea1d203f
commit a0ad83f117
  1. 9
      modules/cvv/CMakeLists.txt
  2. 2
      modules/cvv/src/gui/call_window.hpp
  3. 2
      modules/cvv/src/gui/main_call_window.hpp
  4. 2
      modules/cvv/src/gui/overview_group_subtable.hpp
  5. 4
      modules/cvv/src/qtutil/filter/diffFilterWidget.hpp
  6. 4
      modules/cvv/src/qtutil/filter/overlayfilterwidget.hpp
  7. 4
      modules/cvv/src/qtutil/matchview/cvvkeypoint.hpp
  8. 4
      modules/cvv/src/qtutil/matchview/cvvmatch.hpp
  9. 2
      modules/cvv/src/qtutil/matchview/keypointmanagement.hpp
  10. 2
      modules/cvv/src/qtutil/matchview/keypointselectionselector.hpp
  11. 2
      modules/cvv/src/qtutil/matchview/matchmanagement.hpp
  12. 2
      modules/cvv/src/qtutil/matchview/matchselectionselector.hpp
  13. 4
      modules/cvv/src/qtutil/matchview/showinrawviewwidget.hpp
  14. 6
      modules/cvv/src/qtutil/matchview/zoomableproxyobject.hpp
  15. 3
      modules/cvv/src/qtutil/stfl_query_widget_lineedit.hpp
  16. 8
      modules/cvv/src/view/rawview.hpp
  17. 46
      modules/ovis/src/ovis.cpp
  18. 1
      modules/sfm/CMakeLists.txt

@ -1,4 +1,4 @@
if(NOT HAVE_QT5) if(NOT HAVE_QT5 OR NOT HAVE_CXX11)
ocv_module_disable(cvv) ocv_module_disable(cvv)
return() return()
endif() endif()
@ -6,13 +6,6 @@ endif()
set(the_description "Debug visualization framework") set(the_description "Debug visualization framework")
ocv_add_module(cvv opencv_core opencv_imgproc opencv_features2d WRAP python) ocv_add_module(cvv opencv_core opencv_imgproc opencv_features2d WRAP python)
# we need C++11 and want warnings:
if(MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Qstd=c++11 /W4")
add_definitions(/D__func__=__FUNCTION__)
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wextra -pedantic")
endif()
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wshadow -Wmissing-declarations) ocv_warnings_disable(CMAKE_CXX_FLAGS -Wshadow -Wmissing-declarations)
# Qt5 # Qt5

@ -153,7 +153,7 @@ protected:
void initFooter(); void initFooter();
void closeEvent(QCloseEvent *event); void closeEvent(QCloseEvent *event) CV_OVERRIDE;
size_t getCallTabIdByTabIndex(int index); size_t getCallTabIdByTabIndex(int index);

@ -56,7 +56,7 @@ class MainCallWindow : public CallWindow
void hideCloseWindow(); void hideCloseWindow();
protected: protected:
void closeEvent(QCloseEvent *event); void closeEvent(QCloseEvent *event) CV_OVERRIDE;
private: private:
OverviewPanel *ovPanel; OverviewPanel *ovPanel;

@ -78,7 +78,7 @@ class OverviewGroupSubtable : public QWidget
void setRowGroup(stfl::ElementGroup<OverviewTableRow> &newGroup); void setRowGroup(stfl::ElementGroup<OverviewTableRow> &newGroup);
protected: protected:
void resizeEvent(QResizeEvent *event); void resizeEvent(QResizeEvent *event) CV_OVERRIDE;
private slots: private slots:
void rowClicked(int row, int collumn); void rowClicked(int row, int collumn);

@ -54,13 +54,13 @@ class DiffFilterFunction : public FilterFunctionWidget<2, 1>
* @param in Array of input matrices * @param in Array of input matrices
* @param out Array of output matrices * @param out Array of output matrices
*/ */
void applyFilter(InputArray in, OutputArray out) const; void applyFilter(InputArray in, OutputArray out) const CV_OVERRIDE;
/** /**
* @brief Checks whether matrices in 'in' can be processed by this * @brief Checks whether matrices in 'in' can be processed by this
* DiffFilter * DiffFilter
*/ */
std::pair<bool, QString> checkInput(InputArray in) const; std::pair<bool, QString> checkInput(InputArray in) const CV_OVERRIDE;
private: private:
DiffFilterType filterType_; DiffFilterType filterType_;

@ -44,7 +44,7 @@ class OverlayFilterWidget : public FilterFunctionWidget<2, 1>
* @param in Array of input matrices * @param in Array of input matrices
* @param out Array of output matrices * @param out Array of output matrices
*/ */
void applyFilter(InputArray in, OutputArray out) const; void applyFilter(InputArray in, OutputArray out) const CV_OVERRIDE;
/** /**
* Checks whether the matrices have the same size and same number of * Checks whether the matrices have the same size and same number of
@ -52,7 +52,7 @@ class OverlayFilterWidget : public FilterFunctionWidget<2, 1>
* @brief Checks whether matrices in "in" can be processed by Overlayfilter * @brief Checks whether matrices in "in" can be processed by Overlayfilter
* @param in Array of input matrices * @param in Array of input matrices
*/ */
std::pair<bool, QString> checkInput(InputArray in) const; std::pair<bool, QString> checkInput(InputArray in) const CV_OVERRIDE;
private: private:
double opacityOfFilterImg_; double opacityOfFilterImg_;

@ -52,7 +52,7 @@ class CVVKeyPoint : public QGraphicsObject,public cv::KeyPoint
* @brief boundingRect * @brief boundingRect
* @return the boundingRect * @return the boundingRect
*/ */
QRectF boundingRect() const; QRectF boundingRect() const CV_OVERRIDE;
/** /**
* @brief returns the keypoint * @brief returns the keypoint
@ -65,7 +65,7 @@ class CVVKeyPoint : public QGraphicsObject,public cv::KeyPoint
* @brief the paint function. * @brief the paint function.
*/ */
void paint(QPainter *painter, const QStyleOptionGraphicsItem *, void paint(QPainter *painter, const QStyleOptionGraphicsItem *,
QWidget *); QWidget *) CV_OVERRIDE;
/** /**
* @brief returns true if this keypoint is in the visble area of its * @brief returns true if this keypoint is in the visble area of its

@ -48,13 +48,13 @@ class CVVMatch : public QGraphicsObject,public cv::DMatch
* @brief returns the boundingrect of this Mathc * @brief returns the boundingrect of this Mathc
* @return the boundingrect of this Mathc * @return the boundingrect of this Mathc
*/ */
virtual QRectF boundingRect() const; virtual QRectF boundingRect() const CV_OVERRIDE;
/** /**
* @brief the paint function * @brief the paint function
*/ */
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *, virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *,
QWidget *); QWidget *) CV_OVERRIDE;
/** /**
* @brief returns the left keypoint. * @brief returns the left keypoint.

@ -36,7 +36,7 @@ public:
/** /**
* @brief set the settings if this KeyPoint is selected * @brief set the settings if this KeyPoint is selected
*/ */
virtual void setSettings(CVVKeyPoint &match); virtual void setSettings(CVVKeyPoint &match) CV_OVERRIDE;
/** /**
* @brief add the given KeyPointSettingsSelector to the list * @brief add the given KeyPointSettingsSelector to the list

@ -28,7 +28,7 @@ public:
* @brief select keypoint of the given selection * @brief select keypoint of the given selection
* @return the selected matches * @return the selected matches
*/ */
std::vector<cv::KeyPoint> select(const std::vector<cv::KeyPoint>& selection); std::vector<cv::KeyPoint> select(const std::vector<cv::KeyPoint>& selection) CV_OVERRIDE;
public slots: public slots:
/** /**

@ -35,7 +35,7 @@ public:
/** /**
* @brief set the settings if this match is selected * @brief set the settings if this match is selected
*/ */
virtual void setSettings(CVVMatch &match); virtual void setSettings(CVVMatch &match) CV_OVERRIDE;
/** /**
* @brief add the given MatchSettingsSelector to the list * @brief add the given MatchSettingsSelector to the list

@ -28,7 +28,7 @@ public:
* @brief select matches of the given selection * @brief select matches of the given selection
* @return the selected matches * @return the selected matches
*/ */
std::vector<cv::DMatch> select(const std::vector<cv::DMatch>& selection); std::vector<cv::DMatch> select(const std::vector<cv::DMatch>& selection) CV_OVERRIDE;
public slots: public slots:
/** /**

@ -41,9 +41,9 @@ public:
~ShowInRawView(); ~ShowInRawView();
protected: protected:
virtual void hideEvent(QHideEvent * ); virtual void hideEvent(QHideEvent * ) CV_OVERRIDE;
virtual void showEvent(QShowEvent *); virtual void showEvent(QShowEvent *) CV_OVERRIDE;
private slots: private slots:

@ -20,17 +20,17 @@ class ZoomableProxyObject : public QGraphicsProxyWidget
public: public:
ZoomableProxyObject(ZoomableImage *zoom); ZoomableProxyObject(ZoomableImage *zoom);
~ZoomableProxyObject() ~ZoomableProxyObject() CV_OVERRIDE
{ {
} }
protected: protected:
virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent *event) virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent *event) CV_OVERRIDE
{ {
event->ignore(); event->ignore();
} }
virtual void wheelEvent(QGraphicsSceneWheelEvent *event); virtual void wheelEvent(QGraphicsSceneWheelEvent *event) CV_OVERRIDE;
private: private:
ZoomableImage *image_; ZoomableImage *image_;

@ -6,6 +6,7 @@
#include <QKeyEvent> #include <QKeyEvent>
#include <QAbstractItemView> #include <QAbstractItemView>
#include "opencv2/core/cvdef.h"
#include "stfl_query_widget_completer.hpp" #include "stfl_query_widget_completer.hpp"
namespace cvv namespace cvv
@ -41,7 +42,7 @@ class STFLQueryWidgetLineEdit : public QLineEdit
void showSuggestions(QStringList suggestions); void showSuggestions(QStringList suggestions);
protected: protected:
void keyPressEvent(QKeyEvent *e); void keyPressEvent(QKeyEvent *e) CV_OVERRIDE;
signals: signals:
/** /**

@ -88,9 +88,9 @@ public:
*/ */
bool doesShowShowInViewMenu(); bool doesShowShowInViewMenu();
virtual std::vector<cv::DMatch> getMatchSelection(); virtual std::vector<cv::DMatch> getMatchSelection() CV_OVERRIDE;
virtual std::vector<cv::KeyPoint> getKeyPointSelection(); virtual std::vector<cv::KeyPoint> getKeyPointSelection() CV_OVERRIDE;
signals: signals:
/** /**
@ -139,9 +139,9 @@ public slots:
void selectKeyPoints(const std::vector<cv::KeyPoint> &keyPoints); void selectKeyPoints(const std::vector<cv::KeyPoint> &keyPoints);
virtual void setMatchSelection(std::vector<cv::DMatch> matches); virtual void setMatchSelection(std::vector<cv::DMatch> matches) CV_OVERRIDE;
virtual void setKeyPointSelection(std::vector<cv::KeyPoint> keyPoints); virtual void setKeyPointSelection(std::vector<cv::KeyPoint> keyPoints) CV_OVERRIDE;
/** /**
* @brief Issues the matchesSelected and the keyPointsSelected signal. * @brief Issues the matchesSelected and the keyPointsSelected signal.

@ -187,13 +187,13 @@ struct Application : public OgreBites::ApplicationContext, public OgreBites::Inp
// empty impl to show cursor // empty impl to show cursor
} }
bool keyPressed(const OgreBites::KeyboardEvent& evt) bool keyPressed(const OgreBites::KeyboardEvent& evt) CV_OVERRIDE
{ {
key_pressed = evt.keysym.sym; key_pressed = evt.keysym.sym;
return true; return true;
} }
bool oneTimeConfig() bool oneTimeConfig() CV_OVERRIDE
{ {
Ogre::RenderSystem* rs = getRoot()->getRenderSystemByName(RENDERSYSTEM_NAME); Ogre::RenderSystem* rs = getRoot()->getRenderSystemByName(RENDERSYSTEM_NAME);
CV_Assert(rs); CV_Assert(rs);
@ -202,7 +202,7 @@ struct Application : public OgreBites::ApplicationContext, public OgreBites::Inp
} }
OgreBites::NativeWindowPair createWindow(const Ogre::String& name, uint32_t _w, uint32_t _h, OgreBites::NativeWindowPair createWindow(const Ogre::String& name, uint32_t _w, uint32_t _h,
NameValuePairList miscParams = NameValuePairList()) NameValuePairList miscParams = NameValuePairList()) CV_OVERRIDE
{ {
Ogre::String _name = name; Ogre::String _name = name;
if (!sceneMgr) if (!sceneMgr)
@ -224,7 +224,7 @@ struct Application : public OgreBites::ApplicationContext, public OgreBites::Inp
return ret; return ret;
} }
void locateResources() void locateResources() CV_OVERRIDE
{ {
OgreBites::ApplicationContext::locateResources(); OgreBites::ApplicationContext::locateResources();
ResourceGroupManager& rgm = ResourceGroupManager::getSingleton(); ResourceGroupManager& rgm = ResourceGroupManager::getSingleton();
@ -244,7 +244,7 @@ struct Application : public OgreBites::ApplicationContext, public OgreBites::Inp
} }
} }
void setup() void setup() CV_OVERRIDE
{ {
OgreBites::ApplicationContext::setup(); OgreBites::ApplicationContext::setup();
@ -338,7 +338,7 @@ public:
} }
} }
void setBackground(InputArray image) void setBackground(InputArray image) CV_OVERRIDE
{ {
CV_Assert(bgplane); CV_Assert(bgplane);
@ -357,7 +357,7 @@ public:
bgplane->setVisible(true); bgplane->setVisible(true);
} }
void setCompositors(const std::vector<String>& names) void setCompositors(const std::vector<String>& names) CV_OVERRIDE
{ {
CompositorManager& cm = CompositorManager::getSingleton(); CompositorManager& cm = CompositorManager::getSingleton();
// this should be applied to all owned render targets // this should be applied to all owned render targets
@ -382,7 +382,7 @@ public:
} }
} }
void setBackground(const Scalar& color) void setBackground(const Scalar& color) CV_OVERRIDE
{ {
// hide background plane // hide background plane
bgplane->setVisible(false); bgplane->setVisible(false);
@ -394,7 +394,7 @@ public:
frameSrc->getViewport(0)->setBackgroundColour(_color); frameSrc->getViewport(0)->setBackgroundColour(_color);
} }
void createEntity(const String& name, const String& meshname, InputArray tvec, InputArray rot) void createEntity(const String& name, const String& meshname, InputArray tvec, InputArray rot) CV_OVERRIDE
{ {
Entity* ent = sceneMgr->createEntity(name, meshname, RESOURCEGROUP_NAME); Entity* ent = sceneMgr->createEntity(name, meshname, RESOURCEGROUP_NAME);
@ -405,7 +405,7 @@ public:
node->attachObject(ent); node->attachObject(ent);
} }
void removeEntity(const String& name) { void removeEntity(const String& name) CV_OVERRIDE {
SceneNode& node = _getSceneNode(sceneMgr, name); SceneNode& node = _getSceneNode(sceneMgr, name);
node.getAttachedObject(name)->detachFromParent(); node.getAttachedObject(name)->detachFromParent();
@ -418,7 +418,7 @@ public:
} }
Rect2d createCameraEntity(const String& name, InputArray K, const Size& imsize, float zFar, Rect2d createCameraEntity(const String& name, InputArray K, const Size& imsize, float zFar,
InputArray tvec, InputArray rot) InputArray tvec, InputArray rot) CV_OVERRIDE
{ {
MaterialPtr mat = MaterialManager::getSingleton().create(name, RESOURCEGROUP_NAME); MaterialPtr mat = MaterialManager::getSingleton().create(name, RESOURCEGROUP_NAME);
Pass* rpass = mat->getTechniques()[0]->getPasses()[0]; Pass* rpass = mat->getTechniques()[0]->getPasses()[0];
@ -451,7 +451,7 @@ public:
} }
void createLightEntity(const String& name, InputArray tvec, InputArray rot, const Scalar& diffuseColour, void createLightEntity(const String& name, InputArray tvec, InputArray rot, const Scalar& diffuseColour,
const Scalar& specularColour) const Scalar& specularColour) CV_OVERRIDE
{ {
Light* light = sceneMgr->createLight(name); Light* light = sceneMgr->createLight(name);
light->setDirection(Vector3::NEGATIVE_UNIT_Z); light->setDirection(Vector3::NEGATIVE_UNIT_Z);
@ -466,7 +466,7 @@ public:
node->attachObject(light); node->attachObject(light);
} }
void updateEntityPose(const String& name, InputArray tvec, InputArray rot) void updateEntityPose(const String& name, InputArray tvec, InputArray rot) CV_OVERRIDE
{ {
SceneNode& node = _getSceneNode(sceneMgr, name); SceneNode& node = _getSceneNode(sceneMgr, name);
Quaternion q; Quaternion q;
@ -476,7 +476,7 @@ public:
node.translate(t, Ogre::Node::TS_LOCAL); node.translate(t, Ogre::Node::TS_LOCAL);
} }
void setEntityPose(const String& name, InputArray tvec, InputArray rot, bool invert) void setEntityPose(const String& name, InputArray tvec, InputArray rot, bool invert) CV_OVERRIDE
{ {
SceneNode& node = _getSceneNode(sceneMgr, name); SceneNode& node = _getSceneNode(sceneMgr, name);
Quaternion q; Quaternion q;
@ -486,7 +486,7 @@ public:
node.setPosition(t); node.setPosition(t);
} }
void setEntityProperty(const String& name, int prop, const String& value) void setEntityProperty(const String& name, int prop, const String& value) CV_OVERRIDE
{ {
CV_Assert(prop == ENTITY_MATERIAL); CV_Assert(prop == ENTITY_MATERIAL);
SceneNode& node = _getSceneNode(sceneMgr, name); SceneNode& node = _getSceneNode(sceneMgr, name);
@ -506,7 +506,7 @@ public:
ent->setMaterial(mat); ent->setMaterial(mat);
} }
void setEntityProperty(const String& name, int prop, const Scalar& value) void setEntityProperty(const String& name, int prop, const Scalar& value) CV_OVERRIDE
{ {
CV_Assert(prop == ENTITY_SCALE); CV_Assert(prop == ENTITY_SCALE);
SceneNode& node = _getSceneNode(sceneMgr, name); SceneNode& node = _getSceneNode(sceneMgr, name);
@ -541,7 +541,7 @@ public:
sceneMgr->getRootSceneNode()->createChildSceneNode()->attachObject(bgplane.get()); sceneMgr->getRootSceneNode()->createChildSceneNode()->attachObject(bgplane.get());
} }
void getScreenshot(OutputArray frame) void getScreenshot(OutputArray frame) CV_OVERRIDE
{ {
PixelFormat src_type = frameSrc->suggestPixelFormat(); PixelFormat src_type = frameSrc->suggestPixelFormat();
int dst_type = src_type == PF_BYTE_RGB ? CV_8UC3 : CV_32FC4; int dst_type = src_type == PF_BYTE_RGB ? CV_8UC3 : CV_32FC4;
@ -556,7 +556,7 @@ public:
cvtColor(out, out, dst_type == CV_8UC3 ? COLOR_RGB2BGR : COLOR_RGBA2BGRA); cvtColor(out, out, dst_type == CV_8UC3 ? COLOR_RGB2BGR : COLOR_RGBA2BGRA);
} }
void getDepth(OutputArray depth) void getDepth(OutputArray depth) CV_OVERRIDE
{ {
Camera* cam = sceneMgr->getCamera(title); Camera* cam = sceneMgr->getCamera(title);
if (!depthRTT) if (!depthRTT)
@ -588,7 +588,7 @@ public:
ndc = (2 * f * n) / ndc; ndc = (2 * f * n) / ndc;
} }
void fixCameraYawAxis(bool useFixed, InputArray _up) void fixCameraYawAxis(bool useFixed, InputArray _up) CV_OVERRIDE
{ {
Vector3 up = Vector3::NEGATIVE_UNIT_Y; Vector3 up = Vector3::NEGATIVE_UNIT_Y;
if (!_up.empty()) if (!_up.empty())
@ -599,7 +599,7 @@ public:
camNode->setFixedYawAxis(useFixed, up); camNode->setFixedYawAxis(useFixed, up);
} }
void setCameraPose(InputArray tvec, InputArray rot, bool invert) void setCameraPose(InputArray tvec, InputArray rot, bool invert) CV_OVERRIDE
{ {
Quaternion q; Quaternion q;
Vector3 t; Vector3 t;
@ -612,7 +612,7 @@ public:
camNode->setPosition(t); camNode->setPosition(t);
} }
void getCameraPose(OutputArray R, OutputArray tvec, bool invert) void getCameraPose(OutputArray R, OutputArray tvec, bool invert) CV_OVERRIDE
{ {
Matrix3 _R; Matrix3 _R;
// toOGRE.Inverse() == toOGRE // toOGRE.Inverse() == toOGRE
@ -641,7 +641,7 @@ public:
} }
} }
void setCameraIntrinsics(InputArray K, const Size& imsize, float zNear, float zFar) void setCameraIntrinsics(InputArray K, const Size& imsize, float zNear, float zFar) CV_OVERRIDE
{ {
Camera* cam = sceneMgr->getCamera(title); Camera* cam = sceneMgr->getCamera(title);
@ -650,7 +650,7 @@ public:
if(!K.empty()) _setCameraIntrinsics(cam, K, imsize); if(!K.empty()) _setCameraIntrinsics(cam, K, imsize);
} }
void setCameraLookAt(const String& target, InputArray offset) void setCameraLookAt(const String& target, InputArray offset) CV_OVERRIDE
{ {
SceneNode* tgt = sceneMgr->getEntity(target)->getParentSceneNode(); SceneNode* tgt = sceneMgr->getEntity(target)->getParentSceneNode();

@ -93,6 +93,7 @@ ocv_warnings_disable(CMAKE_CXX_FLAGS
-Wunused-but-set-variable -Wunused-but-set-variable
-Wunused-parameter -Wunused-parameter
-Wunused-function -Wunused-function
-Wsuggest-override
) )
if(UNIX) if(UNIX)

Loading…
Cancel
Save