diff --git a/rtdata/languages/default b/rtdata/languages/default
index 23a7d5d68..d10756b2b 100644
--- a/rtdata/languages/default
+++ b/rtdata/languages/default
@@ -687,6 +687,7 @@ HISTORY_MSG_452;EvPixelshiftShowMotionMaskOnly
HISTORY_MSG_453;EvPixelShiftAutomatic
HISTORY_MSG_454;EvPixelShiftNonGreenHorizontal
HISTORY_MSG_455;EvPixelShiftNonGreenVertical
+HISTORY_MSG_456;EvPixelShiftNonGreenCross
HISTORY_NEWSNAPSHOT;Add
HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s
HISTORY_SNAPSHOT;Snapshot
@@ -1668,6 +1669,7 @@ TP_RAW_LMMSE_TOOLTIP;Adds gamma (step 1), median (steps 2-4) and refinement (ste
TP_RAW_PIXELSHIFTADAPTIVE;Adaptive detection
TP_RAW_PIXELSHIFTNONGREENHORIZONTAL;Check red/blue horizontal
TP_RAW_PIXELSHIFTNONGREENVERTICAL;Check red/blue vertical
+TP_RAW_PIXELSHIFTNONGREENCROSS;Check red/blue cross
TP_RAW_PIXELSHIFTMOTION;Pixelshift motion detection
TP_RAW_PIXELSHIFTMOTION_TOOLTIP;0 means no motion detection\n1 - 99 means motion will be detected according to this value. Increase value to increase detection rate\n100 means the Amaze demosaiced frame will be used
TP_RAW_PIXELSHIFTMOTIONCORRECTION;Pixelshift motion correction
diff --git a/rtengine/pixelshift.cc b/rtengine/pixelshift.cc
index 301e36dae..06dfb3b70 100644
--- a/rtengine/pixelshift.cc
+++ b/rtengine/pixelshift.cc
@@ -98,7 +98,7 @@ float nonGreenDiff(float a, float b, bool adaptive, float stddevFactor, float ep
using namespace std;
using namespace rtengine;
-void RawImageSource::pixelshift(int winx, int winy, int winw, int winh, bool detectMotion, int motion, bool showMotion, bool showOnlyMask, unsigned int frame, RAWParams::BayerSensor::ePSMotionCorrection gridSize_, bool adaptive, float stddevFactor, float eperIso, float nreadIso, float prnu, const std::string &model, float rawWpCorrection, bool checkNonGreenHorizontal, bool checkNonGreenVertical)
+void RawImageSource::pixelshift(int winx, int winy, int winw, int winh, bool detectMotion, int motion, bool showMotion, bool showOnlyMask, unsigned int frame, RAWParams::BayerSensor::ePSMotionCorrection gridSize_, bool adaptive, float stddevFactor, float eperIso, float nreadIso, float prnu, const std::string &model, float rawWpCorrection, bool checkNonGreenHorizontal, bool checkNonGreenVertical, bool checkNonGreenCross)
{
BENCHFUN
@@ -272,7 +272,6 @@ void RawImageSource::pixelshift(int winx, int winy, int winw, int winh, bool det
// For shades of green motion indicators
const float blendFactor = ((adaptive || motion == 0.f) ? 1.f : 1.f / (1.f - motionThreshold));
- bool checkNonGreen = true;
unsigned int offsX = 0, offsY = 0;
// We have to adjust the offsets for the selected subframe we use for areas with motion
@@ -433,6 +432,68 @@ void RawImageSource::pixelshift(int winx, int winy, int winw, int winh, bool det
continue;
}
+ if(adaptive && checkNonGreenCross) {
+ float ng1 = (*rawDataFrames[(offset << 1) + offset])[i][j + offset];
+ float ng0 = (*rawDataFrames[((offset ^ 1) << 1) + (offset ^ 1)])[i][j + (offset ^ 1) + 1];
+ float ng2 = (*rawDataFrames[((offset ^ 1) << 1) + (offset ^ 1)])[i][j + (offset ^ 1) - 1];
+ float ng3 = (*rawDataFrames[((offset << 1) + offset) ^ 1])[i][j + offset];
+ float ng4 = (*rawDataFrames[((offset << 1) + offset) ^ 1])[i + 2][j + offset];
+ float diff0 = ng0 - ng1;
+ float diff2 = ng2 - ng1;
+ float diff3 = ng3 - ng1;
+ float diff4 = ng4 - ng1;
+ if(diff0 * diff2 >= 0.f && diff3 * diff4 >= 0.f && diff0 * diff3 >= 0.f) {
+ float val = (ng0 + ng2 + ng3 + ng4) / 4.f;
+ float gridMax = nonGreenDiff(ng1, val, true, stddevFactor, eperIsoNonGreen0, nRead, prnu, showMotion);
+
+ if(gridMax > 0.f) {
+ if(showMotion) {
+ float blend = gridMax * blendFactor;
+
+ if(!showOnlyMask) {
+ // if showMotion is enabled colourize the pixel
+ nonGreenDest0[j + offsX] = 1000.f + 25000.f * blend;
+ nonGreenDest1[j + offsX] = greenDest[j + offsX] = 0.f;
+ } else {
+ greenDest[j + offsX] = nonGreenDest0[j + offsX] = nonGreenDest1[j + offsX] = 1000.f + 25000.f * blend;
+ }
+ }
+
+ continue;
+ }
+ }
+
+ ng1 = (*rawDataFrames[2 - offset])[i + 1][j - offset + 1];
+ ng0 = (*rawDataFrames[2 - (offset ^ 1)])[i + 1][j - (offset ^ 1) + 2];
+ ng2 = (*rawDataFrames[2 - (offset ^ 1)])[i + 1][j - (offset ^ 1)];
+ ng3 = (*rawDataFrames[3 - ((offset << 1) + offset)])[i - 1][j - offset + 1];
+ ng4 = (*rawDataFrames[3 - ((offset << 1) + offset)])[i + 1][j - offset + 1];
+ diff0 = ng0 - ng1;
+ diff2 = ng2 - ng1;
+ diff3 = ng3 - ng1;
+ diff4 = ng4 - ng1;
+ if(diff0 * diff2 >= 0.f && diff3 * diff4 >= 0.f && diff0 * diff3 >= 0.f) {
+ float val = (ng0 + ng2 + ng3 + ng4) / 4.f;
+ float gridMax = nonGreenDiff(ng1, val, true, stddevFactor, eperIsoNonGreen2, nRead, prnu, showMotion);
+
+ if(gridMax > 0.f) {
+ if(showMotion) {
+ float blend = gridMax * blendFactor;
+
+ if(!showOnlyMask) {
+ // if showMotion is enabled colourize the pixel
+ nonGreenDest1[j + offsX] = 1000.f + 25000.f * blend;
+ nonGreenDest0[j + offsX] = greenDest[j + offsX] = 0.f;
+ } else {
+ greenDest[j + offsX] = nonGreenDest0[j + offsX] = nonGreenDest1[j + offsX] = 1000.f + 25000.f * blend;
+ }
+ }
+
+ continue;
+ }
+ }
+ }
+
if(adaptive && checkNonGreenHorizontal) {
float ng1 = (*rawDataFrames[(offset << 1) + offset])[i][j + offset];
float ng0 = (*rawDataFrames[((offset ^ 1) << 1) + (offset ^ 1)])[i][j + (offset ^ 1) + 1];
diff --git a/rtengine/procevents.h b/rtengine/procevents.h
index a82a2d028..7d9d41436 100644
--- a/rtengine/procevents.h
+++ b/rtengine/procevents.h
@@ -482,6 +482,7 @@ enum ProcEvent {
EvPixelShiftAutomatic = 452,
EvPixelShiftNonGreenHorizontal = 453,
EvPixelShiftNonGreenVertical = 454,
+ EvPixelShiftNonGreenCross = 455,
NUMOFEVENTS
};
diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc
index 66c924fc1..86f02f26d 100644
--- a/rtengine/procparams.cc
+++ b/rtengine/procparams.cc
@@ -896,6 +896,7 @@ void RAWParams::setDefaults()
bayersensor.pixelShiftAutomatic = true;
bayersensor.pixelShiftNonGreenHorizontal = false;
bayersensor.pixelShiftNonGreenVertical = false;
+ bayersensor.pixelShiftNonGreenCross = false;
bayersensor.black0 = 0.0;
bayersensor.black1 = 0.0;
bayersensor.black2 = 0.0;
@@ -3419,6 +3420,10 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b
keyFile.set_boolean ("RAW Bayer", "pixelShiftNonGreenVertical", raw.bayersensor.pixelShiftNonGreenVertical );
}
+ if (!pedited || pedited->raw.bayersensor.pixelShiftNonGreenCross) {
+ keyFile.set_boolean ("RAW Bayer", "pixelShiftNonGreenCross", raw.bayersensor.pixelShiftNonGreenCross );
+ }
+
//if (!pedited || pedited->raw.bayersensor.allEnhance) keyFile.set_boolean ("RAW Bayer", "ALLEnhance", raw.bayersensor.all_enhance );
if (!pedited || pedited->raw.xtranssensor.method) {
@@ -7565,6 +7570,14 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited)
}
}
+ if (keyFile.has_key ("RAW Bayer", "pixelShiftNonGreenCross")) {
+ raw.bayersensor.pixelShiftNonGreenCross = keyFile.get_boolean("RAW Bayer", "pixelShiftNonGreenCross");
+
+ if (pedited) {
+ pedited->raw.bayersensor.pixelShiftNonGreenCross = true;
+ }
+ }
+
//if (keyFile.has_key ("RAW Bayer", "ALLEnhance")) { raw.bayersensor.all_enhance = keyFile.get_boolean("RAW Bayer", "ALLEnhance"); if (pedited) pedited->raw.bayersensor.allEnhance = true; }
}
@@ -8015,6 +8028,7 @@ bool ProcParams::operator== (const ProcParams& other)
&& raw.bayersensor.pixelShiftAutomatic == other.raw.bayersensor.pixelShiftAutomatic
&& raw.bayersensor.pixelShiftNonGreenHorizontal == other.raw.bayersensor.pixelShiftNonGreenHorizontal
&& raw.bayersensor.pixelShiftNonGreenVertical == other.raw.bayersensor.pixelShiftNonGreenVertical
+ && raw.bayersensor.pixelShiftNonGreenCross == other.raw.bayersensor.pixelShiftNonGreenCross
&& raw.bayersensor.dcb_enhance == other.raw.bayersensor.dcb_enhance
//&& raw.bayersensor.all_enhance == other.raw.bayersensor.all_enhance
&& raw.xtranssensor.method == other.raw.xtranssensor.method
diff --git a/rtengine/procparams.h b/rtengine/procparams.h
index 8d3dfc541..1b866b09d 100644
--- a/rtengine/procparams.h
+++ b/rtengine/procparams.h
@@ -1196,6 +1196,7 @@ public:
bool pixelShiftAutomatic;
bool pixelShiftNonGreenHorizontal;
bool pixelShiftNonGreenVertical;
+ bool pixelShiftNonGreenCross;
bool dcb_enhance;
//bool all_enhance;
};
diff --git a/rtengine/rawimagesource.cc b/rtengine/rawimagesource.cc
index 6b97eb0b6..6d4f744d1 100644
--- a/rtengine/rawimagesource.cc
+++ b/rtengine/rawimagesource.cc
@@ -2027,7 +2027,7 @@ void RawImageSource::demosaic(const RAWParams &raw)
amaze_demosaic_RT (0, 0, W, H); // for non pixelshift files use amaze if pixelshift is selected. We need it also for motion correction
}
if(numFrames == 4) {
- pixelshift(0, 0, W, H, raw.bayersensor.pixelShiftMotion > 0, raw.bayersensor.pixelShiftMotion, raw.bayersensor.pixelshiftShowMotion, raw.bayersensor.pixelshiftShowMotionMaskOnly, currFrame, raw.bayersensor.pixelShiftMotionCorrection, raw.bayersensor.pixelShiftAutomatic, raw.bayersensor.pixelShiftStddevFactor, raw.bayersensor.pixelShiftEperIso, raw.bayersensor.pixelShiftNreadIso, raw.bayersensor.pixelShiftPrnu, ri->get_model(), raw.expos, raw.bayersensor.pixelShiftNonGreenHorizontal, raw.bayersensor.pixelShiftNonGreenVertical);
+ pixelshift(0, 0, W, H, raw.bayersensor.pixelShiftMotion > 0, raw.bayersensor.pixelShiftMotion, raw.bayersensor.pixelshiftShowMotion, raw.bayersensor.pixelshiftShowMotionMaskOnly, currFrame, raw.bayersensor.pixelShiftMotionCorrection, raw.bayersensor.pixelShiftAutomatic, raw.bayersensor.pixelShiftStddevFactor, raw.bayersensor.pixelShiftEperIso, raw.bayersensor.pixelShiftNreadIso, raw.bayersensor.pixelShiftPrnu, ri->get_model(), raw.expos, raw.bayersensor.pixelShiftNonGreenHorizontal, raw.bayersensor.pixelShiftNonGreenVertical, raw.bayersensor.pixelShiftNonGreenCross);
}
} else if (raw.bayersensor.method == RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::dcb] ) {
dcb_demosaic(raw.bayersensor.dcb_iterations, raw.bayersensor.dcb_enhance);
diff --git a/rtengine/rawimagesource.h b/rtengine/rawimagesource.h
index a6877f6fd..df284e8c9 100644
--- a/rtengine/rawimagesource.h
+++ b/rtengine/rawimagesource.h
@@ -261,7 +261,7 @@ protected:
void xtransborder_interpolate (int border);
void xtrans_interpolate (const int passes, const bool useCieLab);
void fast_xtrans_interpolate ();
- void pixelshift(int winx, int winy, int winw, int winh, bool detectMotion, int motion, bool showMotion, bool showOnlyMask, unsigned int frame, RAWParams::BayerSensor::ePSMotionCorrection gridSize, bool adaptive, float stddevFactor, float eperIso, float nreadIso, float prnu, const std::string &model, float rawWpCorrection, bool checkNonGreenHorizontal, bool checkNonGreenVertical);
+ void pixelshift(int winx, int winy, int winw, int winh, bool detectMotion, int motion, bool showMotion, bool showOnlyMask, unsigned int frame, RAWParams::BayerSensor::ePSMotionCorrection gridSize, bool adaptive, float stddevFactor, float eperIso, float nreadIso, float prnu, const std::string &model, float rawWpCorrection, bool checkNonGreenHorizontal, bool checkNonGreenVertical, bool checkNonGreenCross);
void hflip (Imagefloat* im);
void vflip (Imagefloat* im);
diff --git a/rtengine/refreshmap.cc b/rtengine/refreshmap.cc
index 6aa73c67a..f0fdcb69f 100644
--- a/rtengine/refreshmap.cc
+++ b/rtengine/refreshmap.cc
@@ -481,7 +481,8 @@ int refreshmap[rtengine::NUMOFEVENTS] = {
DEMOSAIC, // EvPixelshiftShowMotionMaskOnly
DEMOSAIC, // EvPixelShiftAutomatic
DEMOSAIC, // EvPixelShiftNonGreenHorizontal
- DEMOSAIC // EvPixelShiftNonGreenVertical
+ DEMOSAIC, // EvPixelShiftNonGreenVertical
+ DEMOSAIC // EvPixelShiftNonGreenCross
};
diff --git a/rtgui/bayerprocess.cc b/rtgui/bayerprocess.cc
index f5e81de75..611314fc0 100644
--- a/rtgui/bayerprocess.cc
+++ b/rtgui/bayerprocess.cc
@@ -92,6 +92,9 @@ BayerProcess::BayerProcess () : FoldableToolPanel(this, "bayerprocess", M("TP_RA
pixelShiftAutomatic = Gtk::manage (new Gtk::CheckButton(M("TP_RAW_PIXELSHIFTADAPTIVE")));
pixelShiftOptions->pack_start(*pixelShiftAutomatic);
+ pixelShiftNonGreenCross = Gtk::manage (new Gtk::CheckButton(M("TP_RAW_PIXELSHIFTNONGREENCROSS")));
+ pixelShiftOptions->pack_start(*pixelShiftNonGreenCross);
+
pixelShiftNonGreenHorizontal = Gtk::manage (new Gtk::CheckButton(M("TP_RAW_PIXELSHIFTNONGREENHORIZONTAL")));
pixelShiftOptions->pack_start(*pixelShiftNonGreenHorizontal);
@@ -196,6 +199,7 @@ BayerProcess::BayerProcess () : FoldableToolPanel(this, "bayerprocess", M("TP_RA
pixelShiftAutomaticconn = pixelShiftAutomatic->signal_toggled().connect ( sigc::mem_fun(*this, &BayerProcess::pixelShiftAutomaticChanged), true);
pixelShiftNonGreenHorizontalconn = pixelShiftNonGreenHorizontal->signal_toggled().connect ( sigc::mem_fun(*this, &BayerProcess::pixelShiftNonGreenHorizontalChanged), true);
pixelShiftNonGreenVerticalconn = pixelShiftNonGreenVertical->signal_toggled().connect ( sigc::mem_fun(*this, &BayerProcess::pixelShiftNonGreenVerticalChanged), true);
+ pixelShiftNonGreenCrossconn = pixelShiftNonGreenCross->signal_toggled().connect ( sigc::mem_fun(*this, &BayerProcess::pixelShiftNonGreenCrossChanged), true);
//allEnhconn = allEnhance->signal_toggled().connect ( sigc::mem_fun(*this, &BayerProcess::allEnhanceChanged), true);
}
@@ -229,6 +233,7 @@ void BayerProcess::read(const rtengine::procparams::ProcParams* pp, const Params
pixelShiftAutomatic->set_inconsistent(!pedited->raw.bayersensor.pixelShiftAutomatic);
pixelShiftNonGreenHorizontal->set_inconsistent(!pedited->raw.bayersensor.pixelShiftNonGreenHorizontal);
pixelShiftNonGreenVertical->set_inconsistent(!pedited->raw.bayersensor.pixelShiftNonGreenVertical);
+ pixelShiftNonGreenCross->set_inconsistent(!pedited->raw.bayersensor.pixelShiftNonGreenCross);
//allEnhance->set_inconsistent(!pedited->raw.bayersensor.allEnhance);
lmmseIterations->setEditedState ( pedited->raw.bayersensor.lmmseIterations ? Edited : UnEdited);
pixelShiftMotion->setEditedState ( pedited->raw.bayersensor.pixelShiftMotion ? Edited : UnEdited);
@@ -257,6 +262,7 @@ void BayerProcess::read(const rtengine::procparams::ProcParams* pp, const Params
pixelShiftAutomatic->set_active(pp->raw.bayersensor.pixelShiftAutomatic);
pixelShiftNonGreenHorizontal->set_active(pp->raw.bayersensor.pixelShiftNonGreenHorizontal);
pixelShiftNonGreenVertical->set_active(pp->raw.bayersensor.pixelShiftNonGreenVertical);
+ pixelShiftNonGreenCross->set_active(pp->raw.bayersensor.pixelShiftNonGreenCross);
ccSteps->setValue (pp->raw.bayersensor.ccSteps);
lmmseIterations->setValue (pp->raw.bayersensor.lmmse_iterations);
pixelShiftMotion->setValue (pp->raw.bayersensor.pixelShiftMotion);
@@ -325,6 +331,7 @@ void BayerProcess::write( rtengine::procparams::ProcParams* pp, ParamsEdited* pe
pp->raw.bayersensor.pixelShiftAutomatic = pixelShiftAutomatic->get_active();
pp->raw.bayersensor.pixelShiftNonGreenHorizontal = pixelShiftNonGreenHorizontal->get_active();
pp->raw.bayersensor.pixelShiftNonGreenVertical = pixelShiftNonGreenVertical->get_active();
+ pp->raw.bayersensor.pixelShiftNonGreenCross = pixelShiftNonGreenCross->get_active();
int currentRow = method->get_active_row_number();
if( currentRow >= 0 && currentRow < procparams::RAWParams::BayerSensor::numMethods) {
@@ -356,6 +363,7 @@ void BayerProcess::write( rtengine::procparams::ProcParams* pp, ParamsEdited* pe
pedited->raw.bayersensor.pixelShiftAutomatic = !pixelShiftAutomatic->get_inconsistent();
pedited->raw.bayersensor.pixelShiftNonGreenHorizontal = !pixelShiftNonGreenHorizontal->get_inconsistent();
pedited->raw.bayersensor.pixelShiftNonGreenVertical = !pixelShiftNonGreenVertical->get_inconsistent();
+ pedited->raw.bayersensor.pixelShiftNonGreenCross = !pixelShiftNonGreenCross->get_inconsistent();
}
}
@@ -589,6 +597,7 @@ void BayerProcess::pixelShiftAutomaticChanged ()
pixelShiftStddevFactor->set_sensitive(pixelShiftAutomatic->get_active ());
pixelShiftNonGreenHorizontal->set_sensitive(pixelShiftAutomatic->get_active ());
pixelShiftNonGreenVertical->set_sensitive(pixelShiftAutomatic->get_active ());
+ pixelShiftNonGreenCross->set_sensitive(pixelShiftAutomatic->get_active ());
if (listener) {
listener->panelChanged (EvPixelShiftAutomatic, pixelShiftAutomatic->get_active() ? M("GENERAL_ENABLED") : M("GENERAL_DISABLED"));
@@ -636,6 +645,27 @@ void BayerProcess::pixelShiftNonGreenVerticalChanged ()
}
}
+void BayerProcess::pixelShiftNonGreenCrossChanged ()
+{
+ if (batchMode) {
+ if (pixelShiftNonGreenCross->get_inconsistent()) {
+ pixelShiftNonGreenCross->set_inconsistent (false);
+ pixelShiftNonGreenCrossconn.block (true);
+ pixelShiftNonGreenCross->set_active (false);
+ pixelShiftNonGreenCrossconn.block (false);
+ } else if (lastDCBen) {
+ pixelShiftNonGreenCross->set_inconsistent (true);
+ }
+
+ lastDCBen = pixelShiftNonGreenCross->get_active ();
+ }
+
+ if (listener) {
+ listener->panelChanged (EvPixelShiftNonGreenCross, pixelShiftNonGreenCross->get_active() ? M("GENERAL_ENABLED") : M("GENERAL_DISABLED"));
+ }
+}
+
+
/*void BayerProcess::allEnhanceChanged ()
{
if (batchMode) {
diff --git a/rtgui/bayerprocess.h b/rtgui/bayerprocess.h
index a54637f13..136298e80 100644
--- a/rtgui/bayerprocess.h
+++ b/rtgui/bayerprocess.h
@@ -49,6 +49,7 @@ protected:
Gtk::CheckButton* pixelShiftAutomatic;
Gtk::CheckButton* pixelShiftNonGreenHorizontal;
Gtk::CheckButton* pixelShiftNonGreenVertical;
+ Gtk::CheckButton* pixelShiftNonGreenCross;
Adjuster* pixelShiftStddevFactor;
Adjuster* pixelShiftEperIso;
Adjuster* pixelShiftNreadIso;
@@ -56,7 +57,7 @@ protected:
bool lastDCBen;
int oldMethod;
//bool lastALLen;
- sigc::connection methodconn, imagenumberconn, psmcconn, dcbEnhconn, pixelShiftShowMotionconn, pixelShiftShowMotionMaskOnlyconn, pixelShiftAutomaticconn, pixelShiftNonGreenHorizontalconn, pixelShiftNonGreenVerticalconn; //,allEnhconn;
+ sigc::connection methodconn, imagenumberconn, psmcconn, dcbEnhconn, pixelShiftShowMotionconn, pixelShiftShowMotionMaskOnlyconn, pixelShiftAutomaticconn, pixelShiftNonGreenHorizontalconn, pixelShiftNonGreenVerticalconn, pixelShiftNonGreenCrossconn; //,allEnhconn;
public:
BayerProcess ();
@@ -76,6 +77,7 @@ public:
void pixelShiftAutomaticChanged();
void pixelShiftNonGreenHorizontalChanged();
void pixelShiftNonGreenVerticalChanged();
+ void pixelShiftNonGreenCrossChanged();
//void allEnhanceChanged();
};
diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc
index ac0257fa1..f4b41b784 100644
--- a/rtgui/paramsedited.cc
+++ b/rtgui/paramsedited.cc
@@ -381,6 +381,7 @@ void ParamsEdited::set (bool v)
raw.bayersensor.pixelShiftAutomatic = v;
raw.bayersensor.pixelShiftNonGreenHorizontal = v;
raw.bayersensor.pixelShiftNonGreenVertical = v;
+ raw.bayersensor.pixelShiftNonGreenCross = v;
raw.bayersensor.greenEq = v;
raw.bayersensor.linenoise = v;
raw.xtranssensor.method = v;
@@ -888,6 +889,7 @@ void ParamsEdited::initFrom (const std::vector
raw.bayersensor.pixelShiftAutomatic = raw.bayersensor.pixelShiftAutomatic && p.raw.bayersensor.pixelShiftAutomatic == other.raw.bayersensor.pixelShiftAutomatic;
raw.bayersensor.pixelShiftNonGreenHorizontal = raw.bayersensor.pixelShiftNonGreenHorizontal && p.raw.bayersensor.pixelShiftNonGreenHorizontal == other.raw.bayersensor.pixelShiftNonGreenHorizontal;
raw.bayersensor.pixelShiftNonGreenVertical = raw.bayersensor.pixelShiftNonGreenVertical && p.raw.bayersensor.pixelShiftNonGreenVertical == other.raw.bayersensor.pixelShiftNonGreenVertical;
+ raw.bayersensor.pixelShiftNonGreenCross = raw.bayersensor.pixelShiftNonGreenCross && p.raw.bayersensor.pixelShiftNonGreenCross == other.raw.bayersensor.pixelShiftNonGreenCross;
raw.bayersensor.greenEq = raw.bayersensor.greenEq && p.raw.bayersensor.greenthresh == other.raw.bayersensor.greenthresh;
raw.bayersensor.linenoise = raw.bayersensor.linenoise && p.raw.bayersensor.linenoise == other.raw.bayersensor.linenoise;
raw.xtranssensor.method = raw.xtranssensor.method && p.raw.xtranssensor.method == other.raw.xtranssensor.method;
@@ -2344,6 +2346,10 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten
toEdit.raw.bayersensor.pixelShiftNonGreenVertical = mods.raw.bayersensor.pixelShiftNonGreenVertical;
}
+ if (raw.bayersensor.pixelShiftNonGreenCross) {
+ toEdit.raw.bayersensor.pixelShiftNonGreenCross = mods.raw.bayersensor.pixelShiftNonGreenCross;
+ }
+
//if (raw.bayersensor.allEnhance) toEdit.raw.bayersensor.all_enhance = mods.raw.bayersensor.all_enhance;
if (raw.bayersensor.greenEq) {
toEdit.raw.bayersensor.greenthresh = dontforceSet && options.baBehav[ADDSET_PREPROCESS_GREENEQUIL] ? toEdit.raw.bayersensor.greenthresh + mods.raw.bayersensor.greenthresh : mods.raw.bayersensor.greenthresh;
@@ -2857,7 +2863,7 @@ bool RAWParamsEdited::BayerSensor::isUnchanged() const
return method && imageNum && dcbIterations && dcbEnhance && lmmseIterations/*&& allEnhance*/ && greenEq
&& pixelShiftMotion && pixelShiftMotionCorrection && pixelShiftStddevFactor && pixelShiftEperIso
&& pixelShiftNreadIso && pixelShiftPrnu && pixelshiftShowMotion && pixelshiftShowMotionMaskOnly
- && pixelShiftAutomatic && pixelShiftNonGreenHorizontal && pixelShiftNonGreenVertical
+ && pixelShiftAutomatic && pixelShiftNonGreenHorizontal && pixelShiftNonGreenVertical && pixelShiftNonGreenCross
&& linenoise && exBlack0 && exBlack1 && exBlack2 && exBlack3 && exTwoGreen;
}
diff --git a/rtgui/paramsedited.h b/rtgui/paramsedited.h
index 4f9979d1f..bf66afd5d 100644
--- a/rtgui/paramsedited.h
+++ b/rtgui/paramsedited.h
@@ -703,6 +703,7 @@ public:
bool pixelShiftAutomatic;
bool pixelShiftNonGreenHorizontal;
bool pixelShiftNonGreenVertical;
+ bool pixelShiftNonGreenCross;
//bool allEnhance;
bool greenEq;