00001 /*!@file Image/OmniOps.H Operations for omnidirectional correction 00002 */ 00003 00004 // //////////////////////////////////////////////////////////////////// // 00005 // The iLab Neuromorphic Vision C++ Toolkit - Copyright (C) 2001 by the // 00006 // University of Southern California (USC) and the iLab at USC. // 00007 // See http://iLab.usc.edu for information about this project. // 00008 // //////////////////////////////////////////////////////////////////// // 00009 // Major portions of the iLab Neuromorphic Vision Toolkit are protected // 00010 // under the U.S. patent ``Computation of Intrinsic Perceptual Saliency // 00011 // in Visual Environments, and Applications'' by Christof Koch and // 00012 // Laurent Itti, California Institute of Technology, 2001 (patent // 00013 // pending; application number 09/912,225 filed July 23, 2001; see // 00014 // http://pair.uspto.gov/cgi-bin/final/home.pl for current status). // 00015 // //////////////////////////////////////////////////////////////////// // 00016 // This file is part of the iLab Neuromorphic Vision C++ Toolkit. // 00017 // // 00018 // The iLab Neuromorphic Vision C++ Toolkit is free software; you can // 00019 // redistribute it and/or modify it under the terms of the GNU General // 00020 // Public License as published by the Free Software Foundation; either // 00021 // version 2 of the License, or (at your option) any later version. // 00022 // // 00023 // The iLab Neuromorphic Vision C++ Toolkit is distributed in the hope // 00024 // that it will be useful, but WITHOUT ANY WARRANTY; without even the // 00025 // implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR // 00026 // PURPOSE. See the GNU General Public License for more details. // 00027 // // 00028 // You should have received a copy of the GNU General Public License // 00029 // along with the iLab Neuromorphic Vision C++ Toolkit; if not, write // 00030 // to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, // 00031 // Boston, MA 02111-1307 USA. // 00032 // //////////////////////////////////////////////////////////////////// // 00033 // 00034 // Primary maintainer for this file: Rob Peters <rjpeters@klab.caltech.edu> 00035 // $HeadURL: svn://isvn.usc.edu/software/invt/trunk/saliency/src/Image/OmniOps.H $ 00036 // $Id: OmniOps.H 4663 2005-06-23 17:47:28Z rjpeters $ 00037 // 00038 00039 #ifndef IMAGE_OMNI_H_DEFINED 00040 #define IMAGE_OMNI_H_DEFINED 00041 00042 #include "Util/Types.H" 00043 00044 template <class T> class Image; 00045 template <class T> class PixRGB; 00046 00047 00048 //! Perform a low pass filter about a specific pixel 00049 /*! @param x The x coord of the pixel 00050 @param y The y coord of the pixel 00051 @param radius The radius of the filter 00052 */ 00053 template <class T> 00054 void lowPassPixel(Image<T>& src, 00055 const int x, const int y, const int radius); 00056 00057 //! First step of omni directional correction 00058 /*! @param image The image your are going to process 00059 @param Rx The Radius in X - May be equal to Ry 00060 @param Ry The Radius in Y - May be equal to Rx 00061 @param Xc The center pixel x 00062 @param Yc The center pixel y 00063 @param RA Manual radius adjustment, this is used only for distortion 00064 adjustment. 00065 @note omniCorrectSp must be used next for full correction unless 00066 image is a true pinhole image. */ 00067 template <class T> 00068 Image<PixRGB<T> > omniCorrectGen(const Image<PixRGB<T> >& src, 00069 const int Rx, const int Ry, 00070 const int Xc, const int Yc, 00071 const int RA = 0); 00072 00073 //! Second step of omni-directional correcton 00074 /*! Values for r,h,k must be obtained via measurement and derived via 00075 circular regression (see Mundhenk et al SPIE 2000) 00076 Note: run omniCorrectGen first. 00077 @param image The image your are going to process 00078 @param r The radius calculated by circular regression 00079 @param hh The Circle center coord h (i.e. x) 00080 @param kk The Circle center coord k (i.e. y) 00081 @param Rx The Radius in X - May be equal to Ry 00082 @param Ry The Radius in Y - May be equal to Rx 00083 @param Xc The center pixel x 00084 @param Yc The center pixel y 00085 */ 00086 template <class T> 00087 Image<PixRGB<T> > omniCorrectSp(const Image<PixRGB<T> >& src, 00088 const float r, const float hh, 00089 const float kk, const int Rx, const int Ry, 00090 const int Xc, const int Yc); 00091 00092 //! Denebulize a color Image using targeted low pass filtering 00093 /*! @param image a standard Image 00094 @param radius The size of the filter 00095 */ 00096 template <class T> 00097 Image<PixRGB<T> > omniDenebulize(const Image< PixRGB<T> >& src, 00098 const int radius); 00099 00100 //! Denebulize a byte Image using targeted low pass filtering 00101 /*! @param image a standard Image 00102 @param radius The size of the filter 00103 */ 00104 template <class T> 00105 Image<T> omniDenebulize(const Image<T>& image, const int radius); 00106 00107 // ###################################################################### 00108 /* So things look consistent in everyone's emacs... */ 00109 /* Local Variables: */ 00110 /* indent-tabs-mode: nil */ 00111 /* End: */ 00112 00113 #endif // !IMAGE_OMNI_H_DEFINED