00001 /*!@file Foveator/Foveator.H An abstract class for space-variant image processing */ 00002 00003 // $HeadURL: svn://isvn.usc.edu/software/invt/trunk/saliency/src/Foveator/Foveator.H $ 00004 // $Id: Foveator.H 9412 2008-03-10 23:10:15Z farhan $ 00005 00006 #ifndef FOVEATOR_H_DEFINED 00007 #define FOVEATOR_H_DEFINED 00008 00009 #include "Image/Image.H" 00010 #include "Image/Pixels.H" 00011 #include "Image/Point2D.H" 00012 00013 //! An abstract class for space-variant image processing 00014 /*! Space-variant image processing concentrates image quality and resolution 00015 in areas of interest. Human vision has high resolution at the center, but it 00016 decreases as we move further out into the periphery. Through the process of 00017 foveation, we attempt to simulate this type of vision. 00018 00019 Classes used for foveation should inherit this as a base. The foveation 00020 operation is performed through pure virtual function foveate(). Different 00021 foveation techniques and algorithms are implemented in BlurFoveator, 00022 PyrFoveator, and LPTFoveator. 00023 */ 00024 00025 class Foveator 00026 { 00027 protected: 00028 Image< PixRGB< byte > > original; //!< image to be foveated 00029 int width; //!< width of original image 00030 int height; //!< height of original image 00031 Point2D<int> origin; //!< center of foveation 00032 00033 public: 00034 //! Constructor 00035 /*! Create a Foveator object to operate on image argument 00036 @param img image to be foveated 00037 */ 00038 Foveator( const Image< PixRGB< byte > >& img ); 00039 //! Destructor 00040 virtual ~Foveator(); 00041 00042 //! Returns the current center of foveation 00043 Point2D<int> getOrigin( void ) const; 00044 //! Returns width of image being foveated 00045 int getWidth( void ) const; 00046 //! Returns height of image being foveated 00047 int getHeight( void ) const; 00048 00049 //! Change the image to be foveated 00050 /*! Change the image to be foveated to another one of the same size 00051 @param img new image to be used, must have same dimensions as original 00052 */ 00053 void changeImage( const Image< PixRGB< byte > >& img ); 00054 00055 //! Set origin point (center of foveation) 00056 /*! Set origin point to Point2D<int> argument, returns true if successful 00057 @param pt center of foveation 00058 */ 00059 virtual bool setOrigin( Point2D<int> pt ); 00060 //! Set origin point (center of foveation) 00061 /*! Set origin point to two int arguments, returns true if successful 00062 @param x horizontal coordinate of origin 00063 @param y vertical coordinate of origin 00064 */ 00065 virtual bool setOrigin( int x, int y ); 00066 00067 //! Foveation function, returns foveated image 00068 virtual Image< PixRGB< byte> > foveate( void ) = 0; 00069 }; 00070 00071 #endif 00072 00073 // ###################################################################### 00074 /* So things look consistent in everyone's emacs... */ 00075 /* Local Variables: */ 00076 /* indent-tabs-mode: nil */ 00077 /* End: */