Commit d03bdb78 authored by Davis King's avatar Davis King

Added overload of member function set_chip_dims() and also cleaned up a few minor details.

parent 7029c66c
...@@ -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; }
......
...@@ -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 (
......
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