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)
return()
endif()
@ -6,13 +6,6 @@ endif()
set(the_description "Debug visualization framework")
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)
# Qt5

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

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

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

@ -54,13 +54,13 @@ class DiffFilterFunction : public FilterFunctionWidget<2, 1>
* @param in Array of input 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
* DiffFilter
*/
std::pair<bool, QString> checkInput(InputArray in) const;
std::pair<bool, QString> checkInput(InputArray in) const CV_OVERRIDE;
private:
DiffFilterType filterType_;

@ -44,7 +44,7 @@ class OverlayFilterWidget : public FilterFunctionWidget<2, 1>
* @param in Array of input 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
@ -52,7 +52,7 @@ class OverlayFilterWidget : public FilterFunctionWidget<2, 1>
* @brief Checks whether matrices in "in" can be processed by Overlayfilter
* @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:
double opacityOfFilterImg_;

@ -52,7 +52,7 @@ class CVVKeyPoint : public QGraphicsObject,public cv::KeyPoint
* @brief boundingRect
* @return the boundingRect
*/
QRectF boundingRect() const;
QRectF boundingRect() const CV_OVERRIDE;
/**
* @brief returns the keypoint
@ -65,7 +65,7 @@ class CVVKeyPoint : public QGraphicsObject,public cv::KeyPoint
* @brief the paint function.
*/
void paint(QPainter *painter, const QStyleOptionGraphicsItem *,
QWidget *);
QWidget *) CV_OVERRIDE;
/**
* @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
* @return the boundingrect of this Mathc
*/
virtual QRectF boundingRect() const;
virtual QRectF boundingRect() const CV_OVERRIDE;
/**
* @brief the paint function
*/
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *,
QWidget *);
QWidget *) CV_OVERRIDE;
/**
* @brief returns the left keypoint.

@ -36,7 +36,7 @@ public:
/**
* @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

@ -28,7 +28,7 @@ public:
* @brief select keypoint of the given selection
* @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:
/**

@ -35,7 +35,7 @@ public:
/**
* @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

@ -28,7 +28,7 @@ public:
* @brief select matches of the given selection
* @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:
/**

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

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

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

@ -88,9 +88,9 @@ public:
*/
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:
/**
@ -139,9 +139,9 @@ public slots:
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.

@ -187,13 +187,13 @@ struct Application : public OgreBites::ApplicationContext, public OgreBites::Inp
// empty impl to show cursor
}
bool keyPressed(const OgreBites::KeyboardEvent& evt)
bool keyPressed(const OgreBites::KeyboardEvent& evt) CV_OVERRIDE
{
key_pressed = evt.keysym.sym;
return true;
}
bool oneTimeConfig()
bool oneTimeConfig() CV_OVERRIDE
{
Ogre::RenderSystem* rs = getRoot()->getRenderSystemByName(RENDERSYSTEM_NAME);
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,
NameValuePairList miscParams = NameValuePairList())
NameValuePairList miscParams = NameValuePairList()) CV_OVERRIDE
{
Ogre::String _name = name;
if (!sceneMgr)
@ -224,7 +224,7 @@ struct Application : public OgreBites::ApplicationContext, public OgreBites::Inp
return ret;
}
void locateResources()
void locateResources() CV_OVERRIDE
{
OgreBites::ApplicationContext::locateResources();
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();
@ -338,7 +338,7 @@ public:
}
}
void setBackground(InputArray image)
void setBackground(InputArray image) CV_OVERRIDE
{
CV_Assert(bgplane);
@ -357,7 +357,7 @@ public:
bgplane->setVisible(true);
}
void setCompositors(const std::vector<String>& names)
void setCompositors(const std::vector<String>& names) CV_OVERRIDE
{
CompositorManager& cm = CompositorManager::getSingleton();
// 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
bgplane->setVisible(false);
@ -394,7 +394,7 @@ public:
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);
@ -405,7 +405,7 @@ public:
node->attachObject(ent);
}
void removeEntity(const String& name) {
void removeEntity(const String& name) CV_OVERRIDE {
SceneNode& node = _getSceneNode(sceneMgr, name);
node.getAttachedObject(name)->detachFromParent();
@ -418,7 +418,7 @@ public:
}
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);
Pass* rpass = mat->getTechniques()[0]->getPasses()[0];
@ -451,7 +451,7 @@ public:
}
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->setDirection(Vector3::NEGATIVE_UNIT_Z);
@ -466,7 +466,7 @@ public:
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);
Quaternion q;
@ -476,7 +476,7 @@ public:
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);
Quaternion q;
@ -486,7 +486,7 @@ public:
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);
SceneNode& node = _getSceneNode(sceneMgr, name);
@ -506,7 +506,7 @@ public:
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);
SceneNode& node = _getSceneNode(sceneMgr, name);
@ -541,7 +541,7 @@ public:
sceneMgr->getRootSceneNode()->createChildSceneNode()->attachObject(bgplane.get());
}
void getScreenshot(OutputArray frame)
void getScreenshot(OutputArray frame) CV_OVERRIDE
{
PixelFormat src_type = frameSrc->suggestPixelFormat();
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);
}
void getDepth(OutputArray depth)
void getDepth(OutputArray depth) CV_OVERRIDE
{
Camera* cam = sceneMgr->getCamera(title);
if (!depthRTT)
@ -588,7 +588,7 @@ public:
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;
if (!_up.empty())
@ -599,7 +599,7 @@ public:
camNode->setFixedYawAxis(useFixed, up);
}
void setCameraPose(InputArray tvec, InputArray rot, bool invert)
void setCameraPose(InputArray tvec, InputArray rot, bool invert) CV_OVERRIDE
{
Quaternion q;
Vector3 t;
@ -612,7 +612,7 @@ public:
camNode->setPosition(t);
}
void getCameraPose(OutputArray R, OutputArray tvec, bool invert)
void getCameraPose(OutputArray R, OutputArray tvec, bool invert) CV_OVERRIDE
{
Matrix3 _R;
// 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);
@ -650,7 +650,7 @@ public:
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();

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

Loading…
Cancel
Save