Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
colorchecker.c File Reference
#include "bauhaus/bauhaus.h"
#include "common/colorspaces_inline_conversions.h"
#include "common/math.h"
#include "common/opencl.h"
#include "common/exif.h"
#include "control/control.h"
#include "develop/develop.h"
#include "develop/imageop.h"
#include "develop/imageop_math.h"
#include "develop/openmp_maths.h"
#include "develop/tiling.h"
#include "dtgtk/drawingarea.h"
#include "gui/gtk.h"
#include "gui/presets.h"
#include "iop/iop_api.h"
#include "iop/gaussian_elimination.h"
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include <gtk/gtk.h>
#include <inttypes.h>
+ Include dependency graph for colorchecker.c:

Data Structures

struct  dt_iop_colorchecker_params_t
 
struct  dt_iop_colorchecker_gui_data_t
 
struct  dt_iop_colorchecker_data_t
 
struct  dt_iop_colorchecker_global_data_t
 

Macros

#define MAX_PATCHES   49
 

Typedefs

typedef struct dt_iop_colorchecker_params_t dt_iop_colorchecker_params_t
 
typedef struct dt_iop_colorchecker_gui_data_t dt_iop_colorchecker_gui_data_t
 
typedef struct dt_iop_colorchecker_data_t dt_iop_colorchecker_data_t
 
typedef struct dt_iop_colorchecker_global_data_t dt_iop_colorchecker_global_data_t
 

Functions

const char * name ()
 
const char * aliases ()
 
const char ** description (struct dt_iop_module_t *self)
 
int default_group ()
 
int flags ()
 
int default_colorspace (dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece)
 
int legacy_params (dt_iop_module_t *self, const void *const old_params, const int old_version, void *new_params, const int new_version)
 
void init_presets (dt_iop_module_so_t *self)
 
static float kernel (const float *x, const float *y)
 
void process (struct dt_iop_module_t *self, dt_dev_pixelpipe_iop_t *piece, const void *const ivoid, void *const ovoid, const dt_iop_roi_t *const roi_in, const dt_iop_roi_t *const roi_out)
 
void commit_params (struct dt_iop_module_t *self, dt_iop_params_t *p1, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece)
 
void init_pipe (struct dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece)
 
void cleanup_pipe (struct dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece)
 
void gui_reset (struct dt_iop_module_t *self)
 
void _colorchecker_rebuild_patch_list (struct dt_iop_module_t *self)
 
void _colorchecker_update_sliders (struct dt_iop_module_t *self)
 
void gui_update (struct dt_iop_module_t *self)
 
void init (dt_iop_module_t *module)
 
void init_global (dt_iop_module_so_t *module)
 
void cleanup_global (dt_iop_module_so_t *module)
 
void color_picker_apply (dt_iop_module_t *self, GtkWidget *picker, dt_dev_pixelpipe_iop_t *piece)
 
static void target_L_callback (GtkWidget *slider, gpointer user_data)
 
static void target_a_callback (GtkWidget *slider, gpointer user_data)
 
static void target_b_callback (GtkWidget *slider, gpointer user_data)
 
static void target_C_callback (GtkWidget *slider, gpointer user_data)
 
static void target_callback (GtkWidget *combo, gpointer user_data)
 
static void patch_callback (GtkWidget *combo, gpointer user_data)
 
static gboolean checker_draw (GtkWidget *widget, cairo_t *crf, gpointer user_data)
 
static gboolean checker_motion_notify (GtkWidget *widget, GdkEventMotion *event, gpointer user_data)
 
static gboolean checker_button_press (GtkWidget *widget, GdkEventButton *event, gpointer user_data)
 
static gboolean checker_leave_notify (GtkWidget *widget, GdkEventCrossing *event, gpointer user_data)
 
void gui_init (struct dt_iop_module_t *self)
 

Variables

static const int colorchecker_patches = 24
 
static const float colorchecker_Lab []
 

Macro Definition Documentation

◆ MAX_PATCHES

#define MAX_PATCHES   49

Typedef Documentation

◆ dt_iop_colorchecker_data_t

◆ dt_iop_colorchecker_global_data_t

◆ dt_iop_colorchecker_gui_data_t

◆ dt_iop_colorchecker_params_t

Function Documentation

◆ _colorchecker_rebuild_patch_list()

◆ _colorchecker_update_sliders()

◆ aliases()

const char * aliases ( )

◆ checker_button_press()

◆ checker_draw()

static gboolean checker_draw ( GtkWidget *  widget,
cairo_t *  crf,
gpointer  user_data 
)
static

◆ checker_leave_notify()

static gboolean checker_leave_notify ( GtkWidget *  widget,
GdkEventCrossing *  event,
gpointer  user_data 
)
static

References FALSE.

Referenced by gui_init().

◆ checker_motion_notify()

static gboolean checker_motion_notify ( GtkWidget *  widget,
GdkEventMotion *  event,
gpointer  user_data 
)
static

◆ cleanup_global()

◆ cleanup_pipe()

void cleanup_pipe ( struct dt_iop_module_t self,
dt_dev_pixelpipe_t pipe,
dt_dev_pixelpipe_iop_t piece 
)

◆ color_picker_apply()

◆ commit_params()

◆ default_colorspace()

int default_colorspace ( dt_iop_module_t self,
dt_dev_pixelpipe_t pipe,
dt_dev_pixelpipe_iop_t piece 
)

References IOP_CS_LAB.

◆ default_group()

int default_group ( )

References IOP_GROUP_COLOR.

◆ description()

const char ** description ( struct dt_iop_module_t self)

◆ flags()

int flags ( )

◆ gui_init()

◆ gui_reset()

void gui_reset ( struct dt_iop_module_t self)

◆ gui_update()

◆ init()

◆ init_global()

◆ init_pipe()

◆ init_presets()

void init_presets ( dt_iop_module_so_t self)

The following are based on Jo's Fuji film emulations, without tonecurve which is let to user choice https://jo.dreggn.org/blog/ansel-fuji-styles.tar.xz

References DEVELOP_BLEND_CS_RGB_DISPLAY, dt_exif_xmp_decode(), dt_gui_presets_add_generic(), and dt_iop_module_so_t::op.

◆ kernel()

◆ legacy_params()

◆ name()

const char * name ( )

◆ patch_callback()

static void patch_callback ( GtkWidget *  combo,
gpointer  user_data 
)
static

◆ process()

◆ target_a_callback()

static void target_a_callback ( GtkWidget *  slider,
gpointer  user_data 
)
static

◆ target_b_callback()

static void target_b_callback ( GtkWidget *  slider,
gpointer  user_data 
)
static

◆ target_C_callback()

static void target_C_callback ( GtkWidget *  slider,
gpointer  user_data 
)
static

◆ target_callback()

static void target_callback ( GtkWidget *  combo,
gpointer  user_data 
)
static

◆ target_L_callback()

static void target_L_callback ( GtkWidget *  slider,
gpointer  user_data 
)
static

Variable Documentation

◆ colorchecker_Lab

const float colorchecker_Lab[]
static
Initial value:
=
{
37.99, 13.56, 14.06,
65.71, 18.13, 17.81,
49.93, -4.88, -21.93,
43.14, -13.10, 21.91,
55.11, 8.84, -25.40,
70.72, -33.40, -0.20 ,
62.66, 36.07, 57.10,
40.02, 10.41, -45.96,
51.12, 48.24, 16.25,
30.33, 22.98, -21.59,
72.53, -23.71, 57.26,
71.94, 19.36 , 67.86,
28.78, 14.18 , -50.30,
55.26, -38.34, 31.37,
42.10, 53.38 , 28.19,
81.73, 4.04 , 79.82,
51.94, 49.99 , -14.57,
51.04, -28.63, -28.64,
96.54, -0.43 , 1.19 ,
81.26, -0.64 , -0.34 ,
66.77, -0.73 , -0.50 ,
50.87, -0.15 , -0.27 ,
35.66, -0.42 , -1.23 ,
20.46, -0.08 , -0.97
}

Referenced by add_hdr_patches(), add_patches_to_array(), init(), main_csv(), process_button_clicked_callback(), and process_data().

◆ colorchecker_patches

const int colorchecker_patches = 24
static

Referenced by init().