pixelshift: option to smooth transitions between regions with and without motion
This commit is contained in:
@@ -128,6 +128,10 @@ BayerProcess::BayerProcess () : FoldableToolPanel(this, "bayerprocess", M("TP_RA
|
||||
pixelShiftBlur->set_tooltip_text (M("TP_RAW_PIXELSHIFTBLUR_TOOLTIP"));
|
||||
pixelShiftOptions->pack_start(*pixelShiftBlur);
|
||||
|
||||
pixelShiftSmooth = Gtk::manage (new Gtk::CheckButton(M("TP_RAW_PIXELSHIFTSMOOTH")));
|
||||
pixelShiftSmooth->set_tooltip_text (M("TP_RAW_PIXELSHIFTSMOOTH_TOOLTIP"));
|
||||
pixelShiftOptions->pack_start(*pixelShiftSmooth);
|
||||
|
||||
pixelShiftHoleFill = Gtk::manage (new Gtk::CheckButton(M("TP_RAW_PIXELSHIFTHOLEFILL")));
|
||||
pixelShiftHoleFill->set_tooltip_text (M("TP_RAW_PIXELSHIFTHOLEFILL_TOOLTIP"));
|
||||
pixelShiftOptions->pack_start(*pixelShiftHoleFill);
|
||||
@@ -301,6 +305,7 @@ BayerProcess::BayerProcess () : FoldableToolPanel(this, "bayerprocess", M("TP_RA
|
||||
pixelShiftMedian3conn = pixelShiftMedian3->signal_toggled().connect ( sigc::mem_fun(*this, &BayerProcess::pixelShiftMedian3Changed), true);
|
||||
pixelShiftGreenconn = pixelShiftGreen->signal_toggled().connect ( sigc::mem_fun(*this, &BayerProcess::pixelShiftGreenChanged), true);
|
||||
pixelShiftBlurconn = pixelShiftBlur->signal_toggled().connect ( sigc::mem_fun(*this, &BayerProcess::pixelShiftBlurChanged), true);
|
||||
pixelShiftSmoothconn = pixelShiftSmooth->signal_toggled().connect ( sigc::mem_fun(*this, &BayerProcess::pixelShiftSmoothChanged), true);
|
||||
pixelShiftExp0conn = pixelShiftExp0->signal_toggled().connect ( sigc::mem_fun(*this, &BayerProcess::pixelShiftExp0Changed), true);
|
||||
pixelShiftNonGreenCrossconn = pixelShiftNonGreenCross->signal_toggled().connect ( sigc::mem_fun(*this, &BayerProcess::pixelShiftNonGreenCrossChanged), true);
|
||||
pixelShiftNonGreenCross2conn = pixelShiftNonGreenCross2->signal_toggled().connect ( sigc::mem_fun(*this, &BayerProcess::pixelShiftNonGreenCross2Changed), true);
|
||||
@@ -342,6 +347,7 @@ void BayerProcess::read(const rtengine::procparams::ProcParams* pp, const Params
|
||||
pixelShiftMedian3->set_inconsistent(!pedited->raw.bayersensor.pixelShiftMedian3);
|
||||
pixelShiftGreen->set_inconsistent(!pedited->raw.bayersensor.pixelShiftGreen);
|
||||
pixelShiftBlur->set_inconsistent(!pedited->raw.bayersensor.pixelShiftBlur);
|
||||
pixelShiftSmooth->set_inconsistent(!pedited->raw.bayersensor.pixelShiftSmooth);
|
||||
pixelShiftExp0->set_inconsistent(!pedited->raw.bayersensor.pixelShiftExp0);
|
||||
pixelShiftNonGreenCross->set_inconsistent(!pedited->raw.bayersensor.pixelShiftNonGreenCross);
|
||||
pixelShiftNonGreenCross2->set_inconsistent(!pedited->raw.bayersensor.pixelShiftNonGreenCross2);
|
||||
@@ -386,6 +392,7 @@ void BayerProcess::read(const rtengine::procparams::ProcParams* pp, const Params
|
||||
pixelShiftMedian3->set_active(pp->raw.bayersensor.pixelShiftMedian3);
|
||||
pixelShiftGreen->set_active(pp->raw.bayersensor.pixelShiftGreen);
|
||||
pixelShiftBlur->set_active(pp->raw.bayersensor.pixelShiftBlur);
|
||||
pixelShiftSmooth->set_active(pp->raw.bayersensor.pixelShiftSmooth);
|
||||
pixelShiftExp0->set_active(pp->raw.bayersensor.pixelShiftExp0);
|
||||
pixelShiftNonGreenCross->set_active(pp->raw.bayersensor.pixelShiftNonGreenCross);
|
||||
pixelShiftNonGreenCross2->set_active(pp->raw.bayersensor.pixelShiftNonGreenCross2);
|
||||
@@ -407,6 +414,7 @@ void BayerProcess::read(const rtengine::procparams::ProcParams* pp, const Params
|
||||
|
||||
pixelShiftHoleFill->set_sensitive(pixelShiftAutomatic->get_active () && pixelShiftMotionCorrection->get_active_row_number() == 5);
|
||||
pixelShiftBlur->set_sensitive(pixelShiftAutomatic->get_active () && pixelShiftMotionCorrection->get_active_row_number() == 5);
|
||||
pixelShiftSmooth->set_sensitive(pixelShiftAutomatic->get_active () && pixelShiftMotionCorrection->get_active_row_number() == 5 && pixelShiftBlur->get_active());
|
||||
|
||||
if (!batchMode) {
|
||||
if (pp->raw.bayersensor.method == procparams::RAWParams::BayerSensor::methodstring[procparams::RAWParams::BayerSensor::dcb] ||
|
||||
@@ -483,6 +491,7 @@ void BayerProcess::write( rtengine::procparams::ProcParams* pp, ParamsEdited* pe
|
||||
pp->raw.bayersensor.pixelShiftMedian3 = pixelShiftMedian3->get_active();
|
||||
pp->raw.bayersensor.pixelShiftGreen = pixelShiftGreen->get_active();
|
||||
pp->raw.bayersensor.pixelShiftBlur = pixelShiftBlur->get_active();
|
||||
pp->raw.bayersensor.pixelShiftSmooth = pixelShiftSmooth->get_active();
|
||||
pp->raw.bayersensor.pixelShiftExp0 = pixelShiftExp0->get_active();
|
||||
pp->raw.bayersensor.pixelShiftNonGreenCross = pixelShiftNonGreenCross->get_active();
|
||||
pp->raw.bayersensor.pixelShiftNonGreenCross2 = pixelShiftNonGreenCross2->get_active();
|
||||
@@ -529,6 +538,7 @@ void BayerProcess::write( rtengine::procparams::ProcParams* pp, ParamsEdited* pe
|
||||
pedited->raw.bayersensor.pixelShiftMedian3 = !pixelShiftMedian3->get_inconsistent();
|
||||
pedited->raw.bayersensor.pixelShiftGreen = !pixelShiftGreen->get_inconsistent();
|
||||
pedited->raw.bayersensor.pixelShiftBlur = !pixelShiftBlur->get_inconsistent();
|
||||
pedited->raw.bayersensor.pixelShiftSmooth = !pixelShiftSmooth->get_inconsistent();
|
||||
pedited->raw.bayersensor.pixelShiftExp0 = !pixelShiftExp0->get_inconsistent();
|
||||
pedited->raw.bayersensor.pixelShiftNonGreenCross = !pixelShiftNonGreenCross->get_inconsistent();
|
||||
pedited->raw.bayersensor.pixelShiftNonGreenCross2 = !pixelShiftNonGreenCross2->get_inconsistent();
|
||||
@@ -650,9 +660,11 @@ void BayerProcess::psMotionCorrectionChanged ()
|
||||
if(pixelShiftMotionCorrection->get_active_row_number() == 5) {
|
||||
pixelShiftBlur->set_sensitive(true);
|
||||
pixelShiftHoleFill->set_sensitive(true);
|
||||
pixelShiftSmooth->set_sensitive(pixelShiftBlur->get_active());
|
||||
} else {
|
||||
pixelShiftBlur->set_sensitive(false);
|
||||
pixelShiftHoleFill->set_sensitive(false);
|
||||
pixelShiftSmooth->set_sensitive(false);
|
||||
}
|
||||
|
||||
if (listener) {
|
||||
@@ -823,6 +835,7 @@ void BayerProcess::pixelShiftAutomaticChanged ()
|
||||
pixelShiftMedian3->set_sensitive(pixelShiftAutomatic->get_active () && pixelShiftMedian->get_active());
|
||||
pixelShiftGreen->set_sensitive(pixelShiftAutomatic->get_active ());
|
||||
pixelShiftBlur->set_sensitive(pixelShiftAutomatic->get_active () && pixelShiftMotionCorrection->get_active_row_number() == 5);
|
||||
pixelShiftSmooth->set_sensitive(pixelShiftAutomatic->get_active () && pixelShiftMotionCorrection->get_active_row_number() == 5 && pixelShiftBlur->get_active());
|
||||
pixelShiftExp0->set_sensitive(pixelShiftAutomatic->get_active ());
|
||||
pixelShiftNonGreenCross->set_sensitive(pixelShiftAutomatic->get_active ());
|
||||
pixelShiftNonGreenCross2->set_sensitive(pixelShiftAutomatic->get_active ());
|
||||
@@ -971,11 +984,33 @@ void BayerProcess::pixelShiftBlurChanged ()
|
||||
lastDCBen = pixelShiftBlur->get_active ();
|
||||
}
|
||||
|
||||
pixelShiftSmooth->set_sensitive(pixelShiftBlur->get_active ());
|
||||
|
||||
if (listener) {
|
||||
listener->panelChanged (EvPixelShiftBlur, pixelShiftBlur->get_active() ? M("GENERAL_ENABLED") : M("GENERAL_DISABLED"));
|
||||
}
|
||||
}
|
||||
|
||||
void BayerProcess::pixelShiftSmoothChanged ()
|
||||
{
|
||||
if (batchMode) {
|
||||
if (pixelShiftSmooth->get_inconsistent()) {
|
||||
pixelShiftSmooth->set_inconsistent (false);
|
||||
pixelShiftSmoothconn.block (true);
|
||||
pixelShiftSmooth->set_active (false);
|
||||
pixelShiftSmoothconn.block (false);
|
||||
} else if (lastDCBen) {
|
||||
pixelShiftSmooth->set_inconsistent (true);
|
||||
}
|
||||
|
||||
lastDCBen = pixelShiftSmooth->get_active ();
|
||||
}
|
||||
|
||||
if (listener) {
|
||||
listener->panelChanged (EvPixelShiftSmooth, pixelShiftSmooth->get_active() ? M("GENERAL_ENABLED") : M("GENERAL_DISABLED"));
|
||||
}
|
||||
}
|
||||
|
||||
void BayerProcess::pixelShiftExp0Changed ()
|
||||
{
|
||||
if (batchMode) {
|
||||
|
Reference in New Issue
Block a user