Made pyramid_down<1> equivalent to pyramid_disable.

This commit is contained in:
Davis King 2013-10-05 10:29:48 -04:00
parent cb0bbee68b
commit dc068968c3
2 changed files with 7 additions and 2 deletions

View File

@ -782,7 +782,7 @@ namespace dlib
{
public:
COMPILE_TIME_ASSERT(N > 1);
COMPILE_TIME_ASSERT(N > 0);
template <typename T>
vector<double,2> point_down (
@ -888,6 +888,9 @@ namespace dlib
}
};
template <>
class pyramid_down<1> : public pyramid_disable {};
template <>
class pyramid_down<2> : public dlib::impl::pyramid_down_2_1 {};

View File

@ -17,12 +17,14 @@ namespace dlib
{
/*!
REQUIREMENTS ON N
N > 1
N > 0
WHAT THIS OBJECT REPRESENTS
This is a simple functor to help create image pyramids. In particular, it
downsamples images at a ratio of N to N-1.
Note that setting N to 1 means that this object functions like
pyramid_disable (defined at the bottom of this file).
WARNING, when mapping rectangles from one layer of a pyramid
to another you might end up with rectangles which extend slightly