structure names capitalized + minor cleaning

pull/78/head
dmitriy.anisimov 10 years ago
parent 2916f89d82
commit ee684c8ad2
  1. 72
      modules/datasetstools/doc/datasetstools.rst
  2. 2
      modules/datasetstools/include/opencv2/datasetstools/ar_hmdb.hpp
  3. 4
      modules/datasetstools/include/opencv2/datasetstools/ar_sports.hpp
  4. 16
      modules/datasetstools/include/opencv2/datasetstools/dataset.hpp
  5. 4
      modules/datasetstools/include/opencv2/datasetstools/fr_lfw.hpp
  6. 2
      modules/datasetstools/include/opencv2/datasetstools/gr_chalearn.hpp
  7. 2
      modules/datasetstools/include/opencv2/datasetstools/gr_skig.hpp
  8. 2
      modules/datasetstools/include/opencv2/datasetstools/hpe_parse.hpp
  9. 2
      modules/datasetstools/include/opencv2/datasetstools/ir_affine.hpp
  10. 2
      modules/datasetstools/include/opencv2/datasetstools/ir_robot.hpp
  11. 4
      modules/datasetstools/include/opencv2/datasetstools/is_bsds.hpp
  12. 2
      modules/datasetstools/include/opencv2/datasetstools/is_weizmann.hpp
  13. 2
      modules/datasetstools/include/opencv2/datasetstools/msm_epfl.hpp
  14. 2
      modules/datasetstools/include/opencv2/datasetstools/msm_middlebury.hpp
  15. 2
      modules/datasetstools/include/opencv2/datasetstools/or_imagenet.hpp
  16. 2
      modules/datasetstools/include/opencv2/datasetstools/or_sun.hpp
  17. 2
      modules/datasetstools/include/opencv2/datasetstools/slam_kitti.hpp
  18. 2
      modules/datasetstools/include/opencv2/datasetstools/slam_tumindoor.hpp
  19. 2
      modules/datasetstools/include/opencv2/datasetstools/tr_chars.hpp
  20. 4
      modules/datasetstools/include/opencv2/datasetstools/tr_svt.hpp
  21. 2
      modules/datasetstools/include/opencv2/datasetstools/util.hpp
  22. 2
      modules/datasetstools/samples/ar_hmdb.cpp
  23. 2
      modules/datasetstools/samples/ar_sports.cpp
  24. 2
      modules/datasetstools/samples/fr_lfw.cpp
  25. 2
      modules/datasetstools/samples/gr_chalearn.cpp
  26. 2
      modules/datasetstools/samples/gr_skig.cpp
  27. 4
      modules/datasetstools/samples/hpe_parse.cpp
  28. 2
      modules/datasetstools/samples/ir_affine.cpp
  29. 2
      modules/datasetstools/samples/ir_robot.cpp
  30. 4
      modules/datasetstools/samples/is_bsds.cpp
  31. 2
      modules/datasetstools/samples/is_weizmann.cpp
  32. 2
      modules/datasetstools/samples/msm_epfl.cpp
  33. 2
      modules/datasetstools/samples/msm_middlebury.cpp
  34. 2
      modules/datasetstools/samples/or_imagenet.cpp
  35. 2
      modules/datasetstools/samples/or_sun.cpp
  36. 2
      modules/datasetstools/samples/slam_kitti.cpp
  37. 2
      modules/datasetstools/samples/slam_tumindoor.cpp
  38. 8
      modules/datasetstools/samples/tr_chars.cpp
  39. 2
      modules/datasetstools/samples/tr_svt.cpp
  40. 4
      modules/datasetstools/src/ar_hmdb.cpp
  41. 4
      modules/datasetstools/src/ar_sports.cpp
  42. 2
      modules/datasetstools/src/fr_lfw.cpp
  43. 2
      modules/datasetstools/src/gr_chalearn.cpp
  44. 2
      modules/datasetstools/src/gr_skig.cpp
  45. 2
      modules/datasetstools/src/hpe_parse.cpp
  46. 2
      modules/datasetstools/src/ir_affine.cpp
  47. 2
      modules/datasetstools/src/ir_robot.cpp
  48. 4
      modules/datasetstools/src/is_bsds.cpp
  49. 2
      modules/datasetstools/src/is_weizmann.cpp
  50. 2
      modules/datasetstools/src/msm_epfl.cpp
  51. 2
      modules/datasetstools/src/msm_middlebury.cpp
  52. 2
      modules/datasetstools/src/or_imagenet.cpp
  53. 2
      modules/datasetstools/src/or_sun.cpp
  54. 2
      modules/datasetstools/src/slam_kitti.cpp
  55. 2
      modules/datasetstools/src/slam_tumindoor.cpp
  56. 4
      modules/datasetstools/src/tr_chars.cpp
  57. 4
      modules/datasetstools/src/tr_svt.cpp
  58. 2
      modules/datasetstools/src/util.cpp

@ -11,9 +11,9 @@ First version of this module was implemented for **Fall2014 OpenCV Challenge**.
Action Recognition
------------------
ar_hmdb
AR_hmdb
=======
.. ocv:class:: ar_hmdb
.. ocv:class:: AR_hmdb
Implements loading dataset:
@ -27,9 +27,9 @@ _`"HMDB: A Large Human Motion Database"`: http://serre-lab.clps.brown.edu/resour
3. To load data run: ./opencv/build/bin/example_datasetstools_ar_hmdb -p=/home/user/path_to_unpacked_folders/
ar_sports
AR_sports
=========
.. ocv:class:: ar_sports
.. ocv:class:: AR_sports
Implements loading dataset:
@ -44,9 +44,9 @@ _`"Sports-1M Dataset"`: http://cs.stanford.edu/people/karpathy/deepvideo/
Face Recognition
----------------
fr_lfw
FR_lfw
======
.. ocv:class:: fr_lfw
.. ocv:class:: FR_lfw
Implements loading dataset:
@ -63,9 +63,9 @@ _`"Labeled Faces in the Wild-a"`: http://www.openu.ac.il/home/hassner/data/lfwa/
Gesture Recognition
-------------------
gr_chalearn
GR_chalearn
===========
.. ocv:class:: gr_chalearn
.. ocv:class:: GR_chalearn
Implements loading dataset:
@ -79,9 +79,9 @@ _`"ChaLearn Looking at People"`: http://gesture.chalearn.org/
3. To load data run: ./opencv/build/bin/example_datasetstools_gr_chalearn -p=/home/user/path_to_unpacked_folder/
gr_skig
GR_skig
=======
.. ocv:class:: gr_skig
.. ocv:class:: GR_skig
Implements loading dataset:
@ -98,9 +98,9 @@ _`"Sheffield Kinect Gesture Dataset"`: http://lshao.staff.shef.ac.uk/data/Sheffi
Human Pose Estimation
---------------------
hpe_parse
HPE_parse
=========
.. ocv:class:: hpe_parse
.. ocv:class:: HPE_parse
Implements loading dataset:
@ -117,9 +117,9 @@ _`"PARSE Dataset"`: http://www.ics.uci.edu/~dramanan/papers/parse/
Image Registration
------------------
ir_affine
IR_affine
=========
.. ocv:class:: ir_affine
.. ocv:class:: IR_affine
Implements loading dataset:
@ -133,9 +133,9 @@ _`"Affine Covariant Regions Datasets"`: http://www.robots.ox.ac.uk/~vgg/data/dat
3. To load data, for example, for "bark", run: ./opencv/build/bin/example_datasetstools_ir_affine -p=/home/user/path_to_unpacked_folder/bark/
ir_robot
IR_robot
========
.. ocv:class:: ir_robot
.. ocv:class:: IR_robot
Implements loading dataset:
@ -151,9 +151,9 @@ _`"Robot Data Set"`: http://roboimagedata.compute.dtu.dk/?page_id=24
Image Segmentation
------------------
is_bsds
IS_bsds
=======
.. ocv:class:: is_bsds
.. ocv:class:: IS_bsds
Implements loading dataset:
@ -167,9 +167,9 @@ _`"The Berkeley Segmentation Dataset and Benchmark"`: https://www.eecs.berkeley.
3. To load data run: ./opencv/build/bin/example_datasetstools_is_bsds -p=/home/user/path_to_unpacked_folder/BSDS300/
is_weizmann
IS_weizmann
===========
.. ocv:class:: is_weizmann
.. ocv:class:: IS_weizmann
Implements loading dataset:
@ -186,9 +186,9 @@ _`"Weizmann Segmentation Evaluation Database"`: http://www.wisdom.weizmann.ac.il
Multiview Stereo Matching
-------------------------
msm_epfl
MSM_epfl
========
.. ocv:class:: msm_epfl
.. ocv:class:: MSM_epfl
Implements loading dataset:
@ -202,9 +202,9 @@ _`"EPFL Multi-View Stereo"`: http://cvlabwww.epfl.ch/~strecha/multiview/denseMVS
3. To load data, for example, for "fountain", run: ./opencv/build/bin/example_datasetstools_msm_epfl -p=/home/user/path_to_unpacked_folder/fountain/
msm_middlebury
MSM_middlebury
==============
.. ocv:class:: msm_middlebury
.. ocv:class:: MSM_middlebury
Implements loading dataset:
@ -221,9 +221,9 @@ _`"Stereo – Middlebury Computer Vision"`: http://vision.middlebury.edu/mview/
Object Recognition
------------------
or_imagenet
OR_imagenet
===========
.. ocv:class:: or_imagenet
.. ocv:class:: OR_imagenet
Implements loading dataset:
@ -239,9 +239,9 @@ Currently implemented loading full list with urls. Planned to implement dataset
3. To load data run: ./opencv/build/bin/example_datasetstools_or_imagenet -p=/home/user/path_to_unpacked_file/
or_sun
OR_sun
======
.. ocv:class:: or_sun
.. ocv:class:: OR_sun
Implements loading dataset:
@ -260,9 +260,9 @@ Currently implemented loading "Scene Recognition Benchmark. SUN397". Planned to
SLAM
----
slam_kitti
SLAM_kitti
==========
.. ocv:class:: slam_kitti
.. ocv:class:: SLAM_kitti
Implements loading dataset:
@ -276,9 +276,9 @@ _`"KITTI Vision Benchmark"`: http://www.cvlibs.net/datasets/kitti/eval_odometry.
3. To load data run: ./opencv/build/bin/example_datasetstools_slam_kitti -p=/home/user/path_to_unpacked_folder/dataset/
slam_tumindoor
SLAM_tumindoor
==============
.. ocv:class:: slam_tumindoor
.. ocv:class:: SLAM_tumindoor
Implements loading dataset:
@ -295,9 +295,9 @@ _`"TUMindoor Dataset"`: http://www.navvis.lmt.ei.tum.de/dataset/
Text Recognition
----------------
tr_chars
TR_chars
========
.. ocv:class:: tr_chars
.. ocv:class:: TR_chars
Implements loading dataset:
@ -313,9 +313,9 @@ _`"The Chars74K Dataset"`: http://www.ee.surrey.ac.uk/CVSSP/demos/chars74k/
4. To load data, for example "EnglishImg", run: ./opencv/build/bin/example_datasetstools_tr_chars -p=/home/user/path_to_unpacked_folder/English/
tr_svt
TR_svt
======
.. ocv:class:: tr_svt
.. ocv:class:: TR_svt
Implements loading dataset:

@ -54,7 +54,7 @@ namespace cv
namespace datasetstools
{
struct action : public object
struct AR_hmdbObj : public Object
{
std::string name;
std::vector<std::string> videoNames;

@ -54,7 +54,7 @@ namespace cv
namespace datasetstools
{
struct element : public object
struct AR_sportsObj : public Object
{
std::string videoUrl;
std::vector<int> labels;
@ -72,7 +72,7 @@ public:
private:
void loadDataset(const std::string &path);
void loadDatasetPart(const std::string &fileName, std::vector< Ptr<object> > &dataset_);
void loadDatasetPart(const std::string &fileName, std::vector< Ptr<Object> > &dataset_);
};
}

@ -52,28 +52,20 @@ namespace cv
namespace datasetstools
{
struct object
struct Object
{
};
enum datasetType
{
AR_HMDB,
AR_SPORTS
};
class CV_EXPORTS Dataset
{
public:
Dataset() {}
virtual ~Dataset() {train.clear(); test.clear();}
virtual ~Dataset() {}
virtual void load(const std::string &path, int number = 0) = 0;
std::vector< Ptr<object> > train;
std::vector< Ptr<object> > test;
static Ptr<Dataset> create(datasetType type);
std::vector< Ptr<Object> > train;
std::vector< Ptr<Object> > test;
};
}

@ -54,7 +54,7 @@ namespace cv
namespace datasetstools
{
struct face : public object
struct FR_lfwObj : public Object
{
std::string name;
std::vector<std::string> images;
@ -69,8 +69,6 @@ public:
virtual void load(const std::string &path, int number = 0);
//std::vector<face> train;
private:
void loadDataset(const std::string &path);
};

@ -69,7 +69,7 @@ struct skeleton
join s[20];
};
struct gesture : public object
struct GR_chalearnObj : public Object
{
std::string name, nameColor, nameDepth, nameUser;
int numFrames, fps, depth;

@ -88,7 +88,7 @@ enum backgroundType
paperWithCharacters
};
struct gestureSkig : public object
struct GR_skigObj : public Object
{
std::string rgb;
std::string dep;

@ -54,7 +54,7 @@ namespace cv
namespace datasetstools
{
struct objectParse : public object
struct HPE_parseObj : public Object
{
std::string name;
};

@ -55,7 +55,7 @@ namespace cv
namespace datasetstools
{
struct imageParams : public object
struct IR_affineObj : public Object
{
std::string imageName;
Matx33d mat;

@ -59,7 +59,7 @@ namespace datasetstools
// 0.0000e+00 2.8285e+03 6.1618e+02
// 0.0000e+00 0.0000e+00 1.0000e+00
struct scene : public object
struct IR_robotObj : public Object
{
std::string name;
std::vector<std::string> images; // TODO: implement more complex structure

@ -54,7 +54,7 @@ namespace cv
namespace datasetstools
{
struct objectBsds : public object
struct IS_bsdsObj : public Object
{
std::string name;
};
@ -71,7 +71,7 @@ public:
private:
void loadDataset(const std::string &path);
void loadDatasetPart(const std::string &fileName, std::vector< Ptr<object> > &dataset_);
void loadDatasetPart(const std::string &fileName, std::vector< Ptr<Object> > &dataset_);
};
}

@ -54,7 +54,7 @@ namespace cv
namespace datasetstools
{
struct objectWeizmann : public object
struct IS_weizmannObj : public Object
{
std::string imageName;
std::string srcBw;

@ -54,7 +54,7 @@ namespace cv
namespace datasetstools
{
struct objectEpfl : public object
struct MSM_epflObj : public Object
{
std::string imageName;
std::vector<double> bounding, camera, p; // TODO: implement better structures

@ -54,7 +54,7 @@ namespace cv
namespace datasetstools
{
struct cameraParam : public object
struct MSM_middleburyObj : public Object
{
std::string imageName;
double k[3][3];

@ -55,7 +55,7 @@ namespace cv
namespace datasetstools
{
struct objectImagenet : public object
struct OR_imagenetObj : public Object
{
std::string wnid;
int id2;

@ -54,7 +54,7 @@ namespace cv
namespace datasetstools
{
struct objectSun : public object
struct OR_sunObj : public Object
{
std::string name;
std::vector<std::string> imageNames;

@ -59,7 +59,7 @@ struct pose
double elem[12];
};
struct sequence : public object
struct SLAM_kittiObj : public Object
{
std::string name;
std::vector<std::string> images[4];

@ -61,7 +61,7 @@ enum imageType
LADYBUG
};
struct imageInfo : public object
struct SLAM_tumindoorObj : public Object
{
std::string name;
double transformMat[4][4];

@ -54,7 +54,7 @@ namespace cv
namespace datasetstools
{
struct character : public object
struct TR_charsObj : public Object
{
std::string imgName;
int label;

@ -60,7 +60,7 @@ struct tag
int height, width, x, y;
};
struct image : public object
struct TR_svtObj : public Object
{
std::string fileName;
std::vector<std::string> lex;
@ -79,7 +79,7 @@ public:
private:
void loadDataset(const std::string &path);
void xmlParse(const std::string &set, std::vector< Ptr<object> > &out);
void xmlParse(const std::string &set, std::vector< Ptr<Object> > &out);
};
}

@ -52,7 +52,7 @@ namespace cv
namespace datasetstools
{
void split(const std::string s, std::vector<std::string> &elems, char delim);
void split(const std::string &s, std::vector<std::string> &elems, char delim);
void getDirList(const std::string &dirName, std::vector<std::string> &fileNames);

@ -75,7 +75,7 @@ int main(int argc, char *argv[])
// dataset contains for each split: a set of video file names for each action.
// For example, let output all training video file names for second split and first action.
// And its size.
action *example = static_cast<action *>(dataset[1].train[0].get());
AR_hmdbObj *example = static_cast<AR_hmdbObj *>(dataset[1].train[0].get());
printf("name: %s\n", example->name.c_str());
vector<string> &videoNames = example->videoNames;
printf("size: %u\n", (unsigned int)videoNames.size());

@ -75,7 +75,7 @@ int main(int argc, char *argv[])
printf("train size: %u\n", (unsigned int)dataset.train.size());
printf("test size: %u\n", (unsigned int)dataset.test.size());
element *example = static_cast<element *>(dataset.test[0].get());
AR_sportsObj *example = static_cast<AR_sportsObj *>(dataset.test[0].get());
printf("url: %s\n", example->videoUrl.c_str());
printf("labels: ");
vector<int> &labels = example->labels;

@ -71,7 +71,7 @@ int main(int argc, char *argv[])
// dataset contains object with name and its images.
// For example, let output dataset size and sixth element.
printf("dataset size: %u\n", (unsigned int)dataset.train.size());
face *example = static_cast<face *>(dataset.train[5].get());
FR_lfwObj *example = static_cast<FR_lfwObj *>(dataset.train[5].get());
printf("sixth dataset object:\n%s\n", example->name.c_str());
string currPath(path + example->name + "/");
for (vector<string>::iterator it=example->images.begin(); it!=example->images.end(); ++it)

@ -71,7 +71,7 @@ int main(int argc, char *argv[])
// dataset contains information for each sample.
// For example, let output dataset size and first element.
printf("dataset size: %u\n", (unsigned int)dataset.train.size());
gesture *example = static_cast<gesture *>(dataset.train[0].get());
GR_chalearnObj *example = static_cast<GR_chalearnObj *>(dataset.train[0].get());
printf("first dataset sample:\n%s\n", example->name.c_str());
printf("color video:\n%s\n", example->nameColor .c_str());
printf("depth video:\n%s\n", example->nameDepth.c_str());

@ -71,7 +71,7 @@ int main(int argc, char *argv[])
// ***************
// dataset contains pair of rgb\dep images
// For example, let output train size and second element.
gestureSkig *example = static_cast<gestureSkig *>(dataset.train[1].get());
GR_skigObj *example = static_cast<GR_skigObj *>(dataset.train[1].get());
printf("train size: %u\n", (unsigned int)dataset.train.size());
printf("second train image:\nrgb: %s\ndep: %s\n", example->rgb.c_str(), example->dep.c_str());
printf("person: %u, backgroud: %u, illumination: %u, pose: %u, actionType: %u\n",

@ -72,8 +72,8 @@ int main(int argc, char *argv[])
// For example, let output their sizes and first elements.
printf("train size: %u\n", (unsigned int)dataset.train.size());
printf("test size: %u\n", (unsigned int)dataset.test.size());
objectParse *example1 = static_cast<objectParse *>(dataset.train[0].get());
objectParse *example2 = static_cast<objectParse *>(dataset.test[0].get());
HPE_parseObj *example1 = static_cast<HPE_parseObj *>(dataset.train[0].get());
HPE_parseObj *example2 = static_cast<HPE_parseObj *>(dataset.test[0].get());
printf("first train image: %s\n", example1->name.c_str());
printf("first test image: %s\n", example2->name.c_str());

@ -75,7 +75,7 @@ int main(int argc, char *argv[])
// And dataset size.
printf("size: %u\n", (unsigned int)dataset.train.size());
imageParams *example = static_cast<imageParams *>(dataset.train.back().get());
IR_affineObj *example = static_cast<IR_affineObj *>(dataset.train.back().get());
printf("image name: %s\n", example->imageName.c_str());
printf("matrix:\n");
for (int i=0; i<3; ++i)

@ -70,7 +70,7 @@ int main(int argc, char *argv[])
// ***************
// dataset contains object with name and its images.
// For example, let output last element and dataset size.
scene *example = static_cast<scene *>(dataset.train.back().get());
IR_robotObj *example = static_cast<IR_robotObj *>(dataset.train.back().get());
printf("last dataset object:\n%s\n", example->name.c_str());
string currPath(path + example->name + "/");
for (vector<string>::iterator it=example->images.begin(); it!=example->images.end(); ++it)

@ -76,10 +76,10 @@ int main(int argc, char *argv[])
printf("train size: %u\n", (unsigned int)dataset.train.size());
printf("test size: %u\n", (unsigned int)dataset.test.size());
objectBsds *example1 = static_cast<objectBsds *>(dataset.train[0].get());
IS_bsdsObj *example1 = static_cast<IS_bsdsObj *>(dataset.train[0].get());
string fullPath(path + "images/train/" + example1->name + ".jpg");
printf("first train image: %s\n", fullPath.c_str());
objectBsds *example2 = static_cast<objectBsds *>(dataset.test[0].get());
IS_bsdsObj *example2 = static_cast<IS_bsdsObj *>(dataset.test[0].get());
fullPath = path + "images/test/" + example2->name + ".jpg";
printf("first test image: %s\n", fullPath.c_str());

@ -71,7 +71,7 @@ int main(int argc, char *argv[])
// dataset contains all information for each image.
// For example, let output dataset size and first object.
printf("dataset size: %u\n", (unsigned int)dataset.train.size());
objectWeizmann *example = static_cast<objectWeizmann *>(dataset.train[0].get());
IS_weizmannObj *example = static_cast<IS_weizmannObj *>(dataset.train[0].get());
printf("first image:\nname: %s\n", example->imageName.c_str());
printf("src bw: %s\nsrc color: %s\n", example->srcBw.c_str(), example->srcColor.c_str());

@ -71,7 +71,7 @@ int main(int argc, char *argv[])
// dataset contains all information for each image.
// For example, let output dataset size and first object.
printf("dataset size: %u\n", (unsigned int)dataset.train.size());
objectEpfl *example = static_cast<objectEpfl *>(dataset.train[0].get());
MSM_epflObj *example = static_cast<MSM_epflObj *>(dataset.train[0].get());
printf("first image:\nname: %s\n", example->imageName.c_str());
printf("bounding:\n");

@ -71,7 +71,7 @@ int main(int argc, char *argv[])
// dataset contains camera parameters for each image.
// For example, let output number of elements and last element.
printf("images number: %u\n", (unsigned int)dataset.train.size());
cameraParam *example = static_cast<cameraParam *>(dataset.train.back().get());
MSM_middleburyObj *example = static_cast<MSM_middleburyObj *>(dataset.train.back().get());
printf("last image name: %s\n", (path + example->imageName).c_str());
printf("K:\n");
for (int i=0; i<3; ++i)

@ -74,7 +74,7 @@ int main(int argc, char *argv[])
// For example, let output dataset size and first object.
printf("dataset size: %u\n", (unsigned int)dataset.train.size());
printf("wnids number: %u\n", (unsigned int)dataset.wnids.size());
objectImagenet *example = static_cast<objectImagenet *>(dataset.train[0].get());
OR_imagenetObj *example = static_cast<OR_imagenetObj *>(dataset.train[0].get());
printf("first object url: %s\n", example->imageUrl.c_str());
printf("first object wnid: %s\n", example->wnid.c_str());
printf("first object id2: %u\n", example->id2);

@ -71,7 +71,7 @@ int main(int argc, char *argv[])
// dataset contains for each object its images.
// For example, let output dataset size and last object.
printf("dataset size: %u\n", (unsigned int)dataset.train.size());
objectSun *example = static_cast<objectSun *>(dataset.train.back().get());
OR_sunObj *example = static_cast<OR_sunObj *>(dataset.train.back().get());
printf("last object name: %s\n", example->name.c_str());
printf("last object images number: %u\n", (unsigned int)example->imageNames.size());
vector<string> &imageNames = example->imageNames;

@ -72,7 +72,7 @@ int main(int argc, char *argv[])
// For example, let output first sequence and dataset size.
printf("dataset size: %u\n", (unsigned int)dataset.train.size());
sequence *example = static_cast<sequence *>(dataset.train[0].get());
SLAM_kittiObj *example = static_cast<SLAM_kittiObj *>(dataset.train[0].get());
printf("first dataset sequence:\n%s\n", example->name.c_str());
/*string pathVelodyne(path + "sequences/" + example->name + "/velodyne/");

@ -72,7 +72,7 @@ int main(int argc, char *argv[])
// For example, let output first image information and dataset size.
printf("dataset size: %u\n", (unsigned int)dataset.train.size());
imageInfo *example = static_cast<imageInfo *>(dataset.train[0].get());
SLAM_tumindoorObj *example = static_cast<SLAM_tumindoorObj *>(dataset.train[0].get());
printf("first image:\ntype: %u\n", example->type);
string imagePath(path);

@ -83,13 +83,13 @@ int main(int argc, char *argv[])
// And number of splits.
printf("splits number: %u\n", (unsigned int)dataset.size());
vector< Ptr<object> > &currTrain = dataset.back().train;
vector< Ptr<object> > &currTest = dataset.back().test;
vector< Ptr<Object> > &currTrain = dataset.back().train;
vector< Ptr<Object> > &currTest = dataset.back().test;
printf("train size: %u\n", (unsigned int)currTrain.size());
printf("test size: %u\n", (unsigned int)currTest.size());
character *example1 = static_cast<character *>(currTrain[0].get());
character *example2 = static_cast<character *>(currTest[0].get());
TR_charsObj *example1 = static_cast<TR_charsObj *>(currTrain[0].get());
TR_charsObj *example2 = static_cast<TR_charsObj *>(currTest[0].get());
printf("first train element:\nname: %s\n", example1->imgName.c_str());
printf("label: %u\n", example1->label);
printf("first test element:\nname: %s\n", example2->imgName.c_str());

@ -76,7 +76,7 @@ int main(int argc, char *argv[])
printf("train size: %u\n", (unsigned int)dataset.train.size());
printf("test size: %u\n", (unsigned int)dataset.test.size());
image *example = static_cast<image *>(dataset.train.back().get());
TR_svtObj *example = static_cast<TR_svtObj *>(dataset.train.back().get());
printf("last element:\nfile name: %s", example->fileName.c_str());
printf("\nlex: ");
for (vector<string>::iterator it=example->lex.begin(); it!=example->lex.end(); ++it)

@ -91,8 +91,8 @@ void AR_hmdb::loadDataset(const string &path, int number)
getDirList(pathDataset, fileNames);
for (vector<string>::iterator it=fileNames.begin(); it!=fileNames.end(); ++it)
{
Ptr<action> currTrain(new action);
Ptr<action> currTest(new action);
Ptr<AR_hmdbObj> currTrain(new AR_hmdbObj);
Ptr<AR_hmdbObj> currTest(new AR_hmdbObj);
currTrain->name = *it;
currTest->name = *it;

@ -49,13 +49,13 @@ namespace datasetstools
using namespace std;
void AR_sports::loadDatasetPart(const string &fileName, vector< Ptr<object> > &dataset_)
void AR_sports::loadDatasetPart(const string &fileName, vector< Ptr<Object> > &dataset_)
{
ifstream infile(fileName.c_str());
string videoUrl, labels;
while (infile >> videoUrl >> labels)
{
Ptr<element> curr(new element);
Ptr<AR_sportsObj> curr(new AR_sportsObj);
curr->videoUrl = videoUrl;
vector<string> elems;

@ -70,7 +70,7 @@ void FR_lfw::loadDataset(const string &path)
getDirList(path, fileNames);
for (vector<string>::iterator it=fileNames.begin(); it!=fileNames.end(); ++it)
{
Ptr<face> curr(new face);
Ptr<FR_lfwObj> curr(new FR_lfwObj);
curr->name = *it;
string pathFace(path + curr->name + "/");

@ -70,7 +70,7 @@ void GR_chalearn::loadDataset(const string &path)
getDirList(path, fileNames);
for (vector<string>::iterator it=fileNames.begin(); it!=fileNames.end(); ++it)
{
Ptr<gesture> curr(new gesture);
Ptr<GR_chalearnObj> curr(new GR_chalearnObj);
curr->name = *it;
curr->nameColor = curr->name + "/" + curr->name + "_color.mp4";
curr->nameDepth = curr->name + "/" + curr->name + "_depth.mp4";

@ -81,7 +81,7 @@ void GR_skig::loadDataset(const string &path)
{
string &file = *it;
Ptr<gestureSkig> curr(new gestureSkig);
Ptr<GR_skigObj> curr(new GR_skigObj);
curr->rgb = pathDatasetRgb + file;
curr->dep = file;
curr->dep[0] = 'K';

@ -79,7 +79,7 @@ void HPE_parse::loadDataset(const string &path)
}
if (ext==".jpg")
{
Ptr<objectParse> curr(new objectParse);
Ptr<HPE_parseObj> curr(new HPE_parseObj);
curr->name = file;
if (i<100)

@ -68,7 +68,7 @@ void IR_affine::loadDataset(const string &path)
{
for (unsigned int i=1; i<=6; ++i)
{
Ptr<imageParams> curr(new imageParams);
Ptr<IR_affineObj> curr(new IR_affineObj);
char tmp[2];
sprintf(tmp, "%u", i);

@ -70,7 +70,7 @@ void IR_robot::loadDataset(const string &path)
getDirList(path, fileNames);
for (vector<string>::iterator it=fileNames.begin(); it!=fileNames.end(); ++it)
{
Ptr<scene> curr(new scene);
Ptr<IR_robotObj> curr(new IR_robotObj);
curr->name = *it;
string pathScene(path + curr->name + "/");

@ -49,13 +49,13 @@ namespace datasetstools
using namespace std;
void IS_bsds::loadDatasetPart(const string &fileName, vector< Ptr<object> > &dataset_)
void IS_bsds::loadDatasetPart(const string &fileName, vector< Ptr<Object> > &dataset_)
{
ifstream infile(fileName.c_str());
string imageName;
while (infile >> imageName)
{
Ptr<objectBsds> curr(new objectBsds);
Ptr<IS_bsdsObj> curr(new IS_bsdsObj);
curr->name = imageName;
dataset_.push_back(curr);
}

@ -73,7 +73,7 @@ void IS_weizmann::loadDataset(const string &path)
string &imageName = *it;
if (imageName.find('.') == string::npos) // only folders, discard .mat
{
Ptr<objectWeizmann> curr(new objectWeizmann);
Ptr<IS_weizmannObj> curr(new IS_weizmannObj);
curr->imageName = imageName;
curr->srcBw = imageName + "/src_bw/" + imageName + ".png";
curr->srcColor = imageName + "/src_color/" + imageName + ".png";

@ -85,7 +85,7 @@ void MSM_epfl::loadDataset(const string &path)
getDirList(pathPng, fileNames);
for (vector<string>::iterator it=fileNames.begin(); it!=fileNames.end(); ++it)
{
Ptr<objectEpfl> curr(new objectEpfl);
Ptr<MSM_epflObj> curr(new MSM_epflObj);
curr->imageName = *it;
readFileDouble(string(pathBounding + curr->imageName + ".bounding"), curr->bounding);

@ -78,7 +78,7 @@ void MSM_middlebury::loadDataset(const string &path)
infile >> imageName; // skip header
while (infile >> imageName)
{
Ptr<cameraParam> curr(new cameraParam);
Ptr<MSM_middleburyObj> curr(new MSM_middleburyObj);
curr->imageName = imageName;
for (int i=0; i<3; ++i)

@ -73,7 +73,7 @@ void OR_imagenet::loadDataset(const string &path)
vector<string> elems;
split(line, elems, '\t');
Ptr<objectImagenet> curr(new objectImagenet);
Ptr<OR_imagenetObj> curr(new OR_imagenetObj);
curr->imageUrl = elems[1];
string id(elems[0]);

@ -71,7 +71,7 @@ void OR_sun::loadDataset(const string &path)
string line;
while (getline(infile, line))
{
Ptr<objectSun> curr(new objectSun);
Ptr<OR_sunObj> curr(new OR_sunObj);
curr->name = line;
string currPath(path + curr->name);

@ -71,7 +71,7 @@ void SLAM_kitti::loadDataset(const string &path)
getDirList(pathSequence, fileNames);
for (vector<string>::iterator it=fileNames.begin(); it!=fileNames.end(); ++it)
{
Ptr<sequence> curr(new sequence);
Ptr<SLAM_kittiObj> curr(new SLAM_kittiObj);
curr->name = *it;
string currPath(pathSequence + curr->name);

@ -76,7 +76,7 @@ void SLAM_tumindoor::loadDataset(const string &path)
vector<string> elems;
split(line, elems, ';');
Ptr<imageInfo> curr(new imageInfo);
Ptr<SLAM_tumindoorObj> curr(new SLAM_tumindoorObj);
curr->name = elems[0];
if (curr->name.substr(0, strlen("dslr_left")) == "dslr_left")

@ -163,7 +163,7 @@ void TR_chars::loadDataset(const string &path, int number)
continue;
}
Ptr<character> curr(new character);
Ptr<TR_charsObj> curr(new TR_charsObj);
curr->imgName = allNames[*it];
curr->label = allLabels[*it];
train.push_back(curr);
@ -177,7 +177,7 @@ void TR_chars::loadDataset(const string &path, int number)
continue;
}
Ptr<character> curr(new character);
Ptr<TR_charsObj> curr(new TR_charsObj);
curr->imgName = allNames[*it];
curr->label = allLabels[*it];
test.push_back(curr);

@ -52,7 +52,7 @@ namespace datasetstools
using namespace std;
using namespace tinyxml2;
void TR_svt::xmlParse(const string &set, vector< Ptr<object> > &out)
void TR_svt::xmlParse(const string &set, vector< Ptr<Object> > &out)
{
XMLDocument doc;
doc.LoadFile(set.c_str());
@ -67,7 +67,7 @@ void TR_svt::xmlParse(const string &set, vector< Ptr<object> > &out)
string imageName = child->FirstChildElement("imageName")->GetText();
string lex = child->FirstChildElement("lex")->GetText();
Ptr<image> curr(new image);
Ptr<TR_svtObj> curr(new TR_svtObj);
curr->fileName = imageName;
split(lex, curr->lex, ',');

@ -60,7 +60,7 @@ namespace datasetstools
using namespace std;
void split(const string s, vector<string> &elems, char delim)
void split(const string &s, vector<string> &elems, char delim)
{
stringstream ss(s);
string item;

Loading…
Cancel
Save