Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
27440b6c
Commit
27440b6c
authored
Jul 04, 2016
by
Davis King
Browse files
Fixed bugs in the new --resample option
parent
1e50156e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
tools/imglab/src/main.cpp
tools/imglab/src/main.cpp
+3
-1
No files found.
tools/imglab/src/main.cpp
View file @
27440b6c
...
...
@@ -387,7 +387,7 @@ int resample_dataset(const command_line_parser& parser)
const
size_t
obj_size
=
get_option
(
parser
,
"resample"
,
100
*
100
);
const
double
margin_scale
=
2.5
;
// cropped image will be this times wider than the object.
const
size_t
image_size
=
obj_size
*
margin_scale
;
const
size_t
image_size
=
obj_size
*
margin_scale
*
margin_scale
;
dlib
::
image_dataset_metadata
::
dataset
data
,
resampled_data
;
resampled_data
.
comment
=
data
.
comment
;
...
...
@@ -442,6 +442,8 @@ int resample_dataset(const command_line_parser& parser)
box
.
ignore
=
true
;
box
.
rect
=
tform
(
box
.
rect
);
for
(
auto
&&
p
:
box
.
parts
)
p
.
second
=
tform
.
get_tform
()(
p
.
second
);
dimg
.
boxes
.
push_back
(
box
);
}
dimg
.
filename
=
data
.
images
[
i
].
filename
+
"RESAMPLED"
+
cast_to_string
(
j
)
+
".jpg"
;
...
...
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