From 357cf5b96a6968a0bc27eebfc93ecab0ef47790a Mon Sep 17 00:00:00 2001 From: Lawrence Lee Date: Wed, 26 Feb 2020 22:52:55 -0800 Subject: [PATCH] Remove scaling from perspective correction Scaling is applied at the end of all geometric transformations, so it would be more appropriate outside of the perspective correction tool. Such an implementation would also work better with the auto-fit feature. --- rtdata/languages/default | 8 +++----- rtengine/iptransform.cc | 5 ++--- rtengine/procevents.h | 7 +++---- rtengine/procparams.cc | 4 ---- rtengine/procparams.h | 1 - rtengine/refreshmap.cc | 1 - rtgui/addsetids.h | 1 - rtgui/batchtoolpanelcoord.cc | 5 ++--- rtgui/paramsedited.cc | 6 ------ rtgui/paramsedited.h | 1 - rtgui/perspective.cc | 20 +------------------- rtgui/perspective.h | 3 +-- rtgui/preferences.cc | 1 - 13 files changed, 12 insertions(+), 51 deletions(-) diff --git a/rtdata/languages/default b/rtdata/languages/default index e6bbe8957..db90aea22 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -732,10 +732,9 @@ HISTORY_MSG_496;Perspective - Camera HISTORY_MSG_497;Perspective - Camera HISTORY_MSG_498;Perspective - Recovery HISTORY_MSG_499;Perspective - PCA - Rotation -HISTORY_MSG_500;Perspective - PCA - Scale -HISTORY_MSG_501;Perspective - PCA -HISTORY_MSG_502;Perspective - Camera -HISTORY_MSG_503;Perspective - Method +HISTORY_MSG_500;Perspective - PCA +HISTORY_MSG_501;Perspective - Camera +HISTORY_MSG_502;Perspective - Method HISTORY_MSG_CLAMPOOG;Clip out-of-gamut colors HISTORY_MSG_COLORTONING_LABGRID_VALUE;CT - Color correction HISTORY_MSG_COLORTONING_LABREGION_AB;CT - Color correction @@ -1831,7 +1830,6 @@ TP_PERSPECTIVE_METHOD_CAMERA_BASED;Camera-based TP_PERSPECTIVE_POST_CORRECTION_ADJUSTMENT_FRAME;Post-correction adjustment TP_PERSPECTIVE_PROJECTION_PITCH;Vertical TP_PERSPECTIVE_PROJECTION_ROTATE;Rotation -TP_PERSPECTIVE_PROJECTION_SCALE;Scale TP_PERSPECTIVE_PROJECTION_SHIFT_HORIZONTAL;Horizontal shift TP_PERSPECTIVE_PROJECTION_SHIFT_VERTICAL;Vertical shift TP_PERSPECTIVE_PROJECTION_YAW;Horizontal diff --git a/rtengine/iptransform.cc b/rtengine/iptransform.cc index 577f02970..dc095735f 100644 --- a/rtengine/iptransform.cc +++ b/rtengine/iptransform.cc @@ -481,7 +481,7 @@ bool ImProcFunctions::transCoord (int W, int H, const std::vector &src, const double p_projection_rotate = params->perspective.projection_rotate * rtengine::RT_PI_180; const double p_projection_yaw = -params->perspective.projection_yaw * rtengine::RT_PI_180; const double p_projection_pitch = -params->perspective.projection_pitch * rtengine::RT_PI_180; - const double p_projection_scale = params->perspective.projection_scale; + const double p_projection_scale = 1; const homogeneous::Matrix p_matrix = perspectiveMatrix(f, p_camera_shift_horiz, p_camera_shift_vert, p_camera_roll, p_camera_pitch, p_camera_yaw, p_projection_yaw, p_projection_pitch, @@ -1180,7 +1180,7 @@ void ImProcFunctions::transformGeneral(bool highQuality, Imagefloat *original, I const double p_projection_rotate = params->perspective.projection_rotate * rtengine::RT_PI_180; const double p_projection_yaw = -params->perspective.projection_yaw * rtengine::RT_PI_180; const double p_projection_pitch = -params->perspective.projection_pitch * rtengine::RT_PI_180; - const double p_projection_scale = params->perspective.projection_scale; + const double p_projection_scale = 1; const homogeneous::Matrix p_matrix = perspectiveMatrix(f, p_camera_shift_horiz, p_camera_shift_vert, p_camera_roll, p_camera_pitch, p_camera_yaw, p_projection_yaw, p_projection_pitch, @@ -1487,7 +1487,6 @@ bool ImProcFunctions::needsPerspective () const params->perspective.camera_yaw || params->perspective.projection_pitch || params->perspective.projection_rotate || - params->perspective.projection_scale != 1.0 || params->perspective.projection_shift_horiz || params->perspective.projection_shift_vert || params->perspective.projection_yaw) ); diff --git a/rtengine/procevents.h b/rtengine/procevents.h index 9ab3e0395..bd8b06650 100644 --- a/rtengine/procevents.h +++ b/rtengine/procevents.h @@ -522,10 +522,9 @@ enum ProcEventCode { EvPerspCamShift = 496, EvPerspProjAngle = 497, EvPerspProjRotate = 498, - EvPerspProjScale = 499, - EvPerspProjShift = 500, - EvPerspCamAngle = 501, - EvPerspMethod = 502, + EvPerspProjShift = 499, + EvPerspCamAngle = 500, + EvPerspMethod = 501, NUMOFEVENTS diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index 0f39a9a16..bb55cf41d 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -1863,7 +1863,6 @@ PerspectiveParams::PerspectiveParams() : camera_yaw(0.0), projection_pitch(0.0), projection_rotate(0.0), - projection_scale(1.0), projection_shift_horiz(0.0), projection_shift_vert(0.0), projection_yaw(0.0) @@ -1885,7 +1884,6 @@ bool PerspectiveParams::operator ==(const PerspectiveParams& other) const && camera_yaw == other.camera_yaw && projection_shift_horiz == other.projection_shift_horiz && projection_shift_vert == other.projection_shift_vert - && projection_scale == other.projection_scale && projection_rotate == other.projection_rotate && projection_pitch == other.projection_pitch && projection_yaw == other.projection_yaw; @@ -3384,7 +3382,6 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo saveToKeyfile(!pedited || pedited->perspective.projection_shift_horiz, "Perspective", "ProjectionShiftHorizontal", perspective.projection_shift_horiz, keyFile); saveToKeyfile(!pedited || pedited->perspective.projection_pitch, "Perspective", "ProjectionPitch", perspective.projection_pitch, keyFile); saveToKeyfile(!pedited || pedited->perspective.projection_rotate, "Perspective", "ProjectionRotate", perspective.projection_rotate, keyFile); - saveToKeyfile(!pedited || pedited->perspective.projection_scale, "Perspective", "ProjectionScale", perspective.projection_scale, keyFile); saveToKeyfile(!pedited || pedited->perspective.projection_shift_horiz, "Perspective", "ProjectionShiftHorizontal", perspective.projection_shift_horiz, keyFile); saveToKeyfile(!pedited || pedited->perspective.projection_shift_vert, "Perspective", "ProjectionShiftVertical", perspective.projection_shift_vert, keyFile); saveToKeyfile(!pedited || pedited->perspective.projection_yaw, "Perspective", "ProjectionYaw", perspective.projection_yaw, keyFile); @@ -4480,7 +4477,6 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Perspective", "CameraYaw", pedited, perspective.camera_yaw, pedited->perspective.camera_yaw); assignFromKeyfile(keyFile, "Perspective", "ProjectionPitch", pedited, perspective.projection_pitch, pedited->perspective.projection_pitch); assignFromKeyfile(keyFile, "Perspective", "ProjectionRotate", pedited, perspective.projection_rotate, pedited->perspective.projection_rotate); - assignFromKeyfile(keyFile, "Perspective", "ProjectionScale", pedited, perspective.projection_scale, pedited->perspective.projection_scale); assignFromKeyfile(keyFile, "Perspective", "ProjectionShiftHorizontal", pedited, perspective.projection_shift_horiz, pedited->perspective.projection_shift_horiz); assignFromKeyfile(keyFile, "Perspective", "ProjectionShiftVertical", pedited, perspective.projection_shift_vert, pedited->perspective.projection_shift_vert); assignFromKeyfile(keyFile, "Perspective", "ProjectionYaw", pedited, perspective.projection_yaw, pedited->perspective.projection_yaw); diff --git a/rtengine/procparams.h b/rtengine/procparams.h index ffebe89b9..1472a5059 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -918,7 +918,6 @@ struct PerspectiveParams { double camera_yaw; double projection_pitch; double projection_rotate; - double projection_scale; double projection_shift_horiz; double projection_shift_vert; double projection_yaw; diff --git a/rtengine/refreshmap.cc b/rtengine/refreshmap.cc index e480f91ce..29384b652 100644 --- a/rtengine/refreshmap.cc +++ b/rtengine/refreshmap.cc @@ -526,7 +526,6 @@ int refreshmap[rtengine::NUMOFEVENTS] = { TRANSFORM, // EvPerspCamShift TRANSFORM, // EvPerspProjAngle TRANSFORM, // EvPerspProjRotate - TRANSFORM, // EvPerspProjScale TRANSFORM, // EvPerspProjShift TRANSFORM, // EvPerspCamAngle TRANSFORM // EvPerspMethod diff --git a/rtgui/addsetids.h b/rtgui/addsetids.h index 2a02274eb..8e7833a33 100644 --- a/rtgui/addsetids.h +++ b/rtgui/addsetids.h @@ -23,7 +23,6 @@ enum { ADDSET_PERSP_CAM_SHIFT, ADDSET_PERSP_PROJ_ANGLE, ADDSET_PERSP_PROJ_ROTATE, - ADDSET_PERSP_PROJ_SCALE, ADDSET_PERSP_PROJ_SHIFT, ADDSET_CA, ADDSET_VIGN_AMOUNT, diff --git a/rtgui/batchtoolpanelcoord.cc b/rtgui/batchtoolpanelcoord.cc index c6865a82d..f21d82f25 100644 --- a/rtgui/batchtoolpanelcoord.cc +++ b/rtgui/batchtoolpanelcoord.cc @@ -151,7 +151,7 @@ void BatchToolPanelCoordinator::initSession () rotate->setAdjusterBehavior (false); resize->setAdjusterBehavior (false); distortion->setAdjusterBehavior (false); - perspective->setAdjusterBehavior (false, false, false, false, false, false, false, false); + perspective->setAdjusterBehavior (false, false, false, false, false, false, false); gradient->setAdjusterBehavior (false, false, false, false); pcvignette->setAdjusterBehavior (false, false, false); cacorrection->setAdjusterBehavior (false); @@ -196,7 +196,7 @@ void BatchToolPanelCoordinator::initSession () rotate->setAdjusterBehavior (options.baBehav[ADDSET_ROTATE_DEGREE]); resize->setAdjusterBehavior (options.baBehav[ADDSET_RESIZE_SCALE]); distortion->setAdjusterBehavior (options.baBehav[ADDSET_DIST_AMOUNT]); - perspective->setAdjusterBehavior (options.baBehav[ADDSET_PERSPECTIVE], options.baBehav[ADDSET_PERSP_CAM_FOCAL_LENGTH], options.baBehav[ADDSET_PERSP_CAM_SHIFT], options.baBehav[ADDSET_PERSP_CAM_ANGLE], options.baBehav[ADDSET_PERSP_PROJ_ANGLE], options.baBehav[ADDSET_PERSP_PROJ_SHIFT], options.baBehav[ADDSET_PERSP_PROJ_ROTATE], options.baBehav[ADDSET_PERSP_PROJ_SCALE]); + perspective->setAdjusterBehavior (options.baBehav[ADDSET_PERSPECTIVE], options.baBehav[ADDSET_PERSP_CAM_FOCAL_LENGTH], options.baBehav[ADDSET_PERSP_CAM_SHIFT], options.baBehav[ADDSET_PERSP_CAM_ANGLE], options.baBehav[ADDSET_PERSP_PROJ_ANGLE], options.baBehav[ADDSET_PERSP_PROJ_SHIFT], options.baBehav[ADDSET_PERSP_PROJ_ROTATE]); gradient->setAdjusterBehavior (options.baBehav[ADDSET_GRADIENT_DEGREE], options.baBehav[ADDSET_GRADIENT_FEATHER], options.baBehav[ADDSET_GRADIENT_STRENGTH], options.baBehav[ADDSET_GRADIENT_CENTER]); pcvignette->setAdjusterBehavior (options.baBehav[ADDSET_PCVIGNETTE_STRENGTH], options.baBehav[ADDSET_PCVIGNETTE_FEATHER], options.baBehav[ADDSET_PCVIGNETTE_ROUNDNESS]); cacorrection->setAdjusterBehavior (options.baBehav[ADDSET_CA]); @@ -314,7 +314,6 @@ void BatchToolPanelCoordinator::initSession () if (options.baBehav[ADDSET_PERSP_PROJ_ANGLE]) { pparams.perspective.projection_yaw = pparams.perspective.projection_pitch = 0; } if (options.baBehav[ADDSET_PERSP_PROJ_SHIFT]) { pparams.perspective.projection_shift_horiz = pparams.perspective.projection_shift_vert = 0; } if (options.baBehav[ADDSET_PERSP_PROJ_ROTATE]) { pparams.perspective.projection_rotate = 0; } - if (options.baBehav[ADDSET_PERSP_PROJ_SCALE]) { pparams.perspective.projection_scale = 0; } if (options.baBehav[ADDSET_GRADIENT_DEGREE]) { pparams.gradient.degree = 0; } if (options.baBehav[ADDSET_GRADIENT_FEATHER]) { pparams.gradient.feather = 0; } if (options.baBehav[ADDSET_GRADIENT_STRENGTH]) { pparams.gradient.strength = 0; } diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc index 39cbf082b..9d11d8aad 100644 --- a/rtgui/paramsedited.cc +++ b/rtgui/paramsedited.cc @@ -347,7 +347,6 @@ void ParamsEdited::set(bool v) perspective.camera_yaw = v; perspective.projection_pitch = v; perspective.projection_rotate = v; - perspective.projection_scale = v; perspective.projection_shift_horiz = v; perspective.projection_shift_vert = v; perspective.projection_yaw = v; @@ -945,7 +944,6 @@ void ParamsEdited::initFrom(const std::vector& perspective.projection_pitch = perspective.projection_pitch && p.perspective.projection_pitch == other.perspective.projection_pitch; perspective.camera_yaw = perspective.camera_yaw && p.perspective.camera_yaw == other.perspective.camera_yaw; perspective.projection_rotate = perspective.projection_rotate && p.perspective.projection_rotate == other.perspective.projection_rotate; - perspective.projection_scale = perspective.projection_scale && p.perspective.projection_scale == other.perspective.projection_scale; perspective.projection_shift_horiz = perspective.projection_shift_horiz && p.perspective.projection_shift_horiz == other.perspective.projection_shift_horiz; perspective.projection_shift_vert = perspective.projection_shift_vert && p.perspective.projection_shift_vert == other.perspective.projection_shift_vert; perspective.projection_yaw = perspective.projection_yaw && p.perspective.projection_yaw == other.perspective.projection_yaw; @@ -2391,10 +2389,6 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.perspective.projection_rotate = dontforceSet && options.baBehav[ADDSET_PERSP_PROJ_ROTATE] ? toEdit.perspective.projection_rotate + mods.perspective.projection_rotate : mods.perspective.projection_rotate; } - if (perspective.projection_scale) { - toEdit.perspective.projection_scale = dontforceSet && options.baBehav[ADDSET_PERSP_PROJ_SCALE] ? toEdit.perspective.projection_scale + mods.perspective.projection_scale : mods.perspective.projection_scale; - } - if (perspective.projection_shift_horiz) { toEdit.perspective.projection_shift_horiz = dontforceSet && options.baBehav[ADDSET_PERSP_PROJ_SHIFT] ? toEdit.perspective.projection_shift_horiz + mods.perspective.projection_shift_horiz : mods.perspective.projection_shift_horiz; } diff --git a/rtgui/paramsedited.h b/rtgui/paramsedited.h index 2a920a4f3..9c9f23939 100644 --- a/rtgui/paramsedited.h +++ b/rtgui/paramsedited.h @@ -407,7 +407,6 @@ struct PerspectiveParamsEdited { bool camera_yaw; bool projection_pitch; bool projection_rotate; - bool projection_scale; bool projection_shift_horiz; bool projection_shift_vert; bool projection_yaw; diff --git a/rtgui/perspective.cc b/rtgui/perspective.cc index a9f1ef995..42175616f 100644 --- a/rtgui/perspective.cc +++ b/rtgui/perspective.cc @@ -129,9 +129,6 @@ PerspCorrection::PerspCorrection () : FoldableToolPanel(this, "perspective", M(" projection_rotate = Gtk::manage (new Adjuster (M("TP_PERSPECTIVE_PROJECTION_ROTATE"), -45, 45, 0.01, 0, ipers_rotate_left, ipers_rotate_right)); projection_rotate->setAdjusterListener (this); - projection_scale = Gtk::manage (new Adjuster (M("TP_PERSPECTIVE_PROJECTION_SCALE"), 0.5, 2, 0.01, 1)); - projection_scale->setAdjusterListener (this); - Gtk::Frame* recovery_frame = Gtk::manage (new Gtk::Frame (M("TP_PERSPECTIVE_RECOVERY_FRAME"))); recovery_frame->set_label_align(0.025, 0.5); @@ -165,7 +162,6 @@ PerspCorrection::PerspCorrection () : FoldableToolPanel(this, "perspective", M(" pca_vbox->pack_start (*projection_shift_horiz); pca_vbox->pack_start (*projection_shift_vert); pca_vbox->pack_start (*projection_rotate); - pca_vbox->pack_start (*projection_scale); pca_frame->add(*pca_vbox); camera_based->pack_start(*pca_frame); @@ -181,7 +177,6 @@ PerspCorrection::PerspCorrection () : FoldableToolPanel(this, "perspective", M(" vert->setLogScale(2, 0); camera_focal_length->setLogScale(4000, 0.5); camera_crop_factor->setLogScale(300, 0.1); - projection_scale->setLogScale(4, 0.5); method->signal_changed().connect(sigc::mem_fun(*this, &PerspCorrection::methodChanged)); @@ -205,7 +200,6 @@ void PerspCorrection::read (const ProcParams* pp, const ParamsEdited* pedited) camera_yaw->setEditedState (pedited->perspective.camera_yaw ? Edited : UnEdited); projection_pitch->setEditedState (pedited->perspective.projection_pitch ? Edited : UnEdited); projection_rotate->setEditedState (pedited->perspective.projection_rotate ? Edited : UnEdited); - projection_scale->setEditedState (pedited->perspective.projection_scale ? Edited : UnEdited); projection_shift_horiz->setEditedState (pedited->perspective.projection_shift_horiz ? Edited : UnEdited); projection_shift_vert->setEditedState (pedited->perspective.projection_shift_vert ? Edited : UnEdited); projection_yaw->setEditedState (pedited->perspective.projection_yaw ? Edited : UnEdited); @@ -221,7 +215,6 @@ void PerspCorrection::read (const ProcParams* pp, const ParamsEdited* pedited) camera_yaw->setValue (pp->perspective.camera_yaw); projection_pitch->setValue (pp->perspective.projection_pitch); projection_rotate->setValue (pp->perspective.projection_rotate); - projection_scale->setValue (pp->perspective.projection_scale); projection_shift_horiz->setValue (pp->perspective.projection_shift_horiz); projection_shift_vert->setValue (pp->perspective.projection_shift_vert); projection_yaw->setValue (pp->perspective.projection_yaw); @@ -251,7 +244,6 @@ void PerspCorrection::write (ProcParams* pp, ParamsEdited* pedited) pp->perspective.camera_yaw = camera_yaw->getValue (); pp->perspective.projection_pitch = projection_pitch->getValue (); pp->perspective.projection_rotate = projection_rotate->getValue (); - pp->perspective.projection_scale = projection_scale->getValue (); pp->perspective.projection_shift_horiz = projection_shift_horiz->getValue (); pp->perspective.projection_shift_vert = projection_shift_vert->getValue (); pp->perspective.projection_yaw = projection_yaw->getValue (); @@ -275,7 +267,6 @@ void PerspCorrection::write (ProcParams* pp, ParamsEdited* pedited) pedited->perspective.camera_yaw = camera_yaw->getEditedState(); pedited->perspective.projection_pitch = projection_pitch->getEditedState(); pedited->perspective.projection_rotate = projection_rotate->getEditedState(); - pedited->perspective.projection_scale = projection_scale->getEditedState(); pedited->perspective.projection_shift_horiz = projection_shift_horiz->getEditedState(); pedited->perspective.projection_shift_vert = projection_shift_vert->getEditedState(); pedited->perspective.projection_yaw = projection_yaw->getEditedState(); @@ -296,7 +287,6 @@ void PerspCorrection::setDefaults (const ProcParams* defParams, const ParamsEdit camera_yaw->setDefault (defParams->perspective.camera_yaw); projection_pitch->setDefault (defParams->perspective.projection_pitch); projection_rotate->setDefault (defParams->perspective.projection_rotate); - projection_scale->setDefault (defParams->perspective.projection_scale); projection_shift_horiz->setDefault (defParams->perspective.projection_shift_horiz); projection_shift_vert->setDefault (defParams->perspective.projection_shift_vert); projection_yaw->setDefault (defParams->perspective.projection_yaw); @@ -313,7 +303,6 @@ void PerspCorrection::setDefaults (const ProcParams* defParams, const ParamsEdit camera_yaw->setDefaultEditedState (pedited->perspective.camera_yaw ? Edited : UnEdited); projection_pitch->setDefaultEditedState (pedited->perspective.projection_pitch ? Edited : UnEdited); projection_rotate->setDefaultEditedState (pedited->perspective.projection_rotate ? Edited : UnEdited); - projection_scale->setDefaultEditedState (pedited->perspective.projection_scale ? Edited : UnEdited); projection_shift_horiz->setDefaultEditedState (pedited->perspective.projection_shift_horiz ? Edited : UnEdited); projection_shift_vert->setDefaultEditedState (pedited->perspective.projection_shift_vert ? Edited : UnEdited); projection_yaw->setDefaultEditedState (pedited->perspective.projection_yaw ? Edited : UnEdited); @@ -329,7 +318,6 @@ void PerspCorrection::setDefaults (const ProcParams* defParams, const ParamsEdit camera_yaw->setDefaultEditedState (Irrelevant); projection_pitch->setDefaultEditedState (Irrelevant); projection_rotate->setDefaultEditedState (Irrelevant); - projection_scale->setDefaultEditedState (Irrelevant); projection_shift_horiz->setDefaultEditedState (Irrelevant); projection_shift_vert->setDefaultEditedState (Irrelevant); projection_yaw->setDefaultEditedState (Irrelevant); @@ -379,9 +367,6 @@ void PerspCorrection::adjusterChanged(Adjuster* a, double newval) } else if (a == projection_rotate) { listener->panelChanged (EvPerspProjRotate, Glib::ustring::format(projection_rotate->getValue())); - } else if (a == projection_scale) { - listener->panelChanged (EvPerspProjScale, - Glib::ustring::format(projection_scale->getValue())); } else if (a == projection_pitch || a == projection_yaw) { listener->panelChanged (EvPerspProjAngle, Glib::ustring::compose("%1=%2\n%3=%4", @@ -440,7 +425,7 @@ void PerspCorrection::methodChanged (void) } -void PerspCorrection::setAdjusterBehavior (bool badd, bool camera_focal_length_add, bool camera_shift_add, bool camera_angle_add, bool projection_angle_add, bool projection_shift_add, bool projection_rotate_add, bool projection_scale_add) +void PerspCorrection::setAdjusterBehavior (bool badd, bool camera_focal_length_add, bool camera_shift_add, bool camera_angle_add, bool projection_angle_add, bool projection_shift_add, bool projection_rotate_add) { horiz->setAddMode(badd); @@ -454,7 +439,6 @@ void PerspCorrection::setAdjusterBehavior (bool badd, bool camera_focal_length_a camera_yaw->setAddMode(camera_angle_add); projection_pitch->setAddMode(projection_angle_add); projection_rotate->setAddMode(projection_rotate_add); - projection_scale->setAddMode(projection_scale_add); projection_shift_horiz->setAddMode(projection_shift_add); projection_shift_vert->setAddMode(projection_shift_add); projection_yaw->setAddMode(projection_angle_add); @@ -479,7 +463,6 @@ void PerspCorrection::trimValues (rtengine::procparams::ProcParams* pp) camera_yaw->trimValue(pp->perspective.camera_yaw); projection_pitch->trimValue(pp->perspective.projection_pitch); projection_rotate->trimValue(pp->perspective.projection_rotate); - projection_scale->trimValue(pp->perspective.projection_scale); projection_shift_horiz->trimValue(pp->perspective.projection_shift_horiz); projection_shift_vert->trimValue(pp->perspective.projection_shift_vert); projection_yaw->trimValue(pp->perspective.projection_yaw); @@ -500,7 +483,6 @@ void PerspCorrection::setBatchMode (bool batchMode) camera_yaw->showEditedCB (); projection_pitch->showEditedCB (); projection_rotate->showEditedCB (); - projection_scale->showEditedCB (); projection_shift_horiz->showEditedCB (); projection_shift_vert->showEditedCB (); projection_yaw->showEditedCB (); diff --git a/rtgui/perspective.h b/rtgui/perspective.h index c1dd20ee4..e09a766de 100644 --- a/rtgui/perspective.h +++ b/rtgui/perspective.h @@ -48,7 +48,6 @@ protected: Adjuster* camera_yaw; Adjuster* projection_pitch; Adjuster* projection_rotate; - Adjuster* projection_scale; Adjuster* projection_shift_horiz; Adjuster* projection_shift_vert; Adjuster* projection_yaw; @@ -69,7 +68,7 @@ public: void adjusterChanged (Adjuster* a, double newval) override; void autoCorrectionPressed (Gtk::Button* b); void methodChanged (void); - void setAdjusterBehavior (bool badd, bool camera_focal_length_add, bool camera_shift_add, bool camera_angle_add, bool projection_angle_add, bool projection_shift_add, bool projection_rotate_add, bool projection_scale_add); + void setAdjusterBehavior (bool badd, bool camera_focal_length_add, bool camera_shift_add, bool camera_angle_add, bool projection_angle_add, bool projection_shift_add, bool projection_rotate_add); void setLensGeomListener (LensGeomListener* listener) { lens_geom_listener = listener; diff --git a/rtgui/preferences.cc b/rtgui/preferences.cc index 740b81ebd..2b36b792f 100644 --- a/rtgui/preferences.cc +++ b/rtgui/preferences.cc @@ -349,7 +349,6 @@ Gtk::Widget* Preferences::getBatchProcPanel () appendBehavList (mi, M ("TP_PERSPECTIVE_CAMERA_FRAME") + " - " + M ("TP_PERSPECTIVE_CAMERA_ROLL") + ", " + M ("TP_PERSPECTIVE_CAMERA_YAW") + ", " + M ("TP_PERSPECTIVE_CAMERA_PITCH"), ADDSET_PERSP_CAM_ANGLE, false); appendBehavList (mi, M ("TP_PERSPECTIVE_POST_CORRECTION_ADJUSTMENT_FRAME") + " - " + M ("TP_PERSPECTIVE_PROJECTION_SHIFT_HORIZONTAL") + ", " + M ("TP_PERSPECTIVE_PROJECTION_SHIFT_VERTICAL"), ADDSET_PERSP_PROJ_SHIFT, false); appendBehavList (mi, M ("TP_PERSPECTIVE_PROJECTION_ROTATE"), ADDSET_PERSP_PROJ_ROTATE, false); - appendBehavList (mi, M ("TP_PERSPECTIVE_PROJECTION_SCALE"), ADDSET_PERSP_PROJ_SCALE, false); appendBehavList (mi, M ("TP_PERSPECTIVE_RECOVERY_FRAME") + " - " + M ("TP_PERSPECTIVE_PROJECTION_YAW") + ", " + M ("TP_PERSPECTIVE_PROJECTION_PITCH"), ADDSET_PERSP_PROJ_ANGLE, false); mi = behModel->append ();