![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
The detail-mask pixel math: a Scharr-style detail estimate over a raw or scene-referred buffer, and the small blur it is smoothed with. More...
Include dependency graph for masks_detail.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Functions | |
| void | dt_masks_extend_border (float *const mask, const int width, const int height, const int border) |
| void | dt_masks_blur_9x9_coeff (float *coeffs, const float sigma) |
| void | dt_masks_blur_9x9 (float *const src, float *const out, const int width, const int height, const float sigma) |
| void | dt_masks_calc_rawdetail_mask (float *const src, float *const out, float *const tmp, const int width, const int height, const dt_aligned_pixel_t wb) |
| void | dt_masks_calc_detail_mask (float *const src, float *const out, float *const tmp, const int width, const int height, const float threshold, const gboolean detail) |
The detail-mask pixel math: a Scharr-style detail estimate over a raw or scene-referred buffer, and the small blur it is smoothed with.
These five functions were declared in develop/masks.h, and they have nothing to do with the forms model that header describes. They take float buffers, a width, a height and a threshold; no dt_masks_form_t, no group, no GUI, no pipeline. The only thing they ever shared with drawn masks is the word "mask" and the fact that blending consumes both.
Keeping them there had a cost that is easy to miss: iop/detailmask.c and iop/demosaic.c name NOTHING else from masks.h, yet including it handed each of them develop/develop.h, develop/pixelpipe.h, caches/pixelpipe_cache_alloc.h, common/logging.h, system/atomic.h, system/simd.h and common/times.h – and, being a supply line nobody asked for, made those headers impossible to drop later. Part of the masks enclosure, issue #1299.
Implemented in src/develop/masks/detail.c.
Definition in file masks_detail.h.
| void dt_masks_blur_9x9 | ( | float *const | src, |
| float *const | out, | ||
| const int | width, | ||
| const int | height, | ||
| const float | sigma | ||
| ) |
9x9 Gaussian blur of src into out.
Fill coeffs with the 9x9 separable Gaussian weights for sigma.
Definition at line 165 of file detail.c.
References i, k, kernel(), L, and sigma.
Referenced by _refine_with_detail_mask_cl(), dt_masks_blur_9x9(), and dual_demosaic_cl().
| void dt_masks_calc_detail_mask | ( | float *const | src, |
| float *const | out, | ||
| float *const | tmp, | ||
| const int | width, | ||
| const int | height, | ||
| const float | threshold, | ||
| const gboolean | detail | ||
| ) |
Turn a detail estimate into a mask: threshold it, and invert when detail is FALSE so the caller gets the flat regions instead.
| void dt_masks_calc_rawdetail_mask | ( | float *const | src, |
| float *const | out, | ||
| float *const | tmp, | ||
| const int | width, | ||
| const int | height, | ||
| const dt_aligned_pixel_t | wb | ||
| ) |
Detail estimate over a RAW (CFA) buffer: wb carries the white-balance coefficients the estimate has to divide out before it can compare neighbouring photosites.