Commit 007161f0 authored by Davis King's avatar Davis King

Added a static const long copy of downsample so you can obtain its value

given only a poly_image type.
parent 8a2ff553
...@@ -17,12 +17,13 @@ namespace dlib ...@@ -17,12 +17,13 @@ namespace dlib
// ---------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------
template < template <
long downsample long Downsample
> >
class poly_image : noncopyable class poly_image : noncopyable
{ {
COMPILE_TIME_ASSERT(downsample >= 1); COMPILE_TIME_ASSERT(Downsample >= 1);
public: public:
const static long downsample = Downsample;
typedef matrix<double, 0, 1> descriptor_type; typedef matrix<double, 0, 1> descriptor_type;
poly_image( poly_image(
......
...@@ -11,13 +11,13 @@ ...@@ -11,13 +11,13 @@
namespace dlib namespace dlib
{ {
template < template <
long downsample long Downsample
> >
class poly_image : noncopyable class poly_image : noncopyable
{ {
/*! /*!
REQUIREMENTS ON TEMPLATE PARAMETERS REQUIREMENTS ON TEMPLATE PARAMETERS
- downsample >= 1 - Downsample >= 1
WHAT THIS OBJECT REPRESENTS WHAT THIS OBJECT REPRESENTS
This object is a tool for extracting local feature descriptors from an image. This object is a tool for extracting local feature descriptors from an image.
...@@ -27,10 +27,10 @@ namespace dlib ...@@ -27,10 +27,10 @@ namespace dlib
polynomial and then the constant term is discarded. polynomial and then the constant term is discarded.
Additionally, the user can specify a downsampling rate. If the template argument Additionally, the user can specify a downsampling rate. If the template argument
downsample is set to 1 then feature extraction is performed at every pixel of Downsample is set to 1 then feature extraction is performed at every pixel of
an input image (except for a small area around the image border). However, an input image (except for a small area around the image border). However,
if downsample is set to 2 then feature extraction is only performed at every if Downsample is set to 2 then feature extraction is only performed at every
other pixel location. More generally, if downsample is set to N then feature other pixel location. More generally, if Downsample is set to N then feature
extraction is performed only every N pixels. extraction is performed only every N pixels.
THREAD SAFETY THREAD SAFETY
...@@ -44,6 +44,7 @@ namespace dlib ...@@ -44,6 +44,7 @@ namespace dlib
public: public:
typedef matrix<double, 0, 1> descriptor_type; typedef matrix<double, 0, 1> descriptor_type;
const static long downsample = Downsample;
poly_image ( poly_image (
); );
......
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