Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
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
Commits
4ca760d9
Commit
4ca760d9
authored
Dec 06, 2012
by
marina.kolpakova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debug output information.
parent
554080d8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
4 deletions
+15
-4
common.hpp
apps/sft/include/sft/common.hpp
+11
-0
octave.cpp
apps/sft/octave.cpp
+4
-4
No files found.
apps/sft/include/sft/common.hpp
View file @
4ca760d9
...
@@ -56,5 +56,15 @@ namespace sft
...
@@ -56,5 +56,15 @@ namespace sft
typedef
std
::
vector
<
sft
::
string
>
svector
;
typedef
std
::
vector
<
sft
::
string
>
svector
;
}
}
// used for noisy printfs
#define WITH_DEBUG_OUT
#if defined WITH_DEBUG_OUT
# include <stdio.h>
# define dprintf(format, ...) \
do { printf(format, ##__VA_ARGS__); } while (0)
#else
# define dprintf(format, ...)
#endif
#endif
#endif
\ No newline at end of file
apps/sft/octave.cpp
View file @
4ca760d9
...
@@ -147,7 +147,7 @@ void glob(const string& path, svector& ret)
...
@@ -147,7 +147,7 @@ void glob(const string& path, svector& ret)
for
(
uint
i
=
0
;
i
<
glob_result
.
gl_pathc
;
++
i
)
for
(
uint
i
=
0
;
i
<
glob_result
.
gl_pathc
;
++
i
)
{
{
ret
.
push_back
(
std
::
string
(
glob_result
.
gl_pathv
[
i
]));
ret
.
push_back
(
std
::
string
(
glob_result
.
gl_pathv
[
i
]));
//
dprintf("%s\n", ret[i].c_str());
dprintf
(
"%s
\n
"
,
ret
[
i
].
c_str
());
}
}
globfree
(
&
glob_result
);
globfree
(
&
glob_result
);
...
@@ -158,12 +158,12 @@ void glob(const string& path, svector& ret)
...
@@ -158,12 +158,12 @@ void glob(const string& path, svector& ret)
// 2. negatives: <train or test path>/octave_<octave number>/neg/*.png
// 2. negatives: <train or test path>/octave_<octave number>/neg/*.png
Dataset
::
Dataset
(
const
string
&
path
,
const
int
oct
)
Dataset
::
Dataset
(
const
string
&
path
,
const
int
oct
)
{
{
//
dprintf("%s\n", "get dataset file names...");
dprintf
(
"%s
\n
"
,
"get dataset file names..."
);
//
dprintf("%s\n", "Positives globbing...");
dprintf
(
"%s
\n
"
,
"Positives globbing..."
);
glob
(
path
+
"/pos/octave_"
+
itoa
(
oct
)
+
"/*.png"
,
pos
);
glob
(
path
+
"/pos/octave_"
+
itoa
(
oct
)
+
"/*.png"
,
pos
);
//
dprintf("%s\n", "Negatives globbing...");
dprintf
(
"%s
\n
"
,
"Negatives globbing..."
);
glob
(
path
+
"/neg/octave_"
+
itoa
(
oct
)
+
"/*.png"
,
neg
);
glob
(
path
+
"/neg/octave_"
+
itoa
(
oct
)
+
"/*.png"
,
neg
);
// Check: files not empty
// Check: files not empty
...
...
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