Commit 55767bfc authored by Alexander Alekhin's avatar Alexander Alekhin

datasets: apply CV_OVERRIDE/CV_FINAL

parent 8af62cd6
set(the_description "datasets framework") set(the_description "datasets framework")
set(filter_srcs "${CMAKE_CURRENT_LIST_DIR}/src/tinyxml2/tinyxml2.cpp")
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
ocv_append_source_files_cxx_compiler_options(filter_srcs "-Wno-suggest-override") # GCC
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
ocv_append_source_files_cxx_compiler_options(filter_srcs "-Wno-inconsistent-missing-override") # Clang
endif()
ocv_define_module(datasets opencv_core opencv_imgcodecs opencv_ml opencv_flann OPTIONAL opencv_text WRAP python) ocv_define_module(datasets opencv_core opencv_imgcodecs opencv_ml opencv_flann OPTIONAL opencv_text WRAP python)
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4267) # flann, Win64 ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4267) # flann, Win64
...@@ -67,7 +67,7 @@ struct AR_hmdbObj : public Object ...@@ -67,7 +67,7 @@ struct AR_hmdbObj : public Object
class CV_EXPORTS AR_hmdb : public Dataset class CV_EXPORTS AR_hmdb : public Dataset
{ {
public: public:
virtual void load(const std::string &path) = 0; virtual void load(const std::string &path) CV_OVERRIDE = 0;
static Ptr<AR_hmdb> create(); static Ptr<AR_hmdb> create();
}; };
......
...@@ -66,7 +66,7 @@ struct AR_sportsObj : public Object ...@@ -66,7 +66,7 @@ struct AR_sportsObj : public Object
class CV_EXPORTS AR_sports : public Dataset class CV_EXPORTS AR_sports : public Dataset
{ {
public: public:
virtual void load(const std::string &path) = 0; virtual void load(const std::string &path) CV_OVERRIDE = 0;
static Ptr<AR_sports> create(); static Ptr<AR_sports> create();
}; };
......
...@@ -83,7 +83,7 @@ struct FR_adienceObj : public Object ...@@ -83,7 +83,7 @@ struct FR_adienceObj : public Object
class CV_EXPORTS FR_adience : public Dataset class CV_EXPORTS FR_adience : public Dataset
{ {
public: public:
virtual void load(const std::string &path) = 0; virtual void load(const std::string &path) CV_OVERRIDE = 0;
static Ptr<FR_adience> create(); static Ptr<FR_adience> create();
......
...@@ -66,7 +66,7 @@ struct FR_lfwObj : public Object ...@@ -66,7 +66,7 @@ struct FR_lfwObj : public Object
class CV_EXPORTS FR_lfw : public Dataset class CV_EXPORTS FR_lfw : public Dataset
{ {
public: public:
virtual void load(const std::string &path) = 0; virtual void load(const std::string &path) CV_OVERRIDE = 0;
static Ptr<FR_lfw> create(); static Ptr<FR_lfw> create();
}; };
......
...@@ -83,7 +83,7 @@ struct GR_chalearnObj : public Object ...@@ -83,7 +83,7 @@ struct GR_chalearnObj : public Object
class CV_EXPORTS GR_chalearn : public Dataset class CV_EXPORTS GR_chalearn : public Dataset
{ {
public: public:
virtual void load(const std::string &path) = 0; virtual void load(const std::string &path) CV_OVERRIDE = 0;
static Ptr<GR_chalearn> create(); static Ptr<GR_chalearn> create();
}; };
......
...@@ -105,7 +105,7 @@ struct GR_skigObj : public Object ...@@ -105,7 +105,7 @@ struct GR_skigObj : public Object
class CV_EXPORTS GR_skig : public Dataset class CV_EXPORTS GR_skig : public Dataset
{ {
public: public:
virtual void load(const std::string &path) = 0; virtual void load(const std::string &path) CV_OVERRIDE = 0;
static Ptr<GR_skig> create(); static Ptr<GR_skig> create();
}; };
......
...@@ -77,7 +77,7 @@ enum datasetType ...@@ -77,7 +77,7 @@ enum datasetType
class CV_EXPORTS HPE_humaneva : public Dataset class CV_EXPORTS HPE_humaneva : public Dataset
{ {
public: public:
virtual void load(const std::string &path) = 0; virtual void load(const std::string &path) CV_OVERRIDE = 0;
static Ptr<HPE_humaneva> create(int num=humaneva_1); static Ptr<HPE_humaneva> create(int num=humaneva_1);
}; };
......
...@@ -65,7 +65,7 @@ struct HPE_parseObj : public Object ...@@ -65,7 +65,7 @@ struct HPE_parseObj : public Object
class CV_EXPORTS HPE_parse : public Dataset class CV_EXPORTS HPE_parse : public Dataset
{ {
public: public:
virtual void load(const std::string &path) = 0; virtual void load(const std::string &path) CV_OVERRIDE = 0;
static Ptr<HPE_parse> create(); static Ptr<HPE_parse> create();
}; };
......
...@@ -67,7 +67,7 @@ struct IR_affineObj : public Object ...@@ -67,7 +67,7 @@ struct IR_affineObj : public Object
class CV_EXPORTS IR_affine : public Dataset class CV_EXPORTS IR_affine : public Dataset
{ {
public: public:
virtual void load(const std::string &path) = 0; virtual void load(const std::string &path) CV_OVERRIDE = 0;
static Ptr<IR_affine> create(); static Ptr<IR_affine> create();
}; };
......
...@@ -76,7 +76,7 @@ struct IR_robotObj : public Object ...@@ -76,7 +76,7 @@ struct IR_robotObj : public Object
class CV_EXPORTS IR_robot : public Dataset class CV_EXPORTS IR_robot : public Dataset
{ {
public: public:
virtual void load(const std::string &path) = 0; virtual void load(const std::string &path) CV_OVERRIDE = 0;
static Ptr<IR_robot> create(); static Ptr<IR_robot> create();
}; };
......
...@@ -65,7 +65,7 @@ struct IS_bsdsObj : public Object ...@@ -65,7 +65,7 @@ struct IS_bsdsObj : public Object
class CV_EXPORTS IS_bsds : public Dataset class CV_EXPORTS IS_bsds : public Dataset
{ {
public: public:
virtual void load(const std::string &path) = 0; virtual void load(const std::string &path) CV_OVERRIDE = 0;
static Ptr<IS_bsds> create(); static Ptr<IS_bsds> create();
}; };
......
...@@ -68,7 +68,7 @@ struct IS_weizmannObj : public Object ...@@ -68,7 +68,7 @@ struct IS_weizmannObj : public Object
class CV_EXPORTS IS_weizmann : public Dataset class CV_EXPORTS IS_weizmann : public Dataset
{ {
public: public:
virtual void load(const std::string &path) = 0; virtual void load(const std::string &path) CV_OVERRIDE = 0;
static Ptr<IS_weizmann> create(); static Ptr<IS_weizmann> create();
}; };
......
...@@ -77,7 +77,7 @@ struct MSM_epflObj : public Object ...@@ -77,7 +77,7 @@ struct MSM_epflObj : public Object
class CV_EXPORTS MSM_epfl : public Dataset class CV_EXPORTS MSM_epfl : public Dataset
{ {
public: public:
virtual void load(const std::string &path) = 0; virtual void load(const std::string &path) CV_OVERRIDE = 0;
static Ptr<MSM_epfl> create(); static Ptr<MSM_epfl> create();
}; };
......
...@@ -68,7 +68,7 @@ struct MSM_middleburyObj : public Object ...@@ -68,7 +68,7 @@ struct MSM_middleburyObj : public Object
class CV_EXPORTS MSM_middlebury : public Dataset class CV_EXPORTS MSM_middlebury : public Dataset
{ {
public: public:
virtual void load(const std::string &path) = 0; virtual void load(const std::string &path) CV_OVERRIDE = 0;
static Ptr<MSM_middlebury> create(); static Ptr<MSM_middlebury> create();
}; };
......
...@@ -66,7 +66,7 @@ struct OR_imagenetObj : public Object ...@@ -66,7 +66,7 @@ struct OR_imagenetObj : public Object
class CV_EXPORTS OR_imagenet : public Dataset class CV_EXPORTS OR_imagenet : public Dataset
{ {
public: public:
virtual void load(const std::string &path) = 0; virtual void load(const std::string &path) CV_OVERRIDE = 0;
static Ptr<OR_imagenet> create(); static Ptr<OR_imagenet> create();
}; };
......
...@@ -66,7 +66,7 @@ struct OR_mnistObj : public Object ...@@ -66,7 +66,7 @@ struct OR_mnistObj : public Object
class CV_EXPORTS OR_mnist : public Dataset class CV_EXPORTS OR_mnist : public Dataset
{ {
public: public:
virtual void load(const std::string &path) = 0; virtual void load(const std::string &path) CV_OVERRIDE = 0;
static Ptr<OR_mnist> create(); static Ptr<OR_mnist> create();
}; };
......
...@@ -89,7 +89,7 @@ struct OR_pascalObj : public Object ...@@ -89,7 +89,7 @@ struct OR_pascalObj : public Object
class CV_EXPORTS OR_pascal : public Dataset class CV_EXPORTS OR_pascal : public Dataset
{ {
public: public:
virtual void load(const std::string &path) = 0; virtual void load(const std::string &path) CV_OVERRIDE = 0;
static Ptr<OR_pascal> create(); static Ptr<OR_pascal> create();
}; };
......
...@@ -66,7 +66,7 @@ struct OR_sunObj : public Object ...@@ -66,7 +66,7 @@ struct OR_sunObj : public Object
class CV_EXPORTS OR_sun : public Dataset class CV_EXPORTS OR_sun : public Dataset
{ {
public: public:
virtual void load(const std::string &path) = 0; virtual void load(const std::string &path) CV_OVERRIDE = 0;
static Ptr<OR_sun> create(); static Ptr<OR_sun> create();
......
...@@ -76,7 +76,7 @@ struct PD_caltechObj : public Object ...@@ -76,7 +76,7 @@ struct PD_caltechObj : public Object
class CV_EXPORTS PD_caltech : public Dataset class CV_EXPORTS PD_caltech : public Dataset
{ {
public: public:
virtual void load(const std::string &path) = 0; virtual void load(const std::string &path) CV_OVERRIDE = 0;
static Ptr<PD_caltech> create(); static Ptr<PD_caltech> create();
}; };
......
...@@ -57,7 +57,7 @@ namespace datasets ...@@ -57,7 +57,7 @@ namespace datasets
//! @addtogroup datasets_pd //! @addtogroup datasets_pd
//! @{ //! @{
enum sampleType enum sampleType
{ {
POS = 0, POS = 0,
NEG = 1 NEG = 1
...@@ -67,7 +67,7 @@ struct PD_inriaObj : public Object ...@@ -67,7 +67,7 @@ struct PD_inriaObj : public Object
{ {
// image file name // image file name
std::string filename; std::string filename;
// positive or negative // positive or negative
sampleType sType; sampleType sType;
...@@ -83,7 +83,7 @@ struct PD_inriaObj : public Object ...@@ -83,7 +83,7 @@ struct PD_inriaObj : public Object
class CV_EXPORTS PD_inria : public Dataset class CV_EXPORTS PD_inria : public Dataset
{ {
public: public:
virtual void load(const std::string &path) = 0; virtual void load(const std::string &path) CV_OVERRIDE = 0;
static Ptr<PD_inria> create(); static Ptr<PD_inria> create();
}; };
......
...@@ -74,7 +74,7 @@ struct SLAM_kittiObj : public Object ...@@ -74,7 +74,7 @@ struct SLAM_kittiObj : public Object
class CV_EXPORTS SLAM_kitti : public Dataset class CV_EXPORTS SLAM_kitti : public Dataset
{ {
public: public:
virtual void load(const std::string &path) = 0; virtual void load(const std::string &path) CV_OVERRIDE = 0;
static Ptr<SLAM_kitti> create(); static Ptr<SLAM_kitti> create();
}; };
......
...@@ -74,7 +74,7 @@ struct SLAM_tumindoorObj : public Object ...@@ -74,7 +74,7 @@ struct SLAM_tumindoorObj : public Object
class CV_EXPORTS SLAM_tumindoor : public Dataset class CV_EXPORTS SLAM_tumindoor : public Dataset
{ {
public: public:
virtual void load(const std::string &path) = 0; virtual void load(const std::string &path) CV_OVERRIDE = 0;
static Ptr<SLAM_tumindoor> create(); static Ptr<SLAM_tumindoor> create();
}; };
......
...@@ -66,7 +66,7 @@ struct TR_charsObj : public Object ...@@ -66,7 +66,7 @@ struct TR_charsObj : public Object
class CV_EXPORTS TR_chars : public Dataset class CV_EXPORTS TR_chars : public Dataset
{ {
public: public:
virtual void load(const std::string &path) = 0; virtual void load(const std::string &path) CV_OVERRIDE = 0;
static Ptr<TR_chars> create(); static Ptr<TR_chars> create();
}; };
......
...@@ -74,7 +74,7 @@ struct TR_icdarObj : public Object ...@@ -74,7 +74,7 @@ struct TR_icdarObj : public Object
class CV_EXPORTS TR_icdar : public Dataset class CV_EXPORTS TR_icdar : public Dataset
{ {
public: public:
virtual void load(const std::string &path) = 0; virtual void load(const std::string &path) CV_OVERRIDE = 0;
static Ptr<TR_icdar> create(); static Ptr<TR_icdar> create();
}; };
......
...@@ -73,7 +73,7 @@ struct TR_svtObj : public Object ...@@ -73,7 +73,7 @@ struct TR_svtObj : public Object
class CV_EXPORTS TR_svt : public Dataset class CV_EXPORTS TR_svt : public Dataset
{ {
public: public:
virtual void load(const std::string &path) = 0; virtual void load(const std::string &path) CV_OVERRIDE = 0;
static Ptr<TR_svt> create(); static Ptr<TR_svt> create();
}; };
......
...@@ -75,7 +75,7 @@ class CV_EXPORTS TRACK_alov : public Dataset ...@@ -75,7 +75,7 @@ class CV_EXPORTS TRACK_alov : public Dataset
public: public:
static Ptr<TRACK_alov> create(); static Ptr<TRACK_alov> create();
virtual void load(const std::string &path) = 0; virtual void load(const std::string &path) CV_OVERRIDE = 0;
//Load only frames with annotations (~every 5-th frame) //Load only frames with annotations (~every 5-th frame)
virtual void loadAnnotatedOnly(const std::string &path) = 0; virtual void loadAnnotatedOnly(const std::string &path) = 0;
......
...@@ -70,7 +70,7 @@ class CV_EXPORTS TRACK_vot : public Dataset ...@@ -70,7 +70,7 @@ class CV_EXPORTS TRACK_vot : public Dataset
public: public:
static Ptr<TRACK_vot> create(); static Ptr<TRACK_vot> create();
virtual void load(const std::string &path) = 0; virtual void load(const std::string &path) CV_OVERRIDE = 0;
virtual int getDatasetsNum() = 0; virtual int getDatasetsNum() = 0;
......
...@@ -58,7 +58,7 @@ public: ...@@ -58,7 +58,7 @@ public:
//AR_hmdbImp(const string &path, int number = 0); //AR_hmdbImp(const string &path, int number = 0);
virtual ~AR_hmdbImp() {} virtual ~AR_hmdbImp() {}
virtual void load(const string &path); virtual void load(const string &path) CV_OVERRIDE;
private: private:
void loadDatasetSplit(const string &path, int number = 0); void loadDatasetSplit(const string &path, int number = 0);
......
...@@ -56,7 +56,7 @@ public: ...@@ -56,7 +56,7 @@ public:
//AR_sportsImp(const string &path); //AR_sportsImp(const string &path);
virtual ~AR_sportsImp() {} virtual ~AR_sportsImp() {}
virtual void load(const string &path); virtual void load(const string &path) CV_OVERRIDE;
private: private:
void loadDataset(const string &path); void loadDataset(const string &path);
......
...@@ -52,14 +52,14 @@ namespace datasets ...@@ -52,14 +52,14 @@ namespace datasets
using namespace std; using namespace std;
class FR_adienceImp : public FR_adience class FR_adienceImp CV_FINAL : public FR_adience
{ {
public: public:
FR_adienceImp() {} FR_adienceImp() {}
//FR_adienceImp(const string &path); //FR_adienceImp(const string &path);
virtual ~FR_adienceImp() {} virtual ~FR_adienceImp() {}
virtual void load(const string &path); virtual void load(const string &path) CV_OVERRIDE;
private: private:
void loadDataset(const string &path); void loadDataset(const string &path);
......
...@@ -51,14 +51,14 @@ namespace datasets ...@@ -51,14 +51,14 @@ namespace datasets
using namespace std; using namespace std;
class FR_lfwImp : public FR_lfw class FR_lfwImp CV_FINAL : public FR_lfw
{ {
public: public:
FR_lfwImp() {} FR_lfwImp() {}
//FR_lfwImp(const string &path); //FR_lfwImp(const string &path);
virtual ~FR_lfwImp() {} virtual ~FR_lfwImp() {}
virtual void load(const string &path); virtual void load(const string &path) CV_OVERRIDE;
private: private:
void loadDataset(const string &path); void loadDataset(const string &path);
......
...@@ -49,14 +49,14 @@ namespace datasets ...@@ -49,14 +49,14 @@ namespace datasets
using namespace std; using namespace std;
class GR_chalearnImp : public GR_chalearn class GR_chalearnImp CV_FINAL : public GR_chalearn
{ {
public: public:
GR_chalearnImp() {} GR_chalearnImp() {}
//GR_chalearnImp(const string &path); //GR_chalearnImp(const string &path);
virtual ~GR_chalearnImp() {} virtual ~GR_chalearnImp() {}
virtual void load(const string &path); virtual void load(const string &path) CV_OVERRIDE;
private: private:
void loadDataset(const string &path); void loadDataset(const string &path);
......
...@@ -51,14 +51,14 @@ namespace datasets ...@@ -51,14 +51,14 @@ namespace datasets
using namespace std; using namespace std;
class GR_skigImp : public GR_skig class GR_skigImp CV_FINAL : public GR_skig
{ {
public: public:
GR_skigImp() {} GR_skigImp() {}
//GR_skigImp(const string &path); //GR_skigImp(const string &path);
virtual ~GR_skigImp() {} virtual ~GR_skigImp() {}
virtual void load(const string &path); virtual void load(const string &path) CV_OVERRIDE;
private: private:
void loadDataset(const string &path); void loadDataset(const string &path);
......
...@@ -51,14 +51,14 @@ namespace datasets ...@@ -51,14 +51,14 @@ namespace datasets
using namespace std; using namespace std;
class HPE_humanevaImp : public HPE_humaneva class HPE_humanevaImp CV_FINAL : public HPE_humaneva
{ {
public: public:
HPE_humanevaImp() {} HPE_humanevaImp() {}
//HPE_humanevaImp(const string &path); //HPE_humanevaImp(const string &path);
virtual ~HPE_humanevaImp() {} virtual ~HPE_humanevaImp() {}
virtual void load(const string &path); virtual void load(const string &path) CV_OVERRIDE;
private: private:
void loadDataset(const string &path); void loadDataset(const string &path);
...@@ -138,7 +138,7 @@ public: ...@@ -138,7 +138,7 @@ public:
//HPE_humanevaImpII(const string &path); //HPE_humanevaImpII(const string &path);
virtual ~HPE_humanevaImpII() {} virtual ~HPE_humanevaImpII() {}
virtual void load(const string &path); virtual void load(const string &path) CV_OVERRIDE;
private: private:
void loadDataset(const string &path); void loadDataset(const string &path);
......
...@@ -49,14 +49,14 @@ namespace datasets ...@@ -49,14 +49,14 @@ namespace datasets
using namespace std; using namespace std;
class HPE_parseImp : public HPE_parse class HPE_parseImp CV_FINAL : public HPE_parse
{ {
public: public:
HPE_parseImp() {} HPE_parseImp() {}
//HPE_parseImp(const string &path); //HPE_parseImp(const string &path);
virtual ~HPE_parseImp() {} virtual ~HPE_parseImp() {}
virtual void load(const string &path); virtual void load(const string &path) CV_OVERRIDE;
private: private:
void loadDataset(const string &path); void loadDataset(const string &path);
......
...@@ -49,14 +49,14 @@ namespace datasets ...@@ -49,14 +49,14 @@ namespace datasets
using namespace std; using namespace std;
class IR_affineImp : public IR_affine class IR_affineImp CV_FINAL : public IR_affine
{ {
public: public:
IR_affineImp() {} IR_affineImp() {}
//IR_affineImp(const string &path); //IR_affineImp(const string &path);
virtual ~IR_affineImp() {} virtual ~IR_affineImp() CV_OVERRIDE {}
virtual void load(const string &path); virtual void load(const string &path) CV_OVERRIDE;
private: private:
void loadDataset(const string &path); void loadDataset(const string &path);
......
...@@ -49,14 +49,14 @@ namespace datasets ...@@ -49,14 +49,14 @@ namespace datasets
using namespace std; using namespace std;
class IR_robotImp : public IR_robot class IR_robotImp CV_FINAL : public IR_robot
{ {
public: public:
IR_robotImp() {} IR_robotImp() {}
//IR_robotImp(const string &path); //IR_robotImp(const string &path);
virtual ~IR_robotImp() {} virtual ~IR_robotImp() {}
virtual void load(const string &path); virtual void load(const string &path) CV_OVERRIDE;
private: private:
void loadDataset(const string &path); void loadDataset(const string &path);
......
...@@ -49,14 +49,14 @@ namespace datasets ...@@ -49,14 +49,14 @@ namespace datasets
using namespace std; using namespace std;
class IS_bsdsImp : public IS_bsds class IS_bsdsImp CV_FINAL : public IS_bsds
{ {
public: public:
IS_bsdsImp() {} IS_bsdsImp() {}
//IS_bsdsImp(const string &path); //IS_bsdsImp(const string &path);
virtual ~IS_bsdsImp() {} virtual ~IS_bsdsImp() {}
virtual void load(const string &path); virtual void load(const string &path) CV_OVERRIDE;
private: private:
void loadDataset(const string &path); void loadDataset(const string &path);
......
...@@ -49,14 +49,14 @@ namespace datasets ...@@ -49,14 +49,14 @@ namespace datasets
using namespace std; using namespace std;
class IS_weizmannImp : public IS_weizmann class IS_weizmannImp CV_FINAL : public IS_weizmann
{ {
public: public:
IS_weizmannImp() {} IS_weizmannImp() {}
//IS_weizmannImp(const string &path); //IS_weizmannImp(const string &path);
virtual ~IS_weizmannImp() {} virtual ~IS_weizmannImp() {}
virtual void load(const string &path); virtual void load(const string &path) CV_OVERRIDE;
private: private:
void loadDataset(const string &path); void loadDataset(const string &path);
......
...@@ -49,14 +49,14 @@ namespace datasets ...@@ -49,14 +49,14 @@ namespace datasets
using namespace std; using namespace std;
class MSM_epflImp : public MSM_epfl class MSM_epflImp CV_FINAL : public MSM_epfl
{ {
public: public:
MSM_epflImp() {} MSM_epflImp() {}
//MSM_epflImp(const string &path); //MSM_epflImp(const string &path);
virtual ~MSM_epflImp() {} virtual ~MSM_epflImp() CV_OVERRIDE {}
virtual void load(const string &path); virtual void load(const string &path) CV_OVERRIDE;
private: private:
void loadDataset(const string &path); void loadDataset(const string &path);
......
...@@ -49,14 +49,14 @@ namespace datasets ...@@ -49,14 +49,14 @@ namespace datasets
using namespace std; using namespace std;
class MSM_middleburyImp : public MSM_middlebury class MSM_middleburyImp CV_FINAL : public MSM_middlebury
{ {
public: public:
MSM_middleburyImp() {} MSM_middleburyImp() {}
//MSM_middleburyImp(const string &path); //MSM_middleburyImp(const string &path);
virtual ~MSM_middleburyImp() {} virtual ~MSM_middleburyImp() {}
virtual void load(const string &path); virtual void load(const string &path) CV_OVERRIDE;
private: private:
void loadDataset(const string &path); void loadDataset(const string &path);
......
...@@ -51,14 +51,14 @@ namespace datasets ...@@ -51,14 +51,14 @@ namespace datasets
using namespace std; using namespace std;
class OR_imagenetImp : public OR_imagenet class OR_imagenetImp CV_FINAL : public OR_imagenet
{ {
public: public:
OR_imagenetImp() {} OR_imagenetImp() {}
//OR_imagenetImp(const string &path); //OR_imagenetImp(const string &path);
virtual ~OR_imagenetImp() {} virtual ~OR_imagenetImp() CV_OVERRIDE {}
virtual void load(const string &path); virtual void load(const string &path) CV_OVERRIDE;
private: private:
void loadDataset(const string &path); void loadDataset(const string &path);
......
...@@ -49,14 +49,14 @@ namespace datasets ...@@ -49,14 +49,14 @@ namespace datasets
using namespace std; using namespace std;
class OR_mnistImp : public OR_mnist class OR_mnistImp CV_FINAL : public OR_mnist
{ {
public: public:
OR_mnistImp() {} OR_mnistImp() {}
//OR_mnistImp(const string &path); //OR_mnistImp(const string &path);
virtual ~OR_mnistImp() {} virtual ~OR_mnistImp() {}
virtual void load(const string &path); virtual void load(const string &path) CV_OVERRIDE;
private: private:
void loadDataset(const string &path); void loadDataset(const string &path);
......
...@@ -41,7 +41,14 @@ ...@@ -41,7 +41,14 @@
#include "opencv2/datasets/or_pascal.hpp" #include "opencv2/datasets/or_pascal.hpp"
#include "opencv2/datasets/util.hpp" #include "opencv2/datasets/util.hpp"
#if defined(__GNUC__) && __GNUC__ >= 5
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wsuggest-override"
#endif
#include "tinyxml2/tinyxml2.h" #include "tinyxml2/tinyxml2.h"
#if defined(__GNUC__) && __GNUC__ >= 5
#pragma GCC diagnostic pop
#endif
#include <fstream> #include <fstream>
namespace cv namespace cv
...@@ -52,12 +59,12 @@ namespace datasets ...@@ -52,12 +59,12 @@ namespace datasets
using namespace std; using namespace std;
using namespace tinyxml2; using namespace tinyxml2;
class OR_pascalImp : public OR_pascal class OR_pascalImp CV_FINAL : public OR_pascal
{ {
public: public:
OR_pascalImp() {} OR_pascalImp() {}
virtual void load(const string &path); virtual void load(const string &path) CV_OVERRIDE;
private: private:
void loadDataset(const string &path, const string &nameImageSet, vector< Ptr<Object> > &imageSet); void loadDataset(const string &path, const string &nameImageSet, vector< Ptr<Object> > &imageSet);
......
...@@ -51,14 +51,14 @@ namespace datasets ...@@ -51,14 +51,14 @@ namespace datasets
using namespace std; using namespace std;
class OR_sunImp : public OR_sun class OR_sunImp CV_FINAL : public OR_sun
{ {
public: public:
OR_sunImp() {} OR_sunImp() {}
//OR_sunImp(const string &path); //OR_sunImp(const string &path);
virtual ~OR_sunImp() {} virtual ~OR_sunImp() CV_OVERRIDE {}
virtual void load(const string &path); virtual void load(const string &path) CV_OVERRIDE;
private: private:
void loadDataset(const string &path); void loadDataset(const string &path);
......
...@@ -49,14 +49,14 @@ namespace datasets ...@@ -49,14 +49,14 @@ namespace datasets
using namespace std; using namespace std;
class PD_caltechImp : public PD_caltech class PD_caltechImp CV_FINAL : public PD_caltech
{ {
public: public:
PD_caltechImp() {} PD_caltechImp() {}
//PD_caltechImp(const string &path); //PD_caltechImp(const string &path);
virtual ~PD_caltechImp() {} virtual ~PD_caltechImp() CV_OVERRIDE {}
virtual void load(const string &path); virtual void load(const string &path) CV_OVERRIDE;
private: private:
void loadDataset(const string &path); void loadDataset(const string &path);
......
...@@ -49,14 +49,14 @@ namespace datasets ...@@ -49,14 +49,14 @@ namespace datasets
using namespace std; using namespace std;
class PD_inriaImp : public PD_inria class PD_inriaImp CV_FINAL : public PD_inria
{ {
public: public:
PD_inriaImp() {} PD_inriaImp() {}
virtual ~PD_inriaImp() {}
virtual void load(const string &path); virtual ~PD_inriaImp() CV_OVERRIDE {}
virtual void load(const string &path) CV_OVERRIDE;
private: private:
void loadDataset(const string &path, const string nameImageSet, vector< Ptr<Object> > &imageSet); void loadDataset(const string &path, const string nameImageSet, vector< Ptr<Object> > &imageSet);
...@@ -69,7 +69,7 @@ void PD_inriaImp::load(const string &path) ...@@ -69,7 +69,7 @@ void PD_inriaImp::load(const string &path)
// Training set // Training set
train.push_back(vector< Ptr<Object> >()); train.push_back(vector< Ptr<Object> >());
loadDataset(path, "Train", train.back()); loadDataset(path, "Train", train.back());
// Testing set // Testing set
test.push_back(vector< Ptr<Object> >()); test.push_back(vector< Ptr<Object> >());
loadDataset(path, "Test", test.back()); loadDataset(path, "Test", test.back());
...@@ -106,16 +106,16 @@ void PD_inriaImp::parseAnnotation(const string filename, Ptr< PD_inriaObj > &obj ...@@ -106,16 +106,16 @@ void PD_inriaImp::parseAnnotation(const string filename, Ptr< PD_inriaObj > &obj
error_message = format("Unable to open file: \n%s\n", filename.c_str()); error_message = format("Unable to open file: \n%s\n", filename.c_str());
CV_Error(Error::StsBadArg, error_message); CV_Error(Error::StsBadArg, error_message);
} }
string imageSizeHeader = "Image size (X x Y x C) : "; string imageSizeHeader = "Image size (X x Y x C) : ";
string imageSizeFmt = imageSizeHeader + "%d x %d x %d"; string imageSizeFmt = imageSizeHeader + "%d x %d x %d";
string objWithGTHeader = "Objects with ground truth : "; string objWithGTHeader = "Objects with ground truth : ";
string objWithGTFmt = objWithGTHeader + "%d { \"PASperson\" }"; string objWithGTFmt = objWithGTHeader + "%d { \"PASperson\" }";
string boundBoxHeader = "Bounding box for object "; string boundBoxHeader = "Bounding box for object ";
string boundBoxFmt = boundBoxHeader + "%*d \"PASperson\" (Xmin, Ymin) - (Xmax, Ymax) : (%d, %d) - (%d, %d)"; string boundBoxFmt = boundBoxHeader + "%*d \"PASperson\" (Xmin, Ymin) - (Xmax, Ymax) : (%d, %d) - (%d, %d)";
string line = ""; string line = "";
int width = 0; int width = 0;
int height = 0; int height = 0;
int depth = 0; int depth = 0;
...@@ -138,7 +138,7 @@ void PD_inriaImp::parseAnnotation(const string filename, Ptr< PD_inriaObj > &obj ...@@ -138,7 +138,7 @@ void PD_inriaImp::parseAnnotation(const string filename, Ptr< PD_inriaObj > &obj
else if (strstr(line.c_str(), objWithGTHeader.c_str())) else if (strstr(line.c_str(), objWithGTHeader.c_str()))
{ {
sscanf(line.c_str(), objWithGTFmt.c_str(), &numObjects); sscanf(line.c_str(), objWithGTFmt.c_str(), &numObjects);
if (numObjects <= 0) if (numObjects <= 0)
break; break;
} }
...@@ -162,16 +162,16 @@ void PD_inriaImp::loadDataset(const string &path, const string nameImageSet, vec ...@@ -162,16 +162,16 @@ void PD_inriaImp::loadDataset(const string &path, const string nameImageSet, vec
string listAnn = path + nameImageSet + "/annotations.lst"; string listAnn = path + nameImageSet + "/annotations.lst";
string listPos = path + nameImageSet + "/pos.lst"; string listPos = path + nameImageSet + "/pos.lst";
string listNeg = path + nameImageSet + "/neg.lst"; string listNeg = path + nameImageSet + "/neg.lst";
vector< string > fsAnn; vector< string > fsAnn;
vector< string > fsPos; vector< string > fsPos;
vector< string > fsNeg; vector< string > fsNeg;
// read file names // read file names
readTextLines(listAnn, fsAnn); readTextLines(listAnn, fsAnn);
readTextLines(listPos, fsPos); readTextLines(listPos, fsPos);
readTextLines(listNeg, fsNeg); readTextLines(listNeg, fsNeg);
CV_Assert(fsAnn.size() == fsPos.size()); CV_Assert(fsAnn.size() == fsPos.size());
for (unsigned int i = 0; i < fsPos.size(); i++) for (unsigned int i = 0; i < fsPos.size(); i++)
...@@ -180,16 +180,16 @@ void PD_inriaImp::loadDataset(const string &path, const string nameImageSet, vec ...@@ -180,16 +180,16 @@ void PD_inriaImp::loadDataset(const string &path, const string nameImageSet, vec
parseAnnotation(path + fsAnn[i], curr); parseAnnotation(path + fsAnn[i], curr);
curr->filename = path + fsPos[i]; curr->filename = path + fsPos[i];
curr->sType = POS; curr->sType = POS;
imageSet.push_back(curr); imageSet.push_back(curr);
} }
for (unsigned int i = 0; i < fsNeg.size(); i++) for (unsigned int i = 0; i < fsNeg.size(); i++)
{ {
Ptr<PD_inriaObj> curr(new PD_inriaObj); Ptr<PD_inriaObj> curr(new PD_inriaObj);
curr->filename = path + fsNeg[i]; curr->filename = path + fsNeg[i];
curr->sType = NEG; curr->sType = NEG;
imageSet.push_back(curr); imageSet.push_back(curr);
} }
} }
......
...@@ -49,14 +49,14 @@ namespace datasets ...@@ -49,14 +49,14 @@ namespace datasets
using namespace std; using namespace std;
class SLAM_kittiImp : public SLAM_kitti class SLAM_kittiImp CV_FINAL : public SLAM_kitti
{ {
public: public:
SLAM_kittiImp() {} SLAM_kittiImp() {}
//SLAM_kittiImp(const string &path); //SLAM_kittiImp(const string &path);
virtual ~SLAM_kittiImp() {} virtual ~SLAM_kittiImp() CV_OVERRIDE {}
virtual void load(const string &path); virtual void load(const string &path) CV_OVERRIDE;
private: private:
void loadDataset(const string &path); void loadDataset(const string &path);
......
...@@ -51,14 +51,14 @@ namespace datasets ...@@ -51,14 +51,14 @@ namespace datasets
using namespace std; using namespace std;
class SLAM_tumindoorImp : public SLAM_tumindoor class SLAM_tumindoorImp CV_FINAL : public SLAM_tumindoor
{ {
public: public:
SLAM_tumindoorImp() {} SLAM_tumindoorImp() {}
//SLAM_tumindoorImp(const string &path); //SLAM_tumindoorImp(const string &path);
virtual ~SLAM_tumindoorImp() {} virtual ~SLAM_tumindoorImp() CV_OVERRIDE {}
virtual void load(const string &path); virtual void load(const string &path) CV_OVERRIDE;
private: private:
void loadDataset(const string &path); void loadDataset(const string &path);
......
...@@ -49,14 +49,14 @@ namespace datasets ...@@ -49,14 +49,14 @@ namespace datasets
using namespace std; using namespace std;
class TR_charsImp : public TR_chars class TR_charsImp CV_FINAL : public TR_chars
{ {
public: public:
TR_charsImp() {} TR_charsImp() {}
//TR_charsImp(const string &path, int number = 0); //TR_charsImp(const string &path, int number = 0);
virtual ~TR_charsImp() {} virtual ~TR_charsImp() CV_OVERRIDE {}
virtual void load(const string &path); virtual void load(const string &path) CV_OVERRIDE;
private: private:
void loadDatasetSplit(const string &path, int number); void loadDatasetSplit(const string &path, int number);
......
...@@ -53,14 +53,14 @@ namespace datasets ...@@ -53,14 +53,14 @@ namespace datasets
using namespace std; using namespace std;
class TR_icdarImp : public TR_icdar class TR_icdarImp CV_FINAL : public TR_icdar
{ {
public: public:
TR_icdarImp() {} TR_icdarImp() {}
//TR_icdarImp(const string &path); //TR_icdarImp(const string &path);
virtual ~TR_icdarImp() {} virtual ~TR_icdarImp() CV_OVERRIDE {}
virtual void load(const string &path); virtual void load(const string &path) CV_OVERRIDE;
private: private:
void loadDataset(const string &path); void loadDataset(const string &path);
......
...@@ -42,7 +42,14 @@ ...@@ -42,7 +42,14 @@
#include "opencv2/datasets/tr_svt.hpp" #include "opencv2/datasets/tr_svt.hpp"
#include "opencv2/datasets/util.hpp" #include "opencv2/datasets/util.hpp"
#if defined(__GNUC__) && __GNUC__ >= 5
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wsuggest-override"
#endif
#include "tinyxml2/tinyxml2.h" #include "tinyxml2/tinyxml2.h"
#if defined(__GNUC__) && __GNUC__ >= 5
#pragma GCC diagnostic pop
#endif
namespace cv namespace cv
{ {
...@@ -52,14 +59,14 @@ namespace datasets ...@@ -52,14 +59,14 @@ namespace datasets
using namespace std; using namespace std;
using namespace tinyxml2; using namespace tinyxml2;
class TR_svtImp : public TR_svt class TR_svtImp CV_FINAL : public TR_svt
{ {
public: public:
TR_svtImp() {} TR_svtImp() {}
//TR_svtImp(const string &path); //TR_svtImp(const string &path);
virtual ~TR_svtImp() {} virtual ~TR_svtImp() CV_OVERRIDE {}
virtual void load(const string &path); virtual void load(const string &path) CV_OVERRIDE;
private: private:
void loadDataset(const string &path); void loadDataset(const string &path);
......
...@@ -52,7 +52,7 @@ namespace cv ...@@ -52,7 +52,7 @@ namespace cv
namespace datasets namespace datasets
{ {
class TRACK_alovImpl : public TRACK_alov class TRACK_alovImpl CV_FINAL : public TRACK_alov
{ {
public: public:
//Constructor //Constructor
...@@ -62,24 +62,24 @@ public: ...@@ -62,24 +62,24 @@ public:
frameCounter = 0; frameCounter = 0;
} }
//Destructor //Destructor
virtual ~TRACK_alovImpl() {} virtual ~TRACK_alovImpl() CV_OVERRIDE {}
//Load Dataset //Load Dataset
virtual void load(const string &path); virtual void load(const string &path) CV_OVERRIDE;
virtual void loadAnnotatedOnly(const std::string &path); virtual void loadAnnotatedOnly(const std::string &path) CV_OVERRIDE;
protected: protected:
virtual int getDatasetsNum(); virtual int getDatasetsNum() CV_OVERRIDE;
virtual int getDatasetLength(int id); virtual int getDatasetLength(int id) CV_OVERRIDE;
virtual bool initDataset(int id); virtual bool initDataset(int id) CV_OVERRIDE;
virtual bool getNextFrame(Mat &frame); virtual bool getNextFrame(Mat &frame) CV_OVERRIDE;
virtual bool getFrame(Mat &frame, int datasetID, int frameID); virtual bool getFrame(Mat &frame, int datasetID, int frameID) CV_OVERRIDE;
virtual vector <Point2f> getNextGT(); virtual vector <Point2f> getNextGT() CV_OVERRIDE;
virtual vector <Point2f> getGT(int datasetID, int frameID); virtual vector <Point2f> getGT(int datasetID, int frameID) CV_OVERRIDE;
void loadDataset(const string &path); void loadDataset(const string &path);
void loadDatasetAnnotatedOnly(const string &path); void loadDatasetAnnotatedOnly(const string &path);
......
...@@ -52,7 +52,7 @@ namespace cv ...@@ -52,7 +52,7 @@ namespace cv
namespace datasets namespace datasets
{ {
class TRACK_votImpl : public TRACK_vot class TRACK_votImpl CV_FINAL : public TRACK_vot
{ {
public: public:
//Constructor //Constructor
...@@ -62,21 +62,21 @@ namespace cv ...@@ -62,21 +62,21 @@ namespace cv
frameCounter = 0; frameCounter = 0;
} }
//Destructor //Destructor
virtual ~TRACK_votImpl() {} virtual ~TRACK_votImpl() CV_OVERRIDE {}
//Load Dataset //Load Dataset
virtual void load(const string &path); virtual void load(const string &path) CV_OVERRIDE;
protected: protected:
virtual int getDatasetsNum(); virtual int getDatasetsNum() CV_OVERRIDE;
virtual int getDatasetLength(int id); virtual int getDatasetLength(int id) CV_OVERRIDE;
virtual bool initDataset(int id); virtual bool initDataset(int id) CV_OVERRIDE;
virtual bool getNextFrame(Mat &frame); virtual bool getNextFrame(Mat &frame) CV_OVERRIDE;
virtual vector <Point2d> getGT(); virtual vector <Point2d> getGT() CV_OVERRIDE;
void loadDataset(const string &path); void loadDataset(const string &path);
......
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