![]() |
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/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; } |
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) |
| #define MAT3SWAP | ( | a, | |
| b | |||
| ) | { float (*tmp)[3] = (a); (a) = (b); (b) = tmp; } |
| 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 |
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.
| p | Parameter set whose crop margins must be reset. |
Definition at line 744 of file ashift.c.
References p.
Referenced by do_crop().
|
static |
Definition at line 2909 of file ashift.c.
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 |
Definition at line 2934 of file ashift.c.
References _get_structure(), _gui_update_structure_states(), _remove_outliers(), ASHIFT_JOBCODE_GET_STRUCTURE, dt_control_log(), dt_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), error(), FALSE, g, dt_iop_module_t::gui_data, IS_NULL_PTR, and TRUE.
Referenced by _event_structure_auto_clicked(), _run_pending_preview_job(), and do_fit().
|
static |
Definition at line 2993 of file ashift.c.
References _do_clean_structure(), _draw_retrieve_lines_from_params(), _get_ashift_params(), _gui_update_structure_states(), ASHIFT_METHOD_LINES, dt_iop_module_t::dev, dt_control_queue_redraw_center(), dt_dev_distort_get_iop_pipe(), g, dt_iop_module_t::gui_data, dt_dev_pixelpipe_iop_t::iheight, IS_NULL_PTR, dt_dev_pixelpipe_iop_t::iwidth, p, TRUE, and dt_develop_t::virtual_pipe.
Referenced by _event_structure_lines_clicked(), and _run_pending_preview_job().
|
static |
Definition at line 3020 of file ashift.c.
References _do_clean_structure(), _draw_basic_line(), _draw_retrieve_line_type(), _draw_retrieve_lines_from_params(), _get_ashift_params(), _gui_update_structure_states(), ASHIFT_LINE_HORIZONTAL_SELECTED, ASHIFT_LINE_VERTICAL_SELECTED, ASHIFT_METHOD_QUAD, darktable, dt_iop_module_t::dev, darktable_t::develop, dt_control_queue_redraw_center(), dt_dev_distort_backtransform_plus(), dt_dev_distort_get_iop_pipe(), DT_DEV_TRANSFORM_DIR_FORW_INCL, g, dt_iop_module_t::gui_data, i, dt_dev_pixelpipe_iop_t::iheight, dt_iop_module_t::iop_order, IS_NULL_PTR, dt_dev_pixelpipe_iop_t::iwidth, p, dt_develop_t::processed_height, dt_develop_t::processed_width, dt_develop_t::roi, TRUE, and dt_develop_t::virtual_pipe.
Referenced by _event_structure_quad_clicked(), and _run_pending_preview_job().
|
static |
Definition at line 2729 of file ashift.c.
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 |
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().
|
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().
|
static |
Definition at line 2720 of file ashift.c.
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 |
Definition at line 2810 of file ashift.c.
References _draw_basic_line(), _get_ashift_params(), ASHIFT_LINE_HORIZONTAL_SELECTED, ASHIFT_LINE_VERTICAL_SELECTED, ASHIFT_METHOD_LINES, ASHIFT_METHOD_QUAD, darktable, dt_iop_module_t::dev, darktable_t::develop, 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, IS_NULL_PTR, 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 |
Definition at line 2764 of file ashift.c.
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, IS_NULL_PTR, MAX_SAVED_LINES, p, and dt_develop_t::virtual_pipe.
Referenced by _do_clean_structure(), and button_released().
|
static |
Definition at line 5323 of file ashift.c.
References _make_controls_sensitive(), darktable, dt_iop_module_t::dev, dt_bauhaus_combobox_set(), dt_control_change_cursor, dt_control_queue_redraw(), dt_dev_add_history_item, dt_dev_get_thumbnail_size(), DT_DEV_PIPE_SYNCH, dt_dev_pixelpipe_resync_history_all, dt_dev_pixelpipe_sync_virtual(), dt_iop_request_focus(), dt_iop_set_cache_bypass(), dt_iop_module_t::enabled, FALSE, g, darktable_t::gui, gui_changed(), dt_iop_module_t::gui_data, p, dt_iop_module_t::params, dt_gui_gtk_t::reset, and TRUE.
Referenced by _event_commit_clicked(), and gui_init().
|
static |
Definition at line 5377 of file ashift.c.
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 |
Definition at line 5690 of file ashift.c.
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 |
Definition at line 5169 of file ashift.c.
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 |
Definition at line 5122 of file ashift.c.
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 |
Definition at line 5075 of file ashift.c.
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 |
Definition at line 5449 of file ashift.c.
References _run_pending_preview_job(), ASHIFT_JOBCODE_NONE, darktable, dt_control_queue_redraw_center(), g, darktable_t::gui, dt_iop_module_t::gui_data, IS_NULL_PTR, dt_gui_gtk_t::reset, and void().
Referenced by gui_cleanup(), and gui_init().
|
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().
|
static |
Definition at line 5218 of file ashift.c.
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 |
Definition at line 5298 of file ashift.c.
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 |
Definition at line 5273 of file ashift.c.
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 | ) |
Definition at line 658 of file ashift.c.
References g, dt_iop_module_t::gui_data, IS_NULL_PTR, 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_ui_callback(), _event_structure_auto_clicked(), _run_pending_preview_job(), button_released(), cropmode_callback(), gui_changed(), gui_post_expose(), and gui_update().
|
static |
Definition at line 3491 of file ashift.c.
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, state, type, and dt_iop_ashift_points_idx_t::type.
Referenced by button_released(), and mouse_moved().
|
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().
|
static |
Definition at line 3446 of file ashift.c.
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 |
Definition at line 1599 of file ashift.c.
References dt_iop_module_t::dev, dt_free, dt_image_needs_rawprepare(), dt_image_pipe_class(), dt_image_pipe_class_name(), dt_iop_fmt_log, 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, IS_NULL_PTR, line_detect(), TRUE, and width.
Referenced by _do_get_structure_auto().
|
static |
Definition at line 2756 of file ashift.c.
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 | ||
| ) |
Definition at line 4973 of file ashift.c.
References _gui_update_structure_states(), g, and dt_iop_module_t::gui_data.
Referenced by _enter_edit_mode(), _event_commit_clicked(), gui_changed(), gui_reset(), and gui_update().
|
static |
Definition at line 1909 of file ashift.c.
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, IS_NULL_PTR, m, n, ransac(), TRUE, and width.
Referenced by _do_get_structure_auto().
|
static |
Definition at line 5405 of file ashift.c.
References _do_get_structure_auto(), _do_get_structure_lines(), _do_get_structure_quad(), _get_ashift_params(), ASHIFT_JOBCODE_FIT, ASHIFT_JOBCODE_GET_STRUCTURE, ASHIFT_JOBCODE_GET_STRUCTURE_LINES, ASHIFT_JOBCODE_GET_STRUCTURE_QUAD, ASHIFT_JOBCODE_NONE, darktable, do_fit(), g, darktable_t::gui, dt_iop_module_t::gui_data, p, dt_gui_gtk_t::reset, and void().
Referenced by _event_process_after_preview_callback().
|
static |
Definition at line 4174 of file ashift.c.
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().
| int button_pressed | ( | struct dt_iop_module_t * | self, |
| double | x, | ||
| double | y, | ||
| double | pressure, | ||
| int | which, | ||
| int | type, | ||
| uint32_t | state | ||
| ) |
Definition at line 4460 of file ashift.c.
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, darktable, dt_iop_module_t::dev, darktable_t::develop, 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, IS_NULL_PTR, MAX_SAVED_LINES, MIN, 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, state, 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 | ||
| ) |
Definition at line 4712 of file ashift.c.
References _draw_retrieve_line_type(), _draw_save_lines_to_params(), _get_ashift_params(), _get_bounded_inside(), _update_lines_count(), ASHIFT_BOUNDING_DESELECT, ASHIFT_BOUNDING_OFF, ASHIFT_LINE_SELECTED, ASHIFT_LINE_VERTICAL_SELECTED, ASHIFT_METHOD_LINES, darktable, dt_iop_module_t::dev, darktable_t::develop, 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, IS_NULL_PTR, M_PI, MIN, 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, state, TRUE, dt_develop_t::virtual_pipe, and x.
|
static |
Definition at line 3742 of file ashift.c.
References dt_dev_pixelpipe_t::dev, dt_dev_distort_get_iop_pipe(), dt_dev_pixelpipe_activemodule_disables_currentmodule(), and IS_NULL_PTR.
Referenced by gui_post_expose().
| void cleanup_global | ( | dt_iop_module_so_t * | module | ) |
Definition at line 5680 of file ashift.c.
References dt_iop_module_so_t::data, dt_free, dt_opencl_free_kernel(), dt_iop_ashift_global_data_t::kernel_ashift_bicubic, dt_iop_ashift_global_data_t::kernel_ashift_bilinear, and dt_iop_ashift_global_data_t::kernel_ashift_mitchell.
| 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.
| 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 | ||
| ) |
Definition at line 5492 of file ashift.c.
References ASHIFT_MODE_GENERIC, d, dt_dev_pixelpipe_iop_t::data, DEFAULT_F_LENGTH, g, dt_iop_module_t::gui_data, IS_NULL_PTR, p, and dt_iop_ashift_params_t::rotation.
Definition at line 2436 of file ashift.c.
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, k, 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().
Definition at line 5050 of file ashift.c.
References _get_ashift_params(), 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 | ||
| ) |
Definition at line 191 of file ashift.c.
References IOP_CS_RGB.
| int default_group | ( | ) |
Definition at line 175 of file ashift.c.
References IOP_GROUP_REPAIR.
Referenced by test_default_group().
| const char ** description | ( | struct dt_iop_module_t * | self | ) |
Definition at line 160 of file ashift.c.
References dt_iop_set_description().
Referenced by _dt_CGATS_get_name(), _lib_history_change_text(), _piwigo_api_upload_photo(), _preload_image_cache_with_max_size(), dt_accels_new_action_shortcut(), dt_accels_search(), 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(), and store().
|
static |
Definition at line 1366 of file ashift.c.
References __OMP_PARALLEL_FOR__, 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, IS_NULL_PTR, 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 | ||
| ) |
Definition at line 1022 of file ashift.c.
References __OMP_PARALLEL_FOR_SIMD__, 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 | ||
| ) |
Definition at line 1052 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, 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 | ||
| ) |
Definition at line 991 of file ashift.c.
References __OMP_PARALLEL_FOR_SIMD__, 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 |
Definition at line 2515 of file ashift.c.
References _clear_crop_box(), A, dt_iop_ashift_cropfit_params_t::alpha, ASHIFT_CROP_LARGEST, ASHIFT_CROP_OFF, ASHIFT_HOMOGRAPH_FORWARD, ASHIFT_MODE_GENERIC, dt_dev_pixelpipe_iop_t::buf_in, crop_constraint(), crop_fitness(), d, darktable, DEFAULT_F_LENGTH, dt_iop_module_t::dev, dt_bauhaus_combobox_set(), dt_control_log(), dt_dev_distort_get_iop_pipe(), dt_dev_get_thumbnail_size(), DT_DEV_PIPE_SYNCH, dt_dev_pixelpipe_resync_history_all, dt_dev_pixelpipe_sync_virtual(), DT_PIXELPIPE_CACHE_HASH_INVALID, dt_iop_ashift_cropfit_params_t::edges, g, darktable_t::gui, dt_iop_module_t::gui_data, dt_iop_roi_t::height, dt_iop_ashift_cropfit_params_t::height, dt_iop_ashift_cropfit_params_t::homograph, homography(), IS_NULL_PTR, mat3mulv(), MAX, MIN, n, NMS_CROP_EPSILON, NMS_CROP_ITERATIONS, NMS_CROP_SCALE, p, P, dt_gui_gtk_t::reset, simplex(), V, vec3prodn(), dt_develop_t::virtual_pipe, dt_iop_roi_t::width, dt_iop_ashift_cropfit_params_t::width, dt_iop_ashift_cropfit_params_t::x, and dt_iop_ashift_cropfit_params_t::y.
Referenced by button_released(), cropmode_callback(), do_fit(), and gui_changed().
|
static |
Definition at line 3079 of file ashift.c.
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(), IS_NULL_PTR, 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 _run_pending_preview_job().
|
static |
Definition at line 1317 of file ashift.c.
References __OMP_PARALLEL_FOR__, ASHIFT_ENHANCE_HORIZONTAL, ASHIFT_ENHANCE_VERTICAL, dt_free, edge_enhance_1d(), error(), FALSE, height, IS_NULL_PTR, k, out, TRUE, and width.
Referenced by line_detect().
|
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().
|
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().
| int flags | ( | ) |
Definition at line 169 of file ashift.c.
References IOP_FLAGS_ALLOW_TILING, IOP_FLAGS_GUIDES_SPECIAL_DRAW, IOP_FLAGS_ONE_INSTANCE, and IOP_FLAGS_TILING_FULL_ROI.
|
static |
Definition at line 1412 of file ashift.c.
References __OMP_PARALLEL_FOR__, height, LSD_GAMMA, out, and width.
Referenced by line_detect().
|
static |
Definition at line 3583 of file ashift.c.
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, IS_NULL_PTR, 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 | ||
| ) |
Definition at line 4983 of file ashift.c.
References _get_ashift_params(), _make_controls_sensitive(), ASHIFT_MODE_SPECIFIC, do_crop(), dt_bauhaus_combobox_get(), dt_bauhaus_slider_get(), g, dt_iop_module_t::gui_data, and p.
Referenced by _enter_edit_mode().
| void gui_cleanup | ( | struct dt_iop_module_t * | self | ) |
Definition at line 5943 of file ashift.c.
References _event_process_after_preview_callback(), _event_process_after_ui_callback(), darktable, DT_DEBUG_CONTROL_SIGNAL_DISCONNECT, dt_free, dt_iop_set_cache_bypass(), FALSE, g, dt_iop_module_t::gui_data, IOP_GUI_FREE, and darktable_t::signals.
| 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.
| 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 | ||
| ) |
Definition at line 3761 of file ashift.c.
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(), ch, darktable, dt_iop_module_t::dev, darktable_t::develop, 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, IS_NULL_PTR, 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 | ) |
Definition at line 5019 of file ashift.c.
References _do_clean_structure(), _gui_update_structure_states(), _make_controls_sensitive(), ASHIFT_JOBCODE_NONE, dt_iop_module_t::default_params, dt_bauhaus_combobox_set(), dt_control_change_cursor, dt_iop_set_cache_bypass(), FALSE, g, dt_iop_module_t::gui_data, p, and dt_iop_module_t::params.
| void gui_update | ( | struct dt_iop_module_t * | self | ) |
Definition at line 5553 of file ashift.c.
References _get_ashift_params(), _make_controls_sensitive(), ASHIFT_MODE_SPECIFIC, dt_bauhaus_combobox_set(), dt_gui_update_collapsible_section(), FALSE, g, dt_iop_module_t::gui_data, and p.
Referenced by dt_drawlayer_runtime_manager_update().
|
static |
Definition at line 755 of file ashift.c.
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(), process(), and process_cl().
| void init_global | ( | dt_iop_module_so_t * | module | ) |
Definition at line 5668 of file ashift.c.
References dt_opencl_create_kernel(), dt_iop_ashift_global_data_t::kernel_ashift_bicubic, dt_iop_ashift_global_data_t::kernel_ashift_bilinear, and dt_iop_ashift_global_data_t::kernel_ashift_mitchell.
| void init_pipe | ( | struct dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
Definition at line 5540 of file ashift.c.
References d, dt_dev_pixelpipe_iop_t::data, dt_dev_pixelpipe_iop_t::data_size, and dt_calloc_align().
|
inlinestatic |
Definition at line 974 of file ashift.c.
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(), process(), and process_cl().
| int legacy_params | ( | dt_iop_module_t * | self, |
| const void *const | old_params, | ||
| const int | old_version, | ||
| void * | new_params, | ||
| const int | new_version | ||
| ) |
Definition at line 556 of file ashift.c.
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 |
Definition at line 1425 of file ashift.c.
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, IS_NULL_PTR, 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().
Definition at line 2035 of file ashift.c.
References A, ASHIFT_HOMOGRAPH_FORWARD, ASHIFT_LINE_DIRVERT, dt_iop_ashift_fit_params_t::aspect, dt_iop_ashift_fit_params_t::f_length_kb, 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, |
| 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 | ||
| ) |
Definition at line 1172 of file ashift.c.
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, void(), 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, |
| 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 | ||
| ) |
Definition at line 1111 of file ashift.c.
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 | ||
| ) |
Definition at line 4213 of file ashift.c.
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, darktable, dt_iop_module_t::dev, darktable_t::develop, 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, IS_NULL_PTR, MIN, 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.
|
static |
Definition at line 2158 of file ashift.c.
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(), IS_NULL_PTR, 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 | ( | ) |
Definition at line 180 of file ashift.c.
References IOP_TAG_DISTORT.
| int operation_tags_filter | ( | ) |
Definition at line 185 of file ashift.c.
References IOP_TAG_CLIPPING, and IOP_TAG_DECORATION.
| __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().
| 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 | ||
| ) |
Definition at line 3289 of file ashift.c.
References ASHIFT_HOMOGRAPH_INVERTED, dt_dev_pixelpipe_iop_t::buf_in, dt_dev_pixelpipe_iop_t::buf_out, d, darktable, dt_dev_pixelpipe_iop_t::data, dt_iop_module_t::dev, darktable_t::develop, dt_dev_pixelpipe_t::devid, DT_DEBUG_OPENCL, dt_dev_distort_backtransform_plus(), dt_dev_pixelpipe_has_preview_output(), DT_DEV_TRANSFORM_DIR_FORW_EXCL, dt_free, DT_INTERPOLATION_BICUBIC, DT_INTERPOLATION_BILINEAR, DT_INTERPOLATION_MITCHELL, dt_interpolation_new(), DT_INTERPOLATION_USERPREF_WARP, dt_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), dt_opencl_copy_device_to_host(), dt_opencl_copy_host_to_device_constant(), dt_opencl_enqueue_copy_image(), dt_opencl_enqueue_kernel_2d(), dt_opencl_release_mem_object(), dt_opencl_set_kernel_arg(), dt_print(), error(), FALSE, g, dt_iop_module_t::global_data, 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(), dt_interpolation::id, dt_iop_module_t::iop_order, IS_NULL_PTR, isneutral(), dt_iop_ashift_global_data_t::kernel_ashift_bicubic, dt_iop_ashift_global_data_t::kernel_ashift_bilinear, dt_iop_ashift_global_data_t::kernel_ashift_mitchell, M_PI, dt_develop_t::preview_pipe, dt_dev_pixelpipe_iop_t::roi_in, dt_dev_pixelpipe_iop_t::roi_out, ROUNDUPDHT, ROUNDUPDWD, dt_iop_roi_t::scale, TRUE, dt_develop_t::virtual_pipe, width, dt_iop_roi_t::width, dt_iop_roi_t::x, and dt_iop_roi_t::y.
|
static |
|
static |
Definition at line 1736 of file ashift.c.
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 | ) |
Definition at line 5565 of file ashift.c.
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_combobox_set_default(), 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, IS_NULL_PTR, 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 |
Definition at line 1250 of file ashift.c.
References __OMP_PARALLEL_FOR__, 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 | ||
| ) |
Definition at line 4895 of file ashift.c.
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, IS_NULL_PTR, 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 |
|
inlinestatic |
Definition at line 1680 of file ashift.c.
Referenced by quickperm(), and shuffle().
|
static |
Definition at line 3551 of file ashift.c.
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 |
|
inlinestatic |
Definition at line 703 of file ashift.c.
Referenced by _draw_basic_line(), line_detect(), and model_fitness().
|
inlinestatic |
|
inlinestatic |
Definition at line 670 of file ashift.c.
Referenced by _draw_basic_line(), crop_fitness(), do_crop(), line_detect(), model_fitness(), and ransac().
|
inlinestatic |
Definition at line 717 of file ashift.c.
Referenced by line_detect(), model_fitness(), and ransac().
|
static |