Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv_contrib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv_contrib
Commits
5e647ff0
Commit
5e647ff0
authored
Sep 02, 2014
by
dmitriy.anisimov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed all comments except base class enhancment and interface-implementation pattern
parent
17616a86
Hide whitespace changes
Inline
Side-by-side
Showing
60 changed files
with
437 additions
and
422 deletions
+437
-422
ar_hmdb.hpp
...s/datasetstools/include/opencv2/datasetstools/ar_hmdb.hpp
+10
-10
ar_sports.hpp
...datasetstools/include/opencv2/datasetstools/ar_sports.hpp
+11
-11
dataset.hpp
...s/datasetstools/include/opencv2/datasetstools/dataset.hpp
+6
-6
fr_lfw.hpp
...es/datasetstools/include/opencv2/datasetstools/fr_lfw.hpp
+9
-9
gr_chalearn.hpp
...tasetstools/include/opencv2/datasetstools/gr_chalearn.hpp
+11
-11
gr_skig.hpp
...s/datasetstools/include/opencv2/datasetstools/gr_skig.hpp
+48
-10
hpe_parse.hpp
...datasetstools/include/opencv2/datasetstools/hpe_parse.hpp
+9
-9
ir_affine.hpp
...datasetstools/include/opencv2/datasetstools/ir_affine.hpp
+11
-10
ir_robot.hpp
.../datasetstools/include/opencv2/datasetstools/ir_robot.hpp
+9
-9
is_bsds.hpp
...s/datasetstools/include/opencv2/datasetstools/is_bsds.hpp
+10
-10
is_weizmann.hpp
...tasetstools/include/opencv2/datasetstools/is_weizmann.hpp
+9
-9
msm_epfl.hpp
.../datasetstools/include/opencv2/datasetstools/msm_epfl.hpp
+10
-10
msm_middlebury.hpp
...etstools/include/opencv2/datasetstools/msm_middlebury.hpp
+9
-9
or_imagenet.hpp
...tasetstools/include/opencv2/datasetstools/or_imagenet.hpp
+11
-11
or_sun.hpp
...es/datasetstools/include/opencv2/datasetstools/or_sun.hpp
+9
-9
slam_kitti.hpp
...atasetstools/include/opencv2/datasetstools/slam_kitti.hpp
+9
-9
slam_tumindoor.hpp
...etstools/include/opencv2/datasetstools/slam_tumindoor.hpp
+9
-9
tinyxml2.h
...tstools/include/opencv2/datasetstools/tinyxml2/tinyxml2.h
+0
-0
tr_chars.hpp
.../datasetstools/include/opencv2/datasetstools/tr_chars.hpp
+11
-11
tr_svt.hpp
...es/datasetstools/include/opencv2/datasetstools/tr_svt.hpp
+11
-11
util.hpp
modules/datasetstools/include/opencv2/datasetstools/util.hpp
+4
-4
ar_hmdb.cpp
modules/datasetstools/samples/ar_hmdb.cpp
+3
-3
ar_sports.cpp
modules/datasetstools/samples/ar_sports.cpp
+4
-4
fr_lfw.cpp
modules/datasetstools/samples/fr_lfw.cpp
+2
-2
gr_chalearn.cpp
modules/datasetstools/samples/gr_chalearn.cpp
+2
-2
gr_skig.cpp
modules/datasetstools/samples/gr_skig.cpp
+6
-6
hpe_parse.cpp
modules/datasetstools/samples/hpe_parse.cpp
+2
-2
ir_affine.cpp
modules/datasetstools/samples/ir_affine.cpp
+3
-3
ir_robot.cpp
modules/datasetstools/samples/ir_robot.cpp
+2
-2
is_bsds.cpp
modules/datasetstools/samples/is_bsds.cpp
+2
-2
is_weizmann.cpp
modules/datasetstools/samples/is_weizmann.cpp
+2
-2
msm_epfl.cpp
modules/datasetstools/samples/msm_epfl.cpp
+2
-2
msm_middlebury.cpp
modules/datasetstools/samples/msm_middlebury.cpp
+2
-2
or_imagenet.cpp
modules/datasetstools/samples/or_imagenet.cpp
+2
-2
or_sun.cpp
modules/datasetstools/samples/or_sun.cpp
+2
-2
slam_kitti.cpp
modules/datasetstools/samples/slam_kitti.cpp
+2
-2
slam_tumindoor.cpp
modules/datasetstools/samples/slam_tumindoor.cpp
+2
-2
tr_chars.cpp
modules/datasetstools/samples/tr_chars.cpp
+4
-4
tr_svt.cpp
modules/datasetstools/samples/tr_svt.cpp
+2
-2
ar_hmdb.cpp
modules/datasetstools/src/ar_hmdb.cpp
+7
-11
ar_sports.cpp
modules/datasetstools/src/ar_sports.cpp
+6
-11
fr_lfw.cpp
modules/datasetstools/src/fr_lfw.cpp
+5
-9
gr_chalearn.cpp
modules/datasetstools/src/gr_chalearn.cpp
+5
-10
gr_skig.cpp
modules/datasetstools/src/gr_skig.cpp
+9
-13
hpe_parse.cpp
modules/datasetstools/src/hpe_parse.cpp
+5
-9
ir_affine.cpp
modules/datasetstools/src/ir_affine.cpp
+6
-10
ir_robot.cpp
modules/datasetstools/src/ir_robot.cpp
+5
-9
is_bsds.cpp
modules/datasetstools/src/is_bsds.cpp
+6
-9
is_weizmann.cpp
modules/datasetstools/src/is_weizmann.cpp
+5
-9
msm_epfl.cpp
modules/datasetstools/src/msm_epfl.cpp
+9
-13
msm_middlebury.cpp
modules/datasetstools/src/msm_middlebury.cpp
+5
-8
or_imagenet.cpp
modules/datasetstools/src/or_imagenet.cpp
+5
-10
or_sun.cpp
modules/datasetstools/src/or_sun.cpp
+5
-9
precomp.hpp
modules/datasetstools/src/precomp.hpp
+52
-0
slam_kitti.cpp
modules/datasetstools/src/slam_kitti.cpp
+5
-10
slam_tumindoor.cpp
modules/datasetstools/src/slam_tumindoor.cpp
+5
-9
tinyxml2.cpp
modules/datasetstools/src/tinyxml2/tinyxml2.cpp
+1
-1
tr_chars.cpp
modules/datasetstools/src/tr_chars.cpp
+9
-14
tr_svt.cpp
modules/datasetstools/src/tr_svt.cpp
+7
-12
util.cpp
modules/datasetstools/src/util.cpp
+3
-3
No files found.
modules/datasetstools/include/opencv2/ar_hmdb.hpp
→
modules/datasetstools/include/opencv2/
datasetstools/
ar_hmdb.hpp
View file @
5e647ff0
...
...
@@ -39,13 +39,13 @@
//
//M*/
#ifndef
AR_HMDB_H
#define
AR_HMDB_H
#ifndef
OPENCV_DATASETSTOOLS_AR_HMDB_HPP
#define
OPENCV_DATASETSTOOLS_AR_HMDB_HPP
#include <string>
#include <vector>
#include "opencv2/dataset.hpp"
#include "opencv2/dataset
stools/dataset
.hpp"
#include <opencv2/core.hpp>
...
...
@@ -60,22 +60,22 @@ struct action
std
::
vector
<
std
::
string
>
videoNames
;
};
class
CV_EXPORTS
ar_hmdb
:
public
d
ataset
class
CV_EXPORTS
AR_hmdb
:
public
D
ataset
{
public
:
ar
_hmdb
()
{}
ar_hmdb
(
std
::
string
&
path
,
unsigned
int
number
=
0
);
virtual
~
ar
_hmdb
()
{}
AR
_hmdb
()
{}
AR_hmdb
(
const
std
::
string
&
path
,
int
number
=
0
);
virtual
~
AR
_hmdb
()
{}
virtual
void
load
(
std
::
string
&
path
,
unsigned
int
number
=
0
);
virtual
void
load
(
const
std
::
string
&
path
,
int
number
=
0
);
std
::
vector
<
action
>
train
;
std
::
vector
<
action
>
test
;
private
:
void
loadDataset
(
std
::
string
&
path
,
unsigned
int
number
=
0
);
void
loadDataset
(
const
std
::
string
&
path
,
int
number
=
0
);
void
loadAction
(
std
::
string
&
fileName
,
std
::
vector
<
std
::
string
>
&
train_
,
std
::
vector
<
std
::
string
>
&
test_
);
void
loadAction
(
const
std
::
string
&
fileName
,
std
::
vector
<
std
::
string
>
&
train_
,
std
::
vector
<
std
::
string
>
&
test_
);
};
}
...
...
modules/datasetstools/include/opencv2/ar_sports.hpp
→
modules/datasetstools/include/opencv2/
datasetstools/
ar_sports.hpp
View file @
5e647ff0
...
...
@@ -39,13 +39,13 @@
//
//M*/
#ifndef
AR_SPORTS_H
#define
AR_SPORTS_H
#ifndef
OPENCV_DATASETSTOOLS_AR_SPORTS_HPP
#define
OPENCV_DATASETSTOOLS_AR_SPORTS_HPP
#include <string>
#include <vector>
#include "opencv2/dataset.hpp"
#include "opencv2/dataset
stools/dataset
.hpp"
#include <opencv2/core.hpp>
...
...
@@ -57,25 +57,25 @@ namespace datasetstools
struct
element
{
std
::
string
videoUrl
;
std
::
vector
<
unsigned
int
>
labels
;
std
::
vector
<
int
>
labels
;
};
class
CV_EXPORTS
ar_sports
:
public
d
ataset
class
CV_EXPORTS
AR_sports
:
public
D
ataset
{
public
:
ar
_sports
()
{}
ar_sports
(
std
::
string
&
path
);
virtual
~
ar
_sports
()
{}
AR
_sports
()
{}
AR_sports
(
const
std
::
string
&
path
);
virtual
~
AR
_sports
()
{}
virtual
void
load
(
std
::
string
&
path
,
unsigned
int
number
=
0
);
virtual
void
load
(
const
std
::
string
&
path
,
int
number
=
0
);
std
::
vector
<
element
>
train
;
std
::
vector
<
element
>
test
;
private
:
void
loadDataset
(
std
::
string
&
path
);
void
loadDataset
(
const
std
::
string
&
path
);
void
loadDatasetPart
(
std
::
string
&
fileName
,
std
::
vector
<
element
>
&
dataset_
);
void
loadDatasetPart
(
const
std
::
string
&
fileName
,
std
::
vector
<
element
>
&
dataset_
);
};
}
...
...
modules/datasetstools/include/opencv2/dataset.hpp
→
modules/datasetstools/include/opencv2/dataset
stools/dataset
.hpp
View file @
5e647ff0
...
...
@@ -39,8 +39,8 @@
//
//M*/
#ifndef
DATASET_H
#define
DATASET_H
#ifndef
OPENCV_DATASETSTOOLS_DATASET_HPP
#define
OPENCV_DATASETSTOOLS_DATASET_HPP
#include <string>
...
...
@@ -51,13 +51,13 @@ namespace cv
namespace
datasetstools
{
class
CV_EXPORTS
d
ataset
class
CV_EXPORTS
D
ataset
{
public
:
d
ataset
()
{}
virtual
~
d
ataset
()
{}
D
ataset
()
{}
virtual
~
D
ataset
()
{}
virtual
void
load
(
std
::
string
&
path
,
unsigned
int
number
=
0
)
=
0
;
virtual
void
load
(
const
std
::
string
&
path
,
int
number
=
0
)
=
0
;
};
}
...
...
modules/datasetstools/include/opencv2/fr_lfw.hpp
→
modules/datasetstools/include/opencv2/
datasetstools/
fr_lfw.hpp
View file @
5e647ff0
...
...
@@ -39,13 +39,13 @@
//
//M*/
#ifndef
FR_LFW_H
#define
FR_LFW_H
#ifndef
OPENCV_DATASETSTOOLS_FR_LFW_HPP
#define
OPENCV_DATASETSTOOLS_FR_LFW_HPP
#include <string>
#include <vector>
#include "opencv2/dataset.hpp"
#include "opencv2/dataset
stools/dataset
.hpp"
#include <opencv2/core.hpp>
...
...
@@ -60,19 +60,19 @@ struct face
std
::
vector
<
std
::
string
>
images
;
};
class
CV_EXPORTS
fr_lfw
:
public
d
ataset
class
CV_EXPORTS
FR_lfw
:
public
D
ataset
{
public
:
fr
_lfw
()
{}
fr_lfw
(
std
::
string
&
path
);
virtual
~
fr
_lfw
()
{}
FR
_lfw
()
{}
FR_lfw
(
const
std
::
string
&
path
);
virtual
~
FR
_lfw
()
{}
virtual
void
load
(
std
::
string
&
path
,
unsigned
int
number
=
0
);
virtual
void
load
(
const
std
::
string
&
path
,
int
number
=
0
);
std
::
vector
<
face
>
train
;
private
:
void
loadDataset
(
std
::
string
&
path
);
void
loadDataset
(
const
std
::
string
&
path
);
};
}
...
...
modules/datasetstools/include/opencv2/gr_chalearn.hpp
→
modules/datasetstools/include/opencv2/
datasetstools/
gr_chalearn.hpp
View file @
5e647ff0
...
...
@@ -39,13 +39,13 @@
//
//M*/
#ifndef
GR_CHALEARN_H
#define
GR_CHALEARN_H
#ifndef
OPENCV_DATASETSTOOLS_GR_CHALEARN_HPP
#define
OPENCV_DATASETSTOOLS_GR_CHALEARN_HPP
#include <string>
#include <vector>
#include "opencv2/dataset.hpp"
#include "opencv2/dataset
stools/dataset
.hpp"
#include <opencv2/core.hpp>
...
...
@@ -56,7 +56,7 @@ namespace datasetstools
struct
groundTruth
{
unsigned
int
gestureID
,
initialFrame
,
lastFrame
;
int
gestureID
,
initialFrame
,
lastFrame
;
};
struct
join
...
...
@@ -72,24 +72,24 @@ struct skeleton
struct
gesture
{
std
::
string
name
,
nameColor
,
nameDepth
,
nameUser
;
unsigned
int
numFrames
,
fps
,
depth
;
int
numFrames
,
fps
,
depth
;
std
::
vector
<
groundTruth
>
groundTruths
;
std
::
vector
<
skeleton
>
skeletons
;
};
class
CV_EXPORTS
gr_chalearn
:
public
d
ataset
class
CV_EXPORTS
GR_chalearn
:
public
D
ataset
{
public
:
gr
_chalearn
()
{}
gr_chalearn
(
std
::
string
&
path
);
virtual
~
gr
_chalearn
()
{}
GR
_chalearn
()
{}
GR_chalearn
(
const
std
::
string
&
path
);
virtual
~
GR
_chalearn
()
{}
virtual
void
load
(
std
::
string
&
path
,
unsigned
int
number
=
0
);
virtual
void
load
(
const
std
::
string
&
path
,
int
number
=
0
);
std
::
vector
<
gesture
>
train
;
private
:
void
loadDataset
(
std
::
string
&
path
);
void
loadDataset
(
const
std
::
string
&
path
);
};
}
...
...
modules/datasetstools/include/opencv2/gr_skig.hpp
→
modules/datasetstools/include/opencv2/
datasetstools/
gr_skig.hpp
View file @
5e647ff0
...
...
@@ -39,13 +39,13 @@
//
//M*/
#ifndef
GR_SKIG_H
#define
GR_SKIG_H
#ifndef
OPENCV_DATASETSTOOLS_GR_SKIG_HPP
#define
OPENCV_DATASETSTOOLS_GR_SKIG_HPP
#include <string>
#include <vector>
#include "opencv2/dataset.hpp"
#include "opencv2/dataset
stools/dataset
.hpp"
#include <opencv2/core.hpp>
...
...
@@ -54,26 +54,64 @@ namespace cv
namespace
datasetstools
{
enum
actionType
{
circle
=
1
,
triangle
,
updown
,
rightleft
,
wave
,
z
,
cross
,
comehere
,
turnaround
,
pat
};
enum
poseType
{
fist
=
1
,
index
,
flat
};
enum
illuminationType
{
light
=
1
,
dark
};
enum
backgroundType
{
woodenBoard
=
1
,
whitePaper
,
paperWithCharacters
};
struct
gestureSkig
{
std
::
string
rgb
;
std
::
string
dep
;
unsigned
char
person
,
background
,
illumination
,
pose
,
actionType
;
char
person
;
// 1..6
backgroundType
background
;
illuminationType
illumination
;
poseType
pose
;
actionType
type
;
};
class
CV_EXPORTS
gr_skig
:
public
d
ataset
class
CV_EXPORTS
GR_skig
:
public
D
ataset
{
public
:
gr
_skig
()
{}
gr_skig
(
std
::
string
&
path
);
virtual
~
gr
_skig
()
{}
GR
_skig
()
{}
GR_skig
(
const
std
::
string
&
path
);
virtual
~
GR
_skig
()
{}
virtual
void
load
(
std
::
string
&
path
,
unsigned
int
number
=
0
);
virtual
void
load
(
const
std
::
string
&
path
,
int
number
=
0
);
std
::
vector
<
gestureSkig
>
train
;
private
:
void
loadDataset
(
std
::
string
&
path
);
void
loadDataset
(
const
std
::
string
&
path
);
};
}
...
...
modules/datasetstools/include/opencv2/hpe_parse.hpp
→
modules/datasetstools/include/opencv2/
datasetstools/
hpe_parse.hpp
View file @
5e647ff0
...
...
@@ -39,13 +39,13 @@
//
//M*/
#ifndef
HPE_PARSE_H
#define
HPE_PARSE_H
#ifndef
OPENCV_DATASETSTOOLS_HPE_PARSE_HPP
#define
OPENCV_DATASETSTOOLS_HPE_PARSE_HPP
#include <string>
#include <vector>
#include "opencv2/dataset.hpp"
#include "opencv2/dataset
stools/dataset
.hpp"
#include <opencv2/core.hpp>
...
...
@@ -54,20 +54,20 @@ namespace cv
namespace
datasetstools
{
class
CV_EXPORTS
hpe_parse
:
public
d
ataset
class
CV_EXPORTS
HPE_parse
:
public
D
ataset
{
public
:
hpe
_parse
()
{}
hpe_parse
(
std
::
string
&
path
);
virtual
~
hpe
_parse
()
{}
HPE
_parse
()
{}
HPE_parse
(
const
std
::
string
&
path
);
virtual
~
HPE
_parse
()
{}
virtual
void
load
(
std
::
string
&
path
,
unsigned
int
number
=
0
);
virtual
void
load
(
const
std
::
string
&
path
,
int
number
=
0
);
std
::
vector
<
std
::
string
>
train
;
std
::
vector
<
std
::
string
>
test
;
private
:
void
loadDataset
(
std
::
string
&
path
);
void
loadDataset
(
const
std
::
string
&
path
);
};
}
...
...
modules/datasetstools/include/opencv2/ir_affine.hpp
→
modules/datasetstools/include/opencv2/
datasetstools/
ir_affine.hpp
View file @
5e647ff0
...
...
@@ -39,15 +39,16 @@
//
//M*/
#ifndef
IR_AFFINE_H
#define
IR_AFFINE_H
#ifndef
OPENCV_DATASETSTOOLS_IR_AFFINE_HPP
#define
OPENCV_DATASETSTOOLS_IR_AFFINE_HPP
#include <string>
#include <vector>
#include "opencv2/dataset.hpp"
#include "opencv2/dataset
stools/dataset
.hpp"
#include <opencv2/core.hpp>
#include <opencv2/core/matx.hpp>
namespace
cv
{
...
...
@@ -57,22 +58,22 @@ namespace datasetstools
struct
imageParams
{
std
::
string
imageName
;
double
mat
[
3
][
3
]
;
Matx33d
mat
;
};
class
CV_EXPORTS
ir_affine
:
public
d
ataset
class
CV_EXPORTS
IR_affine
:
public
D
ataset
{
public
:
ir
_affine
()
{}
ir_affine
(
std
::
string
&
path
);
virtual
~
ir
_affine
()
{}
IR
_affine
()
{}
IR_affine
(
const
std
::
string
&
path
);
virtual
~
IR
_affine
()
{}
virtual
void
load
(
std
::
string
&
path
,
unsigned
int
number
=
0
);
virtual
void
load
(
const
std
::
string
&
path
,
int
number
=
0
);
std
::
vector
<
imageParams
>
train
;
private
:
void
loadDataset
(
std
::
string
&
path
);
void
loadDataset
(
const
std
::
string
&
path
);
};
}
...
...
modules/datasetstools/include/opencv2/ir_robot.hpp
→
modules/datasetstools/include/opencv2/
datasetstools/
ir_robot.hpp
View file @
5e647ff0
...
...
@@ -39,13 +39,13 @@
//
//M*/
#ifndef
IR_ROBOT_H
#define
IR_ROBOT_H
#ifndef
OPENCV_DATASETSTOOLS_IR_ROBOT_HPP
#define
OPENCV_DATASETSTOOLS_IR_ROBOT_HPP
#include <string>
#include <vector>
#include "opencv2/dataset.hpp"
#include "opencv2/dataset
stools/dataset
.hpp"
#include <opencv2/core.hpp>
...
...
@@ -65,19 +65,19 @@ struct scene
std
::
vector
<
std
::
string
>
images
;
// TODO: implement more complex structure
};
class
CV_EXPORTS
ir_robot
:
public
d
ataset
class
CV_EXPORTS
IR_robot
:
public
D
ataset
{
public
:
ir
_robot
()
{}
ir_robot
(
std
::
string
&
path
);
virtual
~
ir
_robot
()
{}
IR
_robot
()
{}
IR_robot
(
const
std
::
string
&
path
);
virtual
~
IR
_robot
()
{}
virtual
void
load
(
std
::
string
&
path
,
unsigned
int
number
=
0
);
virtual
void
load
(
const
std
::
string
&
path
,
int
number
=
0
);
std
::
vector
<
scene
>
train
;
private
:
void
loadDataset
(
std
::
string
&
path
);
void
loadDataset
(
const
std
::
string
&
path
);
};
}
...
...
modules/datasetstools/include/opencv2/is_bsds.hpp
→
modules/datasetstools/include/opencv2/
datasetstools/
is_bsds.hpp
View file @
5e647ff0
...
...
@@ -39,13 +39,13 @@
//
//M*/
#ifndef
IS_BSDS_H
#define
IS_BSDS_H
#ifndef
OPENCV_DATASETSTOOLS_IS_BSDS_HPP
#define
OPENCV_DATASETSTOOLS_IS_BSDS_HPP
#include <string>
#include <vector>
#include "opencv2/dataset.hpp"
#include "opencv2/dataset
stools/dataset
.hpp"
#include <opencv2/core.hpp>
...
...
@@ -54,22 +54,22 @@ namespace cv
namespace
datasetstools
{
class
CV_EXPORTS
is_bsds
:
public
d
ataset
class
CV_EXPORTS
IS_bsds
:
public
D
ataset
{
public
:
is
_bsds
()
{}
is_bsds
(
std
::
string
&
path
);
virtual
~
is
_bsds
()
{}
IS
_bsds
()
{}
IS_bsds
(
const
std
::
string
&
path
);
virtual
~
IS
_bsds
()
{}
virtual
void
load
(
std
::
string
&
path
,
unsigned
int
number
=
0
);
virtual
void
load
(
const
std
::
string
&
path
,
int
number
=
0
);
std
::
vector
<
std
::
string
>
train
;
std
::
vector
<
std
::
string
>
test
;
private
:
void
loadDataset
(
std
::
string
&
path
);
void
loadDataset
(
const
std
::
string
&
path
);
void
loadDatasetPart
(
std
::
string
&
fileName
,
std
::
vector
<
std
::
string
>
&
dataset_
);
void
loadDatasetPart
(
const
std
::
string
&
fileName
,
std
::
vector
<
std
::
string
>
&
dataset_
);
};
}
...
...
modules/datasetstools/include/opencv2/is_weizmann.hpp
→
modules/datasetstools/include/opencv2/
datasetstools/
is_weizmann.hpp
View file @
5e647ff0
...
...
@@ -39,13 +39,13 @@
//
//M*/
#ifndef
IS_WEIZMANN_H
#define
IS_WEIZMANN_H
#ifndef
OPENCV_DATASETSTOOLS_IS_WEIZMANN_HPP
#define
OPENCV_DATASETSTOOLS_IS_WEIZMANN_HPP
#include <string>
#include <vector>
#include "opencv2/dataset.hpp"
#include "opencv2/dataset
stools/dataset
.hpp"
#include <opencv2/core.hpp>
...
...
@@ -62,19 +62,19 @@ struct object
std
::
string
humanSeg
;
// TODO: read human segmented
};
class
CV_EXPORTS
is_weizmann
:
public
d
ataset
class
CV_EXPORTS
IS_weizmann
:
public
D
ataset
{
public
:
is
_weizmann
()
{}
is_weizmann
(
std
::
string
&
path
);
virtual
~
is
_weizmann
()
{}
IS
_weizmann
()
{}
IS_weizmann
(
const
std
::
string
&
path
);
virtual
~
IS
_weizmann
()
{}
virtual
void
load
(
std
::
string
&
path
,
unsigned
int
number
=
0
);
virtual
void
load
(
const
std
::
string
&
path
,
int
number
=
0
);
std
::
vector
<
object
>
train
;
private
:
void
loadDataset
(
std
::
string
&
path
);
void
loadDataset
(
const
std
::
string
&
path
);
};
}
...
...
modules/datasetstools/include/opencv2/msm_epfl.hpp
→
modules/datasetstools/include/opencv2/
datasetstools/
msm_epfl.hpp
View file @
5e647ff0
...
...
@@ -39,13 +39,13 @@
//
//M*/
#ifndef
MSM_EPFL_H
#define
MSM_EPFL_H
#ifndef
OPENCV_DATASETSTOOLS_MSM_EPFL_HPP
#define
OPENCV_DATASETSTOOLS_MSM_EPFL_HPP
#include <string>
#include <vector>
#include "opencv2/dataset.hpp"
#include "opencv2/dataset
stools/dataset
.hpp"
#include <opencv2/core.hpp>
...
...
@@ -60,21 +60,21 @@ struct objectEpfl
std
::
vector
<
double
>
bounding
,
camera
,
p
;
// TODO: implement better structures
};
class
CV_EXPORTS
msm_epfl
:
public
d
ataset
class
CV_EXPORTS
MSM_epfl
:
public
D
ataset
{
public
:
msm
_epfl
()
{}
msm_epfl
(
std
::
string
&
path
);
virtual
~
msm
_epfl
()
{}
MSM
_epfl
()
{}
MSM_epfl
(
const
std
::
string
&
path
);
virtual
~
MSM
_epfl
()
{}
virtual
void
load
(
std
::
string
&
path
,
unsigned
int
number
=
0
);
virtual
void
load
(
const
std
::
string
&
path
,
int
number
=
0
);
std
::
vector
<
objectEpfl
>
train
;
private
:
void
loadDataset
(
std
::
string
&
path
);
void
loadDataset
(
const
std
::
string
&
path
);
void
readFileDouble
(
std
::
string
fileName
,
std
::
vector
<
double
>
&
out
);
void
readFileDouble
(
const
std
::
string
&
fileName
,
std
::
vector
<
double
>
&
out
);
};
}
...
...
modules/datasetstools/include/opencv2/msm_middlebury.hpp
→
modules/datasetstools/include/opencv2/
datasetstools/
msm_middlebury.hpp
View file @
5e647ff0
...
...
@@ -39,13 +39,13 @@
//
//M*/
#ifndef
MSM_MIDDLEBURY_H
#define
MSM_MIDDLEBURY_H
#ifndef
OPENCV_DATASETSTOOLS_MSM_MIDDLEBURY_HPP
#define
OPENCV_DATASETSTOOLS_MSM_MIDDLEBURY_HPP
#include <string>
#include <vector>
#include "opencv2/dataset.hpp"
#include "opencv2/dataset
stools/dataset
.hpp"
#include <opencv2/core.hpp>
...
...
@@ -62,19 +62,19 @@ struct cameraParam
double
t
[
3
];
};
class
CV_EXPORTS
msm_middlebury
:
public
d
ataset
class
CV_EXPORTS
MSM_middlebury
:
public
D
ataset
{
public
:
msm
_middlebury
()
{}
msm_middlebury
(
std
::
string
&
path
);
virtual
~
msm
_middlebury
()
{}
MSM
_middlebury
()
{}
MSM_middlebury
(
const
std
::
string
&
path
);
virtual
~
MSM
_middlebury
()
{}
virtual
void
load
(
std
::
string
&
path
,
unsigned
int
number
=
0
);
virtual
void
load
(
const
std
::
string
&
path
,
int
number
=
0
);
std
::
vector
<
cameraParam
>
train
;
private
:
void
loadDataset
(
std
::
string
&
path
);
void
loadDataset
(
const
std
::
string
&
path
);
};
}
...
...
modules/datasetstools/include/opencv2/or_imagenet.hpp
→
modules/datasetstools/include/opencv2/
datasetstools/
or_imagenet.hpp
View file @
5e647ff0
...
...
@@ -39,14 +39,14 @@
//
//M*/
#ifndef O
R_IMAGENET_H
#define O
R_IMAGENET_H
#ifndef O
PENCV_DATASETSTOOLS_OR_IMAGENET_HPP
#define O
PENCV_DATASETSTOOLS_OR_IMAGENET_HPP
#include <string>
#include <vector>
#include <set>
#include "opencv2/dataset.hpp"
#include "opencv2/dataset
stools/dataset
.hpp"
#include <opencv2/core.hpp>
...
...
@@ -57,25 +57,25 @@ namespace datasetstools
struct
objectImagenet
{
std
::
string
wnid
;
// TODO: string -> unsigned int
unsigned
int
id2
;
std
::
string
wnid
;
int
id2
;
std
::
string
imageUrl
;
};
class
CV_EXPORTS
or_imagenet
:
public
d
ataset
class
CV_EXPORTS
OR_imagenet
:
public
D
ataset
{
public
:
or
_imagenet
()
{}
or_imagenet
(
std
::
string
&
path
);
virtual
~
or
_imagenet
()
{}
OR
_imagenet
()
{}
OR_imagenet
(
const
std
::
string
&
path
);
virtual
~
OR
_imagenet
()
{}
virtual
void
load
(
std
::
string
&
path
,
unsigned
int
number
=
0
);
virtual
void
load
(
const
std
::
string
&
path
,
int
number
=
0
);
std
::
vector
<
objectImagenet
>
train
;
std
::
set
<
std
::
string
>
wnids
;
private
:
void
loadDataset
(
std
::
string
&
path
);
void
loadDataset
(
const
std
::
string
&
path
);
};
}
...
...
modules/datasetstools/include/opencv2/or_sun.hpp
→
modules/datasetstools/include/opencv2/
datasetstools/
or_sun.hpp
View file @
5e647ff0
...
...
@@ -39,13 +39,13 @@
//
//M*/
#ifndef O
R_SUN_H
#define O
R_SUN_H
#ifndef O
PENCV_DATASETSTOOLS_OR_SUN_HPP
#define O
PENCV_DATASETSTOOLS_OR_SUN_HPP
#include <string>
#include <vector>
#include "opencv2/dataset.hpp"
#include "opencv2/dataset
stools/dataset
.hpp"
#include <opencv2/core.hpp>
...
...
@@ -60,19 +60,19 @@ struct objectSun
std
::
vector
<
std
::
string
>
imageNames
;
};
class
CV_EXPORTS
or_sun
:
public
d
ataset
class
CV_EXPORTS
OR_sun
:
public
D
ataset
{
public
:
or
_sun
()
{}
or_sun
(
std
::
string
&
path
);
virtual
~
or
_sun
()
{}
OR
_sun
()
{}
OR_sun
(
const
std
::
string
&
path
);
virtual
~
OR
_sun
()
{}
virtual
void
load
(
std
::
string
&
path
,
unsigned
int
number
=
0
);
virtual
void
load
(
const
std
::
string
&
path
,
int
number
=
0
);
std
::
vector
<
objectSun
>
train
;
private
:
void
loadDataset
(
std
::
string
&
path
);
void
loadDataset
(
const
std
::
string
&
path
);
};
}
...
...
modules/datasetstools/include/opencv2/slam_kitti.hpp
→
modules/datasetstools/include/opencv2/
datasetstools/
slam_kitti.hpp
View file @
5e647ff0
...
...
@@ -39,13 +39,13 @@
//
//M*/
#ifndef
SLAM_KITTI_H
#define
SLAM_KITTI_H
#ifndef
OPENCV_DATASETSTOOLS_SLAM_KITTI_HPP
#define
OPENCV_DATASETSTOOLS_SLAM_KITTI_HPP
#include <string>
#include <vector>
#include "opencv2/dataset.hpp"
#include "opencv2/dataset
stools/dataset
.hpp"
#include <opencv2/core.hpp>
...
...
@@ -68,19 +68,19 @@ struct sequence
std
::
vector
<
pose
>
posesArray
;
};
class
CV_EXPORTS
slam_kitti
:
public
d
ataset
class
CV_EXPORTS
SLAM_kitti
:
public
D
ataset
{
public
:
slam
_kitti
()
{}
slam_kitti
(
std
::
string
&
path
);
virtual
~
slam
_kitti
()
{}
SLAM
_kitti
()
{}
SLAM_kitti
(
const
std
::
string
&
path
);
virtual
~
SLAM
_kitti
()
{}
virtual
void
load
(
std
::
string
&
path
,
unsigned
int
number
=
0
);
virtual
void
load
(
const
std
::
string
&
path
,
int
number
=
0
);
std
::
vector
<
sequence
>
train
;
private
:
void
loadDataset
(
std
::
string
&
path
);
void
loadDataset
(
const
std
::
string
&
path
);
};
}
...
...
modules/datasetstools/include/opencv2/slam_tumindoor.hpp
→
modules/datasetstools/include/opencv2/
datasetstools/
slam_tumindoor.hpp
View file @
5e647ff0
...
...
@@ -39,13 +39,13 @@
//
//M*/
#ifndef
SLAM_TUMINDOOR_H
#define
SLAM_TUMINDOOR_H
#ifndef
OPENCV_DATASETSTOOLS_SLAM_TUMINDOOR_HPP
#define
OPENCV_DATASETSTOOLS_SLAM_TUMINDOOR_HPP
#include <string>
#include <vector>
#include "opencv2/dataset.hpp"
#include "opencv2/dataset
stools/dataset
.hpp"
#include <opencv2/core.hpp>
...
...
@@ -68,19 +68,19 @@ struct imageInfo
imageType
type
;
};
class
CV_EXPORTS
slam_tumindoor
:
public
d
ataset
class
CV_EXPORTS
SLAM_tumindoor
:
public
D
ataset
{
public
:
slam
_tumindoor
()
{}
slam_tumindoor
(
std
::
string
&
path
);
virtual
~
slam
_tumindoor
()
{}
SLAM
_tumindoor
()
{}
SLAM_tumindoor
(
const
std
::
string
&
path
);
virtual
~
SLAM
_tumindoor
()
{}
virtual
void
load
(
std
::
string
&
path
,
unsigned
int
number
=
0
);
virtual
void
load
(
const
std
::
string
&
path
,
int
number
=
0
);
std
::
vector
<
imageInfo
>
train
;
private
:
void
loadDataset
(
std
::
string
&
path
);
void
loadDataset
(
const
std
::
string
&
path
);
};
}
...
...
modules/datasetstools/include/tinyxml2/tinyxml2.h
→
modules/datasetstools/include/
opencv2/datasetstools/
tinyxml2/tinyxml2.h
View file @
5e647ff0
File moved
modules/datasetstools/include/opencv2/tr_chars.hpp
→
modules/datasetstools/include/opencv2/
datasetstools/
tr_chars.hpp
View file @
5e647ff0
...
...
@@ -39,13 +39,13 @@
//
//M*/
#ifndef
TR_CHARS_H
#define
TR_CHARS_H
#ifndef
OPENCV_DATASETSTOOLS_TR_CHARS_HPP
#define
OPENCV_DATASETSTOOLS_TR_CHARS_HPP
#include <string>
#include <vector>
#include "opencv2/dataset.hpp"
#include "opencv2/dataset
stools/dataset
.hpp"
#include <opencv2/core.hpp>
...
...
@@ -57,25 +57,25 @@ namespace datasetstools
struct
character
{
std
::
string
imgName
;
unsigned
int
label
;
int
label
;
};
class
CV_EXPORTS
tr_chars
:
public
d
ataset
class
CV_EXPORTS
TR_chars
:
public
D
ataset
{
public
:
tr
_chars
()
{}
tr_chars
(
std
::
string
&
path
,
unsigned
int
number
=
0
);
virtual
~
tr
_chars
()
{}
TR
_chars
()
{}
TR_chars
(
const
std
::
string
&
path
,
int
number
=
0
);
virtual
~
TR
_chars
()
{}
virtual
void
load
(
std
::
string
&
path
,
unsigned
int
number
=
0
);
virtual
void
load
(
const
std
::
string
&
path
,
int
number
=
0
);
std
::
vector
<
character
>
train
;
std
::
vector
<
character
>
test
;
private
:
void
loadDataset
(
std
::
string
&
path
,
unsigned
int
number
=
0
);
void
loadDataset
(
const
std
::
string
&
path
,
int
number
=
0
);
void
parseLine
(
std
::
string
&
line
,
std
::
vector
<
int
>
&
currSet
,
unsigned
int
number
);
void
parseLine
(
const
std
::
string
&
line
,
std
::
vector
<
int
>
&
currSet
,
int
number
);
};
}
...
...
modules/datasetstools/include/opencv2/tr_svt.hpp
→
modules/datasetstools/include/opencv2/
datasetstools/
tr_svt.hpp
View file @
5e647ff0
...
...
@@ -39,13 +39,13 @@
//
//M*/
#ifndef
TR_SVT_H
#define
TR_SVT_H
#ifndef
OPENCV_DATASETSTOOLS_TR_SVT_HPP
#define
OPENCV_DATASETSTOOLS_TR_SVT_HPP
#include <string>
#include <vector>
#include "opencv2/dataset.hpp"
#include "opencv2/dataset
stools/dataset
.hpp"
#include <opencv2/core.hpp>
...
...
@@ -57,7 +57,7 @@ namespace datasetstools
struct
tag
{
std
::
string
value
;
unsigned
int
height
,
width
,
x
,
y
;
int
height
,
width
,
x
,
y
;
};
struct
image
...
...
@@ -67,22 +67,22 @@ struct image
std
::
vector
<
tag
>
tags
;
};
class
CV_EXPORTS
tr_svt
:
public
d
ataset
class
CV_EXPORTS
TR_svt
:
public
D
ataset
{
public
:
tr
_svt
()
{}
tr_svt
(
std
::
string
&
path
);
virtual
~
tr
_svt
()
{}
TR
_svt
()
{}
TR_svt
(
const
std
::
string
&
path
);
virtual
~
TR
_svt
()
{}
virtual
void
load
(
std
::
string
&
path
,
unsigned
int
number
=
0
);
virtual
void
load
(
const
std
::
string
&
path
,
int
number
=
0
);
std
::
vector
<
image
>
train
;
std
::
vector
<
image
>
test
;
private
:
void
loadDataset
(
std
::
string
&
path
);
void
loadDataset
(
const
std
::
string
&
path
);
void
xmlParse
(
std
::
string
&
set
,
std
::
vector
<
image
>
&
out
);
void
xmlParse
(
const
std
::
string
&
set
,
std
::
vector
<
image
>
&
out
);
};
}
...
...
modules/datasetstools/include/opencv2/util.hpp
→
modules/datasetstools/include/opencv2/
datasetstools/
util.hpp
View file @
5e647ff0
...
...
@@ -39,8 +39,8 @@
//
//M*/
#ifndef
UTIL_H
#define
UTIL_H
#ifndef
OPENCV_DATASETSTOOLS_UTIL_HPP
#define
OPENCV_DATASETSTOOLS_UTIL_HPP
#include <string>
#include <vector>
...
...
@@ -52,9 +52,9 @@ namespace cv
namespace
datasetstools
{
void
split
(
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
(
std
::
string
&
dirName
,
std
::
vector
<
std
::
string
>
&
fileNames
);
void
getDirList
(
const
std
::
string
&
dirName
,
std
::
vector
<
std
::
string
>
&
fileNames
);
}
}
...
...
modules/datasetstools/samples/ar_hmdb.cpp
View file @
5e647ff0
...
...
@@ -39,7 +39,7 @@
//
//M*/
#include "opencv2/ar_hmdb.hpp"
#include "opencv2/
datasetstools/
ar_hmdb.hpp"
#include <opencv2/core.hpp>
...
...
@@ -65,8 +65,8 @@ int main(int argc, char *argv[])
return
-
1
;
}
ar
_hmdb
dataset
[
3
];
for
(
unsigned
int
i
=
0
;
i
<
3
;
++
i
)
AR
_hmdb
dataset
[
3
];
for
(
int
i
=
0
;
i
<
3
;
++
i
)
{
dataset
[
i
].
load
(
path
,
i
);
}
...
...
modules/datasetstools/samples/ar_sports.cpp
View file @
5e647ff0
...
...
@@ -39,7 +39,7 @@
//
//M*/
#include "opencv2/ar_sports.hpp"
#include "opencv2/
datasetstools/
ar_sports.hpp"
#include <opencv2/core.hpp>
...
...
@@ -66,7 +66,7 @@ int main(int argc, char *argv[])
return
-
1
;
}
ar
_sports
dataset
(
path
);
AR
_sports
dataset
(
path
);
// ***************
// dataset. train & test contains for each video url in dataset all it's labels.
...
...
@@ -78,8 +78,8 @@ int main(int argc, char *argv[])
element
&
first
=
dataset
.
test
[
0
];
printf
(
"url: %s
\n
"
,
first
.
videoUrl
.
c_str
());
printf
(
"labels: "
);
vector
<
unsigned
int
>
&
labels
=
first
.
labels
;
for
(
vector
<
unsigned
int
>::
iterator
it
=
labels
.
begin
();
it
!=
labels
.
end
();
++
it
)
vector
<
int
>
&
labels
=
first
.
labels
;
for
(
vector
<
int
>::
iterator
it
=
labels
.
begin
();
it
!=
labels
.
end
();
++
it
)
{
printf
(
"%u "
,
*
it
);
}
...
...
modules/datasetstools/samples/fr_lfw.cpp
View file @
5e647ff0
...
...
@@ -39,7 +39,7 @@
//
//M*/
#include "opencv2/fr_lfw.hpp"
#include "opencv2/
datasetstools/
fr_lfw.hpp"
#include <opencv2/core.hpp>
...
...
@@ -65,7 +65,7 @@ int main(int argc, char *argv[])
return
-
1
;
}
fr
_lfw
dataset
(
path
);
FR
_lfw
dataset
(
path
);
// ***************
// dataset contains object with name and its images.
...
...
modules/datasetstools/samples/gr_chalearn.cpp
View file @
5e647ff0
...
...
@@ -39,7 +39,7 @@
//
//M*/
#include "opencv2/gr_chalearn.hpp"
#include "opencv2/
datasetstools/
gr_chalearn.hpp"
#include <opencv2/core.hpp>
...
...
@@ -65,7 +65,7 @@ int main(int argc, char *argv[])
return
-
1
;
}
gr
_chalearn
dataset
(
path
);
GR
_chalearn
dataset
(
path
);
// ***************
// dataset contains information for each sample.
...
...
modules/datasetstools/samples/gr_skig.cpp
View file @
5e647ff0
...
...
@@ -39,7 +39,7 @@
//
//M*/
#include "opencv2/gr_skig.hpp"
#include "opencv2/
datasetstools/
gr_skig.hpp"
#include <opencv2/core.hpp>
...
...
@@ -66,16 +66,16 @@ int main(int argc, char *argv[])
return
-
1
;
}
gr
_skig
dataset
(
path
);
GR
_skig
dataset
(
path
);
// ***************
// dataset contains pair of rgb\dep images
// For example, let output train size and
first
element.
gestureSkig
&
example
=
dataset
.
train
[
0
];
// For example, let output train size and
second
element.
gestureSkig
&
example
=
dataset
.
train
[
1
];
printf
(
"train size: %u
\n
"
,
(
unsigned
int
)
dataset
.
train
.
size
());
printf
(
"
first
train image:
\n
rgb: %s
\n
dep: %s
\n
"
,
example
.
rgb
.
c_str
(),
example
.
dep
.
c_str
());
printf
(
"
second
train image:
\n
rgb: %s
\n
dep: %s
\n
"
,
example
.
rgb
.
c_str
(),
example
.
dep
.
c_str
());
printf
(
"person: %u, backgroud: %u, illumination: %u, pose: %u, actionType: %u
\n
"
,
example
.
person
,
example
.
background
,
example
.
illumination
,
example
.
pose
,
example
.
actionT
ype
);
example
.
person
,
example
.
background
,
example
.
illumination
,
example
.
pose
,
example
.
t
ype
);
return
0
;
}
modules/datasetstools/samples/hpe_parse.cpp
View file @
5e647ff0
...
...
@@ -39,7 +39,7 @@
//
//M*/
#include "opencv2/hpe_parse.hpp"
#include "opencv2/
datasetstools/
hpe_parse.hpp"
#include <opencv2/core.hpp>
...
...
@@ -65,7 +65,7 @@ int main(int argc, char *argv[])
return
-
1
;
}
hpe
_parse
dataset
(
path
);
HPE
_parse
dataset
(
path
);
// ***************
// dataset. train & test contain appropriate images
...
...
modules/datasetstools/samples/ir_affine.cpp
View file @
5e647ff0
...
...
@@ -39,7 +39,7 @@
//
//M*/
#include "opencv2/ir_affine.hpp"
#include "opencv2/
datasetstools/
ir_affine.hpp"
#include <opencv2/core.hpp>
...
...
@@ -67,7 +67,7 @@ int main(int argc, char *argv[])
}
// loading dataset
ir
_affine
dataset
(
path
);
IR
_affine
dataset
(
path
);
// ***************
// dataset contains for each image in dataset it's matrix.
...
...
@@ -82,7 +82,7 @@ int main(int argc, char *argv[])
{
for
(
int
j
=
0
;
j
<
3
;
++
j
)
{
printf
(
"%f "
,
example
.
mat
[
i
][
j
]
);
printf
(
"%f "
,
example
.
mat
(
i
,
j
)
);
}
printf
(
"
\n
"
);
}
...
...
modules/datasetstools/samples/ir_robot.cpp
View file @
5e647ff0
...
...
@@ -39,7 +39,7 @@
//
//M*/
#include "opencv2/ir_robot.hpp"
#include "opencv2/
datasetstools/
ir_robot.hpp"
#include <opencv2/core.hpp>
...
...
@@ -65,7 +65,7 @@ int main(int argc, char *argv[])
return
-
1
;
}
ir
_robot
dataset
(
path
);
IR
_robot
dataset
(
path
);
// ***************
// dataset contains object with name and its images.
...
...
modules/datasetstools/samples/is_bsds.cpp
View file @
5e647ff0
...
...
@@ -39,7 +39,7 @@
//
//M*/
#include "opencv2/is_bsds.hpp"
#include "opencv2/
datasetstools/
is_bsds.hpp"
#include <opencv2/core.hpp>
...
...
@@ -65,7 +65,7 @@ int main(int argc, char *argv[])
return
-
1
;
}
is
_bsds
dataset
(
path
);
IS
_bsds
dataset
(
path
);
// TODO: read human/ folder for evaluation
...
...
modules/datasetstools/samples/is_weizmann.cpp
View file @
5e647ff0
...
...
@@ -39,7 +39,7 @@
//
//M*/
#include "opencv2/is_weizmann.hpp"
#include "opencv2/
datasetstools/
is_weizmann.hpp"
#include <opencv2/core.hpp>
...
...
@@ -65,7 +65,7 @@ int main(int argc, char *argv[])
return
-
1
;
}
is
_weizmann
dataset
(
path
);
IS
_weizmann
dataset
(
path
);
// ***************
// dataset contains all information for each image.
...
...
modules/datasetstools/samples/msm_epfl.cpp
View file @
5e647ff0
...
...
@@ -39,7 +39,7 @@
//
//M*/
#include "opencv2/msm_epfl.hpp"
#include "opencv2/
datasetstools/
msm_epfl.hpp"
#include <opencv2/core.hpp>
...
...
@@ -65,7 +65,7 @@ int main(int argc, char *argv[])
return
-
1
;
}
msm
_epfl
dataset
(
path
);
MSM
_epfl
dataset
(
path
);
// ***************
// dataset contains all information for each image.
...
...
modules/datasetstools/samples/msm_middlebury.cpp
View file @
5e647ff0
...
...
@@ -39,7 +39,7 @@
//
//M*/
#include "opencv2/msm_middlebury.hpp"
#include "opencv2/
datasetstools/
msm_middlebury.hpp"
#include <opencv2/core.hpp>
...
...
@@ -65,7 +65,7 @@ int main(int argc, char *argv[])
return
-
1
;
}
msm
_middlebury
dataset
(
path
);
MSM
_middlebury
dataset
(
path
);
// ***************
// dataset contains camera parameters for each image.
...
...
modules/datasetstools/samples/or_imagenet.cpp
View file @
5e647ff0
...
...
@@ -39,7 +39,7 @@
//
//M*/
#include "opencv2/or_imagenet.hpp"
#include "opencv2/
datasetstools/
or_imagenet.hpp"
#include <opencv2/core.hpp>
...
...
@@ -67,7 +67,7 @@ int main(int argc, char *argv[])
return
-
1
;
}
or
_imagenet
dataset
(
path
);
OR
_imagenet
dataset
(
path
);
// ***************
// dataset contains for each object its id & image url.
...
...
modules/datasetstools/samples/or_sun.cpp
View file @
5e647ff0
...
...
@@ -39,7 +39,7 @@
//
//M*/
#include "opencv2/or_sun.hpp"
#include "opencv2/
datasetstools/
or_sun.hpp"
#include <opencv2/core.hpp>
...
...
@@ -65,7 +65,7 @@ int main(int argc, char *argv[])
return
-
1
;
}
or
_sun
dataset
(
path
);
OR
_sun
dataset
(
path
);
// ***************
// dataset contains for each object its images.
...
...
modules/datasetstools/samples/slam_kitti.cpp
View file @
5e647ff0
...
...
@@ -39,7 +39,7 @@
//
//M*/
#include "opencv2/slam_kitti.hpp"
#include "opencv2/
datasetstools/
slam_kitti.hpp"
#include <opencv2/core.hpp>
...
...
@@ -65,7 +65,7 @@ int main(int argc, char *argv[])
return
-
1
;
}
slam
_kitti
dataset
(
path
);
SLAM
_kitti
dataset
(
path
);
// ***************
// dataset contains sequence with name and its data.
...
...
modules/datasetstools/samples/slam_tumindoor.cpp
View file @
5e647ff0
...
...
@@ -39,7 +39,7 @@
//
//M*/
#include "opencv2/slam_tumindoor.hpp"
#include "opencv2/
datasetstools/
slam_tumindoor.hpp"
#include <opencv2/core.hpp>
...
...
@@ -65,7 +65,7 @@ int main(int argc, char *argv[])
return
-
1
;
}
slam
_tumindoor
dataset
(
path
);
SLAM
_tumindoor
dataset
(
path
);
// ***************
// dataset contains image and its information.
...
...
modules/datasetstools/samples/tr_chars.cpp
View file @
5e647ff0
...
...
@@ -39,7 +39,7 @@
//
//M*/
#include "opencv2/tr_chars.hpp"
#include "opencv2/
datasetstools/
tr_chars.hpp"
#include <opencv2/core.hpp>
...
...
@@ -66,13 +66,13 @@ int main(int argc, char *argv[])
return
-
1
;
}
vector
<
tr
_chars
>
dataset
;
vector
<
TR
_chars
>
dataset
;
do
{
tr
_chars
curr
;
TR
_chars
curr
;
dataset
.
push_back
(
curr
);
unsigned
int
number
=
(
unsigned
int
)
dataset
.
size
()
-
1
;
int
number
=
(
int
)
dataset
.
size
()
-
1
;
dataset
.
back
().
load
(
path
,
number
);
}
while
(
dataset
.
back
().
train
.
size
()
>
0
);
dataset
.
pop_back
();
// remove last empty split
...
...
modules/datasetstools/samples/tr_svt.cpp
View file @
5e647ff0
...
...
@@ -39,7 +39,7 @@
//
//M*/
#include "opencv2/tr_svt.hpp"
#include "opencv2/
datasetstools/
tr_svt.hpp"
#include <opencv2/core.hpp>
...
...
@@ -67,7 +67,7 @@ int main(int argc, char *argv[])
}
// loading train & test images description
tr
_svt
dataset
(
path
);
TR
_svt
dataset
(
path
);
// ***************
// dataset. train & test contains images description.
...
...
modules/datasetstools/src/ar_hmdb.cpp
View file @
5e647ff0
...
...
@@ -39,12 +39,8 @@
//
//M*/
#include "opencv2/util.hpp"
#include "opencv2/ar_hmdb.hpp"
#include <cstdio>
#include <fstream>
#include "opencv2/datasetstools/ar_hmdb.hpp"
#include "precomp.hpp"
namespace
cv
{
...
...
@@ -53,7 +49,7 @@ namespace datasetstools
using
namespace
std
;
void
ar_hmdb
::
loadAction
(
string
&
fileName
,
vector
<
string
>
&
train_
,
vector
<
string
>
&
test_
)
void
AR_hmdb
::
loadAction
(
const
string
&
fileName
,
vector
<
string
>
&
train_
,
vector
<
string
>
&
test_
)
{
ifstream
infile
(
fileName
.
c_str
());
string
video
,
label
;
...
...
@@ -70,20 +66,20 @@ void ar_hmdb::loadAction(string &fileName, vector<string> &train_, vector<string
}
}
ar_hmdb
::
ar_hmdb
(
string
&
path
,
unsigned
int
number
)
AR_hmdb
::
AR_hmdb
(
const
string
&
path
,
int
number
)
{
loadDataset
(
path
,
number
);
}
void
ar_hmdb
::
load
(
string
&
path
,
unsigned
int
number
)
void
AR_hmdb
::
load
(
const
string
&
path
,
int
number
)
{
loadDataset
(
path
,
number
);
}
void
ar_hmdb
::
loadDataset
(
string
&
path
,
unsigned
int
number
)
void
AR_hmdb
::
loadDataset
(
const
string
&
path
,
int
number
)
{
// valid number [0,1,2]
if
(
number
>
2
)
if
(
number
<
0
||
number
>
2
)
{
return
;
}
...
...
modules/datasetstools/src/ar_sports.cpp
View file @
5e647ff0
...
...
@@ -39,13 +39,8 @@
//
//M*/
#include "opencv2/util.hpp"
#include "opencv2/ar_sports.hpp"
#include <cstdio>
#include <cstdlib> // atoi
#include <fstream>
#include "opencv2/datasetstools/ar_sports.hpp"
#include "precomp.hpp"
namespace
cv
{
...
...
@@ -54,7 +49,7 @@ namespace datasetstools
using
namespace
std
;
void
ar_sports
::
loadDatasetPart
(
string
&
fileName
,
vector
<
element
>
&
dataset_
)
void
AR_sports
::
loadDatasetPart
(
const
string
&
fileName
,
vector
<
element
>
&
dataset_
)
{
ifstream
infile
(
fileName
.
c_str
());
string
videoUrl
,
labels
;
...
...
@@ -74,12 +69,12 @@ void ar_sports::loadDatasetPart(string &fileName, vector<element> &dataset_)
}
}
ar_sports
::
ar_sports
(
string
&
path
)
AR_sports
::
AR_sports
(
const
string
&
path
)
{
loadDataset
(
path
);
}
void
ar_sports
::
load
(
string
&
path
,
unsigned
int
number
)
void
AR_sports
::
load
(
const
string
&
path
,
int
number
)
{
if
(
number
!=
0
)
{
...
...
@@ -89,7 +84,7 @@ void ar_sports::load(string &path, unsigned int number)
loadDataset
(
path
);
}
void
ar_sports
::
loadDataset
(
string
&
path
)
void
AR_sports
::
loadDataset
(
const
string
&
path
)
{
string
trainPath
(
path
+
"original/train_partition.txt"
);
string
testPath
(
path
+
"original/test_partition.txt"
);
...
...
modules/datasetstools/src/fr_lfw.cpp
View file @
5e647ff0
...
...
@@ -39,12 +39,8 @@
//
//M*/
#include "opencv2/util.hpp"
#include "opencv2/fr_lfw.hpp"
#include <cstdio>
#include <fstream>
#include "opencv2/datasetstools/fr_lfw.hpp"
#include "precomp.hpp"
namespace
cv
{
...
...
@@ -53,12 +49,12 @@ namespace datasetstools
using
namespace
std
;
fr_lfw
::
fr_lfw
(
std
::
string
&
path
)
FR_lfw
::
FR_lfw
(
const
string
&
path
)
{
loadDataset
(
path
);
}
void
fr_lfw
::
load
(
string
&
path
,
unsigned
int
number
)
void
FR_lfw
::
load
(
const
string
&
path
,
int
number
)
{
if
(
number
!=
0
)
{
...
...
@@ -68,7 +64,7 @@ void fr_lfw::load(string &path, unsigned int number)
loadDataset
(
path
);
}
void
fr_lfw
::
loadDataset
(
string
&
path
)
void
FR_lfw
::
loadDataset
(
const
string
&
path
)
{
vector
<
string
>
fileNames
;
getDirList
(
path
,
fileNames
);
...
...
modules/datasetstools/src/gr_chalearn.cpp
View file @
5e647ff0
...
...
@@ -39,13 +39,8 @@
//
//M*/
#include "opencv2/util.hpp"
#include "opencv2/gr_chalearn.hpp"
#include <cstdio>
#include <cstdlib> // atoi
#include <fstream>
#include "opencv2/datasetstools/gr_chalearn.hpp"
#include "precomp.hpp"
namespace
cv
{
...
...
@@ -54,12 +49,12 @@ namespace datasetstools
using
namespace
std
;
gr_chalearn
::
gr_chalearn
(
std
::
string
&
path
)
GR_chalearn
::
GR_chalearn
(
const
string
&
path
)
{
loadDataset
(
path
);
}
void
gr_chalearn
::
load
(
string
&
path
,
unsigned
int
number
)
void
GR_chalearn
::
load
(
const
string
&
path
,
int
number
)
{
if
(
number
!=
0
)
{
...
...
@@ -69,7 +64,7 @@ void gr_chalearn::load(string &path, unsigned int number)
loadDataset
(
path
);
}
void
gr_chalearn
::
loadDataset
(
string
&
path
)
void
GR_chalearn
::
loadDataset
(
const
string
&
path
)
{
vector
<
string
>
fileNames
;
getDirList
(
path
,
fileNames
);
...
...
modules/datasetstools/src/gr_skig.cpp
View file @
5e647ff0
...
...
@@ -39,15 +39,11 @@
//
//M*/
#include "opencv2/
util
.hpp"
#include "
opencv2/gr_skig
.hpp"
#include "opencv2/
datasetstools/gr_skig
.hpp"
#include "
precomp
.hpp"
#include <cstdio>
#include <cstdlib> // atoi
#include <cstring>
#include <fstream>
namespace
cv
{
namespace
datasetstools
...
...
@@ -55,12 +51,12 @@ namespace datasetstools
using
namespace
std
;
gr_skig
::
gr_skig
(
std
::
string
&
path
)
GR_skig
::
GR_skig
(
const
string
&
path
)
{
loadDataset
(
path
);
}
void
gr_skig
::
load
(
string
&
path
,
unsigned
int
number
)
void
GR_skig
::
load
(
const
string
&
path
,
int
number
)
{
if
(
number
!=
0
)
{
...
...
@@ -70,7 +66,7 @@ void gr_skig::load(string &path, unsigned int number)
loadDataset
(
path
);
}
void
gr_skig
::
loadDataset
(
string
&
path
)
void
GR_skig
::
loadDataset
(
const
string
&
path
)
{
for
(
unsigned
int
i
=
1
;
i
<=
6
;
++
i
)
{
...
...
@@ -94,13 +90,13 @@ void gr_skig::loadDataset(string &path)
size_t
pos
=
file
.
find
(
"person_"
);
// TODO: check ::npos
curr
.
person
=
(
unsigned
char
)
atoi
(
file
.
substr
(
pos
+
strlen
(
"person_"
),
1
).
c_str
()
);
pos
=
file
.
find
(
"backgroud_"
);
curr
.
background
=
(
unsigned
char
)
atoi
(
file
.
substr
(
pos
+
strlen
(
"backgroud_"
),
1
).
c_str
()
);
curr
.
background
=
(
backgroundType
)
atoi
(
file
.
substr
(
pos
+
strlen
(
"backgroud_"
),
1
).
c_str
()
);
pos
=
file
.
find
(
"illumination_"
);
curr
.
illumination
=
(
unsigned
char
)
atoi
(
file
.
substr
(
pos
+
strlen
(
"illumination_"
),
1
).
c_str
()
);
curr
.
illumination
=
(
illuminationType
)
atoi
(
file
.
substr
(
pos
+
strlen
(
"illumination_"
),
1
).
c_str
()
);
pos
=
file
.
find
(
"pose_"
);
curr
.
pose
=
(
unsigned
char
)
atoi
(
file
.
substr
(
pos
+
strlen
(
"pose_"
),
1
).
c_str
()
);
curr
.
pose
=
(
poseType
)
atoi
(
file
.
substr
(
pos
+
strlen
(
"pose_"
),
1
).
c_str
()
);
pos
=
file
.
find
(
"actionType_"
);
curr
.
actionType
=
(
unsigned
char
)
atoi
(
file
.
substr
(
pos
+
strlen
(
"actionType_"
),
1
).
c_str
()
);
curr
.
type
=
(
actionType
)
atoi
(
file
.
substr
(
pos
+
strlen
(
"actionType_"
),
2
).
c_str
()
);
train
.
push_back
(
curr
);
}
...
...
modules/datasetstools/src/hpe_parse.cpp
View file @
5e647ff0
...
...
@@ -39,12 +39,8 @@
//
//M*/
#include "opencv2/util.hpp"
#include "opencv2/hpe_parse.hpp"
#include <cstdio>
#include <fstream>
#include "opencv2/datasetstools/hpe_parse.hpp"
#include "precomp.hpp"
namespace
cv
{
...
...
@@ -53,12 +49,12 @@ namespace datasetstools
using
namespace
std
;
hpe_parse
::
hpe_parse
(
std
::
string
&
path
)
HPE_parse
::
HPE_parse
(
const
string
&
path
)
{
loadDataset
(
path
);
}
void
hpe_parse
::
load
(
string
&
path
,
unsigned
int
number
)
void
HPE_parse
::
load
(
const
string
&
path
,
int
number
)
{
if
(
number
!=
0
)
{
...
...
@@ -68,7 +64,7 @@ void hpe_parse::load(string &path, unsigned int number)
loadDataset
(
path
);
}
void
hpe_parse
::
loadDataset
(
string
&
path
)
void
HPE_parse
::
loadDataset
(
const
string
&
path
)
{
unsigned
int
i
=
0
;
vector
<
string
>
fileNames
;
...
...
modules/datasetstools/src/ir_affine.cpp
View file @
5e647ff0
...
...
@@ -39,12 +39,8 @@
//
//M*/
#include "opencv2/ir_affine.hpp"
#include <cstdio>
#include <cstdlib> // atoi
#include <fstream>
#include "opencv2/datasetstools/ir_affine.hpp"
#include "precomp.hpp"
namespace
cv
{
...
...
@@ -53,12 +49,12 @@ namespace datasetstools
using
namespace
std
;
ir_affine
::
ir_affine
(
std
::
string
&
path
)
IR_affine
::
IR_affine
(
const
string
&
path
)
{
loadDataset
(
path
);
}
void
ir_affine
::
load
(
string
&
path
,
unsigned
int
number
)
void
IR_affine
::
load
(
const
string
&
path
,
int
number
)
{
if
(
number
!=
0
)
{
...
...
@@ -68,7 +64,7 @@ void ir_affine::load(string &path, unsigned int number)
loadDataset
(
path
);
}
void
ir_affine
::
loadDataset
(
string
&
path
)
void
IR_affine
::
loadDataset
(
const
string
&
path
)
{
for
(
unsigned
int
i
=
1
;
i
<=
6
;
++
i
)
{
...
...
@@ -86,7 +82,7 @@ void ir_affine::loadDataset(string &path)
{
for
(
int
j
=
0
;
j
<
3
;
++
j
)
{
infile
>>
curr
.
mat
[
k
][
j
]
;
infile
>>
curr
.
mat
(
k
,
j
)
;
}
}
}
...
...
modules/datasetstools/src/ir_robot.cpp
View file @
5e647ff0
...
...
@@ -39,12 +39,8 @@
//
//M*/
#include "opencv2/util.hpp"
#include "opencv2/ir_robot.hpp"
#include <cstdio>
#include <fstream>
#include "opencv2/datasetstools/ir_robot.hpp"
#include "precomp.hpp"
namespace
cv
{
...
...
@@ -53,12 +49,12 @@ namespace datasetstools
using
namespace
std
;
ir_robot
::
ir_robot
(
std
::
string
&
path
)
IR_robot
::
IR_robot
(
const
string
&
path
)
{
loadDataset
(
path
);
}
void
ir_robot
::
load
(
string
&
path
,
unsigned
int
number
)
void
IR_robot
::
load
(
const
string
&
path
,
int
number
)
{
if
(
number
!=
0
)
{
...
...
@@ -68,7 +64,7 @@ void ir_robot::load(string &path, unsigned int number)
loadDataset
(
path
);
}
void
ir_robot
::
loadDataset
(
string
&
path
)
void
IR_robot
::
loadDataset
(
const
string
&
path
)
{
vector
<
string
>
fileNames
;
getDirList
(
path
,
fileNames
);
...
...
modules/datasetstools/src/is_bsds.cpp
View file @
5e647ff0
...
...
@@ -39,11 +39,8 @@
//
//M*/
#include "opencv2/is_bsds.hpp"
#include <cstdio>
#include <fstream>
#include "opencv2/datasetstools/is_bsds.hpp"
#include "precomp.hpp"
namespace
cv
{
...
...
@@ -52,7 +49,7 @@ namespace datasetstools
using
namespace
std
;
void
is_bsds
::
loadDatasetPart
(
string
&
fileName
,
vector
<
string
>
&
dataset_
)
void
IS_bsds
::
loadDatasetPart
(
const
string
&
fileName
,
vector
<
string
>
&
dataset_
)
{
ifstream
infile
(
fileName
.
c_str
());
string
imageName
;
...
...
@@ -62,12 +59,12 @@ void is_bsds::loadDatasetPart(string &fileName, vector<string> &dataset_)
}
}
is_bsds
::
is_bsds
(
std
::
string
&
path
)
IS_bsds
::
IS_bsds
(
const
string
&
path
)
{
loadDataset
(
path
);
}
void
is_bsds
::
load
(
string
&
path
,
unsigned
int
number
)
void
IS_bsds
::
load
(
const
string
&
path
,
int
number
)
{
if
(
number
!=
0
)
{
...
...
@@ -77,7 +74,7 @@ void is_bsds::load(string &path, unsigned int number)
loadDataset
(
path
);
}
void
is_bsds
::
loadDataset
(
string
&
path
)
void
IS_bsds
::
loadDataset
(
const
string
&
path
)
{
string
trainName
(
path
+
"iids_train.txt"
);
string
testName
(
path
+
"iids_test.txt"
);
...
...
modules/datasetstools/src/is_weizmann.cpp
View file @
5e647ff0
...
...
@@ -39,12 +39,8 @@
//
//M*/
#include "opencv2/util.hpp"
#include "opencv2/is_weizmann.hpp"
#include <cstdio>
#include <fstream>
#include "opencv2/datasetstools/is_weizmann.hpp"
#include "precomp.hpp"
namespace
cv
{
...
...
@@ -53,12 +49,12 @@ namespace datasetstools
using
namespace
std
;
is_weizmann
::
is_weizmann
(
std
::
string
&
path
)
IS_weizmann
::
IS_weizmann
(
const
string
&
path
)
{
loadDataset
(
path
);
}
void
is_weizmann
::
load
(
string
&
path
,
unsigned
int
number
)
void
IS_weizmann
::
load
(
const
string
&
path
,
int
number
)
{
if
(
number
!=
0
)
{
...
...
@@ -68,7 +64,7 @@ void is_weizmann::load(string &path, unsigned int number)
loadDataset
(
path
);
}
void
is_weizmann
::
loadDataset
(
string
&
path
)
void
IS_weizmann
::
loadDataset
(
const
string
&
path
)
{
vector
<
string
>
fileNames
;
getDirList
(
path
,
fileNames
);
...
...
modules/datasetstools/src/msm_epfl.cpp
View file @
5e647ff0
...
...
@@ -39,12 +39,8 @@
//
//M*/
#include "opencv2/util.hpp"
#include "opencv2/msm_epfl.hpp"
#include <cstdio>
#include <fstream>
#include "opencv2/datasetstools/msm_epfl.hpp"
#include "precomp.hpp"
namespace
cv
{
...
...
@@ -53,7 +49,7 @@ namespace datasetstools
using
namespace
std
;
void
msm_epfl
::
readFileDouble
(
string
fileName
,
vector
<
double
>
&
out
)
void
MSM_epfl
::
readFileDouble
(
const
string
&
fileName
,
vector
<
double
>
&
out
)
{
ifstream
infile
(
fileName
.
c_str
());
double
val
;
...
...
@@ -63,12 +59,12 @@ void msm_epfl::readFileDouble(string fileName, vector<double> &out)
}
}
msm_epfl
::
msm_epfl
(
std
::
string
&
path
)
MSM_epfl
::
MSM_epfl
(
const
string
&
path
)
{
loadDataset
(
path
);
}
void
msm_epfl
::
load
(
string
&
path
,
unsigned
int
number
)
void
MSM_epfl
::
load
(
const
string
&
path
,
int
number
)
{
if
(
number
!=
0
)
{
...
...
@@ -78,7 +74,7 @@ void msm_epfl::load(string &path, unsigned int number)
loadDataset
(
path
);
}
void
msm_epfl
::
loadDataset
(
string
&
path
)
void
MSM_epfl
::
loadDataset
(
const
string
&
path
)
{
string
pathBounding
(
path
+
"bounding/"
);
string
pathCamera
(
path
+
"camera/"
);
...
...
@@ -92,9 +88,9 @@ void msm_epfl::loadDataset(string &path)
objectEpfl
curr
;
curr
.
imageName
=
*
it
;
readFileDouble
(
pathBounding
+
curr
.
imageName
+
".bounding"
,
curr
.
bounding
);
readFileDouble
(
pathCamera
+
curr
.
imageName
+
".camera"
,
curr
.
camera
);
readFileDouble
(
pathP
+
curr
.
imageName
+
".P"
,
curr
.
p
);
readFileDouble
(
string
(
pathBounding
+
curr
.
imageName
+
".bounding"
)
,
curr
.
bounding
);
readFileDouble
(
string
(
pathCamera
+
curr
.
imageName
+
".camera"
)
,
curr
.
camera
);
readFileDouble
(
string
(
pathP
+
curr
.
imageName
+
".P"
)
,
curr
.
p
);
train
.
push_back
(
curr
);
}
...
...
modules/datasetstools/src/msm_middlebury.cpp
View file @
5e647ff0
...
...
@@ -39,11 +39,8 @@
//
//M*/
#include "opencv2/msm_middlebury.hpp"
#include <cstdio>
#include <fstream>
#include "opencv2/datasetstools/msm_middlebury.hpp"
#include "precomp.hpp"
namespace
cv
{
...
...
@@ -52,12 +49,12 @@ namespace datasetstools
using
namespace
std
;
msm_middlebury
::
msm_middlebury
(
std
::
string
&
path
)
MSM_middlebury
::
MSM_middlebury
(
const
string
&
path
)
{
loadDataset
(
path
);
}
void
msm_middlebury
::
load
(
string
&
path
,
unsigned
int
number
)
void
MSM_middlebury
::
load
(
const
string
&
path
,
int
number
)
{
if
(
number
!=
0
)
{
...
...
@@ -67,7 +64,7 @@ void msm_middlebury::load(string &path, unsigned int number)
loadDataset
(
path
);
}
void
msm_middlebury
::
loadDataset
(
string
&
path
)
void
MSM_middlebury
::
loadDataset
(
const
string
&
path
)
{
string
name
(
path
.
substr
(
0
,
path
.
length
()
-
1
));
size_t
start
=
name
.
rfind
(
'/'
);
...
...
modules/datasetstools/src/or_imagenet.cpp
View file @
5e647ff0
...
...
@@ -39,13 +39,8 @@
//
//M*/
#include "opencv2/util.hpp"
#include "opencv2/or_imagenet.hpp"
#include <cstdio>
#include <cstdlib> // atoi
#include <fstream>
#include "opencv2/datasetstools/or_imagenet.hpp"
#include "precomp.hpp"
namespace
cv
{
...
...
@@ -54,12 +49,12 @@ namespace datasetstools
using
namespace
std
;
or_imagenet
::
or_imagenet
(
std
::
string
&
path
)
OR_imagenet
::
OR_imagenet
(
const
string
&
path
)
{
loadDataset
(
path
);
}
void
or_imagenet
::
load
(
string
&
path
,
unsigned
int
number
)
void
OR_imagenet
::
load
(
const
string
&
path
,
int
number
)
{
if
(
number
!=
0
)
{
...
...
@@ -69,7 +64,7 @@ void or_imagenet::load(string &path, unsigned int number)
loadDataset
(
path
);
}
void
or_imagenet
::
loadDataset
(
string
&
path
)
void
OR_imagenet
::
loadDataset
(
const
string
&
path
)
{
ifstream
infile
((
path
+
"fall11_urls.txt"
).
c_str
());
string
line
;
...
...
modules/datasetstools/src/or_sun.cpp
View file @
5e647ff0
...
...
@@ -39,12 +39,8 @@
//
//M*/
#include "opencv2/util.hpp"
#include "opencv2/or_sun.hpp"
#include <cstdio>
#include <fstream>
#include "opencv2/datasetstools/or_sun.hpp"
#include "precomp.hpp"
namespace
cv
{
...
...
@@ -53,12 +49,12 @@ namespace datasetstools
using
namespace
std
;
or_sun
::
or_sun
(
std
::
string
&
path
)
OR_sun
::
OR_sun
(
const
string
&
path
)
{
loadDataset
(
path
);
}
void
or_sun
::
load
(
string
&
path
,
unsigned
int
number
)
void
OR_sun
::
load
(
const
string
&
path
,
int
number
)
{
if
(
number
!=
0
)
{
...
...
@@ -68,7 +64,7 @@ void or_sun::load(string &path, unsigned int number)
loadDataset
(
path
);
}
void
or_sun
::
loadDataset
(
string
&
path
)
void
OR_sun
::
loadDataset
(
const
string
&
path
)
{
string
classNameFile
(
path
+
"ClassName.txt"
);
ifstream
infile
(
classNameFile
.
c_str
());
...
...
modules/datasetstools/src/precomp.hpp
0 → 100644
View file @
5e647ff0
/*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, install,
// copy or use the software.
//
//
// License Agreement
// For Open Source Computer Vision Library
//
// Copyright (C) 2014, Itseez Inc, all rights reserved.
// Third party copyrights are property of their respective owners.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// * Redistribution's of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// * Redistribution's in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// * The name of the copyright holders may not be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// This software is provided by the copyright holders and contributors "as is" and
// any express or implied warranties, including, but not limited to, the implied
// warranties of merchantability and fitness for a particular purpose are disclaimed.
// In no event shall the Itseez Inc or contributors be liable for any direct,
// indirect, incidental, special, exemplary, or consequential damages
// (including, but not limited to, procurement of substitute goods or services;
// loss of use, data, or profits; or business interruption) however caused
// and on any theory of liability, whether in contract, strict liability,
// or tort (including negligence or otherwise) arising in any way out of
// the use of this software, even if advised of the possibility of such damage.
//
//M*/
#ifndef __OPENCV_PRECOMP_H__
#define __OPENCV_PRECOMP_H__
#include <cstdio>
#include <cstdlib> // atoi, atof
#include <fstream>
#include "opencv2/datasetstools/util.hpp"
#endif
modules/datasetstools/src/slam_kitti.cpp
View file @
5e647ff0
...
...
@@ -39,13 +39,8 @@
//
//M*/
#include "opencv2/util.hpp"
#include "opencv2/slam_kitti.hpp"
#include <cstdio>
#include <cstdlib> // atof
#include <fstream>
#include "opencv2/datasetstools/slam_kitti.hpp"
#include "precomp.hpp"
namespace
cv
{
...
...
@@ -54,12 +49,12 @@ namespace datasetstools
using
namespace
std
;
slam_kitti
::
slam_kitti
(
std
::
string
&
path
)
SLAM_kitti
::
SLAM_kitti
(
const
string
&
path
)
{
loadDataset
(
path
);
}
void
slam_kitti
::
load
(
string
&
path
,
unsigned
int
number
)
void
SLAM_kitti
::
load
(
const
string
&
path
,
int
number
)
{
if
(
number
!=
0
)
{
...
...
@@ -69,7 +64,7 @@ void slam_kitti::load(string &path, unsigned int number)
loadDataset
(
path
);
}
void
slam_kitti
::
loadDataset
(
string
&
path
)
void
SLAM_kitti
::
loadDataset
(
const
string
&
path
)
{
string
pathSequence
(
path
+
"sequences/"
);
vector
<
string
>
fileNames
;
...
...
modules/datasetstools/src/slam_tumindoor.cpp
View file @
5e647ff0
...
...
@@ -39,15 +39,11 @@
//
//M*/
#include "opencv2/
util
.hpp"
#include "
opencv2/slam_tumindoor
.hpp"
#include "opencv2/
datasetstools/slam_tumindoor
.hpp"
#include "
precomp
.hpp"
#include <cstdio>
#include <cstdlib> // atof
#include <cstring>
#include <fstream>
namespace
cv
{
namespace
datasetstools
...
...
@@ -55,12 +51,12 @@ namespace datasetstools
using
namespace
std
;
slam_tumindoor
::
slam_tumindoor
(
std
::
string
&
path
)
SLAM_tumindoor
::
SLAM_tumindoor
(
const
string
&
path
)
{
loadDataset
(
path
);
}
void
slam_tumindoor
::
load
(
string
&
path
,
unsigned
int
number
)
void
SLAM_tumindoor
::
load
(
const
string
&
path
,
int
number
)
{
if
(
number
!=
0
)
{
...
...
@@ -70,7 +66,7 @@ void slam_tumindoor::load(string &path, unsigned int number)
loadDataset
(
path
);
}
void
slam_tumindoor
::
loadDataset
(
string
&
path
)
void
SLAM_tumindoor
::
loadDataset
(
const
string
&
path
)
{
string
infoPath
(
path
+
"info/2011-12-17_15.02.56-info.csv"
);
// TODO
ifstream
infile
(
infoPath
.
c_str
());
...
...
modules/datasetstools/src/tinyxml2/tinyxml2.cpp
View file @
5e647ff0
...
...
@@ -21,7 +21,7 @@ must not be misrepresented as being the original software.
distribution.
*/
#include
<tinyxml2/tinyxml2.h>
#include
"opencv2/datasetstools/tinyxml2/tinyxml2.h"
#include <new> // yes, this one new style header, is in the Android SDK.
# ifdef ANDROID_NDK
...
...
modules/datasetstools/src/tr_chars.cpp
View file @
5e647ff0
...
...
@@ -39,13 +39,8 @@
//
//M*/
#include "opencv2/util.hpp"
#include "opencv2/tr_chars.hpp"
#include <cstdio>
#include <cstdlib> // atoi
#include <fstream>
#include "opencv2/datasetstools/tr_chars.hpp"
#include "precomp.hpp"
namespace
cv
{
...
...
@@ -54,33 +49,33 @@ namespace datasetstools
using
namespace
std
;
void
tr_chars
::
parseLine
(
string
&
line
,
vector
<
int
>
&
currSet
,
unsigned
int
number
)
void
TR_chars
::
parseLine
(
const
string
&
line
,
vector
<
int
>
&
currSet
,
int
number
)
{
vector
<
string
>
elems
;
split
(
line
,
elems
,
' '
);
if
(
number
>=
elems
.
size
())
if
(
number
>=
(
int
)
elems
.
size
())
{
return
;
}
unsigned
int
ind
=
atoi
(
elems
[
number
].
c_str
());
if
(
ind
>
0
)
if
(
ind
>
0
)
{
currSet
.
push_back
(
ind
-
1
);
// take first split
currSet
.
push_back
(
ind
-
1
);
}
}
tr_chars
::
tr_chars
(
std
::
string
&
path
,
unsigned
int
number
)
TR_chars
::
TR_chars
(
const
string
&
path
,
int
number
)
{
loadDataset
(
path
,
number
);
}
void
tr_chars
::
load
(
string
&
path
,
unsigned
int
number
)
void
TR_chars
::
load
(
const
string
&
path
,
int
number
)
{
loadDataset
(
path
,
number
);
}
void
tr_chars
::
loadDataset
(
string
&
path
,
unsigned
int
number
)
void
TR_chars
::
loadDataset
(
const
string
&
path
,
int
number
)
{
vector
<
int
>
allLabels
,
trainSet
,
testSet
;
vector
<
string
>
allNames
;
...
...
modules/datasetstools/src/tr_svt.cpp
View file @
5e647ff0
...
...
@@ -39,15 +39,10 @@
//
//M*/
#include "opencv2/
util
.hpp"
#include "
opencv2/tr_svt
.hpp"
#include "opencv2/
datasetstools/tr_svt
.hpp"
#include "
precomp
.hpp"
#include <tinyxml2/tinyxml2.h>
#include <cstdio>
#include <cstdlib> // atoi
#include <fstream>
#include <opencv2/datasetstools/tinyxml2/tinyxml2.h>
namespace
cv
{
...
...
@@ -57,7 +52,7 @@ namespace datasetstools
using
namespace
std
;
using
namespace
tinyxml2
;
void
tr_svt
::
xmlParse
(
string
&
set
,
vector
<
image
>
&
out
)
void
TR_svt
::
xmlParse
(
const
string
&
set
,
vector
<
image
>
&
out
)
{
XMLDocument
doc
;
doc
.
LoadFile
(
set
.
c_str
());
...
...
@@ -102,12 +97,12 @@ void tr_svt::xmlParse(string &set, vector<image> &out)
}
}
tr_svt
::
tr_svt
(
std
::
string
&
path
)
TR_svt
::
TR_svt
(
const
string
&
path
)
{
loadDataset
(
path
);
}
void
tr_svt
::
load
(
string
&
path
,
unsigned
int
number
)
void
TR_svt
::
load
(
const
string
&
path
,
int
number
)
{
if
(
number
!=
0
)
{
...
...
@@ -117,7 +112,7 @@ void tr_svt::load(string &path, unsigned int number)
loadDataset
(
path
);
}
void
tr_svt
::
loadDataset
(
string
&
path
)
void
TR_svt
::
loadDataset
(
const
string
&
path
)
{
string
trainXml
(
path
+
"train.xml"
);
string
testXml
(
path
+
"test.xml"
);
...
...
modules/datasetstools/src/util.cpp
View file @
5e647ff0
...
...
@@ -39,7 +39,7 @@
//
//M*/
#include "opencv2/util.hpp"
#include "opencv2/
datasetstools/
util.hpp"
#include <cstdlib>
...
...
@@ -60,7 +60,7 @@ namespace datasetstools
using
namespace
std
;
void
split
(
string
s
,
vector
<
string
>
&
elems
,
char
delim
)
void
split
(
const
string
s
,
vector
<
string
>
&
elems
,
char
delim
)
{
stringstream
ss
(
s
);
string
item
;
...
...
@@ -70,7 +70,7 @@ void split(string s, vector<string> &elems, char delim)
}
}
void
getDirList
(
string
&
dirName
,
vector
<
string
>
&
fileNames
)
void
getDirList
(
const
string
&
dirName
,
vector
<
string
>
&
fileNames
)
{
#ifdef __GNUC__
struct
dirent
**
namelist
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment