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
2916f89d
Commit
2916f89d
authored
Sep 02, 2014
by
dmitriy.anisimov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
enhanced base class: created hierarchy for objects in train\test and moved train\test to base class
parent
5e647ff0
Hide whitespace changes
Inline
Side-by-side
Showing
55 changed files
with
246 additions
and
245 deletions
+246
-245
ar_hmdb.hpp
...s/datasetstools/include/opencv2/datasetstools/ar_hmdb.hpp
+1
-4
ar_sports.hpp
...datasetstools/include/opencv2/datasetstools/ar_sports.hpp
+2
-5
dataset.hpp
...s/datasetstools/include/opencv2/datasetstools/dataset.hpp
+17
-1
fr_lfw.hpp
...es/datasetstools/include/opencv2/datasetstools/fr_lfw.hpp
+2
-2
gr_chalearn.hpp
...tasetstools/include/opencv2/datasetstools/gr_chalearn.hpp
+1
-3
gr_skig.hpp
...s/datasetstools/include/opencv2/datasetstools/gr_skig.hpp
+1
-3
hpe_parse.hpp
...datasetstools/include/opencv2/datasetstools/hpe_parse.hpp
+5
-3
ir_affine.hpp
...datasetstools/include/opencv2/datasetstools/ir_affine.hpp
+1
-3
ir_robot.hpp
.../datasetstools/include/opencv2/datasetstools/ir_robot.hpp
+1
-3
is_bsds.hpp
...s/datasetstools/include/opencv2/datasetstools/is_bsds.hpp
+6
-4
is_weizmann.hpp
...tasetstools/include/opencv2/datasetstools/is_weizmann.hpp
+1
-3
msm_epfl.hpp
.../datasetstools/include/opencv2/datasetstools/msm_epfl.hpp
+1
-3
msm_middlebury.hpp
...etstools/include/opencv2/datasetstools/msm_middlebury.hpp
+1
-3
or_imagenet.hpp
...tasetstools/include/opencv2/datasetstools/or_imagenet.hpp
+1
-2
or_sun.hpp
...es/datasetstools/include/opencv2/datasetstools/or_sun.hpp
+1
-3
slam_kitti.hpp
...atasetstools/include/opencv2/datasetstools/slam_kitti.hpp
+1
-3
slam_tumindoor.hpp
...etstools/include/opencv2/datasetstools/slam_tumindoor.hpp
+1
-3
tr_chars.hpp
.../datasetstools/include/opencv2/datasetstools/tr_chars.hpp
+1
-4
tr_svt.hpp
...es/datasetstools/include/opencv2/datasetstools/tr_svt.hpp
+2
-5
ar_hmdb.cpp
modules/datasetstools/samples/ar_hmdb.cpp
+5
-3
ar_sports.cpp
modules/datasetstools/samples/ar_sports.cpp
+3
-3
fr_lfw.cpp
modules/datasetstools/samples/fr_lfw.cpp
+4
-4
gr_chalearn.cpp
modules/datasetstools/samples/gr_chalearn.cpp
+9
-9
gr_skig.cpp
modules/datasetstools/samples/gr_skig.cpp
+3
-3
hpe_parse.cpp
modules/datasetstools/samples/hpe_parse.cpp
+4
-2
ir_affine.cpp
modules/datasetstools/samples/ir_affine.cpp
+3
-3
ir_robot.cpp
modules/datasetstools/samples/ir_robot.cpp
+4
-4
is_bsds.cpp
modules/datasetstools/samples/is_bsds.cpp
+5
-2
is_weizmann.cpp
modules/datasetstools/samples/is_weizmann.cpp
+3
-3
msm_epfl.cpp
modules/datasetstools/samples/msm_epfl.cpp
+5
-5
msm_middlebury.cpp
modules/datasetstools/samples/msm_middlebury.cpp
+5
-5
or_imagenet.cpp
modules/datasetstools/samples/or_imagenet.cpp
+4
-4
or_sun.cpp
modules/datasetstools/samples/or_sun.cpp
+4
-4
slam_kitti.cpp
modules/datasetstools/samples/slam_kitti.cpp
+13
-13
slam_tumindoor.cpp
modules/datasetstools/samples/slam_tumindoor.cpp
+5
-5
tr_chars.cpp
modules/datasetstools/samples/tr_chars.cpp
+8
-8
tr_svt.cpp
modules/datasetstools/samples/tr_svt.cpp
+4
-4
ar_hmdb.cpp
modules/datasetstools/src/ar_hmdb.cpp
+8
-6
ar_sports.cpp
modules/datasetstools/src/ar_sports.cpp
+4
-4
fr_lfw.cpp
modules/datasetstools/src/fr_lfw.cpp
+4
-4
gr_chalearn.cpp
modules/datasetstools/src/gr_chalearn.cpp
+13
-13
gr_skig.cpp
modules/datasetstools/src/gr_skig.cpp
+10
-10
hpe_parse.cpp
modules/datasetstools/src/hpe_parse.cpp
+5
-2
ir_affine.cpp
modules/datasetstools/src/ir_affine.cpp
+3
-3
ir_robot.cpp
modules/datasetstools/src/ir_robot.cpp
+4
-4
is_bsds.cpp
modules/datasetstools/src/is_bsds.cpp
+4
-2
is_weizmann.cpp
modules/datasetstools/src/is_weizmann.cpp
+5
-5
msm_epfl.cpp
modules/datasetstools/src/msm_epfl.cpp
+5
-5
msm_middlebury.cpp
modules/datasetstools/src/msm_middlebury.cpp
+5
-5
or_imagenet.cpp
modules/datasetstools/src/or_imagenet.cpp
+5
-5
or_sun.cpp
modules/datasetstools/src/or_sun.cpp
+4
-4
slam_kitti.cpp
modules/datasetstools/src/slam_kitti.cpp
+9
-9
slam_tumindoor.cpp
modules/datasetstools/src/slam_tumindoor.cpp
+8
-8
tr_chars.cpp
modules/datasetstools/src/tr_chars.cpp
+6
-6
tr_svt.cpp
modules/datasetstools/src/tr_svt.cpp
+6
-6
No files found.
modules/datasetstools/include/opencv2/datasetstools/ar_hmdb.hpp
View file @
2916f89d
...
...
@@ -54,7 +54,7 @@ namespace cv
namespace
datasetstools
{
struct
action
struct
action
:
public
object
{
std
::
string
name
;
std
::
vector
<
std
::
string
>
videoNames
;
...
...
@@ -69,9 +69,6 @@ public:
virtual
void
load
(
const
std
::
string
&
path
,
int
number
=
0
);
std
::
vector
<
action
>
train
;
std
::
vector
<
action
>
test
;
private
:
void
loadDataset
(
const
std
::
string
&
path
,
int
number
=
0
);
...
...
modules/datasetstools/include/opencv2/datasetstools/ar_sports.hpp
View file @
2916f89d
...
...
@@ -54,7 +54,7 @@ namespace cv
namespace
datasetstools
{
struct
element
struct
element
:
public
object
{
std
::
string
videoUrl
;
std
::
vector
<
int
>
labels
;
...
...
@@ -69,13 +69,10 @@ public:
virtual
void
load
(
const
std
::
string
&
path
,
int
number
=
0
);
std
::
vector
<
element
>
train
;
std
::
vector
<
element
>
test
;
private
:
void
loadDataset
(
const
std
::
string
&
path
);
void
loadDatasetPart
(
const
std
::
string
&
fileName
,
std
::
vector
<
element
>
&
dataset_
);
void
loadDatasetPart
(
const
std
::
string
&
fileName
,
std
::
vector
<
Ptr
<
object
>
>
&
dataset_
);
};
}
...
...
modules/datasetstools/include/opencv2/datasetstools/dataset.hpp
View file @
2916f89d
...
...
@@ -43,6 +43,7 @@
#define OPENCV_DATASETSTOOLS_DATASET_HPP
#include <string>
#include <vector>
#include <opencv2/core.hpp>
...
...
@@ -51,13 +52,28 @@ namespace cv
namespace
datasetstools
{
struct
object
{
};
enum
datasetType
{
AR_HMDB
,
AR_SPORTS
};
class
CV_EXPORTS
Dataset
{
public
:
Dataset
()
{}
virtual
~
Dataset
()
{}
virtual
~
Dataset
()
{
train
.
clear
();
test
.
clear
();
}
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
);
};
}
...
...
modules/datasetstools/include/opencv2/datasetstools/fr_lfw.hpp
View file @
2916f89d
...
...
@@ -54,7 +54,7 @@ namespace cv
namespace
datasetstools
{
struct
face
struct
face
:
public
object
{
std
::
string
name
;
std
::
vector
<
std
::
string
>
images
;
...
...
@@ -69,7 +69,7 @@ public:
virtual
void
load
(
const
std
::
string
&
path
,
int
number
=
0
);
std
::
vector
<
face
>
train
;
//
std::vector<face> train;
private
:
void
loadDataset
(
const
std
::
string
&
path
);
...
...
modules/datasetstools/include/opencv2/datasetstools/gr_chalearn.hpp
View file @
2916f89d
...
...
@@ -69,7 +69,7 @@ struct skeleton
join
s
[
20
];
};
struct
gesture
struct
gesture
:
public
object
{
std
::
string
name
,
nameColor
,
nameDepth
,
nameUser
;
int
numFrames
,
fps
,
depth
;
...
...
@@ -86,8 +86,6 @@ public:
virtual
void
load
(
const
std
::
string
&
path
,
int
number
=
0
);
std
::
vector
<
gesture
>
train
;
private
:
void
loadDataset
(
const
std
::
string
&
path
);
};
...
...
modules/datasetstools/include/opencv2/datasetstools/gr_skig.hpp
View file @
2916f89d
...
...
@@ -88,7 +88,7 @@ enum backgroundType
paperWithCharacters
};
struct
gestureSkig
struct
gestureSkig
:
public
object
{
std
::
string
rgb
;
std
::
string
dep
;
...
...
@@ -108,8 +108,6 @@ public:
virtual
void
load
(
const
std
::
string
&
path
,
int
number
=
0
);
std
::
vector
<
gestureSkig
>
train
;
private
:
void
loadDataset
(
const
std
::
string
&
path
);
};
...
...
modules/datasetstools/include/opencv2/datasetstools/hpe_parse.hpp
View file @
2916f89d
...
...
@@ -54,6 +54,11 @@ namespace cv
namespace
datasetstools
{
struct
objectParse
:
public
object
{
std
::
string
name
;
};
class
CV_EXPORTS
HPE_parse
:
public
Dataset
{
public
:
...
...
@@ -63,9 +68,6 @@ public:
virtual
void
load
(
const
std
::
string
&
path
,
int
number
=
0
);
std
::
vector
<
std
::
string
>
train
;
std
::
vector
<
std
::
string
>
test
;
private
:
void
loadDataset
(
const
std
::
string
&
path
);
};
...
...
modules/datasetstools/include/opencv2/datasetstools/ir_affine.hpp
View file @
2916f89d
...
...
@@ -55,7 +55,7 @@ namespace cv
namespace
datasetstools
{
struct
imageParams
struct
imageParams
:
public
object
{
std
::
string
imageName
;
Matx33d
mat
;
...
...
@@ -70,8 +70,6 @@ public:
virtual
void
load
(
const
std
::
string
&
path
,
int
number
=
0
);
std
::
vector
<
imageParams
>
train
;
private
:
void
loadDataset
(
const
std
::
string
&
path
);
};
...
...
modules/datasetstools/include/opencv2/datasetstools/ir_robot.hpp
View file @
2916f89d
...
...
@@ -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
struct
scene
:
public
object
{
std
::
string
name
;
std
::
vector
<
std
::
string
>
images
;
// TODO: implement more complex structure
...
...
@@ -74,8 +74,6 @@ public:
virtual
void
load
(
const
std
::
string
&
path
,
int
number
=
0
);
std
::
vector
<
scene
>
train
;
private
:
void
loadDataset
(
const
std
::
string
&
path
);
};
...
...
modules/datasetstools/include/opencv2/datasetstools/is_bsds.hpp
View file @
2916f89d
...
...
@@ -54,6 +54,11 @@ namespace cv
namespace
datasetstools
{
struct
objectBsds
:
public
object
{
std
::
string
name
;
};
class
CV_EXPORTS
IS_bsds
:
public
Dataset
{
public
:
...
...
@@ -63,13 +68,10 @@ public:
virtual
void
load
(
const
std
::
string
&
path
,
int
number
=
0
);
std
::
vector
<
std
::
string
>
train
;
std
::
vector
<
std
::
string
>
test
;
private
:
void
loadDataset
(
const
std
::
string
&
path
);
void
loadDatasetPart
(
const
std
::
string
&
fileName
,
std
::
vector
<
std
::
string
>
&
dataset_
);
void
loadDatasetPart
(
const
std
::
string
&
fileName
,
std
::
vector
<
Ptr
<
object
>
>
&
dataset_
);
};
}
...
...
modules/datasetstools/include/opencv2/datasetstools/is_weizmann.hpp
View file @
2916f89d
...
...
@@ -54,7 +54,7 @@ namespace cv
namespace
datasetstools
{
struct
object
struct
object
Weizmann
:
public
object
{
std
::
string
imageName
;
std
::
string
srcBw
;
...
...
@@ -71,8 +71,6 @@ public:
virtual
void
load
(
const
std
::
string
&
path
,
int
number
=
0
);
std
::
vector
<
object
>
train
;
private
:
void
loadDataset
(
const
std
::
string
&
path
);
};
...
...
modules/datasetstools/include/opencv2/datasetstools/msm_epfl.hpp
View file @
2916f89d
...
...
@@ -54,7 +54,7 @@ namespace cv
namespace
datasetstools
{
struct
objectEpfl
struct
objectEpfl
:
public
object
{
std
::
string
imageName
;
std
::
vector
<
double
>
bounding
,
camera
,
p
;
// TODO: implement better structures
...
...
@@ -69,8 +69,6 @@ public:
virtual
void
load
(
const
std
::
string
&
path
,
int
number
=
0
);
std
::
vector
<
objectEpfl
>
train
;
private
:
void
loadDataset
(
const
std
::
string
&
path
);
...
...
modules/datasetstools/include/opencv2/datasetstools/msm_middlebury.hpp
View file @
2916f89d
...
...
@@ -54,7 +54,7 @@ namespace cv
namespace
datasetstools
{
struct
cameraParam
struct
cameraParam
:
public
object
{
std
::
string
imageName
;
double
k
[
3
][
3
];
...
...
@@ -71,8 +71,6 @@ public:
virtual
void
load
(
const
std
::
string
&
path
,
int
number
=
0
);
std
::
vector
<
cameraParam
>
train
;
private
:
void
loadDataset
(
const
std
::
string
&
path
);
};
...
...
modules/datasetstools/include/opencv2/datasetstools/or_imagenet.hpp
View file @
2916f89d
...
...
@@ -55,7 +55,7 @@ namespace cv
namespace
datasetstools
{
struct
objectImagenet
struct
objectImagenet
:
public
object
{
std
::
string
wnid
;
int
id2
;
...
...
@@ -71,7 +71,6 @@ public:
virtual
void
load
(
const
std
::
string
&
path
,
int
number
=
0
);
std
::
vector
<
objectImagenet
>
train
;
std
::
set
<
std
::
string
>
wnids
;
private
:
...
...
modules/datasetstools/include/opencv2/datasetstools/or_sun.hpp
View file @
2916f89d
...
...
@@ -54,7 +54,7 @@ namespace cv
namespace
datasetstools
{
struct
objectSun
struct
objectSun
:
public
object
{
std
::
string
name
;
std
::
vector
<
std
::
string
>
imageNames
;
...
...
@@ -69,8 +69,6 @@ public:
virtual
void
load
(
const
std
::
string
&
path
,
int
number
=
0
);
std
::
vector
<
objectSun
>
train
;
private
:
void
loadDataset
(
const
std
::
string
&
path
);
};
...
...
modules/datasetstools/include/opencv2/datasetstools/slam_kitti.hpp
View file @
2916f89d
...
...
@@ -59,7 +59,7 @@ struct pose
double
elem
[
12
];
};
struct
sequence
struct
sequence
:
public
object
{
std
::
string
name
;
std
::
vector
<
std
::
string
>
images
[
4
];
...
...
@@ -77,8 +77,6 @@ public:
virtual
void
load
(
const
std
::
string
&
path
,
int
number
=
0
);
std
::
vector
<
sequence
>
train
;
private
:
void
loadDataset
(
const
std
::
string
&
path
);
};
...
...
modules/datasetstools/include/opencv2/datasetstools/slam_tumindoor.hpp
View file @
2916f89d
...
...
@@ -61,7 +61,7 @@ enum imageType
LADYBUG
};
struct
imageInfo
struct
imageInfo
:
public
object
{
std
::
string
name
;
double
transformMat
[
4
][
4
];
...
...
@@ -77,8 +77,6 @@ public:
virtual
void
load
(
const
std
::
string
&
path
,
int
number
=
0
);
std
::
vector
<
imageInfo
>
train
;
private
:
void
loadDataset
(
const
std
::
string
&
path
);
};
...
...
modules/datasetstools/include/opencv2/datasetstools/tr_chars.hpp
View file @
2916f89d
...
...
@@ -54,7 +54,7 @@ namespace cv
namespace
datasetstools
{
struct
character
struct
character
:
public
object
{
std
::
string
imgName
;
int
label
;
...
...
@@ -69,9 +69,6 @@ public:
virtual
void
load
(
const
std
::
string
&
path
,
int
number
=
0
);
std
::
vector
<
character
>
train
;
std
::
vector
<
character
>
test
;
private
:
void
loadDataset
(
const
std
::
string
&
path
,
int
number
=
0
);
...
...
modules/datasetstools/include/opencv2/datasetstools/tr_svt.hpp
View file @
2916f89d
...
...
@@ -60,7 +60,7 @@ struct tag
int
height
,
width
,
x
,
y
;
};
struct
image
struct
image
:
public
object
{
std
::
string
fileName
;
std
::
vector
<
std
::
string
>
lex
;
...
...
@@ -76,13 +76,10 @@ public:
virtual
void
load
(
const
std
::
string
&
path
,
int
number
=
0
);
std
::
vector
<
image
>
train
;
std
::
vector
<
image
>
test
;
private
:
void
loadDataset
(
const
std
::
string
&
path
);
void
xmlParse
(
const
std
::
string
&
set
,
std
::
vector
<
image
>
&
out
);
void
xmlParse
(
const
std
::
string
&
set
,
std
::
vector
<
Ptr
<
object
>
>
&
out
);
};
}
...
...
modules/datasetstools/samples/ar_hmdb.cpp
View file @
2916f89d
...
...
@@ -74,9 +74,11 @@ 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.
action
&
example
=
dataset
[
1
].
train
[
0
];
printf
(
"name: %s
\n
"
,
example
.
name
.
c_str
());
vector
<
string
>
&
videoNames
=
example
.
videoNames
;
// And its size.
action
*
example
=
static_cast
<
action
*>
(
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
());
for
(
vector
<
string
>::
iterator
it
=
videoNames
.
begin
();
it
!=
videoNames
.
end
();
++
it
)
{
printf
(
"%s
\n
"
,
(
*
it
).
c_str
());
...
...
modules/datasetstools/samples/ar_sports.cpp
View file @
2916f89d
...
...
@@ -75,10 +75,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
());
element
&
first
=
dataset
.
test
[
0
]
;
printf
(
"url: %s
\n
"
,
first
.
videoUrl
.
c_str
());
element
*
example
=
static_cast
<
element
*>
(
dataset
.
test
[
0
].
get
())
;
printf
(
"url: %s
\n
"
,
example
->
videoUrl
.
c_str
());
printf
(
"labels: "
);
vector
<
int
>
&
labels
=
first
.
labels
;
vector
<
int
>
&
labels
=
example
->
labels
;
for
(
vector
<
int
>::
iterator
it
=
labels
.
begin
();
it
!=
labels
.
end
();
++
it
)
{
printf
(
"%u "
,
*
it
);
...
...
modules/datasetstools/samples/fr_lfw.cpp
View file @
2916f89d
...
...
@@ -71,10 +71,10 @@ 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
=
dataset
.
train
[
5
]
;
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
)
face
*
example
=
static_cast
<
face
*>
(
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
)
{
printf
(
"%s
\n
"
,
(
currPath
+
(
*
it
)).
c_str
());
}
...
...
modules/datasetstools/samples/gr_chalearn.cpp
View file @
2916f89d
...
...
@@ -71,18 +71,18 @@ 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
=
dataset
.
train
[
0
]
;
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
());
printf
(
"user video:
\n
%s
\n
"
,
example
.
nameUser
.
c_str
());
printf
(
"video:
\n
number of frames: %u
\n
fps: %u
\n
maximum depth: %u
\n
"
,
example
.
numFrames
,
example
.
fps
,
example
.
depth
);
for
(
vector
<
groundTruth
>::
iterator
it
=
example
.
groundTruths
.
begin
();
it
!=
example
.
groundTruths
.
end
();
++
it
)
gesture
*
example
=
static_cast
<
gesture
*>
(
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
());
printf
(
"user video:
\n
%s
\n
"
,
example
->
nameUser
.
c_str
());
printf
(
"video:
\n
number of frames: %u
\n
fps: %u
\n
maximum depth: %u
\n
"
,
example
->
numFrames
,
example
->
fps
,
example
->
depth
);
for
(
vector
<
groundTruth
>::
iterator
it
=
example
->
groundTruths
.
begin
();
it
!=
example
->
groundTruths
.
end
();
++
it
)
{
printf
(
"gestureID: %u, initial frame: %u, last frame: %u
\n
"
,
(
*
it
).
gestureID
,
(
*
it
).
initialFrame
,
(
*
it
).
lastFrame
);
}
printf
(
"skeletons number: %u
\n
"
,
(
unsigned
int
)
example
.
skeletons
.
size
());
skeleton
&
last
=
example
.
skeletons
.
back
();
printf
(
"skeletons number: %u
\n
"
,
(
unsigned
int
)
example
->
skeletons
.
size
());
skeleton
&
last
=
example
->
skeletons
.
back
();
printf
(
"last skeleton:
\n
"
);
for
(
unsigned
int
i
=
0
;
i
<
20
;
++
i
)
{
...
...
modules/datasetstools/samples/gr_skig.cpp
View file @
2916f89d
...
...
@@ -71,11 +71,11 @@ int main(int argc, char *argv[])
// ***************
// dataset contains pair of rgb\dep images
// For example, let output train size and second element.
gestureSkig
&
example
=
dataset
.
train
[
1
]
;
gestureSkig
*
example
=
static_cast
<
gestureSkig
*>
(
dataset
.
train
[
1
].
get
())
;
printf
(
"train size: %u
\n
"
,
(
unsigned
int
)
dataset
.
train
.
size
());
printf
(
"second 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
.
type
);
example
->
person
,
example
->
background
,
example
->
illumination
,
example
->
pose
,
example
->
type
);
return
0
;
}
modules/datasetstools/samples/hpe_parse.cpp
View file @
2916f89d
...
...
@@ -72,8 +72,10 @@ 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
());
printf
(
"first train image: %s
\n
"
,
dataset
.
train
[
0
].
c_str
());
printf
(
"first test image: %s
\n
"
,
dataset
.
test
[
0
].
c_str
());
objectParse
*
example1
=
static_cast
<
objectParse
*>
(
dataset
.
train
[
0
].
get
());
objectParse
*
example2
=
static_cast
<
objectParse
*>
(
dataset
.
test
[
0
].
get
());
printf
(
"first train image: %s
\n
"
,
example1
->
name
.
c_str
());
printf
(
"first test image: %s
\n
"
,
example2
->
name
.
c_str
());
return
0
;
}
modules/datasetstools/samples/ir_affine.cpp
View file @
2916f89d
...
...
@@ -75,14 +75,14 @@ int main(int argc, char *argv[])
// And dataset size.
printf
(
"size: %u
\n
"
,
(
unsigned
int
)
dataset
.
train
.
size
());
imageParams
&
example
=
dataset
.
train
.
back
(
);
printf
(
"image name: %s
\n
"
,
example
.
imageName
.
c_str
());
imageParams
*
example
=
static_cast
<
imageParams
*>
(
dataset
.
train
.
back
().
get
()
);
printf
(
"image name: %s
\n
"
,
example
->
imageName
.
c_str
());
printf
(
"matrix:
\n
"
);
for
(
int
i
=
0
;
i
<
3
;
++
i
)
{
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 @
2916f89d
...
...
@@ -70,10 +70,10 @@ 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
=
dataset
.
train
.
back
(
);
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
)
scene
*
example
=
static_cast
<
scene
*>
(
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
)
{
printf
(
"%s
\n
"
,
(
currPath
+
(
*
it
)).
c_str
());
}
...
...
modules/datasetstools/samples/is_bsds.cpp
View file @
2916f89d
...
...
@@ -75,9 +75,12 @@ int main(int argc, char *argv[])
// And sets size.
printf
(
"train size: %u
\n
"
,
(
unsigned
int
)
dataset
.
train
.
size
());
printf
(
"test size: %u
\n
"
,
(
unsigned
int
)
dataset
.
test
.
size
());
string
fullPath
(
path
+
"images/train/"
+
dataset
.
train
[
0
]
+
".jpg"
);
objectBsds
*
example1
=
static_cast
<
objectBsds
*>
(
dataset
.
train
[
0
].
get
());
string
fullPath
(
path
+
"images/train/"
+
example1
->
name
+
".jpg"
);
printf
(
"first train image: %s
\n
"
,
fullPath
.
c_str
());
fullPath
=
path
+
"images/test/"
+
dataset
.
test
[
0
]
+
".jpg"
;
objectBsds
*
example2
=
static_cast
<
objectBsds
*>
(
dataset
.
test
[
0
].
get
());
fullPath
=
path
+
"images/test/"
+
example2
->
name
+
".jpg"
;
printf
(
"first test image: %s
\n
"
,
fullPath
.
c_str
());
return
0
;
...
...
modules/datasetstools/samples/is_weizmann.cpp
View file @
2916f89d
...
...
@@ -71,9 +71,9 @@ 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
());
object
&
example
=
dataset
.
train
[
0
]
;
printf
(
"first image:
\n
name: %s
\n
"
,
example
.
imageName
.
c_str
());
printf
(
"src bw: %s
\n
src color: %s
\n
"
,
example
.
srcBw
.
c_str
(),
example
.
srcColor
.
c_str
());
object
Weizmann
*
example
=
static_cast
<
objectWeizmann
*>
(
dataset
.
train
[
0
].
get
())
;
printf
(
"first image:
\n
name: %s
\n
"
,
example
->
imageName
.
c_str
());
printf
(
"src bw: %s
\n
src color: %s
\n
"
,
example
->
srcBw
.
c_str
(),
example
->
srcColor
.
c_str
());
return
0
;
}
modules/datasetstools/samples/msm_epfl.cpp
View file @
2916f89d
...
...
@@ -71,25 +71,25 @@ 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
=
dataset
.
train
[
0
]
;
printf
(
"first image:
\n
name: %s
\n
"
,
example
.
imageName
.
c_str
());
objectEpfl
*
example
=
static_cast
<
objectEpfl
*>
(
dataset
.
train
[
0
].
get
())
;
printf
(
"first image:
\n
name: %s
\n
"
,
example
->
imageName
.
c_str
());
printf
(
"bounding:
\n
"
);
for
(
vector
<
double
>::
iterator
it
=
example
.
bounding
.
begin
();
it
!=
example
.
bounding
.
end
();
++
it
)
for
(
vector
<
double
>::
iterator
it
=
example
->
bounding
.
begin
();
it
!=
example
->
bounding
.
end
();
++
it
)
{
printf
(
"%f "
,
*
it
);
}
printf
(
"
\n
"
);
printf
(
"camera:
\n
"
);
for
(
vector
<
double
>::
iterator
it
=
example
.
camera
.
begin
();
it
!=
example
.
camera
.
end
();
++
it
)
for
(
vector
<
double
>::
iterator
it
=
example
->
camera
.
begin
();
it
!=
example
->
camera
.
end
();
++
it
)
{
printf
(
"%f "
,
*
it
);
}
printf
(
"
\n
"
);
printf
(
"P:
\n
"
);
for
(
vector
<
double
>::
iterator
it
=
example
.
p
.
begin
();
it
!=
example
.
p
.
end
();
++
it
)
for
(
vector
<
double
>::
iterator
it
=
example
->
p
.
begin
();
it
!=
example
->
p
.
end
();
++
it
)
{
printf
(
"%f "
,
*
it
);
}
...
...
modules/datasetstools/samples/msm_middlebury.cpp
View file @
2916f89d
...
...
@@ -71,14 +71,14 @@ 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
=
dataset
.
train
.
back
(
);
printf
(
"last image name: %s
\n
"
,
(
path
+
example
.
imageName
).
c_str
());
cameraParam
*
example
=
static_cast
<
cameraParam
*>
(
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
)
{
for
(
int
j
=
0
;
j
<
3
;
++
j
)
{
printf
(
"%f "
,
example
.
k
[
i
][
j
]);
printf
(
"%f "
,
example
->
k
[
i
][
j
]);
}
printf
(
"
\n
"
);
}
...
...
@@ -87,14 +87,14 @@ int main(int argc, char *argv[])
{
for
(
int
j
=
0
;
j
<
3
;
++
j
)
{
printf
(
"%f "
,
example
.
r
[
i
][
j
]);
printf
(
"%f "
,
example
->
r
[
i
][
j
]);
}
printf
(
"
\n
"
);
}
printf
(
"t:
\n
"
);
for
(
int
i
=
0
;
i
<
3
;
++
i
)
{
printf
(
"%f "
,
example
.
t
[
i
]);
printf
(
"%f "
,
example
->
t
[
i
]);
}
printf
(
"
\n
"
);
...
...
modules/datasetstools/samples/or_imagenet.cpp
View file @
2916f89d
...
...
@@ -74,10 +74,10 @@ 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
=
dataset
.
train
[
0
]
;
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
);
objectImagenet
*
example
=
static_cast
<
objectImagenet
*>
(
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
);
return
0
;
}
modules/datasetstools/samples/or_sun.cpp
View file @
2916f89d
...
...
@@ -71,10 +71,10 @@ 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
=
dataset
.
train
.
back
(
);
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
;
objectSun
*
example
=
static_cast
<
objectSun
*>
(
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
;
for
(
vector
<
string
>::
iterator
it
=
imageNames
.
begin
();
it
!=
imageNames
.
end
();
++
it
)
{
printf
(
"%s
\n
"
,
(
*
it
).
c_str
());
...
...
modules/datasetstools/samples/slam_kitti.cpp
View file @
2916f89d
...
...
@@ -72,39 +72,39 @@ 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
=
dataset
.
train
[
0
]
;
printf
(
"first dataset sequence:
\n
%s
\n
"
,
example
.
name
.
c_str
());
sequence
*
example
=
static_cast
<
sequence
*>
(
dataset
.
train
[
0
].
get
())
;
printf
(
"first dataset sequence:
\n
%s
\n
"
,
example
->
name
.
c_str
());
/*string pathVelodyne(path + "sequences/" + example
.
name + "/velodyne/");
for (vector<string>::iterator it=example
.velodyne.begin(); it!=example.
velodyne.end(); ++it)
/*string pathVelodyne(path + "sequences/" + example
->
name + "/velodyne/");
for (vector<string>::iterator it=example
->velodyne.begin(); it!=example->
velodyne.end(); ++it)
{
printf("%s\n", (pathVelodyne + (*it)).c_str());
}*/
printf
(
"number of velodyne images: %u
\n
"
,
(
unsigned
int
)
example
.
velodyne
.
size
());
printf
(
"number of velodyne images: %u
\n
"
,
(
unsigned
int
)
example
->
velodyne
.
size
());
for
(
unsigned
int
i
=
0
;
i
<=
3
;
++
i
)
{
/*char tmp[2];
sprintf(tmp, "%u", i);
// 0,1 - gray, 2,3 - color
string currPath(path + "sequences/" + example
.
name + "/image_" + tmp + "/");
for (vector<string>::iterator it=example
.images[i].begin(); it!=example.
images[i].end(); ++it)
string currPath(path + "sequences/" + example
->
name + "/image_" + tmp + "/");
for (vector<string>::iterator it=example
->images[i].begin(); it!=example->
images[i].end(); ++it)
{
printf("%s\n", (currPath + (*it)).c_str());
}*/
printf
(
"number of images %u: %u
\n
"
,
i
,
(
unsigned
int
)
example
.
images
[
i
].
size
());
printf
(
"number of images %u: %u
\n
"
,
i
,
(
unsigned
int
)
example
->
images
[
i
].
size
());
}
/*printf("times:\n");
for (vector<double>::iterator it=example
.times.begin(); it!=example.
times.end(); ++it)
for (vector<double>::iterator it=example
->times.begin(); it!=example->
times.end(); ++it)
{
printf("%f ", *it);
}
printf("\n");*/
printf
(
"number of times: %u
\n
"
,
(
unsigned
int
)
example
.
times
.
size
());
printf
(
"number of times: %u
\n
"
,
(
unsigned
int
)
example
->
times
.
size
());
/*printf("poses:\n");
for (vector<pose>::iterator it=example
.posesArray.begin(); it!=example.
posesArray.end(); ++it)
for (vector<pose>::iterator it=example
->posesArray.begin(); it!=example->
posesArray.end(); ++it)
{
for (unsigned int i=0; i<12; ++i)
{
...
...
@@ -112,12 +112,12 @@ int main(int argc, char *argv[])
}
printf("\n");
}*/
printf
(
"number of poses: %u
\n
"
,
(
unsigned
int
)
example
.
posesArray
.
size
());
printf
(
"number of poses: %u
\n
"
,
(
unsigned
int
)
example
->
posesArray
.
size
());
for
(
unsigned
int
i
=
0
;
i
<
4
;
++
i
)
{
printf
(
"calibration %u:
\n
"
,
i
);
for
(
vector
<
double
>::
iterator
it
=
example
.
p
[
i
].
begin
();
it
!=
example
.
p
[
i
].
end
();
++
it
)
for
(
vector
<
double
>::
iterator
it
=
example
->
p
[
i
].
begin
();
it
!=
example
->
p
[
i
].
end
();
++
it
)
{
printf
(
"%f "
,
*
it
);
}
...
...
modules/datasetstools/samples/slam_tumindoor.cpp
View file @
2916f89d
...
...
@@ -72,25 +72,25 @@ 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
=
dataset
.
train
[
0
]
;
printf
(
"first image:
\n
type: %u
\n
"
,
example
.
type
);
imageInfo
*
example
=
static_cast
<
imageInfo
*>
(
dataset
.
train
[
0
].
get
())
;
printf
(
"first image:
\n
type: %u
\n
"
,
example
->
type
);
string
imagePath
(
path
);
if
(
LADYBUG
==
example
.
type
)
if
(
LADYBUG
==
example
->
type
)
{
imagePath
+=
"ladybug/"
;
}
else
{
imagePath
+=
"dslr/"
;
}
printf
(
"file name: %s
\n
"
,
(
imagePath
+
example
.
name
).
c_str
());
printf
(
"file name: %s
\n
"
,
(
imagePath
+
example
->
name
).
c_str
());
printf
(
"transformation matrix:
\n
"
);
for
(
unsigned
int
i
=
0
;
i
<
4
;
++
i
)
{
for
(
unsigned
int
j
=
0
;
j
<
4
;
++
j
)
{
printf
(
"%f "
,
example
.
transformMat
[
i
][
j
]);
printf
(
"%f "
,
example
->
transformMat
[
i
][
j
]);
}
printf
(
"
\n
"
);
}
...
...
modules/datasetstools/samples/tr_chars.cpp
View file @
2916f89d
...
...
@@ -83,17 +83,17 @@ int main(int argc, char *argv[])
// And number of splits.
printf
(
"splits number: %u
\n
"
,
(
unsigned
int
)
dataset
.
size
());
vector
<
character
>
&
currTrain
=
dataset
.
back
().
train
;
vector
<
character
>
&
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
&
currTrainCh
=
currTrain
[
0
]
;
character
&
currTestCh
=
currTest
[
0
]
;
printf
(
"first train element:
\n
name: %s
\n
"
,
currTrainCh
.
imgName
.
c_str
());
printf
(
"label: %u
\n
"
,
currTrainCh
.
label
);
printf
(
"first test element:
\n
name: %s
\n
"
,
currTestCh
.
imgName
.
c_str
());
printf
(
"label: %u
\n
"
,
currTestCh
.
label
);
character
*
example1
=
static_cast
<
character
*>
(
currTrain
[
0
].
get
())
;
character
*
example2
=
static_cast
<
character
*>
(
currTest
[
0
].
get
())
;
printf
(
"first train element:
\n
name: %s
\n
"
,
example1
->
imgName
.
c_str
());
printf
(
"label: %u
\n
"
,
example1
->
label
);
printf
(
"first test element:
\n
name: %s
\n
"
,
example2
->
imgName
.
c_str
());
printf
(
"label: %u
\n
"
,
example2
->
label
);
return
0
;
}
modules/datasetstools/samples/tr_svt.cpp
View file @
2916f89d
...
...
@@ -76,15 +76,15 @@ 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
=
dataset
.
train
.
back
(
);
printf
(
"last element:
\n
file name: %s"
,
example
.
fileName
.
c_str
());
image
*
example
=
static_cast
<
image
*>
(
dataset
.
train
.
back
().
get
()
);
printf
(
"last element:
\n
file name: %s"
,
example
->
fileName
.
c_str
());
printf
(
"
\n
lex: "
);
for
(
vector
<
string
>::
iterator
it
=
example
.
lex
.
begin
();
it
!=
example
.
lex
.
end
();
++
it
)
for
(
vector
<
string
>::
iterator
it
=
example
->
lex
.
begin
();
it
!=
example
->
lex
.
end
();
++
it
)
{
printf
(
"%s,"
,
(
*
it
).
c_str
());
}
printf
(
"
\n
tags:
\n
"
);
for
(
vector
<
tag
>::
iterator
it
=
example
.
tags
.
begin
();
it
!=
example
.
tags
.
end
();
++
it
)
for
(
vector
<
tag
>::
iterator
it
=
example
->
tags
.
begin
();
it
!=
example
->
tags
.
end
();
++
it
)
{
tag
&
t
=
(
*
it
);
printf
(
"%s
\n
height: %u, width: %u, x: %u, y: %u
\n
"
,
...
...
modules/datasetstools/src/ar_hmdb.cpp
View file @
2916f89d
...
...
@@ -91,16 +91,18 @@ void AR_hmdb::loadDataset(const string &path, int number)
getDirList
(
pathDataset
,
fileNames
);
for
(
vector
<
string
>::
iterator
it
=
fileNames
.
begin
();
it
!=
fileNames
.
end
();
++
it
)
{
action
curr
;
curr
.
name
=
*
it
;
Ptr
<
action
>
currTrain
(
new
action
);
Ptr
<
action
>
currTest
(
new
action
);
currTrain
->
name
=
*
it
;
currTest
->
name
=
*
it
;
train
.
push_back
(
curr
);
test
.
push_back
(
curr
);
train
.
push_back
(
curr
Train
);
test
.
push_back
(
curr
Test
);
char
tmp
[
2
];
sprintf
(
tmp
,
"%u"
,
number
+
1
);
string
fileName
(
pathSplit
+
curr
.
name
+
"_test_split"
+
tmp
+
".txt"
);
loadAction
(
fileName
,
train
.
back
().
videoNames
,
test
.
back
().
videoNames
);
string
fileName
(
pathSplit
+
curr
Train
->
name
+
"_test_split"
+
tmp
+
".txt"
);
loadAction
(
fileName
,
currTrain
->
videoNames
,
currTest
->
videoNames
);
}
}
...
...
modules/datasetstools/src/ar_sports.cpp
View file @
2916f89d
...
...
@@ -49,20 +49,20 @@ namespace datasetstools
using
namespace
std
;
void
AR_sports
::
loadDatasetPart
(
const
string
&
fileName
,
vector
<
element
>
&
dataset_
)
void
AR_sports
::
loadDatasetPart
(
const
string
&
fileName
,
vector
<
Ptr
<
object
>
>
&
dataset_
)
{
ifstream
infile
(
fileName
.
c_str
());
string
videoUrl
,
labels
;
while
(
infile
>>
videoUrl
>>
labels
)
{
element
curr
;
curr
.
videoUrl
=
videoUrl
;
Ptr
<
element
>
curr
(
new
element
)
;
curr
->
videoUrl
=
videoUrl
;
vector
<
string
>
elems
;
split
(
labels
,
elems
,
','
);
for
(
vector
<
string
>::
iterator
it
=
elems
.
begin
();
it
!=
elems
.
end
();
++
it
)
{
curr
.
labels
.
push_back
(
atoi
((
*
it
).
c_str
()));
curr
->
labels
.
push_back
(
atoi
((
*
it
).
c_str
()));
}
dataset_
.
push_back
(
curr
);
...
...
modules/datasetstools/src/fr_lfw.cpp
View file @
2916f89d
...
...
@@ -70,15 +70,15 @@ void FR_lfw::loadDataset(const string &path)
getDirList
(
path
,
fileNames
);
for
(
vector
<
string
>::
iterator
it
=
fileNames
.
begin
();
it
!=
fileNames
.
end
();
++
it
)
{
face
curr
;
curr
.
name
=
*
it
;
Ptr
<
face
>
curr
(
new
face
)
;
curr
->
name
=
*
it
;
string
pathFace
(
path
+
curr
.
name
+
"/"
);
string
pathFace
(
path
+
curr
->
name
+
"/"
);
vector
<
string
>
faceNames
;
getDirList
(
pathFace
,
faceNames
);
for
(
vector
<
string
>::
iterator
itFace
=
faceNames
.
begin
();
itFace
!=
faceNames
.
end
();
++
itFace
)
{
curr
.
images
.
push_back
(
*
itFace
);
curr
->
images
.
push_back
(
*
itFace
);
}
train
.
push_back
(
curr
);
...
...
modules/datasetstools/src/gr_chalearn.cpp
View file @
2916f89d
...
...
@@ -70,25 +70,25 @@ void GR_chalearn::loadDataset(const string &path)
getDirList
(
path
,
fileNames
);
for
(
vector
<
string
>::
iterator
it
=
fileNames
.
begin
();
it
!=
fileNames
.
end
();
++
it
)
{
gesture
curr
;
curr
.
name
=
*
it
;
curr
.
nameColor
=
curr
.
name
+
"/"
+
curr
.
name
+
"_color.mp4"
;
curr
.
nameDepth
=
curr
.
name
+
"/"
+
curr
.
name
+
"_depth.mp4"
;
curr
.
nameUser
=
curr
.
name
+
"/"
+
curr
.
name
+
"_user.mp4"
;
Ptr
<
gesture
>
curr
(
new
gesture
)
;
curr
->
name
=
*
it
;
curr
->
nameColor
=
curr
->
name
+
"/"
+
curr
->
name
+
"_color.mp4"
;
curr
->
nameDepth
=
curr
->
name
+
"/"
+
curr
->
name
+
"_depth.mp4"
;
curr
->
nameUser
=
curr
->
name
+
"/"
+
curr
->
name
+
"_user.mp4"
;
// loading video info
string
fileVideoInfo
(
path
+
curr
.
name
+
"/"
+
curr
.
name
+
"_data.csv"
);
string
fileVideoInfo
(
path
+
curr
->
name
+
"/"
+
curr
->
name
+
"_data.csv"
);
ifstream
infile
(
fileVideoInfo
.
c_str
());
string
line
;
getline
(
infile
,
line
);
vector
<
string
>
elems
;
split
(
line
,
elems
,
','
);
curr
.
numFrames
=
atoi
(
elems
[
0
].
c_str
());
curr
.
fps
=
atoi
(
elems
[
1
].
c_str
());
curr
.
depth
=
atoi
(
elems
[
2
].
c_str
());
curr
->
numFrames
=
atoi
(
elems
[
0
].
c_str
());
curr
->
fps
=
atoi
(
elems
[
1
].
c_str
());
curr
->
depth
=
atoi
(
elems
[
2
].
c_str
());
// loading ground truth
string
fileGroundTruth
(
path
+
curr
.
name
+
"/"
+
curr
.
name
+
"_labels.csv"
);
string
fileGroundTruth
(
path
+
curr
->
name
+
"/"
+
curr
->
name
+
"_labels.csv"
);
ifstream
infileGroundTruth
(
fileGroundTruth
.
c_str
());
while
(
getline
(
infileGroundTruth
,
line
))
{
...
...
@@ -100,11 +100,11 @@ void GR_chalearn::loadDataset(const string &path)
currGroundTruth
.
initialFrame
=
atoi
(
elems2
[
1
].
c_str
());
currGroundTruth
.
lastFrame
=
atoi
(
elems2
[
2
].
c_str
());
curr
.
groundTruths
.
push_back
(
currGroundTruth
);
curr
->
groundTruths
.
push_back
(
currGroundTruth
);
}
// loading skeleton
string
fileSkeleton
(
path
+
curr
.
name
+
"/"
+
curr
.
name
+
"_skeleton.csv"
);
string
fileSkeleton
(
path
+
curr
->
name
+
"/"
+
curr
->
name
+
"_skeleton.csv"
);
ifstream
infileSkeleton
(
fileSkeleton
.
c_str
());
while
(
getline
(
infileSkeleton
,
line
))
{
...
...
@@ -126,7 +126,7 @@ void GR_chalearn::loadDataset(const string &path)
currSkeleton
.
s
[
numJoin
].
Py
=
atof
(
elems2
[
i
+
8
].
c_str
());
}
curr
.
skeletons
.
push_back
(
currSkeleton
);
curr
->
skeletons
.
push_back
(
currSkeleton
);
}
train
.
push_back
(
curr
);
...
...
modules/datasetstools/src/gr_skig.cpp
View file @
2916f89d
...
...
@@ -81,22 +81,22 @@ void GR_skig::loadDataset(const string &path)
{
string
&
file
=
*
it
;
gestureSkig
curr
;
curr
.
rgb
=
pathDatasetRgb
+
file
;
curr
.
dep
=
file
;
curr
.
dep
[
0
]
=
'K'
;
curr
.
dep
=
pathDatasetDep
+
curr
.
dep
;
Ptr
<
gestureSkig
>
curr
(
new
gestureSkig
)
;
curr
->
rgb
=
pathDatasetRgb
+
file
;
curr
->
dep
=
file
;
curr
->
dep
[
0
]
=
'K'
;
curr
->
dep
=
pathDatasetDep
+
curr
->
dep
;
size_t
pos
=
file
.
find
(
"person_"
);
// TODO: check ::npos
curr
.
person
=
(
unsigned
char
)
atoi
(
file
.
substr
(
pos
+
strlen
(
"person_"
),
1
).
c_str
()
);
curr
->
person
=
(
unsigned
char
)
atoi
(
file
.
substr
(
pos
+
strlen
(
"person_"
),
1
).
c_str
()
);
pos
=
file
.
find
(
"backgroud_"
);
curr
.
background
=
(
backgroundType
)
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
=
(
illuminationType
)
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
=
(
poseType
)
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
.
type
=
(
actionType
)
atoi
(
file
.
substr
(
pos
+
strlen
(
"actionType_"
),
2
).
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 @
2916f89d
...
...
@@ -79,12 +79,15 @@ void HPE_parse::loadDataset(const string &path)
}
if
(
ext
==
".jpg"
)
{
Ptr
<
objectParse
>
curr
(
new
objectParse
);
curr
->
name
=
file
;
if
(
i
<
100
)
{
train
.
push_back
(
file
);
train
.
push_back
(
curr
);
}
else
{
test
.
push_back
(
file
);
test
.
push_back
(
curr
);
}
++
i
;
}
...
...
modules/datasetstools/src/ir_affine.cpp
View file @
2916f89d
...
...
@@ -68,11 +68,11 @@ void IR_affine::loadDataset(const string &path)
{
for
(
unsigned
int
i
=
1
;
i
<=
6
;
++
i
)
{
imageParams
curr
;
Ptr
<
imageParams
>
curr
(
new
imageParams
)
;
char
tmp
[
2
];
sprintf
(
tmp
,
"%u"
,
i
);
curr
.
imageName
=
path
+
"img"
+
tmp
+
".ppm"
;
curr
->
imageName
=
path
+
"img"
+
tmp
+
".ppm"
;
if
(
i
>
1
)
{
...
...
@@ -82,7 +82,7 @@ void IR_affine::loadDataset(const 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 @
2916f89d
...
...
@@ -70,15 +70,15 @@ void IR_robot::loadDataset(const string &path)
getDirList
(
path
,
fileNames
);
for
(
vector
<
string
>::
iterator
it
=
fileNames
.
begin
();
it
!=
fileNames
.
end
();
++
it
)
{
scene
curr
;
curr
.
name
=
*
it
;
Ptr
<
scene
>
curr
(
new
scene
)
;
curr
->
name
=
*
it
;
string
pathScene
(
path
+
curr
.
name
+
"/"
);
string
pathScene
(
path
+
curr
->
name
+
"/"
);
vector
<
string
>
sceneNames
;
getDirList
(
pathScene
,
sceneNames
);
for
(
vector
<
string
>::
iterator
itScene
=
sceneNames
.
begin
();
itScene
!=
sceneNames
.
end
();
++
itScene
)
{
curr
.
images
.
push_back
(
*
itScene
);
curr
->
images
.
push_back
(
*
itScene
);
}
train
.
push_back
(
curr
);
...
...
modules/datasetstools/src/is_bsds.cpp
View file @
2916f89d
...
...
@@ -49,13 +49,15 @@ namespace datasetstools
using
namespace
std
;
void
IS_bsds
::
loadDatasetPart
(
const
string
&
fileName
,
vector
<
string
>
&
dataset_
)
void
IS_bsds
::
loadDatasetPart
(
const
string
&
fileName
,
vector
<
Ptr
<
object
>
>
&
dataset_
)
{
ifstream
infile
(
fileName
.
c_str
());
string
imageName
;
while
(
infile
>>
imageName
)
{
dataset_
.
push_back
(
imageName
);
Ptr
<
objectBsds
>
curr
(
new
objectBsds
);
curr
->
name
=
imageName
;
dataset_
.
push_back
(
curr
);
}
}
...
...
modules/datasetstools/src/is_weizmann.cpp
View file @
2916f89d
...
...
@@ -73,12 +73,12 @@ void IS_weizmann::loadDataset(const string &path)
string
&
imageName
=
*
it
;
if
(
imageName
.
find
(
'.'
)
==
string
::
npos
)
// only folders, discard .mat
{
object
curr
;
curr
.
imageName
=
imageName
;
curr
.
srcBw
=
imageName
+
"/src_bw/"
+
imageName
+
".png"
;
curr
.
srcColor
=
imageName
+
"/src_color/"
+
imageName
+
".png"
;
Ptr
<
objectWeizmann
>
curr
(
new
objectWeizmann
)
;
curr
->
imageName
=
imageName
;
curr
->
srcBw
=
imageName
+
"/src_bw/"
+
imageName
+
".png"
;
curr
->
srcColor
=
imageName
+
"/src_color/"
+
imageName
+
".png"
;
curr
.
humanSeg
=
imageName
+
"human_seg/"
;
curr
->
humanSeg
=
imageName
+
"human_seg/"
;
train
.
push_back
(
curr
);
}
...
...
modules/datasetstools/src/msm_epfl.cpp
View file @
2916f89d
...
...
@@ -85,12 +85,12 @@ void MSM_epfl::loadDataset(const string &path)
getDirList
(
pathPng
,
fileNames
);
for
(
vector
<
string
>::
iterator
it
=
fileNames
.
begin
();
it
!=
fileNames
.
end
();
++
it
)
{
objectEpfl
curr
;
curr
.
imageName
=
*
it
;
Ptr
<
objectEpfl
>
curr
(
new
objectEpfl
)
;
curr
->
imageName
=
*
it
;
readFileDouble
(
string
(
pathBounding
+
curr
.
imageName
+
".bounding"
),
curr
.
bounding
);
readFileDouble
(
string
(
pathCamera
+
curr
.
imageName
+
".camera"
),
curr
.
camera
);
readFileDouble
(
string
(
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 @
2916f89d
...
...
@@ -78,26 +78,26 @@ void MSM_middlebury::loadDataset(const string &path)
infile
>>
imageName
;
// skip header
while
(
infile
>>
imageName
)
{
cameraParam
curr
;
curr
.
imageName
=
imageName
;
Ptr
<
cameraParam
>
curr
(
new
cameraParam
)
;
curr
->
imageName
=
imageName
;
for
(
int
i
=
0
;
i
<
3
;
++
i
)
{
for
(
int
j
=
0
;
j
<
3
;
++
j
)
{
infile
>>
curr
.
k
[
i
][
j
];
infile
>>
curr
->
k
[
i
][
j
];
}
}
for
(
int
i
=
0
;
i
<
3
;
++
i
)
{
for
(
int
j
=
0
;
j
<
3
;
++
j
)
{
infile
>>
curr
.
r
[
i
][
j
];
infile
>>
curr
->
r
[
i
][
j
];
}
}
for
(
int
i
=
0
;
i
<
3
;
++
i
)
{
infile
>>
curr
.
t
[
i
];
infile
>>
curr
->
t
[
i
];
}
train
.
push_back
(
curr
);
...
...
modules/datasetstools/src/or_imagenet.cpp
View file @
2916f89d
...
...
@@ -73,17 +73,17 @@ void OR_imagenet::loadDataset(const string &path)
vector
<
string
>
elems
;
split
(
line
,
elems
,
'\t'
);
objectImagenet
curr
;
curr
.
imageUrl
=
elems
[
1
];
Ptr
<
objectImagenet
>
curr
(
new
objectImagenet
)
;
curr
->
imageUrl
=
elems
[
1
];
string
id
(
elems
[
0
]);
elems
.
clear
();
split
(
id
,
elems
,
'_'
);
curr
.
wnid
=
elems
[
0
];
curr
.
id2
=
atoi
(
elems
[
1
].
c_str
());
curr
->
wnid
=
elems
[
0
];
curr
->
id2
=
atoi
(
elems
[
1
].
c_str
());
wnids
.
insert
(
curr
.
wnid
);
wnids
.
insert
(
curr
->
wnid
);
train
.
push_back
(
curr
);
}
...
...
modules/datasetstools/src/or_sun.cpp
View file @
2916f89d
...
...
@@ -71,15 +71,15 @@ void OR_sun::loadDataset(const string &path)
string
line
;
while
(
getline
(
infile
,
line
))
{
objectSun
curr
;
curr
.
name
=
line
;
Ptr
<
objectSun
>
curr
(
new
objectSun
)
;
curr
->
name
=
line
;
string
currPath
(
path
+
curr
.
name
);
string
currPath
(
path
+
curr
->
name
);
vector
<
string
>
fileNames
;
getDirList
(
currPath
,
fileNames
);
for
(
vector
<
string
>::
iterator
it
=
fileNames
.
begin
();
it
!=
fileNames
.
end
();
++
it
)
{
curr
.
imageNames
.
push_back
(
*
it
);
curr
->
imageNames
.
push_back
(
*
it
);
}
train
.
push_back
(
curr
);
...
...
modules/datasetstools/src/slam_kitti.cpp
View file @
2916f89d
...
...
@@ -71,10 +71,10 @@ void SLAM_kitti::loadDataset(const string &path)
getDirList
(
pathSequence
,
fileNames
);
for
(
vector
<
string
>::
iterator
it
=
fileNames
.
begin
();
it
!=
fileNames
.
end
();
++
it
)
{
sequence
curr
;
curr
.
name
=
*
it
;
Ptr
<
sequence
>
curr
(
new
sequence
)
;
curr
->
name
=
*
it
;
string
currPath
(
pathSequence
+
curr
.
name
);
string
currPath
(
pathSequence
+
curr
->
name
);
// loading velodyne
string
pathVelodyne
(
currPath
+
"/velodyne/"
);
...
...
@@ -82,7 +82,7 @@ void SLAM_kitti::loadDataset(const string &path)
getDirList
(
pathVelodyne
,
velodyneNames
);
for
(
vector
<
string
>::
iterator
itV
=
velodyneNames
.
begin
();
itV
!=
velodyneNames
.
end
();
++
itV
)
{
curr
.
velodyne
.
push_back
(
*
itV
);
curr
->
velodyne
.
push_back
(
*
itV
);
}
// loading gray & color images
...
...
@@ -95,7 +95,7 @@ void SLAM_kitti::loadDataset(const string &path)
getDirList
(
pathImage
,
imageNames
);
for
(
vector
<
string
>::
iterator
itImage
=
imageNames
.
begin
();
itImage
!=
imageNames
.
end
();
++
itImage
)
{
curr
.
images
[
i
].
push_back
(
*
itImage
);
curr
->
images
[
i
].
push_back
(
*
itImage
);
}
}
...
...
@@ -104,7 +104,7 @@ void SLAM_kitti::loadDataset(const string &path)
string
line
;
while
(
getline
(
infile
,
line
))
{
curr
.
times
.
push_back
(
atof
(
line
.
c_str
()));
curr
->
times
.
push_back
(
atof
(
line
.
c_str
()));
}
// loading calibration
...
...
@@ -117,12 +117,12 @@ void SLAM_kitti::loadDataset(const string &path)
vector
<
string
>::
iterator
itE
=
elems
.
begin
();
for
(
++
itE
;
itE
!=
elems
.
end
();
++
itE
)
{
curr
.
p
[
i
].
push_back
(
atof
((
*
itE
).
c_str
()));
curr
->
p
[
i
].
push_back
(
atof
((
*
itE
).
c_str
()));
}
}
// loading poses
ifstream
infile3
((
path
+
"poses/"
+
curr
.
name
+
".txt"
).
c_str
());
ifstream
infile3
((
path
+
"poses/"
+
curr
->
name
+
".txt"
).
c_str
());
while
(
getline
(
infile3
,
line
))
{
pose
p
;
...
...
@@ -139,7 +139,7 @@ void SLAM_kitti::loadDataset(const string &path)
p
.
elem
[
i
]
=
atof
((
*
itE
).
c_str
());
}
curr
.
posesArray
.
push_back
(
p
);
curr
->
posesArray
.
push_back
(
p
);
}
train
.
push_back
(
curr
);
...
...
modules/datasetstools/src/slam_tumindoor.cpp
View file @
2916f89d
...
...
@@ -76,26 +76,26 @@ void SLAM_tumindoor::loadDataset(const string &path)
vector
<
string
>
elems
;
split
(
line
,
elems
,
';'
);
imageInfo
curr
;
Ptr
<
imageInfo
>
curr
(
new
imageInfo
)
;
curr
.
name
=
elems
[
0
];
if
(
curr
.
name
.
substr
(
0
,
strlen
(
"dslr_left"
))
==
"dslr_left"
)
curr
->
name
=
elems
[
0
];
if
(
curr
->
name
.
substr
(
0
,
strlen
(
"dslr_left"
))
==
"dslr_left"
)
{
curr
.
type
=
LEFT
;
curr
->
type
=
LEFT
;
}
else
if
(
curr
.
name
.
substr
(
0
,
strlen
(
"dslr_right"
))
==
"dslr_right"
)
if
(
curr
->
name
.
substr
(
0
,
strlen
(
"dslr_right"
))
==
"dslr_right"
)
{
curr
.
type
=
RIGHT
;
curr
->
type
=
RIGHT
;
}
else
{
curr
.
type
=
LADYBUG
;
curr
->
type
=
LADYBUG
;
}
for
(
unsigned
int
i
=
0
;
i
<
4
;
++
i
)
{
for
(
unsigned
int
j
=
0
;
j
<
4
;
++
j
)
{
curr
.
transformMat
[
i
][
j
]
=
atof
(
elems
[
1
+
j
+
i
*
4
].
c_str
());
curr
->
transformMat
[
i
][
j
]
=
atof
(
elems
[
1
+
j
+
i
*
4
].
c_str
());
}
}
...
...
modules/datasetstools/src/tr_chars.cpp
View file @
2916f89d
...
...
@@ -163,9 +163,9 @@ void TR_chars::loadDataset(const string &path, int number)
continue
;
}
character
curr
;
curr
.
imgName
=
allNames
[
*
it
];
curr
.
label
=
allLabels
[
*
it
];
Ptr
<
character
>
curr
(
new
character
)
;
curr
->
imgName
=
allNames
[
*
it
];
curr
->
label
=
allLabels
[
*
it
];
train
.
push_back
(
curr
);
}
...
...
@@ -177,9 +177,9 @@ void TR_chars::loadDataset(const string &path, int number)
continue
;
}
character
curr
;
curr
.
imgName
=
allNames
[
*
it
];
curr
.
label
=
allLabels
[
*
it
];
Ptr
<
character
>
curr
(
new
character
)
;
curr
->
imgName
=
allNames
[
*
it
];
curr
->
label
=
allLabels
[
*
it
];
test
.
push_back
(
curr
);
}
}
...
...
modules/datasetstools/src/tr_svt.cpp
View file @
2916f89d
...
...
@@ -52,7 +52,7 @@ namespace datasetstools
using
namespace
std
;
using
namespace
tinyxml2
;
void
TR_svt
::
xmlParse
(
const
string
&
set
,
vector
<
image
>
&
out
)
void
TR_svt
::
xmlParse
(
const
string
&
set
,
vector
<
Ptr
<
object
>
>
&
out
)
{
XMLDocument
doc
;
doc
.
LoadFile
(
set
.
c_str
());
...
...
@@ -67,9 +67,9 @@ void TR_svt::xmlParse(const string &set, vector<image> &out)
string
imageName
=
child
->
FirstChildElement
(
"imageName"
)
->
GetText
();
string
lex
=
child
->
FirstChildElement
(
"lex"
)
->
GetText
();
image
img
;
img
.
fileName
=
imageName
;
split
(
lex
,
img
.
lex
,
','
);
Ptr
<
image
>
curr
(
new
image
)
;
curr
->
fileName
=
imageName
;
split
(
lex
,
curr
->
lex
,
','
);
XMLElement
*
childTaggeds
=
child
->
FirstChildElement
(
"taggedRectangles"
);
if
(
childTaggeds
)
...
...
@@ -84,13 +84,13 @@ void TR_svt::xmlParse(const string &set, vector<image> &out)
t
.
width
=
atoi
(
childTagged
->
Attribute
(
"width"
));
t
.
x
=
atoi
(
childTagged
->
Attribute
(
"x"
));
t
.
y
=
atoi
(
childTagged
->
Attribute
(
"y"
));
img
.
tags
.
push_back
(
t
);
curr
->
tags
.
push_back
(
t
);
childTagged
=
childTagged
->
NextSiblingElement
(
strTagged
.
c_str
());
}
}
out
.
push_back
(
img
);
out
.
push_back
(
curr
);
child
=
child
->
NextSiblingElement
(
strImage
.
c_str
());
}
...
...
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