iLab Neuromorphic Robotics Toolkit  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Transform.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_RESHAPING_TRANSFORM_H
37 #define INCLUDE_NRT_IMAGEPROC_RESHAPING_TRANSFORM_H
38 
39 #include <nrt/Core/Image/Image.H>
41 
42 namespace nrt
43 {
44  /*! @defgroup imagetransform Image Transformations
45  These methods provide various transformations on Images, such as rotations, shifts, etc.
46 
47  \ingroup imagereshaping
48  \see imagereshaping
49  \see imagepromo
50  \see image */
51 
52  /*! @{ */ // **********************************************************************
53 
54  //! Flip an image vertically, so that the top row becomes the bottom row.
55  template <class PixType>
56  Image<PixType> flipVertical(const Image<PixType>& src);
57 
58  //! Flip an image horizontally, so that the left column becomes the right column.
59  template <class PixType>
60  Image<PixType> flipHorizontal(const Image<PixType>& src);
61 
62  //! Shift an image by a non-integer displacement (float dx, float dy)
63  template <NRT_PROMOTE_PIX(void)>
64  Image<DestType> shiftImage(Image<PixType> const src, float const dx, float const dy);
65 
66  //! Shift an image by an integer displacement (int dx, int dy), without wraparound
67  template <class PixType>
68  Image<PixType> shiftClean(Image<PixType> const src, int const dx, int const dy, PixType bgval = PixType(0));
69 
70  //! Rotate an Image about the point p by the angle angRad(in Radians)
71  /*! The resulting Image will have the same dimensions as src, thus any parts of the rotated Image that fall outside of
72  these dimensions will be clipped. */
73  template <NRT_PROMOTE_PIX(void)>
74  Image<DestType> rotate(Image<PixType> const src, Point2D<int32> const p, const float angRad);
75 
76  //! Rotate an Image about its center by the angle angRad(in Radians)
77  /*! \overload rotate(Image<PixType> const src, Point2D<int32> const p, const float angRad) */
78  template <NRT_PROMOTE_PIX(void)>
79  Image<DestType> rotate(Image<PixType> const src, const float angRad);
80 
81  /*! @} */ // **********************************************************************
82 
83 } // namespace nrt
84 
86 
87 #endif // INCLUDE_NRT_IMAGEPROC_RESHAPING_TRANSFORM_H