Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
ashift.c File Reference
#include "bauhaus/bauhaus.h"
#include "common/bilateral.h"
#include "common/colorspaces_inline_conversions.h"
#include "common/debug.h"
#include "common/image.h"
#include "common/imagebuf.h"
#include "common/interpolation.h"
#include "common/math.h"
#include "common/opencl.h"
#include "control/control.h"
#include "develop/develop.h"
#include "develop/imageop.h"
#include "develop/imageop_gui.h"
#include "develop/tiling.h"
#include "dtgtk/button.h"
#include "dtgtk/expander.h"
#include "dtgtk/resetlabel.h"
#include "gui/draw.h"
#include "gui/gtk.h"
#include "gui/presets.h"
#include "iop/iop_api.h"
#include "gui/guides.h"
#include <assert.h>
#include <gtk/gtk.h>
#include <inttypes.h>
#include <stdlib.h>
#include <string.h>
#include "ashift_lsd.c"
#include "ashift_nmsimplex.c"
+ Include dependency graph for ashift.c:

Go to the source code of this file.

Data Structures

struct  dt_iop_ashift_params1_t
 
struct  dt_iop_ashift_params2_t
 
struct  dt_iop_ashift_params3_t
 
struct  dt_iop_ashift_params4_t
 
struct  dt_iop_ashift_params_t
 
struct  dt_iop_ashift_line_t
 
struct  dt_iop_ashift_points_idx_t
 
struct  dt_iop_ashift_fit_params_t
 
struct  dt_iop_ashift_cropfit_params_t
 
struct  dt_iop_ashift_gui_data_t
 
struct  dt_iop_ashift_data_t
 
struct  dt_iop_ashift_global_data_t
 

Macros

#define ROTATION_RANGE   10
 
#define ROTATION_RANGE_SOFT   180
 
#define LENSSHIFT_RANGE   1.0
 
#define LENSSHIFT_RANGE_SOFT   2.0
 
#define SHEAR_RANGE   0.2
 
#define SHEAR_RANGE_SOFT   0.5
 
#define MIN_LINE_LENGTH   5
 
#define MAX_TANGENTIAL_DEVIATION   30
 
#define LSD_SCALE   0.99
 
#define LSD_SIGMA_SCALE   0.6
 
#define LSD_QUANT   2.0
 
#define LSD_ANG_TH   22.5
 
#define LSD_LOG_EPS   0.0
 
#define LSD_DENSITY_TH   0.7
 
#define LSD_N_BINS   1024
 
#define LSD_GAMMA   0.45
 
#define RANSAC_RUNS   400
 
#define RANSAC_EPSILON   2
 
#define RANSAC_EPSILON_STEP   1
 
#define RANSAC_ELIMINATION_RATIO   60
 
#define RANSAC_OPTIMIZATION_STEPS   5
 
#define RANSAC_OPTIMIZATION_DRY_RUNS   50
 
#define RANSAC_HURDLE   5
 
#define MINIMUM_FITLINES   2
 
#define NMS_EPSILON   1e-3
 
#define NMS_SCALE   1.0
 
#define NMS_ITERATIONS   400
 
#define NMS_CROP_EPSILON   100.0
 
#define NMS_CROP_SCALE   0.5
 
#define NMS_CROP_ITERATIONS   100
 
#define NMS_ALPHA   1.0
 
#define NMS_BETA   0.5
 
#define NMS_GAMMA   2.0
 
#define DEFAULT_F_LENGTH   28.0
 
#define SQR(a)   ((a) * (a))
 
#define MAX_SAVED_LINES   50
 
#define MAT3SWAP(a, b)   { float (*tmp)[3] = (a); (a) = (b); (b) = tmp; }
 

Typedefs

typedef enum dt_iop_ashift_method_t dt_iop_ashift_method_t
 
typedef enum dt_iop_ashift_homodir_t dt_iop_ashift_homodir_t
 
typedef enum dt_iop_ashift_linetype_t dt_iop_ashift_linetype_t
 
typedef enum dt_iop_ashift_fitting_t dt_iop_ashift_fitting_t
 
typedef enum dt_iop_ashift_linecolor_t dt_iop_ashift_linecolor_t
 
typedef enum dt_iop_ashift_fitaxis_t dt_iop_ashift_fitaxis_t
 
typedef enum dt_iop_ashift_nmsresult_t dt_iop_ashift_nmsresult_t
 
typedef enum dt_iop_ashift_enhance_t dt_iop_ashift_enhance_t
 
typedef enum dt_iop_ashift_mode_t dt_iop_ashift_mode_t
 
typedef enum dt_iop_ashift_crop_t dt_iop_ashift_crop_t
 
typedef enum dt_iop_ashift_bounding_t dt_iop_ashift_bounding_t
 
typedef enum dt_iop_ashift_jobcode_t dt_iop_ashift_jobcode_t
 
typedef struct dt_iop_ashift_params1_t dt_iop_ashift_params1_t
 
typedef struct dt_iop_ashift_params2_t dt_iop_ashift_params2_t
 
typedef struct dt_iop_ashift_params3_t dt_iop_ashift_params3_t
 
typedef struct dt_iop_ashift_params4_t dt_iop_ashift_params4_t
 
typedef struct dt_iop_ashift_params_t dt_iop_ashift_params_t
 
typedef struct dt_iop_ashift_line_t dt_iop_ashift_line_t
 
typedef struct dt_iop_ashift_points_idx_t dt_iop_ashift_points_idx_t
 
typedef struct dt_iop_ashift_fit_params_t dt_iop_ashift_fit_params_t
 
typedef struct dt_iop_ashift_cropfit_params_t dt_iop_ashift_cropfit_params_t
 
typedef struct dt_iop_ashift_gui_data_t dt_iop_ashift_gui_data_t
 
typedef struct dt_iop_ashift_data_t dt_iop_ashift_data_t
 
typedef struct dt_iop_ashift_global_data_t dt_iop_ashift_global_data_t
 

Enumerations

enum  dt_iop_ashift_method_t {
  ASHIFT_METHOD_NONE = 0 ,
  ASHIFT_METHOD_AUTO ,
  ASHIFT_METHOD_QUAD ,
  ASHIFT_METHOD_LINES
}
 
enum  dt_iop_ashift_homodir_t {
  ASHIFT_HOMOGRAPH_FORWARD ,
  ASHIFT_HOMOGRAPH_INVERTED
}
 
enum  dt_iop_ashift_linetype_t {
  ASHIFT_LINE_IRRELEVANT = 0 ,
  ASHIFT_LINE_RELEVANT = 1 << 0 ,
  ASHIFT_LINE_DIRVERT = 1 << 1 ,
  ASHIFT_LINE_SELECTED = 1 << 2 ,
  ASHIFT_LINE_VERTICAL_NOT_SELECTED = ASHIFT_LINE_RELEVANT | ASHIFT_LINE_DIRVERT ,
  ASHIFT_LINE_HORIZONTAL_NOT_SELECTED = ASHIFT_LINE_RELEVANT ,
  ASHIFT_LINE_VERTICAL_SELECTED = ASHIFT_LINE_RELEVANT | ASHIFT_LINE_DIRVERT | ASHIFT_LINE_SELECTED ,
  ASHIFT_LINE_HORIZONTAL_SELECTED = ASHIFT_LINE_RELEVANT | ASHIFT_LINE_SELECTED ,
  ASHIFT_LINE_MASK = ASHIFT_LINE_RELEVANT | ASHIFT_LINE_DIRVERT | ASHIFT_LINE_SELECTED
}
 
enum  dt_iop_ashift_fitting_t {
  ASHIFT_FITTING_ALL = 0 ,
  ASHIFT_FITTING_LENS_ROTATION = 1 ,
  ASHIFT_FITTING_ROTATION = 2 ,
  ASHIFT_FITTING_LENS = 3
}
 
enum  dt_iop_ashift_linecolor_t {
  ASHIFT_LINECOLOR_GREY = 0 ,
  ASHIFT_LINECOLOR_GREEN = 1 ,
  ASHIFT_LINECOLOR_RED = 2 ,
  ASHIFT_LINECOLOR_BLUE = 3 ,
  ASHIFT_LINECOLOR_YELLOW = 4
}
 
enum  dt_iop_ashift_fitaxis_t {
  ASHIFT_FIT_NONE = 0 ,
  ASHIFT_FIT_ROTATION = 1 << 0 ,
  ASHIFT_FIT_LENS_VERT = 1 << 1 ,
  ASHIFT_FIT_LENS_HOR = 1 << 2 ,
  ASHIFT_FIT_SHEAR = 1 << 3 ,
  ASHIFT_FIT_LINES_VERT = 1 << 4 ,
  ASHIFT_FIT_LINES_HOR = 1 << 5 ,
  ASHIFT_FIT_LENS_BOTH = ASHIFT_FIT_LENS_VERT | ASHIFT_FIT_LENS_HOR ,
  ASHIFT_FIT_LINES_BOTH = ASHIFT_FIT_LINES_VERT | ASHIFT_FIT_LINES_HOR ,
  ASHIFT_FIT_VERTICALLY = ASHIFT_FIT_ROTATION | ASHIFT_FIT_LENS_VERT | ASHIFT_FIT_LINES_VERT ,
  ASHIFT_FIT_HORIZONTALLY = ASHIFT_FIT_ROTATION | ASHIFT_FIT_LENS_HOR | ASHIFT_FIT_LINES_HOR ,
  ASHIFT_FIT_BOTH ,
  ASHIFT_FIT_VERTICALLY_NO_ROTATION = ASHIFT_FIT_LENS_VERT | ASHIFT_FIT_LINES_VERT ,
  ASHIFT_FIT_HORIZONTALLY_NO_ROTATION = ASHIFT_FIT_LENS_HOR | ASHIFT_FIT_LINES_HOR ,
  ASHIFT_FIT_BOTH_NO_ROTATION ,
  ASHIFT_FIT_BOTH_SHEAR ,
  ASHIFT_FIT_ROTATION_VERTICAL_LINES = ASHIFT_FIT_ROTATION | ASHIFT_FIT_LINES_VERT ,
  ASHIFT_FIT_ROTATION_HORIZONTAL_LINES = ASHIFT_FIT_ROTATION | ASHIFT_FIT_LINES_HOR ,
  ASHIFT_FIT_ROTATION_BOTH_LINES = ASHIFT_FIT_ROTATION | ASHIFT_FIT_LINES_VERT | ASHIFT_FIT_LINES_HOR ,
  ASHIFT_FIT_FLIP = ASHIFT_FIT_LENS_VERT | ASHIFT_FIT_LENS_HOR | ASHIFT_FIT_LINES_VERT | ASHIFT_FIT_LINES_HOR
}
 
enum  dt_iop_ashift_nmsresult_t {
  NMS_SUCCESS = 0 ,
  NMS_NOT_ENOUGH_LINES = 1 ,
  NMS_DID_NOT_CONVERGE = 2 ,
  NMS_INSANE = 3
}
 
enum  dt_iop_ashift_enhance_t {
  ASHIFT_ENHANCE_NONE = 0 ,
  ASHIFT_ENHANCE_EDGES = 1 << 0 ,
  ASHIFT_ENHANCE_DETAIL = 1 << 1 ,
  ASHIFT_ENHANCE_HORIZONTAL = 0x100 ,
  ASHIFT_ENHANCE_VERTICAL = 0x200
}
 
enum  dt_iop_ashift_mode_t {
  ASHIFT_MODE_GENERIC = 0 ,
  ASHIFT_MODE_SPECIFIC = 1
}
 
enum  dt_iop_ashift_crop_t {
  ASHIFT_CROP_OFF = 0 ,
  ASHIFT_CROP_LARGEST = 1 ,
  ASHIFT_CROP_ASPECT = 2
}
 
enum  dt_iop_ashift_bounding_t {
  ASHIFT_BOUNDING_OFF = 0 ,
  ASHIFT_BOUNDING_SELECT = 1 ,
  ASHIFT_BOUNDING_DESELECT = 2
}
 
enum  dt_iop_ashift_jobcode_t {
  ASHIFT_JOBCODE_NONE = 0 ,
  ASHIFT_JOBCODE_GET_STRUCTURE = 1 ,
  ASHIFT_JOBCODE_FIT = 2 ,
  ASHIFT_JOBCODE_GET_STRUCTURE_LINES = 3 ,
  ASHIFT_JOBCODE_GET_STRUCTURE_QUAD = 4
}
 

Functions

const char * name ()
 
const char * aliases ()
 
const char ** description (struct dt_iop_module_t *self)
 
int flags ()
 
int default_group ()
 
int operation_tags ()
 
int operation_tags_filter ()
 
int default_colorspace (dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, const 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)
 
dt_iop_ashift_params_t_get_ashift_params (dt_iop_module_t *self)
 
static void vec3prodn (float *dst, const float *const v1, const float *const v2)
 
static void vec3norm (float *dst, const float *const v)
 
static void vec3lnorm (float *dst, const float *const v)
 
static float vec3scalar (const float *const v1, const float *const v2)
 
static int vec3isnull (const float *const v)
 
static void _clear_crop_box (dt_iop_ashift_params_t *p)
 Reset the active crop rectangle to the complete transformed image.
 
static __DT_CLONE_TARGETS__ void homography (float *homograph, const float angle, const float shift_v, const float shift_h, const float shear, const float f_length_kb, const float orthocorr, const float aspect, const int width, const int height, dt_iop_ashift_homodir_t dir)
 
static int isneutral (const dt_iop_ashift_data_t *data)
 
int distort_transform (dt_iop_module_t *self, const dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece, float *const restrict points, size_t points_count)
 
int distort_backtransform (dt_iop_module_t *self, const dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece, float *points, size_t points_count)
 
void distort_mask (struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe, struct dt_dev_pixelpipe_iop_t *piece, const float *const in, float *const out, const dt_iop_roi_t *const roi_in, const dt_iop_roi_t *const roi_out)
 
void modify_roi_out (struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe, struct dt_dev_pixelpipe_iop_t *piece, dt_iop_roi_t *roi_out, const dt_iop_roi_t *roi_in)
 
void modify_roi_in (struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe, struct dt_dev_pixelpipe_iop_t *piece, const dt_iop_roi_t *const roi_out, dt_iop_roi_t *roi_in)
 
static void rgb2grey256 (const float *const in, double *const out, const int width, const int height)
 
static void edge_enhance_1d (const double *in, double *out, const int width, const int height, dt_iop_ashift_enhance_t dir)
 
static int edge_enhance (const double *in, double *out, const int width, const int height)
 
static void XYZ_to_sRGB (const dt_aligned_pixel_t XYZ, dt_aligned_pixel_t sRGB)
 
static void sRGB_to_XYZ (const dt_aligned_pixel_t sRGB, dt_aligned_pixel_t XYZ)
 
static int detail_enhance (const float *const in, float *const out, const int width, const int height)
 
static void gamma_correct (const float *const in, float *const out, const int width, const int height)
 
static int line_detect (float *in, const int width, const int height, const int x_off, const int y_off, const float scale, dt_iop_ashift_line_t **alines, int *lcount, int *vcount, int *hcount, float *vweight, float *hweight, dt_iop_ashift_enhance_t enhance, const int is_raw)
 
static int _get_structure (dt_iop_module_t *module, dt_iop_ashift_enhance_t enhance)
 
static void swap (int *a, int *b)
 
static int quickperm (int *a, int *p, const int N, int *i)
 
static void shuffle (int *a, const int N)
 
static int fact (const int n)
 
static void ransac (const dt_iop_ashift_line_t *lines, int *index_set, int *inout_set, const int set_count, const float total_weight, const int xmin, const int xmax, const int ymin, const int ymax)
 
static int _remove_outliers (dt_iop_module_t *module)
 
static double logit (double x, double min, double max)
 
static double ilogit (double L, double min, double max)
 
static double model_fitness (double *params, void *data)
 
static dt_iop_ashift_nmsresult_t nmsfit (dt_iop_module_t *module, dt_iop_ashift_params_t *p, dt_iop_ashift_fitaxis_t dir)
 
static void crop_constraint (double *params, int pcount)
 
static double crop_fitness (double *params, void *data)
 
static void do_crop (dt_iop_module_t *self, dt_iop_ashift_params_t *p)
 
static void _draw_retrieve_line_type (dt_iop_ashift_line_t *line)
 
static void _draw_basic_line (dt_iop_ashift_line_t *line, float x1, float y1, float x2, float y2, dt_iop_ashift_linetype_t type)
 
static void _gui_update_structure_states (dt_iop_module_t *self, gboolean enable)
 
static void _draw_save_lines_to_params (dt_iop_module_t *self)
 
static gboolean _draw_retrieve_lines_from_params (dt_iop_module_t *self, dt_iop_ashift_method_t method)
 
static int _do_clean_structure (dt_iop_module_t *module, dt_iop_ashift_params_t *p, gboolean save_drawn)
 
static int _do_get_structure_auto (dt_iop_module_t *self, dt_iop_ashift_params_t *p, dt_iop_ashift_enhance_t enhance)
 
static void _do_get_structure_lines (dt_iop_module_t *self)
 
static void _do_get_structure_quad (dt_iop_module_t *self)
 
static void do_fit (dt_iop_module_t *module, dt_iop_ashift_params_t *p, dt_iop_ashift_fitaxis_t dir)
 
__DT_CLONE_TARGETS__ int process (struct dt_iop_module_t *self, const dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece, const void *const ivoid, void *const ovoid)
 
int process_cl (struct dt_iop_module_t *self, const dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece, cl_mem dev_in, cl_mem dev_out)
 
static void _get_near (const float *points, dt_iop_ashift_points_idx_t *points_idx, const int lines_count, float pzx, float pzy, float delta, gboolean multiple)
 
static void _get_bounded_inside (const float *points, dt_iop_ashift_points_idx_t *points_idx, const int points_lines_count, float pzx, float pzy, float pzx2, float pzy2, dt_iop_ashift_bounding_t mode)
 
static uint64_t _get_lines_hash (const dt_iop_ashift_line_t *lines, const int lines_count)
 
static int update_colors (struct dt_iop_module_t *self, dt_iop_ashift_points_idx_t *points_idx, int points_lines_count)
 
static int get_points (struct dt_iop_module_t *self, const dt_iop_ashift_line_t *lines, const int lines_count, const int lines_version, float **points, float **extremas, dt_iop_ashift_points_idx_t **points_idx, int *points_lines_count, float scale)
 
static int call_distort_transform (dt_dev_pixelpipe_t *pipe, struct dt_iop_module_t *self, float *points, size_t points_count)
 
void gui_post_expose (struct dt_iop_module_t *self, cairo_t *cr, int32_t width, int32_t height, int32_t pointerx, int32_t pointery)
 
static void _update_lines_count (const dt_iop_ashift_line_t *lines, const int lines_count, int *vertical_count, int *horizontal_count)
 
static int _draw_near_point (const float x, const float y, const float *points, const int limit)
 
static void _draw_recompute_line_length (dt_iop_ashift_line_t *line)
 
int mouse_moved (struct dt_iop_module_t *self, double x, double y, double pressure, int which)
 
int button_pressed (struct dt_iop_module_t *self, double x, double y, double pressure, int which, int type, uint32_t state)
 
int button_released (struct dt_iop_module_t *self, double x, double y, int which, uint32_t state)
 
int scrolled (struct dt_iop_module_t *self, double x, double y, int up, uint32_t state)
 
void _make_controls_sensitive (dt_iop_module_t *self, const gboolean sensitive)
 
void gui_changed (dt_iop_module_t *self, GtkWidget *w, void *previous)
 
void gui_reset (struct dt_iop_module_t *self)
 
static void fitting_option_changed (GtkWidget *widget, gpointer user_data)
 
static void cropmode_callback (GtkWidget *widget, gpointer user_data)
 
static int _event_fit_v_button_clicked (GtkWidget *widget, GdkEventButton *event, gpointer user_data)
 
static int _event_fit_h_button_clicked (GtkWidget *widget, GdkEventButton *event, gpointer user_data)
 
static int _event_fit_both_button_clicked (GtkWidget *widget, GdkEventButton *event, gpointer user_data)
 
static int _event_structure_auto_clicked (GtkWidget *widget, GdkEventButton *event, gpointer user_data)
 
static int _event_structure_quad_clicked (GtkWidget *widget, GdkEventButton *event, gpointer user_data)
 
static int _event_structure_lines_clicked (GtkWidget *widget, GdkEventButton *event, gpointer user_data)
 
static void _enter_edit_mode (GtkToggleButton *button, struct dt_iop_module_t *self)
 
static void _event_commit_clicked (GtkButton *button, dt_iop_module_t *self)
 
static void _run_pending_preview_job (dt_iop_module_t *self)
 
static void _event_process_after_preview_callback (gpointer instance, gpointer user_data)
 
static void _event_process_after_ui_callback (gpointer instance, gpointer user_data)
 Refresh ashift overlay geometry once the displayed pipe published its new output.
 
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)
 
gboolean runtime_data_hash (struct dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, const 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_update (struct dt_iop_module_t *self)
 
void reload_defaults (dt_iop_module_t *module)
 
void init_global (dt_iop_module_so_t *module)
 
void cleanup_global (dt_iop_module_so_t *module)
 
static gboolean _event_draw (GtkWidget *widget, cairo_t *cr, dt_iop_module_t *self)
 
void gui_init (struct dt_iop_module_t *self)
 
void gui_cleanup (struct dt_iop_module_t *self)
 

Macro Definition Documentation

◆ DEFAULT_F_LENGTH

#define DEFAULT_F_LENGTH   28.0

Definition at line 123 of file ashift.c.

◆ LENSSHIFT_RANGE

#define LENSSHIFT_RANGE   1.0

Definition at line 92 of file ashift.c.

◆ LENSSHIFT_RANGE_SOFT

#define LENSSHIFT_RANGE_SOFT   2.0

Definition at line 93 of file ashift.c.

◆ LSD_ANG_TH

#define LSD_ANG_TH   22.5

Definition at line 101 of file ashift.c.

◆ LSD_DENSITY_TH

#define LSD_DENSITY_TH   0.7

Definition at line 103 of file ashift.c.

◆ LSD_GAMMA

#define LSD_GAMMA   0.45

Definition at line 105 of file ashift.c.

◆ LSD_LOG_EPS

#define LSD_LOG_EPS   0.0

Definition at line 102 of file ashift.c.

◆ LSD_N_BINS

#define LSD_N_BINS   1024

Definition at line 104 of file ashift.c.

◆ LSD_QUANT

#define LSD_QUANT   2.0

Definition at line 100 of file ashift.c.

◆ LSD_SCALE

#define LSD_SCALE   0.99

Definition at line 98 of file ashift.c.

◆ LSD_SIGMA_SCALE

#define LSD_SIGMA_SCALE   0.6

Definition at line 99 of file ashift.c.

◆ MAT3SWAP

#define MAT3SWAP (   a,
 
)    { float (*tmp)[3] = (a); (a) = (b); (b) = tmp; }

Definition at line 752 of file ashift.c.

◆ MAX_SAVED_LINES

#define MAX_SAVED_LINES   50

Definition at line 132 of file ashift.c.

◆ MAX_TANGENTIAL_DEVIATION

#define MAX_TANGENTIAL_DEVIATION   30

Definition at line 97 of file ashift.c.

◆ MIN_LINE_LENGTH

#define MIN_LINE_LENGTH   5

Definition at line 96 of file ashift.c.

◆ MINIMUM_FITLINES

#define MINIMUM_FITLINES   2

Definition at line 113 of file ashift.c.

◆ NMS_ALPHA

#define NMS_ALPHA   1.0

Definition at line 120 of file ashift.c.

◆ NMS_BETA

#define NMS_BETA   0.5

Definition at line 121 of file ashift.c.

◆ NMS_CROP_EPSILON

#define NMS_CROP_EPSILON   100.0

Definition at line 117 of file ashift.c.

◆ NMS_CROP_ITERATIONS

#define NMS_CROP_ITERATIONS   100

Definition at line 119 of file ashift.c.

◆ NMS_CROP_SCALE

#define NMS_CROP_SCALE   0.5

Definition at line 118 of file ashift.c.

◆ NMS_EPSILON

#define NMS_EPSILON   1e-3

Definition at line 114 of file ashift.c.

◆ NMS_GAMMA

#define NMS_GAMMA   2.0

Definition at line 122 of file ashift.c.

◆ NMS_ITERATIONS

#define NMS_ITERATIONS   400

Definition at line 116 of file ashift.c.

◆ NMS_SCALE

#define NMS_SCALE   1.0

Definition at line 115 of file ashift.c.

◆ RANSAC_ELIMINATION_RATIO

#define RANSAC_ELIMINATION_RATIO   60

Definition at line 109 of file ashift.c.

◆ RANSAC_EPSILON

#define RANSAC_EPSILON   2

Definition at line 107 of file ashift.c.

◆ RANSAC_EPSILON_STEP

#define RANSAC_EPSILON_STEP   1

Definition at line 108 of file ashift.c.

◆ RANSAC_HURDLE

#define RANSAC_HURDLE   5

Definition at line 112 of file ashift.c.

◆ RANSAC_OPTIMIZATION_DRY_RUNS

#define RANSAC_OPTIMIZATION_DRY_RUNS   50

Definition at line 111 of file ashift.c.

◆ RANSAC_OPTIMIZATION_STEPS

#define RANSAC_OPTIMIZATION_STEPS   5

Definition at line 110 of file ashift.c.

◆ RANSAC_RUNS

#define RANSAC_RUNS   400

Definition at line 106 of file ashift.c.

◆ ROTATION_RANGE

#define ROTATION_RANGE   10

Definition at line 90 of file ashift.c.

◆ ROTATION_RANGE_SOFT

#define ROTATION_RANGE_SOFT   180

Definition at line 91 of file ashift.c.

◆ SHEAR_RANGE

#define SHEAR_RANGE   0.2

Definition at line 94 of file ashift.c.

◆ SHEAR_RANGE_SOFT

#define SHEAR_RANGE_SOFT   0.5

Definition at line 95 of file ashift.c.

◆ SQR

#define SQR (   a)    ((a) * (a))

Definition at line 128 of file ashift.c.

Typedef Documentation

◆ dt_iop_ashift_bounding_t

◆ dt_iop_ashift_crop_t

◆ dt_iop_ashift_cropfit_params_t

◆ dt_iop_ashift_data_t

◆ dt_iop_ashift_enhance_t

◆ dt_iop_ashift_fit_params_t

◆ dt_iop_ashift_fitaxis_t

◆ dt_iop_ashift_fitting_t

◆ dt_iop_ashift_global_data_t

◆ dt_iop_ashift_gui_data_t

◆ dt_iop_ashift_homodir_t

◆ dt_iop_ashift_jobcode_t

◆ dt_iop_ashift_line_t

◆ dt_iop_ashift_linecolor_t

◆ dt_iop_ashift_linetype_t

◆ dt_iop_ashift_method_t

◆ dt_iop_ashift_mode_t

◆ dt_iop_ashift_nmsresult_t

◆ dt_iop_ashift_params1_t

◆ dt_iop_ashift_params2_t

◆ dt_iop_ashift_params3_t

◆ dt_iop_ashift_params4_t

◆ dt_iop_ashift_params_t

◆ dt_iop_ashift_points_idx_t

Enumeration Type Documentation

◆ dt_iop_ashift_bounding_t

Enumerator
ASHIFT_BOUNDING_OFF 
ASHIFT_BOUNDING_SELECT 
ASHIFT_BOUNDING_DESELECT 

Definition at line 298 of file ashift.c.

◆ dt_iop_ashift_crop_t

Enumerator
ASHIFT_CROP_OFF 
ASHIFT_CROP_LARGEST 
ASHIFT_CROP_ASPECT 

Definition at line 291 of file ashift.c.

◆ dt_iop_ashift_enhance_t

Enumerator
ASHIFT_ENHANCE_NONE 
ASHIFT_ENHANCE_EDGES 
ASHIFT_ENHANCE_DETAIL 
ASHIFT_ENHANCE_HORIZONTAL 
ASHIFT_ENHANCE_VERTICAL 

Definition at line 276 of file ashift.c.

◆ dt_iop_ashift_fitaxis_t

Enumerator
ASHIFT_FIT_NONE 
ASHIFT_FIT_ROTATION 
ASHIFT_FIT_LENS_VERT 
ASHIFT_FIT_LENS_HOR 
ASHIFT_FIT_SHEAR 
ASHIFT_FIT_LINES_VERT 
ASHIFT_FIT_LINES_HOR 
ASHIFT_FIT_LENS_BOTH 
ASHIFT_FIT_LINES_BOTH 
ASHIFT_FIT_VERTICALLY 
ASHIFT_FIT_HORIZONTALLY 
ASHIFT_FIT_BOTH 
ASHIFT_FIT_VERTICALLY_NO_ROTATION 
ASHIFT_FIT_HORIZONTALLY_NO_ROTATION 
ASHIFT_FIT_BOTH_NO_ROTATION 
ASHIFT_FIT_BOTH_SHEAR 
ASHIFT_FIT_ROTATION_VERTICAL_LINES 
ASHIFT_FIT_ROTATION_HORIZONTAL_LINES 
ASHIFT_FIT_ROTATION_BOTH_LINES 
ASHIFT_FIT_FLIP 

Definition at line 241 of file ashift.c.

◆ dt_iop_ashift_fitting_t

Enumerator
ASHIFT_FITTING_ALL 
ASHIFT_FITTING_LENS_ROTATION 
ASHIFT_FITTING_ROTATION 
ASHIFT_FITTING_LENS 

Definition at line 224 of file ashift.c.

◆ dt_iop_ashift_homodir_t

Enumerator
ASHIFT_HOMOGRAPH_FORWARD 
ASHIFT_HOMOGRAPH_INVERTED 

Definition at line 204 of file ashift.c.

◆ dt_iop_ashift_jobcode_t

Enumerator
ASHIFT_JOBCODE_NONE 
ASHIFT_JOBCODE_GET_STRUCTURE 
ASHIFT_JOBCODE_FIT 
ASHIFT_JOBCODE_GET_STRUCTURE_LINES 
ASHIFT_JOBCODE_GET_STRUCTURE_QUAD 

Definition at line 305 of file ashift.c.

◆ dt_iop_ashift_linecolor_t

Enumerator
ASHIFT_LINECOLOR_GREY 
ASHIFT_LINECOLOR_GREEN 
ASHIFT_LINECOLOR_RED 
ASHIFT_LINECOLOR_BLUE 
ASHIFT_LINECOLOR_YELLOW 

Definition at line 232 of file ashift.c.

◆ dt_iop_ashift_linetype_t

Enumerator
ASHIFT_LINE_IRRELEVANT 
ASHIFT_LINE_RELEVANT 
ASHIFT_LINE_DIRVERT 
ASHIFT_LINE_SELECTED 
ASHIFT_LINE_VERTICAL_NOT_SELECTED 
ASHIFT_LINE_HORIZONTAL_NOT_SELECTED 
ASHIFT_LINE_VERTICAL_SELECTED 
ASHIFT_LINE_HORIZONTAL_SELECTED 
ASHIFT_LINE_MASK 

Definition at line 210 of file ashift.c.

◆ dt_iop_ashift_method_t

Enumerator
ASHIFT_METHOD_NONE 
ASHIFT_METHOD_AUTO 
ASHIFT_METHOD_QUAD 
ASHIFT_METHOD_LINES 

Definition at line 196 of file ashift.c.

◆ dt_iop_ashift_mode_t

Enumerator
ASHIFT_MODE_GENERIC 
ASHIFT_MODE_SPECIFIC 

Definition at line 285 of file ashift.c.

◆ dt_iop_ashift_nmsresult_t

Enumerator
NMS_SUCCESS 
NMS_NOT_ENOUGH_LINES 
NMS_DID_NOT_CONVERGE 
NMS_INSANE 

Definition at line 268 of file ashift.c.

Function Documentation

◆ _clear_crop_box()

static void _clear_crop_box ( dt_iop_ashift_params_t p)
static

Reset the active crop rectangle to the complete transformed image.

The caller passes either the persistent module parameters or the private edit-mode copy. Writing through that explicit pointer keeps the normal and edit paths consistent.

Parameters
pParameter set whose crop margins must be reset.

Definition at line 744 of file ashift.c.

References p.

Referenced by do_crop().

◆ _do_clean_structure()

static int _do_clean_structure ( dt_iop_module_t module,
dt_iop_ashift_params_t p,
gboolean  save_drawn 
)
static

◆ _do_get_structure_auto()

◆ _do_get_structure_lines()

◆ _do_get_structure_quad()

◆ _draw_basic_line()

◆ _draw_near_point()

static int _draw_near_point ( const float  x,
const float  y,
const float *  points,
const int  limit 
)
static

Definition at line 4193 of file ashift.c.

References darktable, delta, darktable_t::develop, dt_dev_get_overlay_scale(), DT_PIXEL_APPLY_DPI, i, and x.

Referenced by mouse_moved().

◆ _draw_recompute_line_length()

static void _draw_recompute_line_length ( dt_iop_ashift_line_t line)
static

Definition at line 4207 of file ashift.c.

References dt_iop_ashift_line_t::length, dt_iop_ashift_line_t::p1, and dt_iop_ashift_line_t::p2.

Referenced by mouse_moved().

◆ _draw_retrieve_line_type()

◆ _draw_retrieve_lines_from_params()

◆ _draw_save_lines_to_params()

◆ _enter_edit_mode()

◆ _event_commit_clicked()

◆ _event_draw()

static gboolean _event_draw ( GtkWidget widget,
cairo_t *  cr,
dt_iop_module_t self 
)
static

◆ _event_fit_both_button_clicked()

◆ _event_fit_h_button_clicked()

◆ _event_fit_v_button_clicked()

◆ _event_process_after_preview_callback()

static void _event_process_after_preview_callback ( gpointer  instance,
gpointer  user_data 
)
static

◆ _event_process_after_ui_callback()

static void _event_process_after_ui_callback ( gpointer  instance,
gpointer  user_data 
)
static

Refresh ashift overlay geometry once the displayed pipe published its new output.

The crop frame and manual guides are drawn in center-view coordinates derived from the virtual pipe output size. Rotation, lens shift, shear, and auto-crop all change that size, but the final displayed dimensions are only authoritative after the UI pipe completed. Refreshing the thumbnail geometry here keeps the overlay aligned with the image the user actually sees.

Definition at line 5468 of file ashift.c.

References _get_ashift_params(), ASHIFT_CROP_OFF, darktable, dt_iop_module_t::dev, dt_control_queue_redraw_center(), dt_dev_get_thumbnail_size(), DT_PIXELPIPE_CACHE_HASH_INVALID, g, darktable_t::gui, dt_iop_module_t::gui_data, p, dt_gui_gtk_t::reset, and void().

Referenced by gui_cleanup(), and gui_init().

◆ _event_structure_auto_clicked()

◆ _event_structure_lines_clicked()

static int _event_structure_lines_clicked ( GtkWidget widget,
GdkEventButton *  event,
gpointer  user_data 
)
static

◆ _event_structure_quad_clicked()

static int _event_structure_quad_clicked ( GtkWidget widget,
GdkEventButton *  event,
gpointer  user_data 
)
static

◆ _get_ashift_params()

◆ _get_bounded_inside()

static void _get_bounded_inside ( const float *  points,
dt_iop_ashift_points_idx_t points_idx,
const int  points_lines_count,
float  pzx,
float  pzy,
float  pzx2,
float  pzy2,
dt_iop_ashift_bounding_t  mode 
)
static

◆ _get_lines_hash()

static uint64_t _get_lines_hash ( const dt_iop_ashift_line_t lines,
const int  lines_count 
)
static

Definition at line 3538 of file ashift.c.

References dt_hash(), n, dt_iop_ashift_line_t::p1, dt_iop_ashift_line_t::p2, and v.

Referenced by gui_post_expose().

◆ _get_near()

static void _get_near ( const float *  points,
dt_iop_ashift_points_idx_t points_idx,
const int  lines_count,
float  pzx,
float  pzy,
float  delta,
gboolean  multiple 
)
static

◆ _get_structure()

◆ _gui_update_structure_states()

static void _gui_update_structure_states ( dt_iop_module_t self,
gboolean  enable 
)
static

◆ _make_controls_sensitive()

void _make_controls_sensitive ( dt_iop_module_t self,
const gboolean  sensitive 
)

◆ _remove_outliers()

◆ _run_pending_preview_job()

◆ _update_lines_count()

static void _update_lines_count ( const dt_iop_ashift_line_t lines,
const int  lines_count,
int *  vertical_count,
int *  horizontal_count 
)
static

◆ aliases()

const char * aliases ( )

Definition at line 155 of file ashift.c.

◆ button_pressed()

◆ button_released()

◆ call_distort_transform()

static int call_distort_transform ( dt_dev_pixelpipe_t pipe,
struct dt_iop_module_t self,
float *  points,
size_t  points_count 
)
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 
)

Definition at line 5547 of file ashift.c.

References dt_dev_pixelpipe_iop_t::data, and dt_free_align.

◆ commit_params()

◆ crop_constraint()

static void crop_constraint ( double params,
int  pcount 
)
static

Definition at line 2419 of file ashift.c.

References M_PI.

Referenced by do_crop().

◆ crop_fitness()

◆ cropmode_callback()

static void cropmode_callback ( GtkWidget widget,
gpointer  user_data 
)
static

◆ default_colorspace()

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

Definition at line 191 of file ashift.c.

References IOP_CS_RGB.

◆ default_group()

int default_group ( )

Definition at line 175 of file ashift.c.

References IOP_GROUP_REPAIR.

Referenced by test_default_group().

◆ description()

◆ detail_enhance()

static int detail_enhance ( const float *const  in,
float *const  out,
const int  width,
const int  height 
)
static

◆ distort_backtransform()

◆ distort_mask()

◆ distort_transform()

◆ do_crop()

◆ do_fit()

◆ edge_enhance()

static int edge_enhance ( const double in,
double out,
const int  width,
const int  height 
)
static

◆ edge_enhance_1d()

static void edge_enhance_1d ( const double in,
double out,
const int  width,
const int  height,
dt_iop_ashift_enhance_t  dir 
)
static

Definition at line 1261 of file ashift.c.

References __OMP_PARALLEL_FOR__, ASHIFT_ENHANCE_HORIZONTAL, height, i, k, kernel(), out, and width.

Referenced by edge_enhance().

◆ fact()

static int fact ( const int  n)
static

Definition at line 1715 of file ashift.c.

References fact(), and n.

Referenced by fact(), and ransac().

◆ fitting_option_changed()

static void fitting_option_changed ( GtkWidget widget,
gpointer  user_data 
)
static

Definition at line 5043 of file ashift.c.

References dt_bauhaus_combobox_get(), g, and dt_iop_module_t::gui_data.

Referenced by gui_init().

◆ flags()

◆ gamma_correct()

static void gamma_correct ( const float *const  in,
float *const  out,
const int  width,
const int  height 
)
static

Definition at line 1412 of file ashift.c.

References __OMP_PARALLEL_FOR__, height, LSD_GAMMA, out, and width.

Referenced by line_detect().

◆ get_points()

◆ gui_changed()

◆ gui_cleanup()

◆ gui_init()

void gui_init ( struct dt_iop_module_t self)

Definition at line 5715 of file ashift.c.

References _enter_edit_mode(), _event_commit_clicked(), _event_draw(), _event_fit_both_button_clicked(), _event_fit_h_button_clicked(), _event_fit_v_button_clicked(), _event_process_after_preview_callback(), _event_process_after_ui_callback(), _event_structure_auto_clicked(), _event_structure_lines_clicked(), _event_structure_quad_clicked(), ASHIFT_BOUNDING_OFF, ASHIFT_FIT_NONE, ASHIFT_FITTING_ALL, ASHIFT_JOBCODE_NONE, darktable_t::bauhaus, cropmode_callback(), darktable, dt_iop_module_t::default_params, dt_action_button_new(), dt_bauhaus_combobox_from_params(), dt_bauhaus_combobox_new_full(), dt_bauhaus_combobox_set_default(), dt_bauhaus_slider_from_params(), dt_bauhaus_slider_set_digits(), dt_bauhaus_slider_set_format(), dt_bauhaus_slider_set_soft_range(), DT_DEBUG_CONTROL_SIGNAL_CONNECT, DT_GUI_BOX_SPACING, DT_GUI_MODULE, dt_gui_new_collapsible_section(), dt_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), DT_PIXELPIPE_CACHE_HASH_INVALID, DT_SIGNAL_DEVELOP_PREVIEW_PIPE_FINISHED, DT_SIGNAL_DEVELOP_UI_PIPE_FINISHED, dt_ui_label_new(), dt_ui_section_label_new(), dtgtk_button_new(), dtgtk_cairo_paint_draw_structure(), dtgtk_cairo_paint_masks_drawn(), dtgtk_cairo_paint_perspective(), dtgtk_cairo_paint_structure(), dtgtk_togglebutton_new(), FALSE, fitting_option_changed(), g, IOP_GUI_ALLOC, LENSSHIFT_RANGE, LENSSHIFT_RANGE_SOFT, dt_iop_module_t::params, ROTATION_RANGE, ROTATION_RANGE_SOFT, SHEAR_RANGE, SHEAR_RANGE_SOFT, darktable_t::signals, TRUE, and dt_iop_module_t::widget.

◆ gui_post_expose()

◆ gui_reset()

◆ gui_update()

◆ homography()

static __DT_CLONE_TARGETS__ void homography ( float *  homograph,
const float  angle,
const float  shift_v,
const float  shift_h,
const float  shear,
const float  f_length_kb,
const float  orthocorr,
const float  aspect,
const int  width,
const int  height,
dt_iop_ashift_homodir_t  dir 
)
static

◆ ilogit()

static double ilogit ( double  L,
double  min,
double  max 
)
inlinestatic

Definition at line 2021 of file ashift.c.

References L, max, min, and p.

Referenced by model_fitness(), and nmsfit().

◆ init_global()

◆ init_pipe()

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

◆ isneutral()

◆ legacy_params()

int legacy_params ( dt_iop_module_t self,
const void *const  old_params,
const int  old_version,
void new_params,
const int  new_version 
)

◆ line_detect()

◆ logit()

static double logit ( double  x,
double  min,
double  max 
)
inlinestatic

Definition at line 2010 of file ashift.c.

References eps, max, min, p, and x.

Referenced by nmsfit().

◆ model_fitness()

◆ modify_roi_in()

◆ modify_roi_out()

◆ mouse_moved()

◆ name()

const char * name ( )

Definition at line 150 of file ashift.c.

◆ nmsfit()

static dt_iop_ashift_nmsresult_t nmsfit ( dt_iop_module_t module,
dt_iop_ashift_params_t p,
dt_iop_ashift_fitaxis_t  dir 
)
static

◆ operation_tags()

int operation_tags ( )

Definition at line 180 of file ashift.c.

References IOP_TAG_DISTORT.

◆ operation_tags_filter()

int operation_tags_filter ( )

Definition at line 185 of file ashift.c.

References IOP_TAG_CLIPPING, and IOP_TAG_DECORATION.

◆ process()

__DT_CLONE_TARGETS__ int process ( struct dt_iop_module_t self,
const dt_dev_pixelpipe_t pipe,
const dt_dev_pixelpipe_iop_t piece,
const void *const  ivoid,
void *const  ovoid 
)

Definition at line 3153 of file ashift.c.

References __OMP_PARALLEL_FOR__, ASHIFT_HOMOGRAPH_INVERTED, dt_iop_ashift_data_t::aspect, dt_dev_pixelpipe_iop_t::buf_in, dt_dev_pixelpipe_iop_t::buf_out, dt_iop_ashift_data_t::cb, ch, dt_iop_buffer_dsc_t::channels, dt_iop_ashift_data_t::cl, dt_iop_ashift_data_t::cr, dt_iop_ashift_data_t::ct, darktable, dt_dev_pixelpipe_iop_t::data, dt_iop_module_t::dev, darktable_t::develop, dt_dev_pixelpipe_iop_t::dsc_in, dt_dev_distort_backtransform_plus(), dt_dev_pixelpipe_has_preview_output(), DT_DEV_TRANSFORM_DIR_FORW_EXCL, dt_free, dt_interpolation_compute_pixel4c(), dt_interpolation_new(), DT_INTERPOLATION_USERPREF_WARP, dt_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), dt_iop_image_copy_by_size(), dt_iop_ashift_data_t::f_length_kb, g, dt_dev_pixelpipe_iop_t::global_hash, dt_develop_t::gui_attached, dt_iop_module_t::gui_data, height, dt_iop_roi_t::height, homography(), i, dt_iop_module_t::iop_order, IS_NULL_PTR, isneutral(), dt_iop_ashift_data_t::lensshift_h, dt_iop_ashift_data_t::lensshift_v, M_PI, mat3mulv(), dt_iop_ashift_data_t::orthocorr, out, ovoid, dt_develop_t::preview_pipe, dt_dev_pixelpipe_iop_t::roi_in, dt_dev_pixelpipe_iop_t::roi_out, dt_iop_ashift_data_t::rotation, dt_iop_roi_t::scale, dt_iop_ashift_data_t::shear, dt_develop_t::virtual_pipe, width, dt_iop_roi_t::width, dt_iop_roi_t::x, and dt_iop_roi_t::y.

Referenced by _build_runtime_schedule(), _fill_runtime_inputs(), _import_copy_file(), _release_runtime_source(), _sync_runtime_state_from_inputs(), dt_cache_for_all(), and dt_iop_set_description().

◆ process_cl()

int process_cl ( struct dt_iop_module_t self,
const dt_dev_pixelpipe_t pipe,
const dt_dev_pixelpipe_iop_t piece,
cl_mem  dev_in,
cl_mem  dev_out 
)

◆ quickperm()

static int quickperm ( int *  a,
int *  p,
const int  N,
int *  i 
)
static

Definition at line 1688 of file ashift.c.

References FALSE, i, N, p, swap(), and TRUE.

Referenced by ransac().

◆ ransac()

static void ransac ( const dt_iop_ashift_line_t lines,
int *  index_set,
int *  inout_set,
const int  set_count,
const float  total_weight,
const int  xmin,
const int  xmax,
const int  ymin,
const int  ymax 
)
static

◆ reload_defaults()

◆ rgb2grey256()

static void rgb2grey256 ( const float *const  in,
double *const  out,
const int  width,
const int  height 
)
static

Definition at line 1250 of file ashift.c.

References __OMP_PARALLEL_FOR__, height, out, and width.

Referenced by line_detect().

◆ runtime_data_hash()

gboolean runtime_data_hash ( struct dt_iop_module_t self,
dt_dev_pixelpipe_t pipe,
const dt_dev_pixelpipe_iop_t piece 
)

Definition at line 5531 of file ashift.c.

References TRUE, and void().

◆ scrolled()

◆ shuffle()

static void shuffle ( int *  a,
const int  N 
)
static

Definition at line 1705 of file ashift.c.

References i, N, and swap().

Referenced by ransac().

◆ sRGB_to_XYZ()

static void sRGB_to_XYZ ( const dt_aligned_pixel_t  sRGB,
dt_aligned_pixel_t  XYZ 
)
static

Definition at line 1358 of file ashift.c.

References sRGB, and XYZ.

Referenced by detail_enhance().

◆ swap()

static void swap ( int *  a,
int *  b 
)
inlinestatic

Definition at line 1680 of file ashift.c.

Referenced by quickperm(), and shuffle().

◆ update_colors()

◆ vec3isnull()

static int vec3isnull ( const float *const  v)
inlinestatic

Definition at line 723 of file ashift.c.

References eps, and v.

Referenced by crop_fitness(), and ransac().

◆ vec3lnorm()

static void vec3lnorm ( float *  dst,
const float *const  v 
)
inlinestatic

Definition at line 703 of file ashift.c.

References f, and v.

Referenced by _draw_basic_line(), line_detect(), and model_fitness().

◆ vec3norm()

static void vec3norm ( float *  dst,
const float *const  v 
)
inlinestatic

Definition at line 688 of file ashift.c.

References f, and v.

Referenced by ransac().

◆ vec3prodn()

static void vec3prodn ( float *  dst,
const float *const  v1,
const float *const  v2 
)
inlinestatic

Definition at line 670 of file ashift.c.

References f, l1, and l2.

Referenced by _draw_basic_line(), crop_fitness(), do_crop(), line_detect(), model_fitness(), and ransac().

◆ vec3scalar()

static float vec3scalar ( const float *const  v1,
const float *const  v2 
)
inlinestatic

Definition at line 717 of file ashift.c.

Referenced by line_detect(), model_fitness(), and ransac().

◆ XYZ_to_sRGB()

static void XYZ_to_sRGB ( const dt_aligned_pixel_t  XYZ,
dt_aligned_pixel_t  sRGB 
)
static

Definition at line 1350 of file ashift.c.

References sRGB, and XYZ.

Referenced by detail_enhance().