00001 #ifndef BP_NOISE_H 00002 #define BP_NOISE_H 00003 /******************************************************************************* 00004 * E.S.O. - VLT project 00005 * 00006 * "@(#) $Id: bp_noise.h,v 1.4 2005/09/06 16:44:36 amodigli Exp $" 00007 * 00008 * who when what 00009 * -------- -------- ---------------------------------------------- 00010 * schreib 06/05/03 created 00011 */ 00012 00013 /************************************************************************ 00014 * bp_noise.h 00015 * routine to search for bad pixels 00016 *---------------------------------------------------------------------- 00017 */ 00018 /* 00019 * header files 00020 */ 00021 00022 #include <cpl.h> 00023 /*---------------------------------------------------------------------------- 00024 * Function ANSI C prototypes 00025 *--------------------------------------------------------------------------*/ 00026 00027 /*---------------------------------------------------------------------------- 00028 Function : badSearch() 00029 In : ini_file: file name of according .ini file 00030 Out : integer (0 if it worked, -1 if it doesn't) 00031 Job : 00032 00033 this function searches for static bad pixels in stacks of flatfield frames, 00034 that means it stacks the flatfield in a data cube and takes the median 00035 along the z-axis to be sure to have no cosmics, then the intensity tilt of 00036 each column is removed. 00037 00038 The standard deviation and mean of the pixel values within a defined 00039 rectangular zone is determined in a way that the extreme low and high 00040 values are cut off. 00041 00042 The next step is to indicate each pixel as bad that has a deviation from 00043 the mean greater than a user defined factor times the standard deviation. 00044 This step can be leaped over if wished. 00045 00046 The next step is to calculate the median of the 8 nearest neighbors for 00047 each pixel and to determine the deviation of each pixel value from this 00048 median. 00049 00050 If this deviation is greater than a defined factor times the standard 00051 deviation the pixel value is replaced by the median. The last step is 00052 repeated to be able to consider also clusters of bad pixels. Then the 00053 resulting image is compared with the input image with the column intensity 00054 tilt removed and each changed pixel is indicated as bad. Finally, a bad 00055 pixel mask is produced that means each good pixel is marked with 1 and 00056 each bad pixel with 0. 00057 00058 ---------------------------------------------------------------------------*/ 00059 int badSearchNoise (const char* plugin_id, cpl_parameterlist* config, 00060 cpl_frameset* set, const char* out_name); 00061 00062 #endif 00063 00064 /*--------------------------------------------------------------------------*/
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001