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_