35 CR2RES_BPM_UNSPECIFIED,
36 CR2RES_BPM_GLOBAL_STATS,
37 CR2RES_BPM_LOCAL_STATS,
38 CR2RES_BPM_RUNNING_FILTER
41typedef enum _cr2res_bpm_type_ {
42 CR2RES_BPM_DARK = 1 << 0,
43 CR2RES_BPM_FLAT = 1 << 1,
44 CR2RES_BPM_DETLIN = 1 << 2,
45 CR2RES_BPM_OUTOFORDER = 1 << 3,
46 CR2RES_BPM_EDGEPIX = 1 << 4
48#define CR2RES_BPM_ALL CR2RES_BPM_DARK | \
51 CR2RES_BPM_OUTOFORDER | \
54#define CR2RES_NB_BPM_TYPES 5
55#define CR2RES_NB_BPM_EDGEPIX 4
56#define CR2RES_NB_BPM_VIGN_BOTTOM 40
58extern cr2res_bpm_type bpm_types[CR2RES_NB_BPM_TYPES];
66 cr2res_bpm_method method,
73 cr2res_bpm_type type) ;
77 cr2res_bpm_type type) ;
86 const cpl_image * bpm_ima,
87 cr2res_bpm_type bpm_type) ;
94int cr2res_bpm_find_bad_pixels(cpl_image * img,
double sigma,
int size);
96cpl_image * cr2res_bpm_mask_edgepix(cpl_image * bpm);
int cr2res_bpm_add_mask(cpl_image *bpm_ima, cpl_mask *bpm, int bpm_code)
Add a mask to a BPM image with a dedicated code
cpl_image * cr2res_bpm_from_mask(cpl_mask *mask, cr2res_bpm_type type)
Create a BPM from a mask.
int cr2res_bpm_set_and_correct_image(cpl_image *in, const char *bpm, int chip, int correct)
Set the BPM and optionally apply the correction to an image.
cpl_mask * cr2res_bpm_compute(cpl_image *in, cr2res_bpm_method method, double kappa, double lines_ratio, int clean_flag)
The BPM computation with min/max threshold.
int cr2res_bpm_count(cpl_image *bpm, cr2res_bpm_type type)
Count BPM of a given type.
cpl_mask * cr2res_bpm_extract_mask(const cpl_image *bpm_ima, cr2res_bpm_type bpm_type)
Extract a mask from a BPM image.