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
e8fc2dc0
Commit
e8fc2dc0
authored
Dec 10, 2016
by
Davis King
Browse files
Relaxed requires clauses even more.
parent
b612dda8
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
6 deletions
+10
-6
dlib/image_transforms/random_cropper.h
dlib/image_transforms/random_cropper.h
+2
-2
dlib/image_transforms/random_cropper_abstract.h
dlib/image_transforms/random_cropper_abstract.h
+8
-4
No files found.
dlib/image_transforms/random_cropper.h
View file @
e8fc2dc0
...
@@ -84,7 +84,7 @@ namespace dlib
...
@@ -84,7 +84,7 @@ namespace dlib
double
value
double
value
)
)
{
{
DLIB_CASSERT
(
0
<
value
&&
value
<=
1
);
DLIB_CASSERT
(
0
<
value
);
min_object_height
=
value
;
min_object_height
=
value
;
}
}
...
@@ -94,7 +94,7 @@ namespace dlib
...
@@ -94,7 +94,7 @@ namespace dlib
double
value
double
value
)
)
{
{
DLIB_CASSERT
(
0
<
value
&&
value
<=
1
);
DLIB_CASSERT
(
0
<
value
);
max_object_height
=
value
;
max_object_height
=
value
;
}
}
...
...
dlib/image_transforms/random_cropper_abstract.h
View file @
e8fc2dc0
...
@@ -149,7 +149,10 @@ namespace dlib
...
@@ -149,7 +149,10 @@ namespace dlib
ensures
ensures
- When a chip is extracted around an object, the chip will be sized so that
- When a chip is extracted around an object, the chip will be sized so that
the object's height is at least get_min_object_height() percent of the
the object's height is at least get_min_object_height() percent of the
chip height.
chip height. E.g. if the chip is HEIGHT pixels tall then the object will
be at least HEIGHT*get_min_object_height() pixels tall. This also means
that if get_min_object_height() >1 then the object will be only partially
visible in the crop since it will be too big to fit.
!*/
!*/
void
set_min_object_height
(
void
set_min_object_height
(
...
@@ -157,7 +160,7 @@ namespace dlib
...
@@ -157,7 +160,7 @@ namespace dlib
);
);
/*!
/*!
requires
requires
- 0 < value
<= 1
- 0 < value
ensures
ensures
- #get_min_object_height() == value
- #get_min_object_height() == value
!*/
!*/
...
@@ -168,7 +171,8 @@ namespace dlib
...
@@ -168,7 +171,8 @@ namespace dlib
ensures
ensures
- When a chip is extracted around an object, the chip will be sized so that
- When a chip is extracted around an object, the chip will be sized so that
the object's height is at most get_min_object_height() percent of the
the object's height is at most get_min_object_height() percent of the
chip height.
chip height. E.g. if the chip is HEIGHT pixels tall then the object will
be at most HEIGHT*get_max_object_height() pixels tall.
!*/
!*/
void
set_max_object_height
(
void
set_max_object_height
(
...
@@ -176,7 +180,7 @@ namespace dlib
...
@@ -176,7 +180,7 @@ namespace dlib
);
);
/*!
/*!
requires
requires
- 0 < value
<= 1
- 0 < value
ensures
ensures
- #get_max_object_height() == value
- #get_max_object_height() == value
!*/
!*/
...
...
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