CR2RE Pipeline Reference Manual 1.6.2
hdrl_bpm_2d.h
1/*
2 * This file is part of the HDRL
3 * Copyright (C) 2013 European Southern Observatory
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19
20#ifndef HDRL_BPM_2D_H
21#define HDRL_BPM_2D_H
22
23/*-----------------------------------------------------------------------------
24 Includes
25 -----------------------------------------------------------------------------*/
26
27#include <cpl.h>
28#include <stdint.h>
29#include "hdrl_image.h"
30#include "hdrl_imagelist.h"
31
32CPL_BEGIN_DECLS
33
34/*-----------------------------------------------------------------------------
35 Defines
36 -----------------------------------------------------------------------------*/
37
38typedef enum {
39 HDRL_BPM_2D_LEGENDRESMOOTH,
40 HDRL_BPM_2D_FILTERSMOOTH
41} hdrl_bpm_2d_method ;
42
43/*-----------------------------------------------------------------------------
44 Functions prototypes
45 -----------------------------------------------------------------------------*/
46
47/*----------------------------------------------------------------------------
48 BPM_2D Parameters
49 ----------------------------------------------------------------------------*/
50hdrl_parameter * hdrl_bpm_2d_parameter_create_legendresmooth(double, double,
51 int, int, int, int, int, int, int) ;
52hdrl_parameter * hdrl_bpm_2d_parameter_create_filtersmooth(double, double,
53 int, cpl_filter_mode, cpl_border_mode, int, int) ;
54cpl_error_code hdrl_bpm_2d_parameter_verify(const hdrl_parameter *) ;
55cpl_boolean hdrl_bpm_2d_parameter_check(const hdrl_parameter *) ;
56
57/* Accessors */
58cpl_filter_mode hdrl_bpm_2d_parameter_get_filter(const hdrl_parameter *) ;
59cpl_border_mode hdrl_bpm_2d_parameter_get_border(const hdrl_parameter *) ;
60double hdrl_bpm_2d_parameter_get_kappa_low(const hdrl_parameter *) ;
61double hdrl_bpm_2d_parameter_get_kappa_high(const hdrl_parameter *) ;
62int hdrl_bpm_2d_parameter_get_maxiter(const hdrl_parameter *) ;
63int hdrl_bpm_2d_parameter_get_steps_x(const hdrl_parameter *) ;
64int hdrl_bpm_2d_parameter_get_steps_y(const hdrl_parameter *) ;
65int hdrl_bpm_2d_parameter_get_filter_size_x(const hdrl_parameter *) ;
66int hdrl_bpm_2d_parameter_get_filter_size_y(const hdrl_parameter *) ;
67int hdrl_bpm_2d_parameter_get_order_x(const hdrl_parameter *) ;
68int hdrl_bpm_2d_parameter_get_order_y(const hdrl_parameter *) ;
69int hdrl_bpm_2d_parameter_get_smooth_x(const hdrl_parameter *) ;
70int hdrl_bpm_2d_parameter_get_smooth_y(const hdrl_parameter *) ;
71hdrl_bpm_2d_method hdrl_bpm_2d_parameter_get_method(const hdrl_parameter *) ;
72
73/* Parameter Lists */
74cpl_parameterlist * hdrl_bpm_2d_parameter_create_parlist(
75 const char * base_context,
76 const char * prefix,
77 const char * method_def,
78 const hdrl_parameter * filtersmooth_def,
79 const hdrl_parameter * legendresmooth_def);
80hdrl_parameter * hdrl_bpm_2d_parameter_parse_parlist(const cpl_parameterlist *,
81 const char *) ;
82
83/*----------------------------------------------------------------------------
84 BPM_2D Computation
85 ----------------------------------------------------------------------------*/
86
87cpl_mask * hdrl_bpm_2d_compute(
88 const hdrl_image * img_in,
89 const hdrl_parameter * params) ;
90
91/*-----------------------------------------------------------------------------
92 Private declarations - must not be used outside of hdrl
93 -----------------------------------------------------------------------------*/
94
95#ifdef HDRL_USE_PRIVATE
96
97#endif
98
99CPL_END_DECLS
100
101#endif
cpl_mask * hdrl_bpm_2d_compute(const hdrl_image *img_in, const hdrl_parameter *params)
Detect bad pixels on a single image with an iterative process.
Definition: hdrl_bpm_2d.c:1136
hdrl_bpm_2d_method hdrl_bpm_2d_parameter_get_method(const hdrl_parameter *)
Access the method in the BPM_2D parameter.
Definition: hdrl_bpm_2d.c:495
double hdrl_bpm_2d_parameter_get_kappa_high(const hdrl_parameter *)
Access the kappa_high in the BPM_2D parameter.
Definition: hdrl_bpm_2d.c:355
int hdrl_bpm_2d_parameter_get_maxiter(const hdrl_parameter *)
Access the maxiter in the BPM_2D parameter.
Definition: hdrl_bpm_2d.c:369
cpl_border_mode hdrl_bpm_2d_parameter_get_border(const hdrl_parameter *)
Access the border in the BPM_2D parameter.
Definition: hdrl_bpm_2d.c:327
int hdrl_bpm_2d_parameter_get_filter_size_y(const hdrl_parameter *)
Access the filter_size_y in the BPM_2D parameter.
Definition: hdrl_bpm_2d.c:425
int hdrl_bpm_2d_parameter_get_smooth_y(const hdrl_parameter *)
Access the smooth_y in the BPM_2D parameter.
Definition: hdrl_bpm_2d.c:467
int hdrl_bpm_2d_parameter_get_order_y(const hdrl_parameter *)
Access the order_y in the BPM_2D parameter.
Definition: hdrl_bpm_2d.c:453
hdrl_parameter * hdrl_bpm_2d_parameter_parse_parlist(const cpl_parameterlist *, const char *)
Parse parameter list to create input parameters for the BPM_2D.
Definition: hdrl_bpm_2d.c:896
int hdrl_bpm_2d_parameter_get_filter_size_x(const hdrl_parameter *)
Access the filter_size_x in the BPM_2D parameter.
Definition: hdrl_bpm_2d.c:411
hdrl_parameter * hdrl_bpm_2d_parameter_create_filtersmooth(double, double, int, cpl_filter_mode, cpl_border_mode, int, int)
Creates BPM_2D Parameters object for HDRL_BPM_2D_FILTERSMOOTH.
Definition: hdrl_bpm_2d.c:137
int hdrl_bpm_2d_parameter_get_smooth_x(const hdrl_parameter *)
Access the smooth_x in the BPM_2D parameter.
Definition: hdrl_bpm_2d.c:481
int hdrl_bpm_2d_parameter_get_steps_x(const hdrl_parameter *)
Access the steps_x in the BPM_2D parameter.
Definition: hdrl_bpm_2d.c:383
cpl_filter_mode hdrl_bpm_2d_parameter_get_filter(const hdrl_parameter *)
Access the filter in the BPM_2D parameter.
Definition: hdrl_bpm_2d.c:313
cpl_error_code hdrl_bpm_2d_parameter_verify(const hdrl_parameter *)
Verify basic correctness of the BPM_2D parameters.
Definition: hdrl_bpm_2d.c:232
cpl_parameterlist * hdrl_bpm_2d_parameter_create_parlist(const char *base_context, const char *prefix, const char *method_def, const hdrl_parameter *filtersmooth_def, const hdrl_parameter *legendresmooth_def)
Create parameter list for the BPM_2D computation.
Definition: hdrl_bpm_2d.c:798
int hdrl_bpm_2d_parameter_get_order_x(const hdrl_parameter *)
Access the order_x in the BPM_2D parameter.
Definition: hdrl_bpm_2d.c:439
int hdrl_bpm_2d_parameter_get_steps_y(const hdrl_parameter *)
Access the steps_y in the BPM_2D parameter.
Definition: hdrl_bpm_2d.c:397
hdrl_parameter * hdrl_bpm_2d_parameter_create_legendresmooth(double, double, int, int, int, int, int, int, int)
Creates BPM_2D Parameters object for HDRL_BPM_2D_LEGENDRESMOOTH.
Definition: hdrl_bpm_2d.c:191
cpl_boolean hdrl_bpm_2d_parameter_check(const hdrl_parameter *)
Check that the parameter is a BPM_2D parameter.
Definition: hdrl_bpm_2d.c:301
double hdrl_bpm_2d_parameter_get_kappa_low(const hdrl_parameter *)
Access the kappa_low in the BPM_2D parameter.
Definition: hdrl_bpm_2d.c:341