iLab Neuromorphic Robotics Toolkit  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MakeImagePyramid.H
Go to the documentation of this file.
1 /*! @file
2  @author Randolph Voorhies
3  @copyright GNU Public License (GPL v3)
4  @section License
5  @verbatim
6  // ////////////////////////////////////////////////////////////////////////
7  // The iLab Neuromorphic Robotics Toolkit (NRT) //
8  // Copyright 2010-2012 by the University of Southern California (USC) //
9  // and the iLab at USC. //
10  // //
11  // iLab - University of Southern California //
12  // Hedco Neurociences Building, Room HNB-10 //
13  // Los Angeles, Ca 90089-2520 - USA //
14  // //
15  // See http://ilab.usc.edu for information about this project. //
16  // ////////////////////////////////////////////////////////////////////////
17  // This file is part of The iLab Neuromorphic Robotics Toolkit. //
18  // //
19  // The iLab Neuromorphic Robotics Toolkit is free software: you can //
20  // redistribute it and/or modify it under the terms of the GNU General //
21  // Public License as published by the Free Software Foundation, either //
22  // version 3 of the License, or (at your option) any later version. //
23  // //
24  // The iLab Neuromorphic Robotics Toolkit is distributed in the hope //
25  // that it will be useful, but WITHOUT ANY WARRANTY; without even the //
26  // implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR //
27  // PURPOSE. See the GNU General Public License for more details. //
28  // //
29  // You should have received a copy of the GNU General Public License //
30  // along with The iLab Neuromorphic Robotics Toolkit. If not, see //
31  // <http://www.gnu.org/licenses/>. //
32  // ////////////////////////////////////////////////////////////////////////
33  @endverbatim */
34 
35 
36 #ifndef INCLUDE_NRT_IMAGEPROC_PYRAMID_MAKEIMAGEPYRAMID_H
37 #define INCLUDE_NRT_IMAGEPROC_PYRAMID_MAKEIMAGEPYRAMID_H
38 
41 #include <nrt/Core/Typing/Macros.H>
46 
47 namespace nrt
48 {
49  /*! \defgroup makeimagepyramid Functions to build multiresolution ImagePyramid objects
50 
51  These functions can create Gaussian, Laplacian, Oriented, etc image pyramids.
52 
53  \ingroup imagepyramid
54  \see imagepyramid
55  \see imagepromo */
56 
57  /*! @{ */ // **********************************************************************
58 
59  //! Create a gaussian pyramid from an input Image
60  template <NRT_PROMOTE_PIX(void)>
61  ImagePyramid<DestType>
62  gaussianPyramid(Image<PixType> const source,
63  size_t const numOctaves, size_t const firstOctave = 0, size_t const filterSize = 5);
64 
65  //! Create a laplacian pyramid from an input Image
66  template <NRT_PROMOTE_PIX(double)>
67  ImagePyramid<DestType>
68  laplacianPyramid(Image<PixType> const source,
69  size_t const numOctaves, size_t const firstOctave = 0, size_t const filterSize = 5);
70 
71  //! Create an oriented pyramid from an input Image
72  /*! The pyramid created by this method is a fast approximation to a Gabor pyramid. */
73  template <NRT_PROMOTE_PIX(void)>
74  ImagePyramid<DestType>
75  orientedPyramid(Image<PixType> const source,
76  size_t const numOctaves, size_t const firstOctave, int const filterSize,
77  float theta, float intensity, bool const fastMath = false);
78 
79  //! Create an oriented pyramid from an already constructed Laplacian pyramid
80  template <NRT_PROMOTE_PIX(double)>
81  ImagePyramid<DestType>
82  orientedPyramid(ImagePyramid<PixType> const laplacian,
83  int filterSize, float theta, float intensity, bool const fastMath = false);
84 
85  //! A Reichardt motion pyramid
86  template<class PixType>
88  {
89  public:
90  PyramidReichardt(size_t const depth, size_t const firstLevel, float dx, float dy, float filterSize = 5);
92 
93  private:
94  //shifted and unshifted pyramid for the Reichardt pyramid
95  std::deque<nrt::ImagePyramid<PixType>> shifted, unshifted;
96  size_t itsDepth;
97  size_t itsFirstLevel;
98  int itsDx;
99  int itsDy;
100  size_t itsFilterSize;
101  };
102 
103  /*! @} */ // **********************************************************************
104 
105 }
106 
108 
109 #endif // INCLUDE_NRT_IMAGEPROC_PYRAMID_MAKEIMAGEPYRAMID_H