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

Modules/ImageProcessor/ImageProcessorTools/FastSUSANNoiseReduction.cpp

Go to the documentation of this file.
00001 
00002 /** 
00003 * @file FastSUSANNoiseReduction.cpp
00004 * Implementation of class FastSUSANNoiseReduction.
00005 *
00006 * @author <A href=mailto:walter.nistico@uni-dortmund.de>Walter Nistico</A>
00007 */
00008 
00009 #include "FastSUSANNoiseReduction.h"
00010 
00011 void FastSUSANNoiseReduction::setupSusanLUT(int threshold)
00012 {
00013   int k;
00014   for (k=0; k<(threshold>>2); k++){
00015     Susan_LUT[63+k] = -1;
00016     Susan_LUT[63-k] = -1;
00017   }
00018   for (k=(threshold>>2); k<64; k++){
00019     Susan_LUT[63+k] = 0;
00020     Susan_LUT[63-k] = 0;
00021   }
00022 }
00023 
00024 void FastSUSANNoiseReduction::getFilteredImage(const Image& source, Image& destination) const
00025 {
00026   destination.cameraInfo = source.cameraInfo;
00027   destination.colorTable = source.colorTable;
00028   destination.frameNumber = source.frameNumber;
00029   int width = source.cameraInfo.resolutionWidth;
00030   int height = source.cameraInfo.resolutionHeight;
00031   unsigned char A, B, C;
00032   for (int x=1; x<width-1; x++)
00033     for (int y=1; y<height-1; y++)
00034       {
00035         getFilteredPixel(source, x, y, A, B, C);
00036         destination.image[y][0][x] = A;
00037         destination.image[y][1][x] = B;
00038         destination.image[y][2][x] = C;
00039       }
00040 }
00041 
00042 
00043 /** Constructor */
00044 FastSUSANNoiseReduction::FastSUSANNoiseReduction(const int smoothingThreshold)
00045 {
00046   setupSusanLUT(smoothingThreshold);
00047 }
00048 
00049 /** Destructor */
00050 FastSUSANNoiseReduction::~FastSUSANNoiseReduction()
00051 {
00052 }

Generated on Mon Mar 20 21:59:49 2006 for GT2005 by doxygen 1.3.6