|
CR2RE Pipeline Reference Manual 1.6.10
|
Algorithms to compute fixed pattern noise on a single image. More...
Functions | |
| cpl_error_code | hdrl_fpn_compute (cpl_image *img_in, const cpl_mask *mask_in, const cpl_size dc_mask_x, const cpl_size dc_mask_y, cpl_image **power_spectrum, double *std, double *std_mad) |
| Algorithms to compute fixed pattern noise on a single image. | |
Algorithms to compute fixed pattern noise on a single image.
The routine in this module can be used to detect fixed pattern noise in an image. The algorithm first computes the power spectrum of the image using the Fast Fourier Transform (FFT) as follows:

Then it computes the standard deviation (std) and the mad-based std of the power_spectrum excluding the masked region. For this the user can provide an optional mask or use the dc_mask_x and dc_mask_y function parameter to create one on the fly. The mask created on the fly will start at pixel (1,1) and extend in both direction up to (dc_mask_x, dc_mask_y).
| cpl_error_code hdrl_fpn_compute | ( | cpl_image * | img_in, |
| const cpl_mask * | mask_in, | ||
| const cpl_size | dc_mask_x, | ||
| const cpl_size | dc_mask_y, | ||
| cpl_image ** | power_spectrum, | ||
| double * | std, | ||
| double * | std_mad | ||
| ) |
Algorithms to compute fixed pattern noise on a single image.
| img_in | input cpl image (bad pixels are not allowed) |
| mask_in | optional input cpl mask applied to the power spectrum (or NULL). |
| dc_mask_x | x-pixel window (>= 1) to discard DC component starting form pixel (1, 1) |
| dc_mask_y | y-pixel window (>= 1) to discard DC component starting from pixel (1, 1) |
| power_spectrum | output power spectrum image with associated mask. |
| std | output standard deviation of the power spectrum |
| std_mad | output standard deviation of the power spectrum based on the MAD |
The function detects fixed pattern noise on the image (img_in). The algorithm first computes the power spectrum (power_spectrum) of the image using the Fast Fourier Transform (FFT) as follows:

Then it computes the standard deviation (std) and the mad-based std (std_mad) of the power_spectrum excluding the masked region. For this the user can provide an optional mask or use the dc_mask_x and dc_mask_y function parameter to create one on the fly. The mask created on the fly will start at pixel (1,1) and extend in both direction up to (dc_mask_x, dc_mask_y).
Possible cpl_error_code_ set in this function:
Definition at line 113 of file hdrl_fpn.c.