Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Modules/ImageProcessor/ImageProcessorTools/SUSANEdgeDetectionLite.h

Go to the documentation of this file.
00001 
00002 /** 
00003 * @file SUSANEdgeDetectionLite.h
00004 * Declaration of file SUSANEdgeDetectionLite.
00005 *
00006 * @author <A href=mailto:walter.nistico@uni-dortmund.de>Walter Nistico</A>
00007 */
00008 
00009 #ifndef _SUSANEdgeDetectionLite_h_
00010 #define _SUSANEdgeDetectionLite_h_
00011 
00012 #include "Representations/Perception/Image.h"
00013 #include <math.h>
00014 
00015 /**
00016 * @class SUSANEdgeDetectionLite
00017 *
00018 * This class represents a non-linear image edge detection filter.
00019 * Unlike traditional edge detectors gradient based like Sobel or LoG, this filter doesnt perform a derivative operation on the image, 
00020 * (which is an hi-pass characteristic) thus has a better noise-rejection performance.
00021 * This implementation is dubbed "Lite" as the heaviest passes of the full algorithm (edge direction calculation, non-maxima suppression, binary thinning)
00022 * have been stripped out for performance reasons.
00023 *
00024 * @author <A href=mailto:walter.nistico@uni-dortmund.de>Walter Nistico</A>
00025 */
00026 class SUSANEdgeDetectionLite 
00027 {
00028     
00029 public:
00030   
00031   enum ColorSpectra {componentA=0, componentB, componentC};
00032   enum {GEOMETRIC_THRESHOLD=255*8*3/4};
00033 
00034   /** Constructor */
00035   SUSANEdgeDetectionLite(int edgeThreshold);
00036 
00037   /** Destructor */
00038   ~SUSANEdgeDetectionLite();
00039 
00040   /** 
00041   * Checks if a given point is an edge point.
00042   * @param image The source image
00043   * @param X The X coordinate of the given point
00044   * @param Y The Y coordinate of the given point
00045   * @param channel The chosen color spectrum (Y, U, or V for ex.)
00046   * @return is the point an edge point?
00047   */
00048   bool isEdgePoint(const Image& image, int X, int Y, ColorSpectra channel) const;
00049  
00050 private:
00051 
00052   /**
00053   * A LookUpTable containing a correlation function
00054   */
00055   unsigned char Susan_LUT[255];
00056 
00057   /**
00058   * Initializes the LookUpTable
00059   */
00060   void setupSusanLUT(int threshold);
00061 
00062   /**
00063   * The correlation function, precomputed
00064   */
00065   inline unsigned char correlation(int delta) const
00066   {
00067     return Susan_LUT[(delta>>1)+127];
00068   }
00069 
00070 };
00071 
00072 #endif   //  _SUSANEdgeDetectionLite_h_
00073 
00074 /*
00075 * Change log :
00076 * 
00077 * $Log: SUSANEdgeDetectionLite.h,v $
00078 * Revision 1.2  2004/06/01 13:23:01  nistico
00079 * *** empty log message ***
00080 *
00081 * Revision 1.1.1.1  2004/05/22 17:19:53  cvsadm
00082 * created new repository GT2004_WM
00083 *
00084 * Revision 1.3  2004/03/19 11:04:58  nistico
00085 * Some corrections and restructuring
00086 *
00087 * Revision 1.2  2004/03/11 21:00:39  schmidtb
00088 * removed errors with enums and destructor
00089 *
00090 * Revision 1.1  2004/03/03 13:43:52  nistico
00091 * -Added SUSANEdgeDetectionLite
00092 *
00093 *
00094 *
00095 */

Generated on Thu Sep 23 19:57:29 2004 for GT2004 by doxygen 1.3.6