Commit ad19228c authored by Davis King's avatar Davis King

Merged and also clarified requires clauses.

parents 6720b7f5 82aff7db
......@@ -962,11 +962,11 @@ namespace dlib
// ----------------------------------------------------------------------------------------
template <
typename image_type,
typename image_array_type,
typename T
>
void add_image_left_right_flips (
dlib::array<image_type>& images,
image_array_type& images,
std::vector<std::vector<T> >& objects
)
{
......@@ -978,7 +978,7 @@ namespace dlib
<< "\n\t objects.size(): " << objects.size()
);
image_type temp;
typename image_array_type::value_type temp;
std::vector<T> rects;
const unsigned long num = images.size();
......@@ -998,12 +998,12 @@ namespace dlib
// ----------------------------------------------------------------------------------------
template <
typename image_type,
typename image_array_type,
typename T,
typename U
>
void add_image_left_right_flips (
dlib::array<image_type>& images,
image_array_type& images,
std::vector<std::vector<T> >& objects,
std::vector<std::vector<U> >& objects2
)
......@@ -1018,7 +1018,7 @@ namespace dlib
<< "\n\t objects2.size(): " << objects2.size()
);
image_type temp;
typename image_array_type::value_type temp;
std::vector<T> rects;
std::vector<U> rects2;
......@@ -1042,9 +1042,9 @@ namespace dlib
// ----------------------------------------------------------------------------------------
template <typename image_type>
template <typename image_array_type>
void flip_image_dataset_left_right (
dlib::array<image_type>& images,
image_array_type& images,
std::vector<std::vector<rectangle> >& objects
)
{
......@@ -1056,7 +1056,7 @@ namespace dlib
<< "\n\t objects.size(): " << objects.size()
);
image_type temp;
typename image_array_type::value_type temp;
for (unsigned long i = 0; i < images.size(); ++i)
{
flip_image_left_right(images[i], temp);
......@@ -1070,9 +1070,9 @@ namespace dlib
// ----------------------------------------------------------------------------------------
template <typename image_type>
template <typename image_array_type>
void flip_image_dataset_left_right (
dlib::array<image_type>& images,
image_array_type& images,
std::vector<std::vector<rectangle> >& objects,
std::vector<std::vector<rectangle> >& objects2
)
......@@ -1087,7 +1087,7 @@ namespace dlib
<< "\n\t objects2.size(): " << objects2.size()
);
image_type temp;
typename image_array_type::value_type temp;
for (unsigned long i = 0; i < images.size(); ++i)
{
flip_image_left_right(images[i], temp);
......@@ -1107,10 +1107,10 @@ namespace dlib
template <
typename pyramid_type,
typename image_type
typename image_array_type
>
void upsample_image_dataset (
dlib::array<image_type>& images,
image_array_type& images,
std::vector<std::vector<rectangle> >& objects
)
{
......@@ -1122,7 +1122,7 @@ namespace dlib
<< "\n\t objects.size(): " << objects.size()
);
image_type temp;
typename image_array_type::value_type temp;
pyramid_type pyr;
for (unsigned long i = 0; i < images.size(); ++i)
{
......@@ -1137,10 +1137,10 @@ namespace dlib
template <
typename pyramid_type,
typename image_type
typename image_array_type
>
void upsample_image_dataset (
dlib::array<image_type>& images,
image_array_type& images,
std::vector<std::vector<rectangle> >& objects,
std::vector<std::vector<rectangle> >& objects2
)
......@@ -1155,7 +1155,7 @@ namespace dlib
<< "\n\t objects2.size(): " << objects2.size()
);
image_type temp;
typename image_array_type::value_type temp;
pyramid_type pyr;
for (unsigned long i = 0; i < images.size(); ++i)
{
......@@ -1174,10 +1174,10 @@ namespace dlib
// ----------------------------------------------------------------------------------------
template <typename image_type>
template <typename image_array_type>
void rotate_image_dataset (
double angle,
dlib::array<image_type>& images,
image_array_type& images,
std::vector<std::vector<rectangle> >& objects
)
{
......@@ -1189,7 +1189,7 @@ namespace dlib
<< "\n\t objects.size(): " << objects.size()
);
image_type temp;
typename image_array_type::value_type temp;
for (unsigned long i = 0; i < images.size(); ++i)
{
const point_transform_affine tran = rotate_image(images[i], temp, angle);
......@@ -1202,10 +1202,10 @@ namespace dlib
}
}
template <typename image_type>
template <typename image_array_type>
void rotate_image_dataset (
double angle,
dlib::array<image_type>& images,
image_array_type& images,
std::vector<std::vector<rectangle> >& objects,
std::vector<std::vector<rectangle> >& objects2
)
......@@ -1220,7 +1220,7 @@ namespace dlib
<< "\n\t objects2.size(): " << objects2.size()
);
image_type temp;
typename image_array_type::value_type temp;
for (unsigned long i = 0; i < images.size(); ++i)
{
const point_transform_affine tran = rotate_image(images[i], temp, angle);
......@@ -1241,14 +1241,14 @@ namespace dlib
// ----------------------------------------------------------------------------------------
template <
typename image_type,
typename image_array_type,
typename EXP,
typename T,
typename U
>
void add_image_rotations (
const matrix_exp<EXP>& angles,
dlib::array<image_type>& images,
image_array_type& images,
std::vector<std::vector<T> >& objects,
std::vector<std::vector<U> >& objects2
)
......@@ -1266,7 +1266,7 @@ namespace dlib
<< "\n\t objects2.size(): " << objects2.size()
);
dlib::array<image_type> new_images;
image_array_type new_images;
std::vector<std::vector<T> > new_objects;
std::vector<std::vector<U> > new_objects2;
......@@ -1274,7 +1274,7 @@ namespace dlib
std::vector<T> objtemp;
std::vector<U> objtemp2;
image_type temp;
typename image_array_type::image_type temp;
for (long i = 0; i < angles.size(); ++i)
{
for (unsigned long j = 0; j < images.size(); ++j)
......@@ -1302,13 +1302,13 @@ namespace dlib
// ----------------------------------------------------------------------------------------
template <
typename image_type,
typename image_array_type,
typename EXP,
typename T
>
void add_image_rotations (
const matrix_exp<EXP>& angles,
dlib::array<image_type>& images,
image_array_type& images,
std::vector<std::vector<T> >& objects
)
{
......
......@@ -443,17 +443,17 @@ namespace dlib
// ----------------------------------------------------------------------------------------
template <
typename image_type,
typename image_array_type,
typename T
>
void add_image_left_right_flips (
dlib::array<image_type>& images,
image_array_type& images,
std::vector<std::vector<T> >& objects
);
/*!
requires
- image_type == an image object that implements the interface defined in
dlib/image_processing/generic_image.h
- image_array_type == a dlib::array or std::vector of image objects that each
implement the interface defined in dlib/image_processing/generic_image.h
- T == rectangle or full_object_detection
- images.size() == objects.size()
ensures
......@@ -472,19 +472,19 @@ namespace dlib
// ----------------------------------------------------------------------------------------
template <
typename image_type,
typename image_array_type,
typename T,
typename U
>
void add_image_left_right_flips (
dlib::array<image_type>& images,
image_array_type& images,
std::vector<std::vector<T> >& objects,
std::vector<std::vector<U> >& objects2
);
/*!
requires
- image_type == an image object that implements the interface defined in
dlib/image_processing/generic_image.h
- image_array_type == a dlib::array or std::vector of image objects that each
implement the interface defined in dlib/image_processing/generic_image.h
- images.size() == objects.size()
- images.size() == objects2.size()
- T == rectangle or full_object_detection
......@@ -507,21 +507,21 @@ namespace dlib
// ----------------------------------------------------------------------------------------
template <
typename image_type,
typename image_array_type,
typename EXP,
typename T,
typename U
>
void add_image_rotations (
const matrix_exp<EXP>& angles,
dlib::array<image_type>& images,
image_array_type& images,
std::vector<std::vector<T> >& objects,
std::vector<std::vector<U> >& objects2
);
/*!
requires
- image_type == an image object that implements the interface defined in
dlib/image_processing/generic_image.h
- image_array_type == a dlib::array or std::vector of image objects that each
implement the interface defined in dlib/image_processing/generic_image.h
- is_vector(angles) == true
- angles.size() > 0
- images.size() == objects.size()
......@@ -547,19 +547,19 @@ namespace dlib
// ----------------------------------------------------------------------------------------
template <
typename image_type,
typename image_array_type,
typename EXP,
typename T
>
void add_image_rotations (
const matrix_exp<EXP>& angles,
dlib::array<image_type>& images,
image_array_type& images,
std::vector<std::vector<T> >& objects
);
/*!
requires
- image_type == an image object that implements the interface defined in
dlib/image_processing/generic_image.h
- image_array_type == a dlib::array or std::vector of image objects that each
implement the interface defined in dlib/image_processing/generic_image.h
- is_vector(angles) == true
- angles.size() > 0
- images.size() == objects.size()
......@@ -572,16 +572,16 @@ namespace dlib
// ----------------------------------------------------------------------------------------
template <
typename image_type
typename image_array_type
>
void flip_image_dataset_left_right (
dlib::array<image_type>& images,
image_array_type& images,
std::vector<std::vector<rectangle> >& objects
);
/*!
requires
- image_type == an image object that implements the interface defined in
dlib/image_processing/generic_image.h
- image_array_type == a dlib::array or std::vector of image objects that each
implement the interface defined in dlib/image_processing/generic_image.h
- images.size() == objects.size()
ensures
- This function replaces each image in images with the left/right flipped
......@@ -597,17 +597,17 @@ namespace dlib
// ----------------------------------------------------------------------------------------
template <
typename image_type
typename image_array_type
>
void flip_image_dataset_left_right (
dlib::array<image_type>& images,
image_array_type& images,
std::vector<std::vector<rectangle> >& objects,
std::vector<std::vector<rectangle> >& objects2
);
/*!
requires
- image_type == an image object that implements the interface defined in
dlib/image_processing/generic_image.h
- image_array_type == a dlib::array or std::vector of image objects that each
implement the interface defined in dlib/image_processing/generic_image.h
- images.size() == objects.size()
- images.size() == objects2.size()
ensures
......@@ -628,16 +628,16 @@ namespace dlib
template <
typename pyramid_type,
typename image_type
typename image_array_type
>
void upsample_image_dataset (
dlib::array<image_type>& images,
image_array_type& images,
std::vector<std::vector<rectangle> >& objects
);
/*!
requires
- image_type == an image object that implements the interface defined in
dlib/image_processing/generic_image.h
- image_array_type == a dlib::array or std::vector of image objects that each
implement the interface defined in dlib/image_processing/generic_image.h
- images.size() == objects.size()
ensures
- This function replaces each image in images with an upsampled version of that
......@@ -655,17 +655,17 @@ namespace dlib
template <
typename pyramid_type,
typename image_type
typename image_array_type,
>
void upsample_image_dataset (
dlib::array<image_type>& images,
image_array_type& images,
std::vector<std::vector<rectangle> >& objects,
std::vector<std::vector<rectangle> >& objects2
);
/*!
requires
- image_type == an image object that implements the interface defined in
dlib/image_processing/generic_image.h
- image_array_type == a dlib::array or std::vector of image objects that each
implement the interface defined in dlib/image_processing/generic_image.h
- images.size() == objects.size()
- images.size() == objects2.size()
ensures
......@@ -685,16 +685,16 @@ namespace dlib
// ----------------------------------------------------------------------------------------
template <typename image_type>
template <typename image_array_type>
void rotate_image_dataset (
double angle,
dlib::array<image_type>& images,
image_array_type& images,
std::vector<std::vector<rectangle> >& objects
);
/*!
requires
- image_type == an image object that implements the interface defined in
dlib/image_processing/generic_image.h
- image_array_type == a dlib::array or std::vector of image objects that each
implement the interface defined in dlib/image_processing/generic_image.h
- images.size() == objects.size()
ensures
- This function replaces each image in images with a rotated version of that
......@@ -715,17 +715,17 @@ namespace dlib
// ----------------------------------------------------------------------------------------
template <typename image_type>
template <typename image_array_type>
void rotate_image_dataset (
double angle,
dlib::array<image_type>& images,
image_array_type& images,
std::vector<std::vector<rectangle> >& objects,
std::vector<std::vector<rectangle> >& objects2
);
/*!
requires
- image_type == an image object that implements the interface defined in
dlib/image_processing/generic_image.h
- image_array_type == a dlib::array or std::vector of image objects that each
implement the interface defined in dlib/image_processing/generic_image.h
- images.size() == objects.size()
- images.size() == objects2.size()
ensures
......
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