FastSUSANNoiseReduction Class Reference

#include <FastSUSANNoiseReduction.h>

List of all members.

Public Member Functions

 FastSUSANNoiseReduction (int smoothingThreshold)
 ~FastSUSANNoiseReduction ()
void getFilteredPixel (const Image &source, int posX, int posY, unsigned char &valA, unsigned char &valB, unsigned char &valC) const
void filterPixel (Image &source, int posX, int posY) const
void getFilteredImage (const Image &source, Image &destination) const

Private Member Functions

void setupSusanLUT (int threshold)
char correlation (int delta) const
unsigned char getFilteredPixelSpectrum (const Image &image, int posx, int posy, int spectrum) const

Private Attributes

char Susan_LUT [127]


Detailed Description

This class represents a non-linear image noise-reduction filter. The main feature of S.U.S.A.N. filters is their capability to smooth out the noise while preserving image structures like lines, edges, borders, and so on, hence if the smoothing threshold is set correctly, the resulting image tipically exhibits no blur. This implementation has been significantly modified from the original SUSAN algorithm, in order to reach a vastly reduced computational cost making it suitable for real-time processing, so strictly speaking, this is NOT a SUSAN filter, yet it shares the same basic idea.

Author:
Walter Nistico

Definition at line 26 of file FastSUSANNoiseReduction.h.


Constructor & Destructor Documentation

FastSUSANNoiseReduction::FastSUSANNoiseReduction ( int  smoothingThreshold  ) 

Constructor

Definition at line 44 of file FastSUSANNoiseReduction.cpp.

References setupSusanLUT().

FastSUSANNoiseReduction::~FastSUSANNoiseReduction (  ) 

Destructor

Definition at line 50 of file FastSUSANNoiseReduction.cpp.


Member Function Documentation

char FastSUSANNoiseReduction::correlation ( int  delta  )  const [inline, private]

The correlation function, precomputed

Definition at line 100 of file FastSUSANNoiseReduction.h.

References Susan_LUT.

Referenced by getFilteredPixelSpectrum().

void FastSUSANNoiseReduction::filterPixel ( Image source,
int  posX,
int  posY 
) const [inline]

Filters a chosen pixel of an image, directly modifying it. IMPORTANT NOTE: since it's a filter which makes use of a convolution kernel of size 3x3, always make sure that you don't access the 1 pixel wide border of the image, (so it should always be x>0, x<width-1, y>0, y<width-1) otherwise you'll be accessing memory out of the allocated space, with obvious consequences.

Parameters:
source the source image to be filtered
posX the x coordinate of the chosen pixel
posY the y coordinate of the chosen pixel

Definition at line 67 of file FastSUSANNoiseReduction.h.

References getFilteredPixelSpectrum(), and Image::image.

void FastSUSANNoiseReduction::getFilteredImage ( const Image source,
Image destination 
) const

Filters a whole image. IMPORTANT NOTE: since it's a filter which makes use of a convolution kernel of size 3x3, always make sure that you don't access the 1 pixel wide border of the image, (so it should always be x>0, x<width-1, y>0, y<width-1) otherwise you'll be accessing memory out of the allocated space, with obvious consequences.

Parameters:
source the source image to be filtered
destination the resulting image

Definition at line 24 of file FastSUSANNoiseReduction.cpp.

References Image::cameraInfo, Image::colorTable, Image::frameNumber, getFilteredPixel(), Image::image, CameraInfo::resolutionHeight, and CameraInfo::resolutionWidth.

Referenced by CMessageHandlerForQueueToGUI::handleMessage(), and CMessageHandlerForQueueFromPhysicalRobots::handleMessage().

void FastSUSANNoiseReduction::getFilteredPixel ( const Image source,
int  posX,
int  posY,
unsigned char &  valA,
unsigned char &  valB,
unsigned char &  valC 
) const [inline]

Filters a chosen pixel of an image. IMPORTANT NOTE: since it's a filter which makes use of a convolution kernel of size 3x3, always make sure that you don't access the 1 pixel wide border of the image, (so it should always be x>0, x<width-1, y>0, y<width-1) otherwise you'll be accessing memory out of the allocated space, with obvious consequences.

Parameters:
source the source image to be filtered
posX the x coordinate of the chosen pixel
posY the y coordinate of the chosen pixel
valA the first spectrum (ex. Y (luminance)) of the filtered pixel, returned
valB the second spectrum (ex. U (crominance)) of the filtered pixel, returned
valC the third spectrum (ex. V (crominance)) of the filtered pixel, returned

Definition at line 50 of file FastSUSANNoiseReduction.h.

References getFilteredPixelSpectrum().

Referenced by getFilteredImage().

unsigned char FastSUSANNoiseReduction::getFilteredPixelSpectrum ( const Image image,
int  posx,
int  posy,
int  spectrum 
) const [inline, private]

Filters a single spectrum (ex. Y or U or V) of a chosen pixel of an image. IMPORTANT NOTE: since it's a filter which makes use of a convolution kernel of size 3x3, always make sure that you don't access the 1 pixel wide border of the image, (so it should always be x>0, x<width-1, y>0, y<width-1) otherwise you'll be accessing memory out of the allocated space, with obvious consequences.

Parameters:
image the source image to be filtered
posx the x coordinate of the chosen pixel
posy the y coordinate of the chosen pixel
spectrum the chosen image spectrum
Returns:
the filtered value

Definition at line 117 of file FastSUSANNoiseReduction.h.

References correlation(), and image.

Referenced by filterPixel(), and getFilteredPixel().

void FastSUSANNoiseReduction::setupSusanLUT ( int  threshold  )  [private]

Initializes the LookUpTable

Definition at line 11 of file FastSUSANNoiseReduction.cpp.

References Susan_LUT.

Referenced by FastSUSANNoiseReduction().


Member Data Documentation

char FastSUSANNoiseReduction::Susan_LUT[127] [private]

A LookUpTable containing a correlation function, in this implementation it's a "rect" for efficiency reasons

Definition at line 90 of file FastSUSANNoiseReduction.h.

Referenced by correlation(), and setupSusanLUT().


The documentation for this class was generated from the following files:
Generated on Thu Dec 7 01:31:28 2006 for DT2005.panorama by  doxygen 1.4.7