From 7395b26db4311509646c32fd72e3496087a71ccc Mon Sep 17 00:00:00 2001 From: Lawrence Date: Sat, 18 Jan 2020 17:13:24 -0800 Subject: [PATCH] Add rotation to camera-based perspective tool This rotation is different from the Rotate tool and the post-correction adjustment rotation because it is applied between camera shift and camera angle. It is equivalent to correcting the camera's roll and is the same as the rotation calculated by automatic perspective correction. --- rtdata/languages/default | 1 + rtengine/ashift_dt.c | 2 +- rtengine/iptransform.cc | 23 +++++++++++++++-------- rtengine/perspectivecorrection.cc | 22 ++++++++++++---------- rtengine/procparams.cc | 4 ++++ rtengine/procparams.h | 1 + rtgui/paramsedited.cc | 6 ++++++ rtgui/paramsedited.h | 1 + rtgui/perspective.cc | 21 +++++++++++++++++++-- rtgui/perspective.h | 1 + 10 files changed, 61 insertions(+), 21 deletions(-) diff --git a/rtdata/languages/default b/rtdata/languages/default index 82431fb43..95b8980b3 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -1815,6 +1815,7 @@ TP_PERSPECTIVE_CAMERA_CROP_FACTOR;Crop factor TP_PERSPECTIVE_CAMERA_FRAME;Correction TP_PERSPECTIVE_CAMERA_FOCAL_LENGTH;Focal length TP_PERSPECTIVE_CAMERA_PITCH;Vertical +TP_PERSPECTIVE_CAMERA_ROLL;Rotation TP_PERSPECTIVE_CAMERA_SHIFT_HORIZONTAL;Horizontal shift TP_PERSPECTIVE_CAMERA_SHIFT_VERTICAL;Vertical shift TP_PERSPECTIVE_CAMERA_YAW;Horizontal diff --git a/rtengine/ashift_dt.c b/rtengine/ashift_dt.c index d5367d7a5..b63ef147f 100644 --- a/rtengine/ashift_dt.c +++ b/rtengine/ashift_dt.c @@ -670,7 +670,7 @@ static void homography(float *homograph, const float angle, const float shift_v, const float u = width; const float v = height; - const float rot = M_PI * angle / 180.0f; + const float rot = -M_PI * angle / 180.0f; const float pitch = M_PI * camera_pitch / 180.0f; const float yaw = M_PI * camera_yaw / 180.0f; diff --git a/rtengine/iptransform.cc b/rtengine/iptransform.cc index b8083c1d6..600dca033 100644 --- a/rtengine/iptransform.cc +++ b/rtengine/iptransform.cc @@ -212,6 +212,7 @@ namespace rtengine * @param camera_focal_length Camera's focal length. * @param camera_shift_horiz Camera lens's shift to the right. * @param camera_shift_vert Camera lens's shift upwards. + * @param camera_roll Camera's roll in radians. Counter-clockwise is positive. * @param camera_pitch Camera's pitch in radians. Up is positive. * @param camera_yaw Camera's yaw in radians. Right is positive. * Up is positive. @@ -227,10 +228,11 @@ namespace rtengine * @param projection_scale Scale factor of perspective-corrected image. */ homogeneous::Matrix perspectiveMatrix(double camera_focal_length, double - camera_shift_horiz, double camera_shift_vert, double camera_pitch, - double camera_yaw, double projection_yaw, double projection_pitch, - double projection_rotate, double projection_shift_horiz, double - projection_shift_vert, double projection_scale) + camera_shift_horiz, double camera_shift_vert, double camera_roll, double + camera_pitch, double camera_yaw, double projection_yaw, double + projection_pitch, double projection_rotate, double + projection_shift_horiz, double projection_shift_vert, double + projection_scale) { const double projection_scale_inverse = 1.0 / projection_scale; homogeneous::Vector center; @@ -254,6 +256,8 @@ homogeneous::Matrix perspectiveMatrix(double camera_focal_length, double // Lens/sensor shift and move to z == camera_focal_length. homogeneous::translationMatrix(-camera_shift_horiz, -camera_shift_vert, -camera_focal_length) * + // Camera roll. + homogeneous::rotationMatrix(camera_roll, homogeneous::Axis::Z) * // Perspective correction. homogeneous::projectionMatrix(camera_focal_length, homogeneous::Axis::Z) * homogeneous::rotationMatrix(-camera_pitch, homogeneous::Axis::X) * @@ -337,6 +341,7 @@ bool ImProcFunctions::transCoord (int W, int H, const std::vector &src, 12.0*12.0)); const double p_camera_yaw = params->perspective.camera_yaw / 180.0 * rtengine::RT_PI; const double p_camera_pitch = params->perspective.camera_pitch / 180.0 * rtengine::RT_PI; + const double p_camera_roll = params->perspective.camera_roll * rtengine::RT_PI_180; const double p_camera_shift_horiz = oW / 100.0 * params->perspective.camera_shift_horiz; const double p_camera_shift_vert = oH / -100.0 * params->perspective.camera_shift_vert; const double p_projection_shift_horiz = oW / 100.0 * params->perspective.projection_shift_horiz; @@ -346,8 +351,8 @@ bool ImProcFunctions::transCoord (int W, int H, const std::vector &src, const double p_projection_pitch = -params->perspective.projection_pitch * rtengine::RT_PI_180; const double p_projection_scale = params->perspective.projection_scale; const homogeneous::Matrix p_matrix = perspectiveMatrix(f, - p_camera_shift_horiz, p_camera_shift_vert, p_camera_pitch, - p_camera_yaw, p_projection_yaw, p_projection_pitch, + p_camera_shift_horiz, p_camera_shift_vert, p_camera_roll, + p_camera_pitch, p_camera_yaw, p_projection_yaw, p_projection_pitch, p_projection_rotate, p_projection_shift_horiz, p_projection_shift_vert, p_projection_scale); @@ -1044,6 +1049,7 @@ void ImProcFunctions::transformGeneral(bool highQuality, Imagefloat *original, I 12.0*12.0)); const double p_camera_yaw = params->perspective.camera_yaw / 180.0 * rtengine::RT_PI; const double p_camera_pitch = params->perspective.camera_pitch / 180.0 * rtengine::RT_PI; + const double p_camera_roll = params->perspective.camera_roll * rtengine::RT_PI_180; const double p_camera_shift_horiz = oW / 100.0 * params->perspective.camera_shift_horiz; const double p_camera_shift_vert = oH / -100.0 * params->perspective.camera_shift_vert; const double p_projection_shift_horiz = oW / 100.0 * params->perspective.projection_shift_horiz; @@ -1053,8 +1059,8 @@ void ImProcFunctions::transformGeneral(bool highQuality, Imagefloat *original, I const double p_projection_pitch = -params->perspective.projection_pitch * rtengine::RT_PI_180; const double p_projection_scale = params->perspective.projection_scale; const homogeneous::Matrix p_matrix = perspectiveMatrix(f, - p_camera_shift_horiz, p_camera_shift_vert, p_camera_pitch, - p_camera_yaw, p_projection_yaw, p_projection_pitch, + p_camera_shift_horiz, p_camera_shift_vert, p_camera_roll, + p_camera_pitch, p_camera_yaw, p_projection_yaw, p_projection_pitch, p_projection_rotate, p_projection_shift_horiz, p_projection_shift_vert, p_projection_scale); @@ -1298,6 +1304,7 @@ bool ImProcFunctions::needsPerspective () const (params->perspective.horizontal || params->perspective.vertical) ) || ( (params->perspective.method == "camera_based") && ( params->perspective.camera_pitch || + params->perspective.camera_roll || params->perspective.camera_shift_horiz || params->perspective.camera_shift_vert || params->perspective.camera_yaw || diff --git a/rtengine/perspectivecorrection.cc b/rtengine/perspectivecorrection.cc index fe89b7f5f..5f2ce3aa5 100644 --- a/rtengine/perspectivecorrection.cc +++ b/rtengine/perspectivecorrection.cc @@ -45,6 +45,7 @@ #include "perspectivecorrection.h" #include "improcfun.h" +#include "procparams.h" #include "rt_math.h" #include #include @@ -121,7 +122,7 @@ std::vector get_corners(int w, int h) */ void init_dt_structures(dt_iop_ashift_params_t *p, dt_iop_ashift_gui_data_t *g, - const procparams::ProcParams *params) + const procparams::PerspectiveParams *params) { dt_iop_ashift_params_t dp = { 0.0f, @@ -185,13 +186,13 @@ void init_dt_structures(dt_iop_ashift_params_t *p, dt_iop_ashift_gui_data_t *g, g->crop_cx = g->crop_cy = 1.0f; if (params) { - p->rotation = params->rotate.degree; - p->lensshift_v = params->perspective.camera_shift_vert; - p->lensshift_h = params->perspective.camera_shift_horiz; - p->f_length = params->perspective.camera_focal_length; - p->crop_factor = params->perspective.camera_crop_factor; - p->camera_pitch = params->perspective.camera_pitch; - p->camera_yaw = params->perspective.camera_yaw; + p->rotation = params->camera_roll; + p->lensshift_v = params->camera_shift_vert; + p->lensshift_h = params->camera_shift_horiz; + p->f_length = params->camera_focal_length; + p->crop_factor = params->camera_crop_factor; + p->camera_pitch = params->camera_pitch; + p->camera_yaw = params->camera_yaw; } } @@ -238,11 +239,12 @@ PerspectiveCorrection::Params PerspectiveCorrection::autocompute(ImageSource *sr pcp.shear = dflt.shear; */ pcp.camera_pitch = dflt.camera_pitch; + pcp.camera_roll = dflt.camera_roll; pcp.camera_yaw = dflt.camera_yaw; dt_iop_ashift_params_t p; dt_iop_ashift_gui_data_t g; - init_dt_structures(&p, &g, pparams); + init_dt_structures(&p, &g, &pparams->perspective); dt_iop_module_t module; module.gui_data = &g; module.is_raw = src->isRAW(); @@ -323,7 +325,7 @@ PerspectiveCorrection::Params PerspectiveCorrection::autocompute(ImageSource *sr free(g.buf); if (!res) { - retval.angle = pparams->rotate.degree; + retval.angle = pparams->perspective.camera_roll; retval.pitch = pparams->perspective.camera_pitch; retval.yaw = pparams->perspective.camera_yaw; } diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index 18be5346b..8934bf977 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -1856,6 +1856,7 @@ PerspectiveParams::PerspectiveParams() : camera_crop_factor(1.0), camera_focal_length(24.0), camera_pitch(0.0), + camera_roll(0.0), camera_shift_horiz(0.0), camera_shift_vert(0.0), camera_yaw(0.0), @@ -1877,6 +1878,7 @@ bool PerspectiveParams::operator ==(const PerspectiveParams& other) const && camera_focal_length == other.camera_focal_length && camera_crop_factor == other.camera_crop_factor && camera_pitch == other.camera_pitch + && camera_roll == other.camera_roll && camera_shift_horiz == other.camera_shift_horiz && camera_shift_vert == other.camera_shift_vert && camera_yaw == other.camera_yaw @@ -3373,6 +3375,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo saveToKeyfile(!pedited || pedited->perspective.camera_crop_factor, "Perspective", "CameraCropFactor", perspective.camera_crop_factor, keyFile); saveToKeyfile(!pedited || pedited->perspective.camera_focal_length, "Perspective", "CameraFocalLength", perspective.camera_focal_length, keyFile); saveToKeyfile(!pedited || pedited->perspective.camera_pitch, "Perspective", "CameraPitch", perspective.camera_pitch, keyFile); + saveToKeyfile(!pedited || pedited->perspective.camera_roll, "Perspective", "CameraRoll", perspective.camera_roll, keyFile); saveToKeyfile(!pedited || pedited->perspective.camera_shift_horiz, "Perspective", "CameraShiftHorizontal", perspective.camera_shift_horiz, keyFile); saveToKeyfile(!pedited || pedited->perspective.camera_shift_vert, "Perspective", "CameraShiftVertical", perspective.camera_shift_vert, keyFile); saveToKeyfile(!pedited || pedited->perspective.camera_yaw, "Perspective", "CameraYaw", perspective.camera_yaw, keyFile); @@ -4464,6 +4467,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Perspective", "CameraShiftHorizontal", pedited, perspective.camera_shift_horiz, pedited->perspective.camera_shift_horiz); assignFromKeyfile(keyFile, "Perspective", "CameraShiftVertical", pedited, perspective.camera_shift_vert, pedited->perspective.camera_shift_vert); assignFromKeyfile(keyFile, "Perspective", "CameraPitch", pedited, perspective.camera_pitch, pedited->perspective.camera_pitch); + assignFromKeyfile(keyFile, "Perspective", "CameraRoll", pedited, perspective.camera_roll, pedited->perspective.camera_roll); assignFromKeyfile(keyFile, "Perspective", "CameraCropFactor", pedited, perspective.camera_crop_factor, pedited->perspective.camera_crop_factor); assignFromKeyfile(keyFile, "Perspective", "CameraFocalLength", pedited, perspective.camera_focal_length, pedited->perspective.camera_focal_length); assignFromKeyfile(keyFile, "Perspective", "CameraYaw", pedited, perspective.camera_yaw, pedited->perspective.camera_yaw); diff --git a/rtengine/procparams.h b/rtengine/procparams.h index 3803f5a34..06d397a54 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -911,6 +911,7 @@ struct PerspectiveParams { double camera_crop_factor; double camera_focal_length; double camera_pitch; + double camera_roll; double camera_shift_horiz; double camera_shift_vert; double camera_yaw; diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc index d21df0741..b78033796 100644 --- a/rtgui/paramsedited.cc +++ b/rtgui/paramsedited.cc @@ -340,6 +340,7 @@ void ParamsEdited::set(bool v) perspective.camera_crop_factor = v; perspective.camera_focal_length = v; perspective.camera_pitch = v; + perspective.camera_roll = v; perspective.camera_shift_horiz = v; perspective.camera_shift_vert = v; perspective.camera_yaw = v; @@ -936,6 +937,7 @@ void ParamsEdited::initFrom(const std::vector& perspective.camera_crop_factor = perspective.camera_crop_factor && p.perspective.camera_crop_factor == other.perspective.camera_crop_factor; perspective.camera_focal_length = perspective.camera_focal_length && p.perspective.camera_focal_length == other.perspective.camera_focal_length; perspective.camera_pitch = perspective.camera_pitch && p.perspective.camera_pitch == other.perspective.camera_pitch; + perspective.camera_roll = perspective.camera_roll && p.perspective.camera_roll == other.perspective.camera_roll; perspective.camera_shift_horiz = perspective.camera_shift_horiz && p.perspective.camera_shift_horiz == other.perspective.camera_shift_horiz; perspective.camera_shift_vert = perspective.camera_shift_vert && p.perspective.camera_shift_vert == other.perspective.camera_shift_vert; perspective.projection_pitch = perspective.projection_pitch && p.perspective.projection_pitch == other.perspective.projection_pitch; @@ -2359,6 +2361,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.perspective.camera_pitch = dontforceSet && options.baBehav[ADDSET_PERSP_CAM_ANGLE] ? toEdit.perspective.camera_pitch + mods.perspective.camera_pitch : mods.perspective.camera_pitch; } + if (perspective.camera_roll) { + toEdit.perspective.camera_roll = dontforceSet && options.baBehav[ADDSET_PERSP_CAM_ANGLE] ? toEdit.perspective.camera_roll + mods.perspective.camera_roll : mods.perspective.camera_roll; + } + if (perspective.camera_shift_horiz) { toEdit.perspective.camera_shift_horiz = dontforceSet && options.baBehav[ADDSET_PERSP_CAM_SHIFT] ? toEdit.perspective.camera_shift_horiz + mods.perspective.camera_shift_horiz : mods.perspective.camera_shift_horiz; } diff --git a/rtgui/paramsedited.h b/rtgui/paramsedited.h index 29422b9d0..b7ae96de1 100644 --- a/rtgui/paramsedited.h +++ b/rtgui/paramsedited.h @@ -400,6 +400,7 @@ struct PerspectiveParamsEdited { bool camera_crop_factor; bool camera_focal_length; bool camera_pitch; + bool camera_roll; bool camera_shift_horiz; bool camera_shift_vert; bool camera_yaw; diff --git a/rtgui/perspective.cc b/rtgui/perspective.cc index 6fa524c45..f3b6eea2c 100644 --- a/rtgui/perspective.cc +++ b/rtgui/perspective.cc @@ -87,6 +87,9 @@ PerspCorrection::PerspCorrection () : FoldableToolPanel(this, "perspective", M(" camera_shift_vert = Gtk::manage (new Adjuster (M("TP_PERSPECTIVE_CAMERA_SHIFT_VERTICAL"), -100, 100, 0.01, 0)); camera_shift_vert->setAdjusterListener (this); + camera_roll = Gtk::manage (new Adjuster (M("TP_PERSPECTIVE_CAMERA_ROLL"), -45, 45, 0.01, 0)); + camera_roll->setAdjusterListener (this); + camera_pitch = Gtk::manage (new Adjuster (M("TP_PERSPECTIVE_CAMERA_PITCH"), -85, 85, 0.1, 0, ipers_cam_pitch_left, ipers_cam_pitch_right)); camera_pitch->setAdjusterListener (this); @@ -152,6 +155,7 @@ PerspCorrection::PerspCorrection () : FoldableToolPanel(this, "perspective", M(" camera_vbox->pack_start (*camera_crop_factor); camera_vbox->pack_start (*camera_shift_horiz); camera_vbox->pack_start (*camera_shift_vert); + camera_vbox->pack_start (*camera_roll); camera_vbox->pack_start (*camera_pitch); camera_vbox->pack_start (*camera_yaw); camera_vbox->pack_start (*auto_hbox); @@ -195,6 +199,7 @@ void PerspCorrection::read (const ProcParams* pp, const ParamsEdited* pedited) camera_crop_factor->setEditedState (pedited->perspective.camera_crop_factor ? Edited : UnEdited); camera_focal_length->setEditedState (pedited->perspective.camera_focal_length ? Edited : UnEdited); camera_pitch->setEditedState (pedited->perspective.camera_pitch ? Edited : UnEdited); + camera_roll->setEditedState (pedited->perspective.camera_roll ? Edited : UnEdited); camera_shift_horiz->setEditedState (pedited->perspective.camera_shift_horiz ? Edited : UnEdited); camera_shift_vert->setEditedState (pedited->perspective.camera_shift_vert ? Edited : UnEdited); camera_yaw->setEditedState (pedited->perspective.camera_yaw ? Edited : UnEdited); @@ -211,6 +216,7 @@ void PerspCorrection::read (const ProcParams* pp, const ParamsEdited* pedited) camera_crop_factor->setValue (pp->perspective.camera_crop_factor); camera_focal_length->setValue (pp->perspective.camera_focal_length); camera_pitch->setValue (pp->perspective.camera_pitch); + camera_roll->setValue (pp->perspective.camera_roll); camera_shift_horiz->setValue (pp->perspective.camera_shift_horiz); camera_shift_vert->setValue (pp->perspective.camera_shift_vert); camera_yaw->setValue (pp->perspective.camera_yaw); @@ -240,6 +246,7 @@ void PerspCorrection::write (ProcParams* pp, ParamsEdited* pedited) pp->perspective.camera_crop_factor= camera_crop_factor->getValue (); pp->perspective.camera_focal_length = camera_focal_length->getValue (); pp->perspective.camera_pitch = camera_pitch->getValue (); + pp->perspective.camera_roll = camera_roll->getValue (); pp->perspective.camera_shift_horiz = camera_shift_horiz->getValue (); pp->perspective.camera_shift_vert = camera_shift_vert->getValue (); pp->perspective.camera_yaw = camera_yaw->getValue (); @@ -263,6 +270,7 @@ void PerspCorrection::write (ProcParams* pp, ParamsEdited* pedited) pedited->perspective.camera_crop_factor= camera_crop_factor->getEditedState (); pedited->perspective.camera_focal_length = camera_focal_length->getEditedState (); pedited->perspective.camera_pitch = camera_pitch->getEditedState(); + pedited->perspective.camera_roll = camera_roll->getEditedState(); pedited->perspective.camera_shift_horiz = camera_shift_horiz->getEditedState(); pedited->perspective.camera_shift_vert = camera_shift_vert->getEditedState(); pedited->perspective.camera_yaw = camera_yaw->getEditedState(); @@ -283,6 +291,7 @@ void PerspCorrection::setDefaults (const ProcParams* defParams, const ParamsEdit camera_crop_factor->setDefault (defParams->perspective.camera_crop_factor); camera_focal_length->setDefault (defParams->perspective.camera_focal_length); camera_pitch->setDefault (defParams->perspective.camera_pitch); + camera_roll->setDefault (defParams->perspective.camera_roll); camera_shift_horiz->setDefault (defParams->perspective.camera_shift_horiz); camera_shift_vert->setDefault (defParams->perspective.camera_shift_vert); camera_yaw->setDefault (defParams->perspective.camera_yaw); @@ -299,6 +308,7 @@ void PerspCorrection::setDefaults (const ProcParams* defParams, const ParamsEdit camera_crop_factor->setDefaultEditedState (pedited->perspective.camera_crop_factor ? Edited : UnEdited); camera_focal_length->setDefaultEditedState (pedited->perspective.camera_focal_length ? Edited : UnEdited); camera_pitch->setDefaultEditedState (pedited->perspective.camera_pitch ? Edited : UnEdited); + camera_roll->setDefaultEditedState (pedited->perspective.camera_roll ? Edited : UnEdited); camera_shift_horiz->setDefaultEditedState (pedited->perspective.camera_shift_horiz ? Edited : UnEdited); camera_shift_vert->setDefaultEditedState (pedited->perspective.camera_shift_vert ? Edited : UnEdited); camera_yaw->setDefaultEditedState (pedited->perspective.camera_yaw ? Edited : UnEdited); @@ -314,6 +324,7 @@ void PerspCorrection::setDefaults (const ProcParams* defParams, const ParamsEdit camera_crop_factor->setDefaultEditedState (Irrelevant); camera_focal_length->setDefaultEditedState (Irrelevant); camera_pitch->setDefaultEditedState (Irrelevant); + camera_roll->setDefaultEditedState (Irrelevant); camera_shift_horiz->setDefaultEditedState (Irrelevant); camera_shift_vert->setDefaultEditedState (Irrelevant); camera_yaw->setDefaultEditedState (Irrelevant); @@ -350,9 +361,11 @@ void PerspCorrection::adjusterChanged(Adjuster* a, double newval) camera_shift_horiz->getValue(), M("TP_PERSPECTIVE_CAMERA_SHIFT_VERTICAL"), camera_shift_vert->getValue())); - } else if (a == camera_pitch || a == camera_yaw) { + } else if (a == camera_pitch || a == camera_roll|| a == camera_yaw) { listener->panelChanged (EvPerspCamAngle, - Glib::ustring::compose("%1=%2\n%3=%4", + Glib::ustring::compose("%1=%2\n%3=%4\n%5=%6", + M("TP_PERSPECTIVE_CAMERA_ROLL"), + camera_roll->getValue(), M("TP_PERSPECTIVE_CAMERA_YAW"), camera_yaw->getValue(), M("TP_PERSPECTIVE_CAMERA_PITCH"), @@ -401,6 +414,7 @@ void PerspCorrection::autoCorrectionPressed(Gtk::Button* b) disableListener(); camera_pitch->setValue(pitch); + camera_roll->setValue(rot); camera_yaw->setValue(yaw); enableListener(); @@ -435,6 +449,7 @@ void PerspCorrection::setAdjusterBehavior (bool badd, bool camera_focal_length_a camera_crop_factor->setAddMode(camera_focal_length_add); camera_focal_length->setAddMode(camera_focal_length_add); camera_pitch->setAddMode(camera_angle_add); + camera_roll->setAddMode(camera_angle_add); camera_shift_horiz->setAddMode(camera_shift_add); camera_shift_vert->setAddMode(camera_shift_add); camera_yaw->setAddMode(camera_angle_add); @@ -454,6 +469,7 @@ void PerspCorrection::trimValues (rtengine::procparams::ProcParams* pp) camera_crop_factor->trimValue(pp->perspective.camera_crop_factor); camera_focal_length->trimValue(pp->perspective.camera_focal_length); camera_pitch->trimValue(pp->perspective.camera_pitch); + camera_roll->trimValue(pp->perspective.camera_roll); camera_shift_horiz->trimValue(pp->perspective.camera_shift_horiz); camera_shift_vert->trimValue(pp->perspective.camera_shift_vert); camera_yaw->trimValue(pp->perspective.camera_yaw); @@ -474,6 +490,7 @@ void PerspCorrection::setBatchMode (bool batchMode) camera_crop_factor->showEditedCB (); camera_focal_length->showEditedCB (); camera_pitch->showEditedCB (); + camera_roll->showEditedCB (); camera_shift_horiz->showEditedCB (); camera_shift_vert->showEditedCB (); camera_yaw->showEditedCB (); diff --git a/rtgui/perspective.h b/rtgui/perspective.h index fadead7e9..a7a2da7ed 100644 --- a/rtgui/perspective.h +++ b/rtgui/perspective.h @@ -42,6 +42,7 @@ protected: Adjuster* camera_crop_factor; Adjuster* camera_focal_length; Adjuster* camera_pitch; + Adjuster* camera_roll; Adjuster* camera_shift_horiz; Adjuster* camera_shift_vert; Adjuster* camera_yaw;