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
d03bdb78
Commit
d03bdb78
authored
Sep 05, 2016
by
Davis King
Browse files
Added overload of member function set_chip_dims() and also cleaned up a few minor details.
parent
7029c66c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
2 deletions
+17
-2
dlib/image_transforms/random_cropper.h
dlib/image_transforms/random_cropper.h
+7
-1
dlib/image_transforms/random_cropper_abstract.h
dlib/image_transforms/random_cropper_abstract.h
+10
-1
No files found.
dlib/image_transforms/random_cropper.h
View file @
d03bdb78
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
#ifndef DLIB_RaNDOM_CROPPER_H_
#ifndef DLIB_RaNDOM_CROPPER_H_
#define DLIB_RaNDOM_CROPPER_H_
#define DLIB_RaNDOM_CROPPER_H_
#include "random_cropper_abstract.h"
#include "../threads.h"
#include "../threads.h"
#include <mutex>
#include <mutex>
#include <vector>
#include <vector>
...
@@ -28,6 +29,11 @@ namespace dlib
...
@@ -28,6 +29,11 @@ namespace dlib
const
chip_dims
&
dims_
const
chip_dims
&
dims_
)
{
dims
=
dims_
;
}
)
{
dims
=
dims_
;
}
void
set_chip_dims
(
unsigned
long
rows
,
unsigned
long
cols
)
{
set_chip_dims
(
chip_dims
(
rows
,
cols
));
}
bool
get_randomly_flip
(
bool
get_randomly_flip
(
)
const
{
return
randomly_flip
;
}
)
const
{
return
randomly_flip
;
}
...
@@ -39,7 +45,7 @@ namespace dlib
...
@@ -39,7 +45,7 @@ namespace dlib
)
const
{
return
max_rotation_degrees
;
}
)
const
{
return
max_rotation_degrees
;
}
void
set_max_rotation_degrees
(
void
set_max_rotation_degrees
(
double
value
double
value
)
{
max_rotation_degrees
=
value
;
}
)
{
max_rotation_degrees
=
std
::
abs
(
value
)
;
}
double
get_min_object_height
(
double
get_min_object_height
(
)
const
{
return
min_object_height
;
}
)
const
{
return
min_object_height
;
}
...
...
dlib/image_transforms/random_cropper_abstract.h
View file @
d03bdb78
...
@@ -54,6 +54,15 @@ namespace dlib
...
@@ -54,6 +54,15 @@ namespace dlib
- #get_chip_dims() == dims
- #get_chip_dims() == dims
!*/
!*/
void
set_chip_dims
(
unsigned
long
rows
,
unsigned
long
cols
);
/*!
ensures
- #get_chip_dims() == chip_dims(rows,cols)
!*/
bool
get_randomly_flip
(
bool
get_randomly_flip
(
)
const
;
)
const
;
/*!
/*!
...
@@ -83,7 +92,7 @@ namespace dlib
...
@@ -83,7 +92,7 @@ namespace dlib
);
);
/*!
/*!
ensures
ensures
- #get_max_rotation_degrees() == value
- #get_max_rotation_degrees() ==
std::abs(
value
)
!*/
!*/
double
get_min_object_height
(
double
get_min_object_height
(
...
...
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