Image.h
Go to the documentation of this file.
00001 /*
00002 * This file is part of Parallel SURF, which implements the SURF algorithm
00003 * using multi-threading.
00004 *
00005 * Copyright (C) 2010 David Gossow
00006 *
00007 * It is based on the SURF implementation included in Pan-o-matic 0.9.4, 
00008 * written by Anael Orlinski.
00009 * 
00010 * Parallel SURF is free software; you can redistribute it and/or modify
00011 * it under the terms of the GNU General Public License as published by
00012 * the Free Software Foundation; either version 3 of the License, or
00013 * (at your option) any later version.
00014 * 
00015 * Parallel SURF is distributed in the hope that it will be useful,
00016 * but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 * GNU General Public License for more details.
00019 * 
00020 * You should have received a copy of the GNU General Public License
00021 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
00022 */
00023 
00024 #ifndef __parallelsurf_image_h
00025 #define __parallelsurf_image_h
00026 
00027 namespace parallelsurf {
00028 
00029 // forward declaration
00030 class IntegralImage;
00031 
00032 class Image
00033 {
00034 public:
00035         Image() : _ii(0), _width(0), _height(0) {};
00036 
00037         // Constructor from a pixel array
00038         Image( const unsigned char **iPixels, unsigned int iWidth, unsigned int iHeight);
00039 
00040         // setup the integral image
00041   void init(const unsigned char **iPixels, unsigned int iWidth, unsigned int iHeight);
00042 
00043         // cleanup
00044         void clean();
00045 
00046         // Destructor
00047         ~Image();
00048 
00049         // Accessors
00050   inline const unsigned char **         getPixels()                     { return _pixels; }
00051         inline double **                getIntegralImage()      { return _ii; }
00052         inline unsigned int             getWidth()                      { return _width; }
00053         inline unsigned int             getHeight()                     { return _height; }
00054 
00055         // allocate and deallocate integral image pixels
00056         static double **                AllocateImage(unsigned int iWidth, unsigned int iHeight);
00057         static void                             DeallocateImage(double **iImagePtr, unsigned int iHeight);
00058 
00059 private:
00060 
00061         // prepare the integral image
00062         void                                    buildIntegralImage();
00063 
00064         // pixel data of the image
00065   const unsigned char**                         _pixels;
00066 
00067   // integral image
00068   double**        _ii; // Data of the integral image Like data[lines][rows]
00069 
00070         // image size
00071         unsigned int                    _width;
00072         unsigned int                    _height;
00073 
00074 };
00075 
00076 }
00077 
00078 #endif //__parallelsurf_image_h
00079 


obj_rec_gui
Author(s): AGAS/agas@uni-koblenz.de
autogenerated on Mon Oct 6 2014 02:53:43