gibias.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef GIBIAS_H
00029 #define GIBIAS_H
00030
00031 #include <cxstring.h>
00032
00033 #include <cpl_macros.h>
00034 #include <cpl_parameterlist.h>
00035 #include <cpl_matrix.h>
00036
00037 #include <giimage.h>
00038
00039
00040 #ifdef __cplusplus
00041 extern "C" {
00042 #endif
00043
00044
00045 enum GiBiasMethod {
00046 GIBIAS_METHOD_UNDEFINED,
00047 GIBIAS_METHOD_UNIFORM,
00048 GIBIAS_METHOD_PLANE,
00049 GIBIAS_METHOD_CURVE,
00050 GIBIAS_METHOD_PROFILE,
00051 GIBIAS_METHOD_MASTER,
00052 GIBIAS_METHOD_ZMASTER
00053 };
00054
00055 typedef enum GiBiasMethod GiBiasMethod;
00056
00057
00058 enum GiBiasOption {
00059 GIBIAS_OPTION_UNDEFINED,
00060 GIBIAS_OPTION_PLANE,
00061 GIBIAS_OPTION_CURVE
00062 };
00063
00064 typedef enum GiBiasOption GiBiasOption;
00065
00066
00067 enum GiBiasModel {
00068 GIBIAS_MODEL_UNDEFINED,
00069 GIBIAS_MODEL_FITTED,
00070 GIBIAS_MODEL_MEAN
00071 };
00072
00073 typedef enum GiBiasModel GiBiasModel;
00074
00075
00076 struct GiBiasConfig {
00077 GiBiasMethod method;
00078 GiBiasModel model;
00079 GiBiasOption option;
00080 cxdouble mbias;
00081 cxint remove;
00082 cxchar* areas;
00083 cxdouble xdeg;
00084 cxdouble ydeg;
00085 cxdouble xstep;
00086 cxdouble ystep;
00087 cxdouble sigma;
00088 cxint iterations;
00089 cxdouble fraction;
00090 };
00091
00092 typedef struct GiBiasConfig GiBiasConfig;
00093
00094
00095
00096
00097
00098
00099 cxint
00100 giraffe_bias_remove(GiImage* result_img, const GiImage* raw_frame,
00101 const GiImage* master_bias, const GiImage* bad_pixels,
00102 const cpl_matrix* biaslimits, const GiBiasConfig* config);
00103
00104
00105
00106
00107
00108
00109 cpl_matrix* giraffe_get_raw_areas(const GiImage* image);
00110 cxint giraffe_trim_raw_areas(GiImage* image);
00111
00112
00113
00114
00115
00116
00117 GiBiasConfig* giraffe_bias_config_create(cpl_parameterlist* list);
00118 void giraffe_bias_config_destroy(GiBiasConfig* config);
00119
00120 void giraffe_bias_config_add(cpl_parameterlist* list);
00121
00122
00123 #ifdef __cplusplus
00124 }
00125 #endif
00126
00127 #endif