![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "bauhaus/bauhaus.h"#include "common/bilateral.h"#include "common/colorspaces_inline_conversions.h"#include "common/debug.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 "libs/modulegroups.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: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; } |
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_shadow_crop_box (dt_iop_ashift_gui_data_t *g) |
| static 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, 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, 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 gboolean | _sync_private_buffer_from_preview_cache (dt_iop_module_t *self, dt_dev_pixelpipe_iop_t **preview_piece_out) |
| Rebuild the GUI-side fitting buffer from the authoritative preview cacheline. | |
| 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) |
| 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) |
| 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_develop_t *dev, 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 | _event_process_after_preview_callback (gpointer instance, gpointer user_data) |
| 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) |
| #define DEFAULT_F_LENGTH 28.0 |
| #define LENSSHIFT_RANGE 1.0 |
| #define LENSSHIFT_RANGE_SOFT 2.0 |
| #define LSD_ANG_TH 22.5 |
| #define LSD_DENSITY_TH 0.7 |
| #define LSD_GAMMA 0.45 |
| #define LSD_LOG_EPS 0.0 |
| #define LSD_N_BINS 1024 |
| #define LSD_QUANT 2.0 |
| #define LSD_SCALE 0.99 |
| #define LSD_SIGMA_SCALE 0.6 |
| #define MAX_SAVED_LINES 50 |
| #define MAX_TANGENTIAL_DEVIATION 30 |
| #define MIN_LINE_LENGTH 5 |
| #define MINIMUM_FITLINES 2 |
| #define NMS_ALPHA 1.0 |
| #define NMS_BETA 0.5 |
| #define NMS_CROP_EPSILON 100.0 |
| #define NMS_CROP_ITERATIONS 100 |
| #define NMS_CROP_SCALE 0.5 |
| #define NMS_EPSILON 1e-3 |
| #define NMS_GAMMA 2.0 |
| #define NMS_ITERATIONS 400 |
| #define NMS_SCALE 1.0 |
| #define RANSAC_ELIMINATION_RATIO 60 |
| #define RANSAC_EPSILON 2 |
| #define RANSAC_EPSILON_STEP 1 |
| #define RANSAC_HURDLE 5 |
| #define RANSAC_OPTIMIZATION_DRY_RUNS 50 |
| #define RANSAC_OPTIMIZATION_STEPS 5 |
| #define RANSAC_RUNS 400 |
| #define ROTATION_RANGE 10 |
| #define ROTATION_RANGE_SOFT 180 |
| #define SHEAR_RANGE 0.2 |
| #define SHEAR_RANGE_SOFT 0.5 |
| typedef enum dt_iop_ashift_bounding_t dt_iop_ashift_bounding_t |
| typedef enum dt_iop_ashift_crop_t dt_iop_ashift_crop_t |
| typedef struct dt_iop_ashift_cropfit_params_t dt_iop_ashift_cropfit_params_t |
| typedef struct dt_iop_ashift_data_t dt_iop_ashift_data_t |
| typedef enum dt_iop_ashift_enhance_t dt_iop_ashift_enhance_t |
| typedef struct dt_iop_ashift_fit_params_t dt_iop_ashift_fit_params_t |
| typedef enum dt_iop_ashift_fitaxis_t dt_iop_ashift_fitaxis_t |
| typedef enum dt_iop_ashift_fitting_t dt_iop_ashift_fitting_t |
| typedef struct dt_iop_ashift_global_data_t dt_iop_ashift_global_data_t |
| typedef struct dt_iop_ashift_gui_data_t dt_iop_ashift_gui_data_t |
| typedef enum dt_iop_ashift_homodir_t dt_iop_ashift_homodir_t |
| typedef enum dt_iop_ashift_jobcode_t dt_iop_ashift_jobcode_t |
| typedef struct dt_iop_ashift_line_t dt_iop_ashift_line_t |
| typedef enum dt_iop_ashift_linecolor_t dt_iop_ashift_linecolor_t |
| typedef enum dt_iop_ashift_linetype_t dt_iop_ashift_linetype_t |
| typedef enum dt_iop_ashift_method_t dt_iop_ashift_method_t |
| typedef enum dt_iop_ashift_mode_t dt_iop_ashift_mode_t |
| typedef enum dt_iop_ashift_nmsresult_t dt_iop_ashift_nmsresult_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_points_idx_t dt_iop_ashift_points_idx_t |
| enum dt_iop_ashift_crop_t |
| enum dt_iop_ashift_mode_t |
|
static |
|
static |
References _draw_save_lines_to_params(), ASHIFT_METHOD_NONE, dt_free, FALSE, g, dt_iop_module_t::gui_data, and TRUE.
Referenced by _do_get_structure_lines(), _do_get_structure_quad(), _event_structure_auto_clicked(), and gui_reset().
|
static |
References _get_structure(), _gui_update_structure_states(), _remove_outliers(), _sync_private_buffer_from_preview_cache(), ASHIFT_JOBCODE_GET_STRUCTURE, b, darktable, dt_dev_pixelpipe_iop_t::data, dt_iop_module_t::dev, dt_control_log(), dt_dev_distort_get_iop_pipe(), dt_dev_pixelpipe_cache_get_entry(), dt_dev_pixelpipe_cache_remove(), dt_dev_pixelpipe_is_backbufer_valid(), dt_dev_pixelpipe_resync_history_preview, dt_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), DT_PIXELPIPE_CACHE_HASH_INVALID, error(), FALSE, g, dt_dev_pixelpipe_iop_t::global_hash, dt_iop_module_t::gui_data, dt_dev_pixelpipe_t::nodes, darktable_t::pixelpipe_cache, dt_develop_t::preview_pipe, and TRUE.
Referenced by _event_process_after_preview_callback(), _event_structure_auto_clicked(), and do_fit().
|
static |
References _do_clean_structure(), _draw_retrieve_lines_from_params(), _get_ashift_params(), _gui_update_structure_states(), _sync_private_buffer_from_preview_cache(), ASHIFT_JOBCODE_GET_STRUCTURE_LINES, ASHIFT_METHOD_LINES, b, darktable, dt_dev_pixelpipe_iop_t::data, dt_iop_module_t::dev, dt_control_log(), dt_control_queue_redraw_center(), dt_dev_distort_get_iop_pipe(), dt_dev_pixelpipe_cache_get_entry(), dt_dev_pixelpipe_cache_remove(), dt_dev_pixelpipe_is_backbufer_valid(), dt_dev_pixelpipe_resync_history_preview, dt_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), DT_PIXELPIPE_CACHE_HASH_INVALID, FALSE, g, dt_dev_pixelpipe_iop_t::global_hash, dt_iop_module_t::gui_data, dt_dev_pixelpipe_iop_t::iheight, dt_dev_pixelpipe_iop_t::iwidth, dt_dev_pixelpipe_t::nodes, p, darktable_t::pixelpipe_cache, dt_develop_t::preview_pipe, TRUE, and dt_develop_t::virtual_pipe.
Referenced by _event_process_after_preview_callback(), and _event_structure_lines_clicked().
|
static |
References _do_clean_structure(), _draw_basic_line(), _draw_retrieve_line_type(), _draw_retrieve_lines_from_params(), _get_ashift_params(), _gui_update_structure_states(), _sync_private_buffer_from_preview_cache(), ASHIFT_JOBCODE_GET_STRUCTURE_QUAD, ASHIFT_LINE_HORIZONTAL_SELECTED, ASHIFT_LINE_VERTICAL_SELECTED, ASHIFT_METHOD_QUAD, b, darktable, dt_dev_pixelpipe_iop_t::data, dt_iop_module_t::dev, dt_control_log(), dt_control_queue_redraw_center(), dt_dev_distort_backtransform_plus(), dt_dev_distort_get_iop_pipe(), dt_dev_pixelpipe_cache_get_entry(), dt_dev_pixelpipe_cache_remove(), dt_dev_pixelpipe_is_backbufer_valid(), dt_dev_pixelpipe_resync_history_preview, DT_DEV_TRANSFORM_DIR_FORW_INCL, dt_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), DT_PIXELPIPE_CACHE_HASH_INVALID, FALSE, g, dt_dev_pixelpipe_iop_t::global_hash, dt_iop_module_t::gui_data, i, dt_dev_pixelpipe_iop_t::iheight, dt_iop_module_t::iop_order, dt_dev_pixelpipe_iop_t::iwidth, dt_dev_pixelpipe_t::nodes, p, darktable_t::pixelpipe_cache, dt_develop_t::preview_pipe, dt_develop_t::processed_height, dt_develop_t::processed_width, dt_develop_t::roi, TRUE, and dt_develop_t::virtual_pipe.
Referenced by _event_process_after_preview_callback(), and _event_structure_quad_clicked().
|
static |
References dt_iop_ashift_line_t::L, dt_iop_ashift_line_t::length, dt_iop_ashift_line_t::p1, dt_iop_ashift_line_t::p2, type, dt_iop_ashift_line_t::type, vec3lnorm(), vec3prodn(), dt_iop_ashift_line_t::weight, and dt_iop_ashift_line_t::width.
Referenced by _do_get_structure_quad(), _draw_retrieve_lines_from_params(), and button_pressed().
|
static |
References darktable, delta, darktable_t::develop, dt_dev_get_overlay_scale(), DT_PIXEL_APPLY_DPI, i, and x.
Referenced by mouse_moved().
|
static |
References dt_iop_ashift_line_t::length, dt_iop_ashift_line_t::p1, and dt_iop_ashift_line_t::p2.
Referenced by mouse_moved().
|
static |
References ASHIFT_LINE_HORIZONTAL_SELECTED, ASHIFT_LINE_VERTICAL_SELECTED, dt_iop_ashift_line_t::p1, dt_iop_ashift_line_t::p2, and dt_iop_ashift_line_t::type.
Referenced by _do_get_structure_quad(), and button_released().
|
static |
References _draw_basic_line(), _get_ashift_params(), ASHIFT_LINE_HORIZONTAL_SELECTED, ASHIFT_LINE_VERTICAL_SELECTED, ASHIFT_METHOD_LINES, ASHIFT_METHOD_QUAD, dt_iop_module_t::dev, dt_dev_distort_get_iop_pipe(), dt_dev_distort_transform_plus(), DT_DEV_TRANSFORM_DIR_BACK_EXCL, dt_free, FALSE, g, dt_iop_module_t::gui_data, i, dt_dev_pixelpipe_iop_t::iheight, dt_iop_module_t::iop_order, dt_dev_pixelpipe_iop_t::iwidth, MAX_SAVED_LINES, p, TRUE, and dt_develop_t::virtual_pipe.
Referenced by _do_get_structure_lines(), and _do_get_structure_quad().
|
static |
References _get_ashift_params(), ASHIFT_LINE_HORIZONTAL_SELECTED, ASHIFT_LINE_VERTICAL_SELECTED, ASHIFT_METHOD_LINES, ASHIFT_METHOD_QUAD, dt_iop_module_t::dev, dt_dev_distort_backtransform_plus(), DT_DEV_TRANSFORM_DIR_BACK_EXCL, g, dt_iop_module_t::gui_data, i, dt_iop_module_t::iop_order, MAX_SAVED_LINES, p, and dt_develop_t::virtual_pipe.
Referenced by _do_clean_structure(), and button_released().
|
static |
References _make_controls_sensitive(), dt_iop_module_t::dev, dt_control_change_cursor(), dt_control_queue_redraw(), dt_dev_add_history_item, dt_dev_get_thumbnail_size(), dt_dev_pixelpipe_resync_history_all, dt_dev_pixelpipe_update_zoom_main, dt_dev_pixelpipe_update_zoom_preview, dt_iop_request_focus(), dt_iop_set_cache_bypass(), dt_iop_module_t::enabled, FALSE, g, gui_changed(), dt_iop_module_t::gui_data, p, dt_iop_module_t::params, and TRUE.
Referenced by _event_commit_clicked(), and gui_init().
|
static |
References _enter_edit_mode(), _make_controls_sensitive(), darktable, dt_iop_module_t::dev, darktable_t::develop, dt_dev_add_history_item, dt_dev_get_thumbnail_size(), dt_dev_pixelpipe_update_zoom_main, dt_dev_pixelpipe_update_zoom_preview, dt_iop_set_cache_bypass(), FALSE, g, dt_iop_module_t::gui_data, p, dt_iop_module_t::params, and TRUE.
Referenced by gui_init().
|
static |
References darktable, dt_bauhaus_widget_set_label(), dt_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), FALSE, g, darktable_t::gui, dt_iop_module_t::gui_data, and dt_gui_gtk_t::reset.
Referenced by gui_init().
|
static |
References _get_ashift_params(), ASHIFT_FIT_BOTH, ASHIFT_FIT_BOTH_NO_ROTATION, ASHIFT_FIT_BOTH_SHEAR, ASHIFT_FIT_NONE, ASHIFT_FIT_ROTATION_BOTH_LINES, ASHIFT_FITTING_ALL, ASHIFT_FITTING_LENS, ASHIFT_FITTING_LENS_ROTATION, ASHIFT_FITTING_ROTATION, ASHIFT_JOBCODE_FIT, darktable, dt_iop_module_t::dev, do_fit(), dt_dev_pixelpipe_update_history_preview, dt_iop_request_focus(), dt_iop_module_t::enabled, FALSE, g, darktable_t::gui, dt_iop_module_t::gui_data, p, dt_gui_gtk_t::reset, and TRUE.
Referenced by gui_init().
|
static |
References _get_ashift_params(), ASHIFT_FIT_HORIZONTALLY, ASHIFT_FIT_HORIZONTALLY_NO_ROTATION, ASHIFT_FIT_NONE, ASHIFT_FIT_ROTATION_HORIZONTAL_LINES, ASHIFT_FITTING_ALL, ASHIFT_FITTING_LENS, ASHIFT_FITTING_LENS_ROTATION, ASHIFT_FITTING_ROTATION, ASHIFT_JOBCODE_FIT, darktable, dt_iop_module_t::dev, do_fit(), dt_dev_pixelpipe_update_history_preview, dt_iop_request_focus(), dt_iop_module_t::enabled, FALSE, g, darktable_t::gui, dt_iop_module_t::gui_data, p, dt_gui_gtk_t::reset, and TRUE.
Referenced by gui_init().
|
static |
References _get_ashift_params(), ASHIFT_FIT_NONE, ASHIFT_FIT_ROTATION_VERTICAL_LINES, ASHIFT_FIT_VERTICALLY, ASHIFT_FIT_VERTICALLY_NO_ROTATION, ASHIFT_FITTING_ALL, ASHIFT_FITTING_LENS, ASHIFT_FITTING_LENS_ROTATION, ASHIFT_FITTING_ROTATION, ASHIFT_JOBCODE_FIT, darktable, dt_iop_module_t::dev, do_fit(), dt_dev_pixelpipe_update_history_preview, dt_iop_request_focus(), dt_iop_module_t::enabled, FALSE, g, darktable_t::gui, dt_iop_module_t::gui_data, p, dt_gui_gtk_t::reset, and TRUE.
Referenced by gui_init().
|
static |
References _do_get_structure_auto(), _do_get_structure_lines(), _do_get_structure_quad(), _get_ashift_params(), ASHIFT_JOBCODE_DO_CROP, ASHIFT_JOBCODE_FIT, ASHIFT_JOBCODE_GET_STRUCTURE, ASHIFT_JOBCODE_GET_STRUCTURE_LINES, ASHIFT_JOBCODE_GET_STRUCTURE_QUAD, ASHIFT_JOBCODE_NONE, darktable, do_crop(), do_fit(), dt_control_queue_redraw_center(), 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().
|
static |
References _do_clean_structure(), _do_get_structure_auto(), _get_ashift_params(), ASHIFT_ENHANCE_DETAIL, ASHIFT_ENHANCE_EDGES, ASHIFT_ENHANCE_NONE, ASHIFT_JOBCODE_GET_STRUCTURE, ASHIFT_METHOD_AUTO, darktable, dt_iop_module_t::dev, dt_control_queue_redraw_center(), dt_dev_pixelpipe_update_history_preview, dt_iop_request_focus(), dt_modifiers_include(), dt_iop_module_t::enabled, FALSE, g, darktable_t::gui, dt_iop_module_t::gui_data, p, dt_gui_gtk_t::reset, TRUE, and void().
Referenced by gui_init().
|
static |
References _do_get_structure_lines(), ASHIFT_JOBCODE_GET_STRUCTURE_LINES, darktable, dt_iop_module_t::dev, dt_dev_pixelpipe_update_history_preview, dt_iop_request_focus(), dt_iop_module_t::enabled, FALSE, g, darktable_t::gui, dt_iop_module_t::gui_data, dt_gui_gtk_t::reset, and TRUE.
Referenced by gui_init().
|
static |
References _do_get_structure_quad(), ASHIFT_JOBCODE_GET_STRUCTURE_QUAD, darktable, dt_iop_module_t::dev, dt_dev_pixelpipe_update_history_preview, dt_iop_request_focus(), dt_iop_module_t::enabled, FALSE, g, darktable_t::gui, dt_iop_module_t::gui_data, dt_gui_gtk_t::reset, and TRUE.
Referenced by gui_init().
| dt_iop_ashift_params_t * _get_ashift_params | ( | dt_iop_module_t * | self | ) |
References g, dt_iop_module_t::gui_data, and dt_iop_module_t::params.
Referenced by _do_get_structure_lines(), _do_get_structure_quad(), _draw_retrieve_lines_from_params(), _draw_save_lines_to_params(), _event_fit_both_button_clicked(), _event_fit_h_button_clicked(), _event_fit_v_button_clicked(), _event_process_after_preview_callback(), _event_structure_auto_clicked(), button_released(), cropmode_callback(), gui_changed(), gui_post_expose(), gui_reset(), and gui_update().
|
static |
References ASHIFT_BOUNDING_DESELECT, ASHIFT_LINE_IRRELEVANT, ASHIFT_LINE_SELECTED, dt_iop_ashift_points_idx_t::bounded, n, dt_iop_ashift_points_idx_t::near, type, and dt_iop_ashift_points_idx_t::type.
Referenced by button_released(), and mouse_moved().
|
static |
References dt_hash(), n, dt_iop_ashift_line_t::p1, dt_iop_ashift_line_t::p2, and v.
Referenced by gui_post_expose().
|
static |
References ASHIFT_LINE_IRRELEVANT, delta, dt_iop_ashift_points_idx_t::length, n, dt_iop_ashift_points_idx_t::near, dt_iop_ashift_points_idx_t::offset, and type.
Referenced by button_pressed(), mouse_moved(), and scrolled().
|
static |
References dt_iop_module_t::dev, dt_free, dt_image_is_raw(), dt_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), dt_iop_image_copy_by_size(), error(), FALSE, g, dt_iop_module_t::gui_data, height, dt_develop_t::image_storage, line_detect(), TRUE, and width.
Referenced by _do_get_structure_auto().
|
static |
References enable(), g, and dt_iop_module_t::gui_data.
Referenced by _do_get_structure_auto(), _do_get_structure_lines(), _do_get_structure_quad(), _make_controls_sensitive(), gui_reset(), and reload_defaults().
| void _make_controls_sensitive | ( | dt_iop_module_t * | self, |
| const gboolean | sensitive | ||
| ) |
References _gui_update_structure_states(), FALSE, g, and dt_iop_module_t::gui_data.
Referenced by _enter_edit_mode(), _event_commit_clicked(), gui_changed(), and gui_update().
|
static |
References ASHIFT_LINE_HORIZONTAL_SELECTED, ASHIFT_LINE_MASK, ASHIFT_LINE_SELECTED, ASHIFT_LINE_VERTICAL_SELECTED, dt_free, error(), FALSE, g, dt_iop_module_t::gui_data, height, m, n, ransac(), TRUE, and width.
Referenced by _do_get_structure_auto().
|
static |
Rebuild the GUI-side fitting buffer from the authoritative preview cacheline.
The ashift GUI keeps a private float buffer used by structure detection and fit. That buffer is not owned by the pixelpipe cache and may disappear on darkroom teardown while the preview pipe still exact-hits cached hashes on re-entry. In that case, the correct recovery is to reopen the cached upstream preview input of the ashift piece and copy it back into g->buf.
This helper performs only that buffer resynchronization. Callers keep ownership of the fallback policy when the cacheline is unavailable, so the control flow that removes cache suffixes, requeues jobs, and resyncs preview remains explicit at the call site.
| self | Current ashift module. | |
| [out] | preview_piece_out | Matching ashift piece on the preview pipe, used by callers when the cache restore fails and they need to invalidate the preview suffix explicitly. |
g->buf has been repopulated from cache, FALSE otherwise. References dt_iop_buffer_dsc_t::channels, darktable, dt_dev_pixelpipe_iop_t::data, dt_iop_module_t::dev, dt_dev_pixelpipe_iop_t::dsc_in, dt_dev_distort_get_iop_pipe(), dt_dev_pixelpipe_cache_peek(), dt_dev_pixelpipe_cache_ref_count_entry(), dt_dev_pixelpipe_node_hash(), dt_free, dt_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), dt_iop_image_copy_by_size(), dt_dev_pixelpipe_iop_t::enabled, FALSE, g, dt_iop_module_t::gui_data, height, dt_iop_roi_t::height, dt_dev_pixelpipe_t::nodes, darktable_t::pixelpipe_cache, dt_develop_t::preview_pipe, dt_dev_pixelpipe_iop_t::roi_in, dt_iop_roi_t::scale, TRUE, width, dt_iop_roi_t::width, dt_iop_roi_t::x, and dt_iop_roi_t::y.
Referenced by _do_get_structure_auto(), _do_get_structure_lines(), and _do_get_structure_quad().
|
static |
References ASHIFT_LINE_HORIZONTAL_SELECTED, ASHIFT_LINE_MASK, ASHIFT_LINE_VERTICAL_SELECTED, n, and type.
Referenced by button_pressed(), button_released(), mouse_moved(), and scrolled().
| const char * aliases | ( | ) |
| int button_pressed | ( | struct dt_iop_module_t * | self, |
| double | x, | ||
| double | y, | ||
| double | pressure, | ||
| int | which, | ||
| int | type, | ||
| uint32_t | state | ||
| ) |
References _draw_basic_line(), _get_near(), _update_lines_count(), ASHIFT_BOUNDING_DESELECT, ASHIFT_BOUNDING_SELECT, ASHIFT_LINE_HORIZONTAL_SELECTED, ASHIFT_LINE_SELECTED, ASHIFT_LINE_VERTICAL_SELECTED, ASHIFT_METHOD_LINES, ASHIFT_METHOD_QUAD, dt_iop_module_t::dev, dt_conf_get_float(), dt_control_change_cursor(), dt_control_log(), dt_dev_coordinates_widget_to_image_norm(), dt_dev_distort_backtransform_plus(), dt_dev_get_zoom_scale(), DT_DEV_TRANSFORM_DIR_FORW_INCL, dt_free, dt_modifier_is(), FALSE, g, dt_iop_module_t::gui_data, i, dt_iop_module_t::iop_order, MAX_SAVED_LINES, n, dt_develop_t::preview_height, dt_develop_t::preview_width, dt_develop_t::processed_height, dt_develop_t::processed_width, dt_develop_t::roi, TRUE, type, dt_iop_ashift_line_t::type, dt_develop_t::virtual_pipe, and x.
Referenced by _click_on_view(), and _click_on_view_dictionary().
| int button_released | ( | struct dt_iop_module_t * | self, |
| double | x, | ||
| double | y, | ||
| int | which, | ||
| uint32_t | state | ||
| ) |
References _draw_retrieve_line_type(), _draw_save_lines_to_params(), _get_ashift_params(), _get_bounded_inside(), _update_lines_count(), a, ASHIFT_BOUNDING_DESELECT, ASHIFT_BOUNDING_OFF, ASHIFT_JOBCODE_DO_CROP, ASHIFT_LINE_SELECTED, ASHIFT_LINE_VERTICAL_SELECTED, ASHIFT_METHOD_LINES, darktable, dt_iop_module_t::dev, do_crop(), dt_bauhaus_slider_get(), dt_bauhaus_slider_set(), dt_control_change_cursor(), dt_control_queue_redraw_center(), dt_dev_add_history_item, dt_dev_coordinates_widget_to_image_norm(), dt_dev_distort_backtransform_plus(), DT_DEV_TRANSFORM_DIR_FORW_EXCL, dt_modifier_is(), FALSE, g, darktable_t::gui, dt_iop_module_t::gui_data, dt_iop_module_t::iop_order, M_PI, n, p, dt_develop_t::preview_height, dt_develop_t::preview_width, dt_develop_t::processed_height, dt_develop_t::processed_width, dt_gui_gtk_t::reset, dt_develop_t::roi, TRUE, dt_develop_t::virtual_pipe, and x.
|
static |
References dt_iop_module_t::dev, dt_dev_distort_get_iop_pipe(), dt_dev_pixelpipe_activemodule_disables_currentmodule(), and dt_develop_t::virtual_pipe.
Referenced by gui_post_expose().
| void cleanup_global | ( | dt_iop_module_so_t * | module | ) |
| void cleanup_pipe | ( | struct dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
References dt_dev_pixelpipe_iop_t::data, and dt_free_align.
| 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 | ||
| ) |
References ASHIFT_MODE_GENERIC, d, dt_dev_pixelpipe_iop_t::data, DEFAULT_F_LENGTH, g, dt_iop_module_t::gui_data, and p.
References A, dt_iop_ashift_cropfit_params_t::alpha, dt_iop_ashift_cropfit_params_t::edges, dt_iop_ashift_cropfit_params_t::height, dt_iop_ashift_cropfit_params_t::homograph, mat3mulv(), MIN, P, SQR, vec3isnull(), vec3prodn(), dt_iop_ashift_cropfit_params_t::width, x, dt_iop_ashift_cropfit_params_t::x, and dt_iop_ashift_cropfit_params_t::y.
Referenced by do_crop().
References _get_ashift_params(), ASHIFT_JOBCODE_DO_CROP, darktable, dt_iop_module_t::dev, do_crop(), dt_bauhaus_combobox_get(), dt_conf_set_int(), dt_dev_add_history_item, g, darktable_t::gui, dt_iop_module_t::gui_data, p, dt_gui_gtk_t::reset, and TRUE.
Referenced by gui_init().
| int default_colorspace | ( | dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| const dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
References IOP_CS_RGB.
| int default_group | ( | ) |
References IOP_GROUP_REPAIR.
Referenced by test_default_group().
| const char ** description | ( | struct dt_iop_module_t * | self | ) |
References dt_iop_set_description().
Referenced by _lib_history_change_text(), _piwigo_api_upload_photo(), dt_accels_new_action_shortcut(), dt_accels_search(), dt_lua_style_create_from_image(), dt_presets_import_from_file(), dt_presets_save_to_file(), dt_styles_create_from_image(), dt_styles_create_from_style(), dt_styles_create_style_header(), dt_styles_get_by_name(), dt_styles_get_description(), dt_styles_get_list(), dt_timer_start_with_name(), dt_unreachable_codepath_with_caller(), export_button_clicked_callback(), export_raw(), export_raw_button_clicked_callback(), export_style(), get_export_filename(), main_csv(), parse_csv(), store(), and style_duplicate().
|
static |
References b, dt_bilateral_blur(), dt_bilateral_free(), dt_bilateral_init(), dt_bilateral_slice_to_output(), dt_bilateral_splat(), dt_Lab_to_XYZ(), dt_XYZ_to_Lab(), FALSE, height, out, sigma_r, sigma_s, sRGB_to_XYZ(), TRUE, width, XYZ, and XYZ_to_sRGB().
Referenced by line_detect().
| 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 | ||
| ) |
References 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, dt_iop_ashift_data_t::cl, dt_iop_ashift_data_t::cr, dt_iop_ashift_data_t::ct, dt_dev_pixelpipe_iop_t::data, DT_ALIGNED_ARRAY, DT_ALIGNED_PIXEL, dt_iop_ashift_data_t::f_length_kb, dt_iop_roi_t::height, homography(), i, isneutral(), dt_iop_ashift_data_t::lensshift_h, dt_iop_ashift_data_t::lensshift_v, mat3mulv(), dt_iop_ashift_data_t::orthocorr, dt_iop_ashift_data_t::rotation, dt_iop_ashift_data_t::shear, and dt_iop_roi_t::width.
| 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 | ||
| ) |
References 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, dt_iop_ashift_data_t::cl, dt_iop_ashift_data_t::cr, dt_iop_ashift_data_t::ct, dt_dev_pixelpipe_iop_t::data, dt_interpolation_compute_pixel4c(), dt_interpolation_new(), DT_INTERPOLATION_USERPREF_WARP, dt_iop_image_copy_by_size(), dt_iop_ashift_data_t::f_length_kb, dt_iop_roi_t::height, homography(), i, isneutral(), dt_iop_ashift_data_t::lensshift_h, dt_iop_ashift_data_t::lensshift_v, mat3mulv(), dt_iop_ashift_data_t::orthocorr, out, dt_iop_ashift_data_t::rotation, dt_iop_roi_t::scale, dt_iop_ashift_data_t::shear, void(), dt_iop_roi_t::width, dt_iop_roi_t::x, and dt_iop_roi_t::y.
| 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 | ||
| ) |
References ASHIFT_HOMOGRAPH_FORWARD, 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, dt_iop_ashift_data_t::cl, dt_iop_ashift_data_t::cr, dt_iop_ashift_data_t::ct, dt_dev_pixelpipe_iop_t::data, DT_ALIGNED_ARRAY, DT_ALIGNED_PIXEL, dt_iop_ashift_data_t::f_length_kb, dt_iop_roi_t::height, homography(), i, isneutral(), dt_iop_ashift_data_t::lensshift_h, dt_iop_ashift_data_t::lensshift_v, mat3mulv(), dt_iop_ashift_data_t::orthocorr, dt_iop_ashift_data_t::rotation, dt_iop_ashift_data_t::shear, and dt_iop_roi_t::width.
|
static |
References _clear_shadow_crop_box(), A, dt_iop_ashift_cropfit_params_t::alpha, ASHIFT_CROP_LARGEST, ASHIFT_CROP_OFF, ASHIFT_HOMOGRAPH_FORWARD, ASHIFT_MODE_GENERIC, crop_constraint(), crop_fitness(), d, darktable, DEFAULT_F_LENGTH, dt_iop_module_t::dev, dt_bauhaus_combobox_set(), dt_control_log(), dt_dev_pixelpipe_resync_history_all, dt_dev_pixelpipe_update_history_all, dt_iop_ashift_cropfit_params_t::edges, g, darktable_t::gui, dt_iop_module_t::gui_data, dt_iop_ashift_cropfit_params_t::height, dt_iop_ashift_cropfit_params_t::homograph, homography(), mat3mulv(), MAX, MIN, n, NMS_CROP_EPSILON, NMS_CROP_ITERATIONS, NMS_CROP_SCALE, p, P, dt_gui_gtk_t::reset, simplex(), V, vec3prodn(), dt_iop_ashift_cropfit_params_t::width, dt_iop_ashift_cropfit_params_t::x, and dt_iop_ashift_cropfit_params_t::y.
Referenced by _event_process_after_preview_callback(), button_released(), cropmode_callback(), do_fit(), and gui_changed().
|
static |
References _do_get_structure_auto(), ASHIFT_ENHANCE_NONE, ASHIFT_HOMOGRAPH_FORWARD, ASHIFT_MODE_GENERIC, darktable, DEFAULT_F_LENGTH, do_crop(), dt_bauhaus_slider_set(), dt_control_log(), g, darktable_t::gui, dt_iop_module_t::gui_data, homography(), M_PI, mat3mulv(), MINIMUM_FITLINES, NMS_DID_NOT_CONVERGE, NMS_INSANE, NMS_NOT_ENOUGH_LINES, NMS_SUCCESS, nmsfit(), p, and dt_gui_gtk_t::reset.
Referenced by _event_fit_both_button_clicked(), _event_fit_h_button_clicked(), _event_fit_v_button_clicked(), and _event_process_after_preview_callback().
|
static |
References ASHIFT_ENHANCE_HORIZONTAL, ASHIFT_ENHANCE_VERTICAL, dt_free, edge_enhance_1d(), error(), FALSE, height, out, TRUE, and width.
Referenced by line_detect().
|
static |
References ASHIFT_ENHANCE_HORIZONTAL, height, i, kernel(), out, and width.
Referenced by edge_enhance().
References dt_bauhaus_combobox_get(), g, and dt_iop_module_t::gui_data.
Referenced by gui_init().
| int flags | ( | ) |
|
static |
|
static |
References ASHIFT_LINE_HORIZONTAL_NOT_SELECTED, ASHIFT_LINE_HORIZONTAL_SELECTED, ASHIFT_LINE_MASK, ASHIFT_LINE_VERTICAL_NOT_SELECTED, ASHIFT_LINE_VERTICAL_SELECTED, ASHIFT_LINECOLOR_BLUE, ASHIFT_LINECOLOR_GREEN, ASHIFT_LINECOLOR_GREY, ASHIFT_LINECOLOR_RED, ASHIFT_LINECOLOR_YELLOW, dt_iop_ashift_points_idx_t::bbx, dt_iop_ashift_points_idx_t::bbX, dt_iop_ashift_points_idx_t::bby, dt_iop_ashift_points_idx_t::bbY, dt_iop_ashift_points_idx_t::bounded, dt_iop_ashift_points_idx_t::color, dt_iop_module_t::dev, dt_dev_distort_transform_plus(), DT_DEV_TRANSFORM_DIR_FORW_INCL, dt_free, error(), FALSE, g, dt_iop_module_t::gui_data, i, dt_iop_module_t::iop_order, dt_iop_ashift_line_t::length, dt_iop_ashift_points_idx_t::length, MAX, n, dt_iop_ashift_points_idx_t::near, dt_iop_ashift_points_idx_t::offset, dt_iop_ashift_line_t::p1, dt_iop_ashift_line_t::p2, TRUE, type, dt_iop_ashift_line_t::type, dt_iop_ashift_points_idx_t::type, dt_develop_t::virtual_pipe, and x.
Referenced by gui_post_expose().
| void gui_changed | ( | dt_iop_module_t * | self, |
| GtkWidget * | w, | ||
| void * | previous | ||
| ) |
References _get_ashift_params(), _make_controls_sensitive(), ASHIFT_JOBCODE_DO_CROP, ASHIFT_MODE_SPECIFIC, dt_iop_module_t::dev, do_crop(), dt_bauhaus_combobox_get(), dt_bauhaus_slider_get(), dt_dev_pixelpipe_resync_history_all, dt_dev_pixelpipe_update_history_all, g, dt_iop_module_t::gui_data, and p.
Referenced by _enter_edit_mode().
| void gui_cleanup | ( | struct dt_iop_module_t * | self | ) |
| void gui_init | ( | struct dt_iop_module_t * | self | ) |
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_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_action_button_new(), dt_bauhaus_combobox_from_params(), dt_bauhaus_combobox_new_full(), dt_bauhaus_slider_from_params(), dt_bauhaus_slider_set_digits(), dt_bauhaus_slider_set_format(), dt_bauhaus_slider_set_soft_range(), DT_BAUHAUS_SPACE, DT_DEBUG_CONTROL_SIGNAL_CONNECT, DT_GUI_MODULE, dt_gui_new_collapsible_section(), dt_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), DT_PIXEL_APPLY_DPI, DT_PIXELPIPE_CACHE_HASH_INVALID, DT_SIGNAL_DEVELOP_PREVIEW_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, ROTATION_RANGE, ROTATION_RANGE_SOFT, SHEAR_RANGE, SHEAR_RANGE_SOFT, darktable_t::signals, TRUE, and dt_iop_module_t::widget.
| 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 | ||
| ) |
References _get_ashift_params(), _get_lines_hash(), ASHIFT_BOUNDING_OFF, ASHIFT_LINE_HORIZONTAL_SELECTED, ASHIFT_LINE_VERTICAL_SELECTED, ASHIFT_METHOD_LINES, ASHIFT_METHOD_QUAD, darktable_t::bauhaus, dt_dev_pixelpipe_iop_t::buf_in, C, call_distort_transform(), darktable, dt_iop_module_t::dev, dt_dev_clip_roi(), dt_dev_coordinates_widget_to_image_norm(), dt_dev_distort_get_iop_pipe(), dt_dev_distort_transform_plus(), dt_dev_get_history_hash(), dt_dev_get_natural_scale(), dt_dev_get_overlay_scale(), DT_DEV_PIPE_TOP_CHANGED, dt_dev_pixelpipe_get_hash(), dt_dev_pixelpipe_get_history_hash(), dt_dev_pixelpipe_sync_virtual(), dt_dev_rescale_roi(), DT_DEV_TRANSFORM_DIR_FORW_EXCL, dt_draw_set_color_overlay(), dt_free, dt_gui_draw_rounded_rectangle(), dt_guides_draw(), DT_PIXEL_APPLY_DPI, dt_iop_module_t::enabled, FALSE, g, get_points(), dt_iop_module_t::gui_data, height, dt_iop_roi_t::height, i, dt_iop_module_t::iop_order, M_PI, MAX, MIN, n, p, dt_bauhaus_t::pango_font_desc, dt_develop_t::preview_height, dt_develop_t::preview_pipe, dt_develop_t::preview_width, dt_develop_t::roi, TRUE, update_colors(), V, dt_develop_t::virtual_pipe, width, dt_iop_roi_t::width, dt_iop_roi_t::x, and dt_iop_roi_t::y.
| void gui_reset | ( | struct dt_iop_module_t * | self | ) |
| void gui_update | ( | struct dt_iop_module_t * | self | ) |
References _get_ashift_params(), _make_controls_sensitive(), ASHIFT_MODE_SPECIFIC, dt_gui_update_collapsible_section(), FALSE, g, dt_iop_module_t::gui_data, and p.
Referenced by dt_drawlayer_runtime_manager_update().
|
static |
References ASHIFT_HOMOGRAPH_FORWARD, height, M_PI, mat3inv(), mat3mul(), mat3mulv(), MAT3SWAP, v, width, and x.
Referenced by _draw_boxes(), distort_backtransform(), distort_mask(), distort_transform(), do_crop(), do_fit(), draw_box(), draw_color_boxes_inside(), draw_color_boxes_outline(), draw_d_boxes(), draw_f_boxes(), draw_image_callback(), get_corners(), get_xyz_sample_from_image(), model_fitness(), modify_roi_in(), modify_roi_out(), nmsfit(), and process().
| void init_global | ( | dt_iop_module_so_t * | module | ) |
| void init_pipe | ( | struct dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
References d, dt_dev_pixelpipe_iop_t::data, dt_dev_pixelpipe_iop_t::data_size, and dt_calloc_align().
|
inlinestatic |
References dt_iop_ashift_data_t::aspect, dt_iop_ashift_data_t::cb, dt_iop_ashift_data_t::cl, dt_iop_ashift_data_t::cr, dt_iop_ashift_data_t::ct, eps, dt_iop_ashift_data_t::lensshift_h, dt_iop_ashift_data_t::lensshift_v, dt_iop_ashift_data_t::rotation, and dt_iop_ashift_data_t::shear.
Referenced by distort_backtransform(), distort_mask(), distort_transform(), modify_roi_in(), modify_roi_out(), and process().
| int legacy_params | ( | dt_iop_module_t * | self, |
| const void *const | old_params, | ||
| const int | old_version, | ||
| void * | new_params, | ||
| const int | new_version | ||
| ) |
References ASHIFT_CROP_OFF, ASHIFT_MODE_GENERIC, dt_iop_ashift_params2_t::aspect, dt_iop_ashift_params3_t::aspect, dt_iop_ashift_params4_t::aspect, dt_iop_ashift_params3_t::cb, dt_iop_ashift_params4_t::cb, dt_iop_ashift_params3_t::cl, dt_iop_ashift_params4_t::cl, dt_iop_ashift_params3_t::cr, dt_iop_ashift_params4_t::cr, dt_iop_ashift_params2_t::crop_factor, dt_iop_ashift_params3_t::crop_factor, dt_iop_ashift_params4_t::crop_factor, dt_iop_ashift_params3_t::cropmode, dt_iop_ashift_params4_t::cropmode, dt_iop_ashift_params3_t::ct, dt_iop_ashift_params4_t::ct, DEFAULT_F_LENGTH, dt_iop_ashift_params2_t::f_length, dt_iop_ashift_params3_t::f_length, dt_iop_ashift_params4_t::f_length, i, dt_iop_ashift_params1_t::lensshift_h, dt_iop_ashift_params2_t::lensshift_h, dt_iop_ashift_params3_t::lensshift_h, dt_iop_ashift_params4_t::lensshift_h, dt_iop_ashift_params1_t::lensshift_v, dt_iop_ashift_params2_t::lensshift_v, dt_iop_ashift_params3_t::lensshift_v, dt_iop_ashift_params4_t::lensshift_v, MAX_SAVED_LINES, dt_iop_ashift_params2_t::mode, dt_iop_ashift_params3_t::mode, dt_iop_ashift_params4_t::mode, dt_iop_ashift_params2_t::orthocorr, dt_iop_ashift_params3_t::orthocorr, dt_iop_ashift_params4_t::orthocorr, dt_iop_ashift_params1_t::rotation, dt_iop_ashift_params2_t::rotation, dt_iop_ashift_params3_t::rotation, dt_iop_ashift_params4_t::rotation, dt_iop_ashift_params_t::rotation, and dt_iop_ashift_params4_t::shear.
|
static |
References ASHIFT_ENHANCE_DETAIL, ASHIFT_ENHANCE_EDGES, ASHIFT_LINE_HORIZONTAL_SELECTED, ASHIFT_LINE_IRRELEVANT, ASHIFT_LINE_VERTICAL_SELECTED, detail_enhance(), dt_free, edge_enhance(), error(), FALSE, gamma_correct(), height, L, dt_iop_ashift_line_t::length, LineSegmentDetection(), LSD_ANG_TH, LSD_DENSITY_TH, LSD_LOG_EPS, LSD_N_BINS, LSD_QUANT, LSD_SCALE, LSD_SIGMA_SCALE, M_PI, MAX_TANGENTIAL_DEVIATION, MIN_LINE_LENGTH, n, dt_iop_ashift_line_t::p1, dt_iop_ashift_line_t::p2, rgb2grey256(), TRUE, type, dt_iop_ashift_line_t::type, vec3lnorm(), vec3prodn(), vec3scalar(), void(), weight(), dt_iop_ashift_line_t::weight, width, and dt_iop_ashift_line_t::width.
Referenced by _get_structure().
References A, ASHIFT_HOMOGRAPH_FORWARD, ASHIFT_LINE_DIRVERT, dt_iop_ashift_fit_params_t::aspect, dt_iop_ashift_fit_params_t::f_length_kb, h, height, dt_iop_ashift_fit_params_t::height, homography(), ilogit(), L, dt_iop_ashift_fit_params_t::lensshift_h, dt_iop_ashift_fit_params_t::lensshift_h_range, dt_iop_ashift_fit_params_t::lensshift_v, dt_iop_ashift_fit_params_t::lensshift_v_range, dt_iop_ashift_fit_params_t::linemask, dt_iop_ashift_fit_params_t::lines, dt_iop_ashift_fit_params_t::lines_count, dt_iop_ashift_fit_params_t::linetype, mat3mulv(), n, dt_iop_ashift_fit_params_t::orthocorr, dt_iop_ashift_fit_params_t::params_count, dt_iop_ashift_fit_params_t::rotation, dt_iop_ashift_fit_params_t::rotation_range, dt_iop_ashift_fit_params_t::shear, dt_iop_ashift_fit_params_t::shear_range, type, dt_iop_ashift_line_t::type, v, vec3lnorm(), vec3prodn(), vec3scalar(), dt_iop_ashift_line_t::weight, width, and dt_iop_ashift_fit_params_t::width.
Referenced by nmsfit().
| void modify_roi_in | ( | struct dt_iop_module_t * | self, |
| struct dt_dev_pixelpipe_iop_t * | piece, | ||
| const dt_iop_roi_t *const | roi_out, | ||
| dt_iop_roi_t * | roi_in | ||
| ) |
References 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, dt_iop_ashift_data_t::cl, dt_iop_ashift_data_t::cr, dt_iop_ashift_data_t::ct, dt_dev_pixelpipe_iop_t::data, dt_interpolation_new(), DT_INTERPOLATION_USERPREF_WARP, dt_iop_ashift_data_t::f_length_kb, dt_iop_roi_t::height, homography(), isneutral(), dt_iop_ashift_data_t::lensshift_h, dt_iop_ashift_data_t::lensshift_v, mat3mulv(), MAX, MIN, dt_iop_ashift_data_t::orthocorr, dt_iop_ashift_data_t::rotation, dt_iop_roi_t::scale, dt_iop_ashift_data_t::shear, dt_interpolation::width, dt_iop_roi_t::width, x, dt_iop_roi_t::x, and dt_iop_roi_t::y.
| void modify_roi_out | ( | struct dt_iop_module_t * | self, |
| struct dt_dev_pixelpipe_iop_t * | piece, | ||
| dt_iop_roi_t * | roi_out, | ||
| const dt_iop_roi_t * | roi_in | ||
| ) |
References ASHIFT_HOMOGRAPH_FORWARD, dt_iop_ashift_data_t::aspect, dt_dev_pixelpipe_iop_t::buf_in, dt_iop_ashift_data_t::cb, dt_iop_ashift_data_t::cl, dt_iop_ashift_data_t::cr, dt_iop_ashift_data_t::ct, dt_dev_pixelpipe_iop_t::data, dt_iop_ashift_data_t::f_length_kb, height, dt_iop_roi_t::height, homography(), isneutral(), dt_iop_ashift_data_t::lensshift_h, dt_iop_ashift_data_t::lensshift_v, mat3mulv(), MAX, MIN, dt_iop_ashift_data_t::orthocorr, dt_iop_ashift_data_t::rotation, dt_iop_roi_t::scale, dt_iop_ashift_data_t::shear, width, dt_iop_roi_t::width, x, dt_iop_roi_t::x, and dt_iop_roi_t::y.
| int mouse_moved | ( | struct dt_iop_module_t * | self, |
| double | x, | ||
| double | y, | ||
| double | pressure, | ||
| int | which | ||
| ) |
References _draw_near_point(), _draw_recompute_line_length(), _get_bounded_inside(), _get_near(), _update_lines_count(), ASHIFT_BOUNDING_OFF, ASHIFT_LINE_SELECTED, ASHIFT_METHOD_LINES, ASHIFT_METHOD_QUAD, CLAMPF, dt_iop_module_t::dev, dt_control_queue_redraw_center(), dt_dev_coordinates_widget_to_image_norm(), dt_dev_distort_backtransform_plus(), DT_DEV_TRANSFORM_DIR_FORW_INCL, FALSE, g, dt_iop_module_t::gui_data, dt_iop_module_t::iop_order, n, dt_develop_t::preview_height, dt_develop_t::preview_width, dt_develop_t::processed_height, dt_develop_t::processed_width, dt_develop_t::roi, TRUE, dt_develop_t::virtual_pipe, and x.
| const char * name | ( | ) |
|
static |
References ASHIFT_FIT_FLIP, ASHIFT_FIT_LENS_BOTH, ASHIFT_FIT_LENS_HOR, ASHIFT_FIT_LENS_VERT, ASHIFT_FIT_LINES_BOTH, ASHIFT_FIT_LINES_HOR, ASHIFT_FIT_LINES_VERT, ASHIFT_FIT_NONE, ASHIFT_FIT_ROTATION, ASHIFT_FIT_SHEAR, ASHIFT_HOMOGRAPH_FORWARD, ASHIFT_LINE_DIRVERT, ASHIFT_LINE_MASK, ASHIFT_LINE_RELEVANT, ASHIFT_LINE_SELECTED, ASHIFT_MODE_GENERIC, dt_iop_ashift_fit_params_t::aspect, DEFAULT_F_LENGTH, dt_iop_ashift_fit_params_t::f_length_kb, g, dt_iop_module_t::gui_data, dt_iop_ashift_fit_params_t::height, homography(), ilogit(), dt_iop_ashift_fit_params_t::lensshift_h, dt_iop_ashift_fit_params_t::lensshift_h_range, dt_iop_ashift_fit_params_t::lensshift_v, dt_iop_ashift_fit_params_t::lensshift_v_range, dt_iop_ashift_fit_params_t::linemask, dt_iop_ashift_fit_params_t::lines, dt_iop_ashift_fit_params_t::lines_count, dt_iop_ashift_fit_params_t::linetype, logit(), mat3mulv(), MINIMUM_FITLINES, model_fitness(), NMS_DID_NOT_CONVERGE, NMS_EPSILON, NMS_INSANE, NMS_ITERATIONS, NMS_NOT_ENOUGH_LINES, NMS_SCALE, NMS_SUCCESS, dt_iop_ashift_fit_params_t::orthocorr, p, dt_iop_ashift_fit_params_t::params_count, dt_iop_ashift_fit_params_t::rotation, dt_iop_ashift_fit_params_t::rotation_range, dt_iop_ashift_fit_params_t::shear, dt_iop_ashift_fit_params_t::shear_range, simplex(), TRUE, dt_iop_ashift_fit_params_t::weight, dt_iop_ashift_fit_params_t::width, and x.
Referenced by do_fit().
| int operation_tags | ( | ) |
References IOP_TAG_DISTORT.
| int operation_tags_filter | ( | ) |
References IOP_TAG_CLIPPING, and IOP_TAG_DECORATION.
| 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 | ||
| ) |
References 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, dt_iop_buffer_dsc_t::channels, dt_iop_ashift_data_t::cl, dt_iop_ashift_data_t::cr, dt_iop_ashift_data_t::ct, dt_dev_pixelpipe_iop_t::data, dt_iop_module_t::dev, 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, 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, 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(), dt_drawlayer_runtime_manager_update(), and dt_iop_set_description().
|
static |
|
static |
References d, dt_free, fact(), dt_iop_ashift_line_t::L, n, perm, quickperm(), r, RANSAC_ELIMINATION_RATIO, RANSAC_EPSILON, RANSAC_EPSILON_STEP, RANSAC_HURDLE, RANSAC_OPTIMIZATION_DRY_RUNS, RANSAC_OPTIMIZATION_STEPS, RANSAC_RUNS, shuffle(), V, vec3isnull(), vec3norm(), vec3prodn(), vec3scalar(), and weight().
Referenced by _remove_outliers().
| void reload_defaults | ( | dt_iop_module_t * | module | ) |
References _gui_update_structure_states(), ASHIFT_BOUNDING_OFF, ASHIFT_FIT_NONE, ASHIFT_JOBCODE_NONE, ASHIFT_METHOD_NONE, DEFAULT_F_LENGTH, dt_iop_module_t::default_params, dt_iop_module_t::dev, dt_bauhaus_slider_set_default(), dt_bauhaus_widget_set_label(), dt_conf_get_int(), dt_free, dt_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), DT_PIXELPIPE_CACHE_HASH_INVALID, dt_image_t::exif_crop, dt_image_t::exif_focal_length, FALSE, g, dt_iop_module_t::gui_data, LENSSHIFT_RANGE_SOFT, dt_image_t::orientation, ORIENTATION_ROTATE_CCW_90_DEG, ORIENTATION_ROTATE_CW_90_DEG, ROTATION_RANGE_SOFT, and SHEAR_RANGE_SOFT.
Referenced by dt_dev_replace_history_on_image().
|
static |
References height, out, and width.
Referenced by line_detect().
| gboolean runtime_data_hash | ( | struct dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| const dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
| int scrolled | ( | struct dt_iop_module_t * | self, |
| double | x, | ||
| double | y, | ||
| int | up, | ||
| uint32_t | state | ||
| ) |
References _get_near(), _update_lines_count(), ASHIFT_LINE_SELECTED, ASHIFT_METHOD_LINES, ASHIFT_METHOD_QUAD, dt_iop_module_t::dev, dt_conf_get_float(), dt_conf_set_float(), dt_control_queue_redraw_center(), dt_dev_coordinates_widget_to_image_norm(), FALSE, g, dt_iop_module_t::gui_data, MAX, MIN, n, dt_develop_t::preview_height, dt_develop_t::preview_width, dt_develop_t::roi, TRUE, and x.
Referenced by _active_modules_popup(), _hm_show_merge_report_popup(), and dt_accels_search().
|
static |
|
static |
Referenced by detail_enhance().
|
inlinestatic |
Referenced by quickperm(), and shuffle().
|
static |
References ASHIFT_LINE_HORIZONTAL_NOT_SELECTED, ASHIFT_LINE_HORIZONTAL_SELECTED, ASHIFT_LINE_MASK, ASHIFT_LINE_VERTICAL_NOT_SELECTED, ASHIFT_LINE_VERTICAL_SELECTED, ASHIFT_LINECOLOR_BLUE, ASHIFT_LINECOLOR_GREEN, ASHIFT_LINECOLOR_GREY, ASHIFT_LINECOLOR_RED, ASHIFT_LINECOLOR_YELLOW, dt_iop_ashift_points_idx_t::color, g, dt_iop_module_t::gui_data, n, TRUE, type, and dt_iop_ashift_points_idx_t::type.
Referenced by gui_post_expose().
|
inlinestatic |
Referenced by crop_fitness(), and ransac().
|
inlinestatic |
Referenced by _draw_basic_line(), line_detect(), and model_fitness().
|
inlinestatic |
|
inlinestatic |
Referenced by _draw_basic_line(), crop_fitness(), do_crop(), line_detect(), model_fitness(), and ransac().
|
inlinestatic |
Referenced by line_detect(), model_fitness(), and ransac().
|
static |
Referenced by detail_enhance().