Commit e8fc2dc0 authored by Davis King's avatar Davis King

Relaxed requires clauses even more.

parent b612dda8
...@@ -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;
} }
......
...@@ -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
!*/ !*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment