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

This commit is contained in:
Davis King 2016-09-05 10:15:52 -04:00
parent 7029c66c65
commit d03bdb78eb
2 changed files with 17 additions and 2 deletions

View File

@ -3,6 +3,7 @@
#ifndef DLIB_RaNDOM_CROPPER_H_
#define DLIB_RaNDOM_CROPPER_H_
#include "random_cropper_abstract.h"
#include "../threads.h"
#include <mutex>
#include <vector>
@ -28,6 +29,11 @@ namespace dlib
const chip_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 (
) const { return randomly_flip; }
@ -39,7 +45,7 @@ namespace dlib
) const { return max_rotation_degrees; }
void set_max_rotation_degrees (
double value
) { max_rotation_degrees = value; }
) { max_rotation_degrees = std::abs(value); }
double get_min_object_height (
) const { return min_object_height; }

View File

@ -54,6 +54,15 @@ namespace dlib
- #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 (
) const;
/*!
@ -83,7 +92,7 @@ namespace dlib
);
/*!
ensures
- #get_max_rotation_degrees() == value
- #get_max_rotation_degrees() == std::abs(value)
!*/
double get_min_object_height (