hdrl_bpm_2d_parameter_create_filtersmooth (double kappa_low, double kappa_high, int maxiter, cpl_filter_mode filter, cpl_border_mode border, int smooth_x, int smooth_y)
Creates BPM_2D Parameters object for HDRL_BPM_2D_FILTERSMOOTH.
hdrl_bpm_2d_parameter_create_legendresmooth (double kappa_low, double kappa_high, int maxiter, int steps_x, int steps_y, int filter_size_x, int filter_size_y, int order_x, int order_y)
Creates BPM_2D Parameters object for HDRL_BPM_2D_LEGENDRESMOOTH.
Detect bad pixels on a single image with an iterative process.
Detailed Description
Algorithms to detect bad pixels on a single image.
The routines in this module can be used to detect bad pixels on a single image. The algorithm first smoothes the image by applying different methods. Then it subtracts the smoothed image and derives bad pixels by thresholding the residual image, i.e. all pixels exceeding the threshold are considered as bad.
Detect bad pixels on a single image with an iterative process.
Parameters
img_in
input hdrl image
params
BPM_2D computation parameters - see below
Returns
Bad pixel mask with the newly found bad pixels
The algorithm first smoothes the image by applying the methods described below. Then it subtracts the smoothed image and derives bad pixels by thresholding the residual image, i.e. all pixels exceeding the threshold are considered as bad. To compute the upper and lower threshold, it measures a robust rms (a properly scaled Median Absolute Deviation), which is then scaled by the parameter kappa_low and kappa_high. Furthermore, the algorithm is applied iteratively controlled by maxiter. During each iteration the newly found bad pixels are ignored. Please note, that the thresholding values are applied as median(residual-image) thresholds. This makes the algorithm more robust in the case that the methods listed below are not able to completely remove the background level, e.g due to an exceeding number of bad pixels in the first iteration.
Two methods are currently available to derive a smoothed version of the image:
Applying a filter like e.g. a median filter to the image. The filtering can be done by all modes currently supported by cpl and is controlled by the filter-type filter, the border-type border and by the kernel size in x and y, i.e. smooth_x and smooth_y. The corresponding BPM_2D parameter is created by hdrl_bpm_2d_parameter_create_filtersmooth()
Fitting a Legendre polynomial to the image of order order_x, in x and order_y in y direction. This method allows you to define steps_xsteps_y sampling points (the latter are computed as the median within a box of filter_size_x and filter_size_y) where the polynomial is fitted. This substantially decreases the fitting time for the Legendre polynomial. The corresponding BPM_2D parameter is created by hdrl_bpm_2d_parameter_create_legendresmooth()