Main Page | Alphabetical List | Class List | File List | Class Members | File Members

MedianFilter.h

00001 #ifndef MEDIAN_FILTER_H 00002 #define MEDIAN_FILTER_H 00003 00004 #include "SimplePixelImage.h" 00005 00006 //?????????????????????????????????????????????? 00007 //? S'hauria d'afegir un MedianOptions amb les opcions de la mediana. incloent 00008 //? els possibles defines 00009 00010 //************************************************************************************** 00011 //* #DEFINE related with the filtering window size 00012 //************************************************************************************** 00013 #define WINDOW_WIDTH 3 //Size of the median window Window_Width^2 00014 00015 //DATA TYPES 00016 typedef enum _FrameProcessing 00017 { 00018 FRAME_UNCHANGED, //Carry out no changes on frame 00019 FRAME_DARK, //Draw a 0 colour frame 00020 FRAME_SATURATED, //Draw a maxLevel colour frame 00021 FRAME_FILTERED, //Do a kind of median filter on the frame 00022 //************************************************************************ 00023 //* WARNING: When adding terms to the enumeration 00024 //* keep always this item at the end of the enumeration 00025 //************************************************************************ 00026 FRAME_NUMBER 00027 } 00028 FrameProcessing; 00029 00030 //*************************************************************************************** 00031 //* 00032 00033 00034 00035 //FUNCTIONS 00036 00037 //****************************************************************************************** 00038 //* filterMedianSimplePixelImage: Performs the filter median on a SimplePixelImage 00039 //* 00040 //* OUTPUT: The filtered image is stored by each colour in the 00041 //* outputImage SimplePixelImage. 00042 //****************************************************************************************** 00043 void filterMedianSimplePixelImage (SimplePixelImage const &inputImage, 00044 SimplePixelImage &outputImage, 00045 FrameProcessing frame); 00046 00047 void getWindow (PixelPlane const pixel, unsigned char *iWindow, int iCentralRow, int iCentralCol); 00048 void bubbleSort (unsigned char *iVector, int iDimension); 00049 void medianbubbleSort (unsigned char *iVector, int iDimension); 00050 void swap (unsigned char *first, unsigned char *second); 00051 #endif //MEDIAN_FILTER_H

Generated on Wed Jul 14 17:25:04 2004 for Segmentation by doxygen 1.3.7