new gtk3 version of pixelshift
This commit is contained in:
commit
f9a536fd0b
@ -46,6 +46,7 @@ Other contributors (profiles, ideas, mockups, testing, forum activity, translati
|
||||
André Gauthier
|
||||
Sébastien Guyader
|
||||
M. Dávid Gyurkó
|
||||
JK Han (pinholecam)
|
||||
Arturs Jekabsons
|
||||
Marián Kyral
|
||||
Oscar de Lama
|
||||
@ -56,6 +57,8 @@ Other contributors (profiles, ideas, mockups, testing, forum activity, translati
|
||||
Wim ter Meer
|
||||
Alberto Righetto
|
||||
Kostia (Kildor) Romanov
|
||||
Kalle Söderman
|
||||
Johan Thor
|
||||
Vitalis Tiknius
|
||||
TooWaBoo
|
||||
Colin Walker
|
||||
|
@ -685,6 +685,36 @@ HISTORY_MSG_441;Retinex - Gain transmission
|
||||
HISTORY_MSG_442;Retinex - Scale
|
||||
HISTORY_MSG_443;Output Black Point Compensation
|
||||
HISTORY_MSG_444;WB - Temp bias
|
||||
HISTORY_MSG_445;Raw Sub-Image
|
||||
HISTORY_MSG_446;EvPixelShiftMotion
|
||||
HISTORY_MSG_447;EvPixelShiftMotionCorrection
|
||||
HISTORY_MSG_448;EvPixelShiftStddevFactorGreen
|
||||
HISTORY_MSG_449;PS ISO adaption
|
||||
HISTORY_MSG_450;EvPixelShiftNreadIso
|
||||
HISTORY_MSG_451;EvPixelShiftPrnu
|
||||
HISTORY_MSG_452;PS Show motion
|
||||
HISTORY_MSG_453;PS Show mask only
|
||||
HISTORY_MSG_454;EvPixelShiftAutomatic
|
||||
HISTORY_MSG_455;EvPixelShiftNonGreenHorizontal
|
||||
HISTORY_MSG_456;EvPixelShiftNonGreenVertical
|
||||
HISTORY_MSG_457;PS Check red/blue
|
||||
HISTORY_MSG_458;EvPixelShiftStddevFactorRed
|
||||
HISTORY_MSG_459;EvPixelShiftStddevFactorBlue
|
||||
HISTORY_MSG_460;EvPixelShiftGreenAmaze
|
||||
HISTORY_MSG_461;EvPixelShiftNonGreenAmaze
|
||||
HISTORY_MSG_462;PS Check green
|
||||
HISTORY_MSG_463;EvPixelShiftRedBlueWeight
|
||||
HISTORY_MSG_464;PS Blur motion mask
|
||||
HISTORY_MSG_465;PS Blur radius
|
||||
HISTORY_MSG_466;EvPixelShiftSum
|
||||
HISTORY_MSG_467;EvPixelShiftExp0
|
||||
HISTORY_MSG_468;PS Fill holes
|
||||
HISTORY_MSG_469;PS Median
|
||||
HISTORY_MSG_470;EvPixelShiftMedian3
|
||||
HISTORY_MSG_471;PS Motion correction
|
||||
HISTORY_MSG_472;PS Smooth transitions
|
||||
HISTORY_MSG_473;PS Use lmmse
|
||||
HISTORY_MSG_474;PS Equalize
|
||||
HISTORY_NEWSNAPSHOT;Add
|
||||
HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: <b>Alt-s</b>
|
||||
HISTORY_SNAPSHOT;Snapshot
|
||||
@ -875,6 +905,7 @@ PARTIALPASTE_RAW_DCBENHANCE;DCB enhancement
|
||||
PARTIALPASTE_RAW_DCBITERATIONS;DCB iterations
|
||||
PARTIALPASTE_RAW_DMETHOD;Demosaic method
|
||||
PARTIALPASTE_RAW_FALSECOLOR;False color suppression
|
||||
PARTIALPASTE_RAW_IMAGENUM;Sub-image
|
||||
PARTIALPASTE_RAW_LMMSEITERATIONS;LMMSE enhancement steps
|
||||
PARTIALPASTE_RESIZE;Resize
|
||||
PARTIALPASTE_RETINEX;Retinex
|
||||
@ -1660,13 +1691,57 @@ TP_RAW_DCBITERATIONS;Number of DCB iterations
|
||||
TP_RAW_DMETHOD;Method
|
||||
TP_RAW_DMETHOD_PROGRESSBAR;%1 demosaicing...
|
||||
TP_RAW_DMETHOD_PROGRESSBAR_REFINE;Demosaicing refinement...
|
||||
TP_RAW_DMETHOD_TOOLTIP;Note: IGV and LMMSE are dedicated to high ISO images to aid in noise reduction without leading to maze patterns, posterization or a washed-out look.
|
||||
TP_RAW_DMETHOD_TOOLTIP;Note: IGV and LMMSE are dedicated to high ISO images to aid in noise reduction without leading to maze patterns, posterization or a washed-out look.\nPixelshift is for Pentax pixelshift files. It falls back to Amaze for non pixelshift files.
|
||||
TP_RAW_FALSECOLOR;False color suppression steps
|
||||
TP_RAW_HD;Threshold
|
||||
TP_RAW_HD_TOOLTIP;Lower values make hot/dead pixel detection more aggressive, but false positives may lead to artifacts. If you notice any artifacts appearing when enabling the Hot/Dead Pixel Filters, gradually increase the threshold value until they disappear.
|
||||
TP_RAW_IMAGENUM;Sub-image
|
||||
TP_RAW_IMAGENUM_TOOLTIP;Some raw files might embed several sub-images (HDR, Pixel-Shift, Dual Sensitivity). Use this button to select the sub-image.\n\nThe last sub-image will be used if you select a value beyond the real sub-image count.
|
||||
TP_RAW_LABEL;Demosaicing
|
||||
TP_RAW_LMMSEITERATIONS;LMMSE enhancement steps
|
||||
TP_RAW_LMMSE_TOOLTIP;Adds gamma (step 1), median (steps 2-4) and refinement (steps 5-6) to reduce artifacts and improve the signal-to-noise ratio.
|
||||
TP_RAW_PIXELSHIFTADAPTIVE;Adaptive detection
|
||||
TP_RAW_PIXELSHIFTNONGREENHORIZONTAL;Check red/blue horizontal
|
||||
TP_RAW_PIXELSHIFTNONGREENVERTICAL;Check red/blue vertical
|
||||
TP_RAW_PIXELSHIFTMEDIAN;Median
|
||||
TP_RAW_PIXELSHIFTMEDIAN3;Exclude selected frame from median
|
||||
TP_RAW_PIXELSHIFTHOLEFILL;Fill holes in motion mask
|
||||
TP_RAW_PIXELSHIFTBLUR;Blur motion mask
|
||||
TP_RAW_PIXELSHIFTSIGMA_TOOLTIP;Default radius of 1.0 usually fits good for base ISO. Increase value for high ISO shots,\n5.0 is a good starting point for high ISO shots.\nWatch motion mask while changing the value.
|
||||
TP_RAW_PIXELSHIFTSMOOTH;Smooth transitions
|
||||
TP_RAW_PIXELSHIFTLMMSE_TOOLTIP;Use lmmse instead of amaze for motion areas.\nUseful for High ISO images.
|
||||
TP_RAW_PIXELSHIFTLMMSE;Use lmmse for motion parts
|
||||
TP_RAW_PIXELSHIFTEQUALBRIGHT;Equalize brightness of frames
|
||||
TP_RAW_PIXELSHIFTEQUALBRIGHT_TOOLTIP;Equalize the brightness of the frames to the brightness of the selected frame.\nIf there are overexposed areas in the frames select the brightest frame to avoid magenta colour cast in overexposed areas or enable motion correction.
|
||||
TP_RAW_PIXELSHIFTEXP0;Experimental
|
||||
TP_RAW_PIXELSHIFTGREEN;Check green channel for motion
|
||||
TP_RAW_PIXELSHIFTNONGREENCROSS;Check red/blue channels for motion
|
||||
TP_RAW_PIXELSHIFTNONGREENCROSS2;Check green amaze
|
||||
TP_RAW_PIXELSHIFTNONGREENAMAZE;Check red/blue amaze
|
||||
TP_RAW_PIXELSHIFTMOTION;Motion detection level (deprecated)
|
||||
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_PIXELSHIFTHOLEFILL_TOOLTIP;Fill holes in motion mask
|
||||
TP_RAW_PIXELSHIFTBLUR_TOOLTIP;Blur motion mask
|
||||
TP_RAW_PIXELSHIFTSMOOTH_TOOLTIP;Smooth transitions between areas with and without motion.\nSet to 0 to disable smooth transitions\nSet to 1 to get Amaze/lmmse or Median
|
||||
TP_RAW_PIXELSHIFTMEDIAN_TOOLTIP;Use median of all frames instead of selected frame for regions with motion.\nRemoves objects which are at different places in all frames.\nGives motion effect on slow moving (overlapping) objects.
|
||||
TP_RAW_PIXELSHIFTMEDIAN3_TOOLTIP;Excludes selected frame from median.\nUseful if moving objects overlap in frame 2 and 3
|
||||
TP_RAW_PIXELSHIFTSHOWMOTION_TOOLTIP;Overlays the image with a mask showing the regions with motion
|
||||
TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY_TOOLTIP;Shows the motion mask without the image
|
||||
TP_RAW_PIXELSHIFTMOTIONCORRECTION;Green motion correction size
|
||||
TP_RAW_PIXELSHIFTMOTIONCORRECTION_TOOLTIP;1 = 2 pixels\n3 = 3x3 grid\n5 = 5x5 grid
|
||||
TP_RAW_PIXELSHIFTMOTIONMETHOD;Motion Correction
|
||||
TP_RAW_PIXELSHIFTSHOWMOTION;Show motion
|
||||
TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY;Show mask only
|
||||
TP_RAW_PIXELSHIFTSTDDEVFACTORGREEN;StdDev factor Green
|
||||
TP_RAW_PIXELSHIFTSTDDEVFACTORRED;StdDev factor Red
|
||||
TP_RAW_PIXELSHIFTSTDDEVFACTORBLUE;StdDev factor Blue
|
||||
TP_RAW_PIXELSHIFTEPERISO;ISO adaption
|
||||
TP_RAW_PIXELSHIFTEPERISO_TOOLTIP;The default value (0.0) should work fine for base ISO.\nIncrease the value to improve motion detection for higher ISO.\nIncrease in small steps and watch the motion mask while increasing.
|
||||
TP_RAW_PIXELSHIFTNREADISO;nRead
|
||||
TP_RAW_PIXELSHIFTPRNU;PRNU (%)
|
||||
TP_RAW_PIXELSHIFTSIGMA;Blur radius
|
||||
TP_RAW_PIXELSHIFTMASKTHRESHOLD;3x3 new threshold
|
||||
TP_RAW_PIXELSHIFTREDBLUEWEIGHT;Red&Blue weight
|
||||
TP_RAW_SENSOR_BAYER_LABEL;Sensor with Bayer Matrix
|
||||
TP_RAW_SENSOR_XTRANS_DMETHOD_TOOLTIP;3-pass gives best results (recommended for low ISO images).\n1-pass is almost undistinguishable from 3-pass for high ISO images and is faster.
|
||||
TP_RAW_SENSOR_XTRANS_LABEL;Sensor with X-Trans Matrix
|
||||
|
@ -112,7 +112,7 @@ bool LinEqSolve(int nDim, double* pfMatr, double* pfVect, double* pfSolution)
|
||||
using namespace std;
|
||||
using namespace rtengine;
|
||||
|
||||
void RawImageSource::CA_correct_RT(const double cared, const double cablue, const double caautostrength)
|
||||
void RawImageSource::CA_correct_RT(const double cared, const double cablue, const double caautostrength, array2D<float> &rawData)
|
||||
{
|
||||
// multithreaded and partly vectorized by Ingo Weyrich
|
||||
constexpr int ts = 128;
|
||||
|
@ -24,6 +24,7 @@ set (RTENGINESOURCEFILES colortemp.cc curves.cc flatcurves.cc diagonalcurves.cc
|
||||
klt/storeFeatures.cc klt/trackFeatures.cc klt/writeFeatures.cc
|
||||
clutstore.cc
|
||||
ciecam02.cc
|
||||
pixelshift.cc
|
||||
)
|
||||
|
||||
include_directories (BEFORE "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
|
@ -38,7 +38,7 @@
|
||||
namespace rtengine
|
||||
{
|
||||
|
||||
SSEFUNCTION void RawImageSource::amaze_demosaic_RT(int winx, int winy, int winw, int winh)
|
||||
SSEFUNCTION void RawImageSource::amaze_demosaic_RT(int winx, int winy, int winw, int winh, array2D<float> &rawData, array2D<float> &red, array2D<float> &green, array2D<float> &blue)
|
||||
{
|
||||
BENCHFUN
|
||||
|
||||
|
@ -8578,7 +8578,7 @@ void CLASS identify()
|
||||
parse_fuji (i);
|
||||
}
|
||||
load_raw = &CLASS unpacked_load_raw;
|
||||
fseek (ifp, 100+28*(shot_select > 0), SEEK_SET);
|
||||
fseek (ifp, 100+28*(shot_select > 0 && shot_select < is_raw), SEEK_SET);
|
||||
parse_tiff (data_offset = get4());
|
||||
parse_tiff (thumb_offset+12);
|
||||
/*RT*/ exif_base = thumb_offset+12;
|
||||
@ -9492,7 +9492,7 @@ dng_skip:
|
||||
adobe_coeff (make, model);
|
||||
if(!strncmp(make, "Samsung", 7) && !strncmp(model, "NX1",3))
|
||||
adobe_coeff (make, model);
|
||||
if(!strncmp(make, "Pentax", 6) && (!strncmp(model, "K10D",4) || !strncmp(model, "K-70",4)))
|
||||
if(!strncmp(make, "Pentax", 6) && (!strncmp(model, "K10D",4) || !strncmp(model, "K-70",4) || !strncmp(model, "K-1",3)))
|
||||
adobe_coeff (make, model);
|
||||
if(!strncmp(make, "Leica", 5) && !strncmp(model, "Q",1))
|
||||
adobe_coeff (make, model);
|
||||
|
@ -1,5 +1,5 @@
|
||||
--- dcraw.c 2016-10-28 13:45:27 +0000
|
||||
+++ dcraw.cc 2016-10-31 13:35:15 +0000
|
||||
--- dcraw.c 2016-11-01 01:07:55 +0000
|
||||
+++ dcraw.cc 2016-11-01 14:54:02 +0000
|
||||
@@ -1,3 +1,16 @@
|
||||
+/*RT*/#include <glib.h>
|
||||
+/*RT*/#include <glib/gstdio.h>
|
||||
@ -2892,8 +2892,12 @@
|
||||
parse_ciff (hlen, flen-hlen, 0);
|
||||
load_raw = &CLASS canon_load_raw;
|
||||
} else if (parse_tiff(0)) apply_tiff();
|
||||
@@ -8494,6 +8575,7 @@
|
||||
fseek (ifp, 100+28*(shot_select > 0), SEEK_SET);
|
||||
@@ -8491,9 +8572,10 @@
|
||||
parse_fuji (i);
|
||||
}
|
||||
load_raw = &CLASS unpacked_load_raw;
|
||||
- fseek (ifp, 100+28*(shot_select > 0), SEEK_SET);
|
||||
+ fseek (ifp, 100+28*(shot_select > 0 && shot_select < is_raw), SEEK_SET);
|
||||
parse_tiff (data_offset = get4());
|
||||
parse_tiff (thumb_offset+12);
|
||||
+/*RT*/ exif_base = thumb_offset+12;
|
||||
|
@ -1316,7 +1316,7 @@ void RawImageSource::jdl_interpolate_omp() // from "Lassus"
|
||||
// Adapted to RawTherapee by Jacques Desmis 3/2013
|
||||
// Improved speed and reduced memory consumption by Ingo Weyrich 2/2015
|
||||
//TODO Tiles to reduce memory consumption
|
||||
SSEFUNCTION void RawImageSource::lmmse_interpolate_omp(int winw, int winh, int iterations)
|
||||
SSEFUNCTION void RawImageSource::lmmse_interpolate_omp(int winw, int winh, array2D<float> &rawData, array2D<float> &red, array2D<float> &green, array2D<float> &blue, int iterations)
|
||||
{
|
||||
const int width = winw, height = winh;
|
||||
const int ba = 10;
|
||||
|
@ -144,7 +144,7 @@ void dfInfo::updateRawImage()
|
||||
} else {
|
||||
int H = ri->get_height();
|
||||
int W = ri->get_width();
|
||||
ri->compress_image();
|
||||
ri->compress_image(0);
|
||||
int rSize = W * ((ri->getSensorType() == ST_BAYER || ri->getSensorType() == ST_FUJI_XTRANS) ? 1 : 3);
|
||||
acc_t **acc = new acc_t*[H];
|
||||
|
||||
@ -164,7 +164,7 @@ void dfInfo::updateRawImage()
|
||||
RawImage* temp = new RawImage(*iName);
|
||||
|
||||
if( !temp->loadRaw(true)) {
|
||||
temp->compress_image(); //\ TODO would be better working on original, because is temporary
|
||||
temp->compress_image(0); //\ TODO would be better working on original, because is temporary
|
||||
nFiles++;
|
||||
|
||||
if( ri->getSensorType() == ST_BAYER || ri->getSensorType() == ST_FUJI_XTRANS ) {
|
||||
@ -204,7 +204,7 @@ void dfInfo::updateRawImage()
|
||||
delete ri;
|
||||
ri = nullptr;
|
||||
} else {
|
||||
ri->compress_image();
|
||||
ri->compress_image(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ namespace rtengine
|
||||
|
||||
extern const Settings* settings;
|
||||
|
||||
void RawImageSource::processRawWhitepoint(float expos, float preser)
|
||||
void RawImageSource::processRawWhitepoint(float expos, float preser, array2D<float> &rawData)
|
||||
{
|
||||
MyTime t1e, t2e;
|
||||
|
||||
|
@ -130,14 +130,13 @@ void ffInfo::updateRawImage()
|
||||
if( !pathNames.empty() ) {
|
||||
std::list<Glib::ustring>::iterator iName = pathNames.begin();
|
||||
ri = new RawImage(*iName); // First file used also for extra pixels informations (width,height, shutter, filters etc.. )
|
||||
|
||||
if( ri->loadRaw(true)) {
|
||||
delete ri;
|
||||
ri = nullptr;
|
||||
} else {
|
||||
int H = ri->get_height();
|
||||
int W = ri->get_width();
|
||||
ri->compress_image();
|
||||
ri->compress_image(0);
|
||||
int rSize = W * ((ri->getSensorType() == ST_BAYER || ri->getSensorType() == ST_FUJI_XTRANS) ? 1 : 3);
|
||||
acc_t **acc = new acc_t*[H];
|
||||
|
||||
@ -157,7 +156,7 @@ void ffInfo::updateRawImage()
|
||||
RawImage* temp = new RawImage(*iName);
|
||||
|
||||
if( !temp->loadRaw(true)) {
|
||||
temp->compress_image(); //\ TODO would be better working on original, because is temporary
|
||||
temp->compress_image(0); //\ TODO would be better working on original, because is temporary
|
||||
nFiles++;
|
||||
|
||||
if( ri->getSensorType() == ST_BAYER || ri->getSensorType() == ST_FUJI_XTRANS ) {
|
||||
@ -192,12 +191,11 @@ void ffInfo::updateRawImage()
|
||||
}
|
||||
} else {
|
||||
ri = new RawImage(pathname);
|
||||
|
||||
if( ri->loadRaw(true)) {
|
||||
delete ri;
|
||||
ri = nullptr;
|
||||
} else {
|
||||
ri->compress_image();
|
||||
ri->compress_image(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -30,12 +30,11 @@
|
||||
|
||||
#include "rt_math.h"
|
||||
#include "rawimagesource.h"
|
||||
|
||||
namespace rtengine
|
||||
{
|
||||
|
||||
//void green_equilibrate()//for dcraw implementation
|
||||
void RawImageSource::green_equilibrate(float thresh)
|
||||
void RawImageSource::green_equilibrate(float thresh, array2D<float> &rawData)
|
||||
{
|
||||
// thresh = threshold for performing green equilibration; max percentage difference of G1 vs G2
|
||||
// G1-G2 differences larger than this will be assumed to be Nyquist texture, and left untouched
|
||||
@ -79,7 +78,7 @@ void RawImageSource::green_equilibrate(float thresh)
|
||||
*/
|
||||
//now smooth the cfa data
|
||||
#ifdef _OPENMP
|
||||
#pragma omp parallel for
|
||||
#pragma omp parallel for schedule(dynamic,16)
|
||||
#endif
|
||||
|
||||
for (int rr = 4; rr < height - 4; rr++)
|
||||
@ -99,8 +98,8 @@ void RawImageSource::green_equilibrate(float thresh)
|
||||
float d1 = (o1_1 + o1_2 + o1_3 + o1_4) * 0.25f;
|
||||
float d2 = (o2_1 + o2_2 + o2_3 + o2_4) * 0.25f;
|
||||
|
||||
float c1 = (fabs(o1_1 - o1_2) + fabs(o1_1 - o1_3) + fabs(o1_1 - o1_4) + fabs(o1_2 - o1_3) + fabs(o1_3 - o1_4) + fabs(o1_2 - o1_4)) / 6.0;
|
||||
float c2 = (fabs(o2_1 - o2_2) + fabs(o2_1 - o2_3) + fabs(o2_1 - o2_4) + fabs(o2_2 - o2_3) + fabs(o2_3 - o2_4) + fabs(o2_2 - o2_4)) / 6.0;
|
||||
float c1 = (fabs(o1_1 - o1_2) + fabs(o1_1 - o1_3) + fabs(o1_1 - o1_4) + fabs(o1_2 - o1_3) + fabs(o1_3 - o1_4) + fabs(o1_2 - o1_4)) / 6.f;
|
||||
float c2 = (fabs(o2_1 - o2_2) + fabs(o2_1 - o2_3) + fabs(o2_1 - o2_4) + fabs(o2_2 - o2_3) + fabs(o2_3 - o2_4) + fabs(o2_2 - o2_4)) / 6.f;
|
||||
//%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
//vote1=(checker[rr-2][cc]+checker[rr][cc-2]+checker[rr][cc+2]+checker[rr+2][cc]);
|
||||
@ -111,10 +110,10 @@ void RawImageSource::green_equilibrate(float thresh)
|
||||
//pixel interpolation
|
||||
float gin = cfa[rr][cc];
|
||||
|
||||
float gse = (cfa[rr + 1][cc + 1]) + 0.5 * (cfa[rr][cc] - cfa[rr + 2][cc + 2]);
|
||||
float gnw = (cfa[rr - 1][cc - 1]) + 0.5 * (cfa[rr][cc] - cfa[rr - 2][cc - 2]);
|
||||
float gne = (cfa[rr - 1][cc + 1]) + 0.5 * (cfa[rr][cc] - cfa[rr - 2][cc + 2]);
|
||||
float gsw = (cfa[rr + 1][cc - 1]) + 0.5 * (cfa[rr][cc] - cfa[rr + 2][cc - 2]);
|
||||
float gse = (cfa[rr + 1][cc + 1]) + 0.5f * (cfa[rr][cc] - cfa[rr + 2][cc + 2]);
|
||||
float gnw = (cfa[rr - 1][cc - 1]) + 0.5f * (cfa[rr][cc] - cfa[rr - 2][cc - 2]);
|
||||
float gne = (cfa[rr - 1][cc + 1]) + 0.5f * (cfa[rr][cc] - cfa[rr - 2][cc + 2]);
|
||||
float gsw = (cfa[rr + 1][cc - 1]) + 0.5f * (cfa[rr][cc] - cfa[rr + 2][cc - 2]);
|
||||
|
||||
|
||||
|
||||
|
@ -66,7 +66,7 @@ public:
|
||||
embProfile(nullptr), idata(nullptr), dirpyrdenoiseExpComp(INFINITY) {}
|
||||
|
||||
virtual ~ImageSource () {}
|
||||
virtual int load (const Glib::ustring &fname, bool batch = false) = 0;
|
||||
virtual int load (const Glib::ustring &fname, int imageNum = 0, bool batch = false) = 0;
|
||||
virtual void preprocess (const RAWParams &raw, const LensProfParams &lensProf, const CoarseTransformParams& coarse, bool prepareDenoise = true) {};
|
||||
virtual void demosaic (const RAWParams &raw) {};
|
||||
virtual void retinex (ColorManagementParams cmp, RetinexParams deh, ToneCurveParams Tc, LUTf & cdcurve, LUTf & mapcurve, const RetinextransmissionCurve & dehatransmissionCurve, const RetinexgaintransmissionCurve & dehagaintransmissionCurve, multi_array2D<float, 4> &conversionBuffer, bool dehacontlutili, bool mapcontlutili, bool useHsl, float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax, LUTu &histLRETI) {};
|
||||
@ -80,6 +80,9 @@ public:
|
||||
|
||||
virtual bool IsrgbSourceModified() const = 0; // tracks whether cached rgb output of demosaic has been modified
|
||||
|
||||
virtual void setCurrentFrame(unsigned int frameNum) = 0;
|
||||
|
||||
|
||||
// use right after demosaicing image, add coarse transformation and put the result in the provided Imagefloat*
|
||||
virtual void getImage (const ColorTemp &ctemp, int tran, Imagefloat* image, const PreviewProps &pp, const ToneCurveParams &hlp, const ColorManagementParams &cmp, const RAWParams &raw) = 0;
|
||||
virtual eSensorType getSensorType ()
|
||||
@ -157,6 +160,7 @@ public:
|
||||
{
|
||||
return this;
|
||||
}
|
||||
virtual void getRawValues(int x, int y, int rotate, int &R, int &G, int &B) = 0;
|
||||
};
|
||||
}
|
||||
#endif
|
||||
|
@ -185,6 +185,7 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall)
|
||||
|
||||
// raw auto CA is bypassed if no high detail is needed, so we have to compute it when high detail is needed
|
||||
if ( (todo & M_PREPROC) || (!highDetailPreprocessComputed && highDetailNeeded)) {
|
||||
imgsrc->setCurrentFrame(params.raw.bayersensor.imageNum);
|
||||
imgsrc->preprocess( rp, params.lensProf, params.coarse );
|
||||
imgsrc->getRAWHistogram( histRedRaw, histGreenRaw, histBlueRaw );
|
||||
|
||||
@ -214,7 +215,7 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall)
|
||||
|
||||
if (settings->verbose) {
|
||||
if (imgsrc->getSensorType() == ST_BAYER) {
|
||||
printf("Demosaic Bayer image using method: %s\n", rp.bayersensor.method.c_str());
|
||||
printf("Demosaic Bayer image n.%d using method: %s\n", rp.bayersensor.imageNum + 1, rp.bayersensor.method.c_str());
|
||||
} else if (imgsrc->getSensorType() == ST_FUJI_XTRANS) {
|
||||
printf("Demosaic X-Trans image with using method: %s\n", rp.xtranssensor.method.c_str());
|
||||
}
|
||||
|
@ -6924,7 +6924,7 @@ double ImProcFunctions::getAutoDistor (const Glib::ustring &fname, int thumb_si
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
Thumbnail* raw = rtengine::Thumbnail::loadFromRaw (fname, ri, w_raw, h_raw, 1, 1.0, FALSE);
|
||||
Thumbnail* raw = rtengine::Thumbnail::loadFromRaw (fname, ri, w_raw, h_raw, 1, 1.0, FALSE, 0);
|
||||
|
||||
if (!raw) {
|
||||
delete thumb;
|
||||
|
@ -64,6 +64,15 @@ inline vfloat median(std::array<vfloat, 3> array)
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
template<typename T>
|
||||
inline T median(std::array<T, 4> array)
|
||||
{
|
||||
float val1 = std::max(std::min(array[0], array[1]), std::min(array[2], array[3]));
|
||||
float val2 = std::min(std::max(array[0], array[1]), std::max(array[2], array[3]));
|
||||
return (val1 + val2) / 2.f;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
inline T median(std::array<T, 5> array)
|
||||
{
|
||||
|
1871
rtengine/pixelshift.cc
Normal file
1871
rtengine/pixelshift.cc
Normal file
File diff suppressed because it is too large
Load Diff
@ -471,6 +471,36 @@ enum ProcEvent {
|
||||
EvLskal = 441,
|
||||
EvOBPCompens = 442,
|
||||
EvWBtempBias = 443,
|
||||
EvRawImageNum = 444,
|
||||
EvPixelShiftMotion = 445,
|
||||
EvPixelShiftMotionCorrection = 446,
|
||||
EvPixelShiftStddevFactorGreen = 447,
|
||||
EvPixelShiftEperIso = 448,
|
||||
EvPixelShiftNreadIso = 449,
|
||||
EvPixelShiftPrnu = 450,
|
||||
EvPixelshiftShowMotion = 451,
|
||||
EvPixelshiftShowMotionMaskOnly = 452,
|
||||
EvPixelShiftAutomatic = 453,
|
||||
EvPixelShiftNonGreenHorizontal = 454,
|
||||
EvPixelShiftNonGreenVertical = 455,
|
||||
EvPixelShiftNonGreenCross = 456,
|
||||
EvPixelShiftStddevFactorRed = 457,
|
||||
EvPixelShiftStddevFactorBlue = 458,
|
||||
EvPixelShiftGreenAmaze = 459,
|
||||
EvPixelShiftNonGreenAmaze = 460,
|
||||
EvPixelShiftGreen = 461,
|
||||
EvPixelShiftRedBlueWeight = 462,
|
||||
EvPixelShiftBlur = 463,
|
||||
EvPixelShiftSigma = 464,
|
||||
EvPixelShiftSum = 465,
|
||||
EvPixelShiftExp0 = 466,
|
||||
EvPixelShiftHoleFill = 467,
|
||||
EvPixelShiftMedian = 468,
|
||||
EvPixelShiftMedian3 = 469,
|
||||
EvPixelShiftMotionMethod = 470,
|
||||
EvPixelShiftSmooth = 471,
|
||||
EvPixelShiftLmmse = 472,
|
||||
EvPixelShiftEqualBright = 473,
|
||||
NUMOFEVENTS
|
||||
|
||||
};
|
||||
|
@ -40,7 +40,7 @@ const int br = (int) options.rtSettings.bot_right;
|
||||
const int tl = (int) options.rtSettings.top_left;
|
||||
const int bl = (int) options.rtSettings.bot_left;
|
||||
|
||||
const char *RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::numMethods] = {"amaze", "igv", "lmmse", "eahd", "hphd", "vng4", "dcb", "ahd", "fast", "mono", "none" };
|
||||
const char *RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::numMethods] = {"amaze", "igv", "lmmse", "eahd", "hphd", "vng4", "dcb", "ahd", "fast", "mono", "none", "pixelshift" };
|
||||
const char *RAWParams::XTransSensor::methodstring[RAWParams::XTransSensor::numMethods] = {"3-pass (best)", "1-pass (medium)", "fast", "mono", "none" };
|
||||
|
||||
const char *RAWParams::ff_BlurTypestring[RAWParams::numFlatFileBlurTypes] = {/*"Parametric",*/ "Area Flatfield", "Vertical Flatfield", "Horizontal Flatfield", "V+H Flatfield"};
|
||||
@ -875,10 +875,41 @@ void CoarseTransformParams::setDefaults()
|
||||
hflip = false;
|
||||
vflip = false;
|
||||
}
|
||||
void RAWParams::BayerSensor::setPixelShiftDefaults()
|
||||
{
|
||||
pixelShiftMotion = 0;
|
||||
pixelShiftMotionCorrection = RAWParams::BayerSensor::Grid3x3New;
|
||||
pixelShiftMotionCorrectionMethod = RAWParams::BayerSensor::Automatic;
|
||||
pixelShiftStddevFactorGreen = 5.0;
|
||||
pixelShiftStddevFactorRed = 5.0;
|
||||
pixelShiftStddevFactorBlue = 5.0;
|
||||
pixelShiftEperIso = 0.0;
|
||||
pixelShiftNreadIso = 0.0;
|
||||
pixelShiftPrnu = 1.0;
|
||||
pixelShiftSigma = 1.0;
|
||||
pixelShiftSum = 3.0;
|
||||
pixelShiftRedBlueWeight = 0.7;
|
||||
pixelShiftAutomatic = true;
|
||||
pixelShiftNonGreenHorizontal = false;
|
||||
pixelShiftNonGreenVertical = false;
|
||||
pixelShiftHoleFill = true;
|
||||
pixelShiftMedian = false;
|
||||
pixelShiftMedian3 = false;
|
||||
pixelShiftGreen = true;
|
||||
pixelShiftBlur = true;
|
||||
pixelShiftSmoothFactor = 0.7;
|
||||
pixelShiftExp0 = false;
|
||||
pixelShiftLmmse = false;
|
||||
pixelShiftEqualBright = false;
|
||||
pixelShiftNonGreenCross = true;
|
||||
pixelShiftNonGreenCross2 = false;
|
||||
pixelShiftNonGreenAmaze = false;
|
||||
}
|
||||
|
||||
void RAWParams::setDefaults()
|
||||
{
|
||||
bayersensor.method = RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::amaze];
|
||||
bayersensor.imageNum = 0;
|
||||
bayersensor.ccSteps = 0;
|
||||
bayersensor.dcb_iterations = 2;
|
||||
bayersensor.dcb_enhance = true;
|
||||
@ -913,6 +944,10 @@ void RAWParams::setDefaults()
|
||||
hotPixelFilter = false;
|
||||
deadPixelFilter = false;
|
||||
hotdeadpix_thresh = 100;
|
||||
bayersensor.setPixelShiftDefaults();
|
||||
bayersensor.pixelshiftShowMotion = false;
|
||||
bayersensor.pixelshiftShowMotionMaskOnly = false;
|
||||
|
||||
}
|
||||
|
||||
void ColorManagementParams::setDefaults()
|
||||
@ -3320,6 +3355,10 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b
|
||||
keyFile.set_string ("RAW Bayer", "Method", raw.bayersensor.method );
|
||||
}
|
||||
|
||||
if (!pedited || pedited->raw.bayersensor.imageNum) {
|
||||
keyFile.set_integer ("RAW Bayer", "ImageNum", raw.bayersensor.imageNum + 1 );
|
||||
}
|
||||
|
||||
if (!pedited || pedited->raw.bayersensor.ccSteps) {
|
||||
keyFile.set_integer ("RAW Bayer", "CcSteps", raw.bayersensor.ccSteps);
|
||||
}
|
||||
@ -3364,7 +3403,121 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b
|
||||
keyFile.set_integer ("RAW Bayer", "LMMSEIterations", raw.bayersensor.lmmse_iterations );
|
||||
}
|
||||
|
||||
//if (!pedited || pedited->raw.bayersensor.allEnhance) keyFile.set_boolean ("RAW Bayer", "ALLEnhance", raw.bayersensor.all_enhance );
|
||||
if (!pedited || pedited->raw.bayersensor.pixelShiftMotion) {
|
||||
keyFile.set_integer ("RAW Bayer", "PixelShiftMotion", raw.bayersensor.pixelShiftMotion );
|
||||
}
|
||||
|
||||
if (!pedited || pedited->raw.bayersensor.pixelShiftMotionCorrection) {
|
||||
keyFile.set_integer ("RAW Bayer", "PixelShiftMotionCorrection", raw.bayersensor.pixelShiftMotionCorrection );
|
||||
}
|
||||
|
||||
if (!pedited || pedited->raw.bayersensor.pixelShiftMotionCorrectionMethod) {
|
||||
keyFile.set_integer ("RAW Bayer", "PixelShiftMotionCorrectionMethod", raw.bayersensor.pixelShiftMotionCorrectionMethod );
|
||||
}
|
||||
|
||||
if (!pedited || pedited->raw.bayersensor.pixelShiftStddevFactorGreen) {
|
||||
keyFile.set_double ("RAW Bayer", "pixelShiftStddevFactorGreen", raw.bayersensor.pixelShiftStddevFactorGreen );
|
||||
}
|
||||
|
||||
if (!pedited || pedited->raw.bayersensor.pixelShiftStddevFactorRed) {
|
||||
keyFile.set_double ("RAW Bayer", "pixelShiftStddevFactorRed", raw.bayersensor.pixelShiftStddevFactorRed );
|
||||
}
|
||||
|
||||
if (!pedited || pedited->raw.bayersensor.pixelShiftStddevFactorBlue) {
|
||||
keyFile.set_double ("RAW Bayer", "pixelShiftStddevFactorBlue", raw.bayersensor.pixelShiftStddevFactorBlue );
|
||||
}
|
||||
|
||||
if (!pedited || pedited->raw.bayersensor.pixelShiftEperIso) {
|
||||
keyFile.set_double ("RAW Bayer", "PixelShiftEperIso", raw.bayersensor.pixelShiftEperIso );
|
||||
}
|
||||
|
||||
if (!pedited || pedited->raw.bayersensor.pixelShiftNreadIso) {
|
||||
keyFile.set_double ("RAW Bayer", "PixelShiftNreadIso", raw.bayersensor.pixelShiftNreadIso );
|
||||
}
|
||||
|
||||
if (!pedited || pedited->raw.bayersensor.pixelShiftPrnu) {
|
||||
keyFile.set_double ("RAW Bayer", "PixelShiftPrnu", raw.bayersensor.pixelShiftPrnu );
|
||||
}
|
||||
|
||||
if (!pedited || pedited->raw.bayersensor.pixelShiftSigma) {
|
||||
keyFile.set_double ("RAW Bayer", "PixelShiftSigma", raw.bayersensor.pixelShiftSigma );
|
||||
}
|
||||
|
||||
if (!pedited || pedited->raw.bayersensor.pixelShiftSum) {
|
||||
keyFile.set_double ("RAW Bayer", "PixelShiftSum", raw.bayersensor.pixelShiftSum );
|
||||
}
|
||||
|
||||
if (!pedited || pedited->raw.bayersensor.pixelShiftRedBlueWeight) {
|
||||
keyFile.set_double ("RAW Bayer", "PixelShiftRedBlueWeight", raw.bayersensor.pixelShiftRedBlueWeight );
|
||||
}
|
||||
|
||||
if (!pedited || pedited->raw.bayersensor.pixelshiftShowMotion) {
|
||||
keyFile.set_boolean ("RAW Bayer", "PixelShiftShowMotion", raw.bayersensor.pixelshiftShowMotion );
|
||||
}
|
||||
|
||||
if (!pedited || pedited->raw.bayersensor.pixelshiftShowMotionMaskOnly) {
|
||||
keyFile.set_boolean ("RAW Bayer", "PixelShiftShowMotionMaskOnly", raw.bayersensor.pixelshiftShowMotionMaskOnly );
|
||||
}
|
||||
|
||||
if (!pedited || pedited->raw.bayersensor.pixelShiftAutomatic) {
|
||||
keyFile.set_boolean ("RAW Bayer", "pixelShiftAutomatic", raw.bayersensor.pixelShiftAutomatic );
|
||||
}
|
||||
|
||||
if (!pedited || pedited->raw.bayersensor.pixelShiftNonGreenHorizontal) {
|
||||
keyFile.set_boolean ("RAW Bayer", "pixelShiftNonGreenHorizontal", raw.bayersensor.pixelShiftNonGreenHorizontal );
|
||||
}
|
||||
|
||||
if (!pedited || pedited->raw.bayersensor.pixelShiftNonGreenVertical) {
|
||||
keyFile.set_boolean ("RAW Bayer", "pixelShiftNonGreenVertical", raw.bayersensor.pixelShiftNonGreenVertical );
|
||||
}
|
||||
|
||||
if (!pedited || pedited->raw.bayersensor.pixelShiftHoleFill) {
|
||||
keyFile.set_boolean ("RAW Bayer", "pixelShiftHoleFill", raw.bayersensor.pixelShiftHoleFill );
|
||||
}
|
||||
|
||||
if (!pedited || pedited->raw.bayersensor.pixelShiftMedian) {
|
||||
keyFile.set_boolean ("RAW Bayer", "pixelShiftMedian", raw.bayersensor.pixelShiftMedian );
|
||||
}
|
||||
|
||||
if (!pedited || pedited->raw.bayersensor.pixelShiftMedian3) {
|
||||
keyFile.set_boolean ("RAW Bayer", "pixelShiftMedian3", raw.bayersensor.pixelShiftMedian3 );
|
||||
}
|
||||
|
||||
if (!pedited || pedited->raw.bayersensor.pixelShiftGreen) {
|
||||
keyFile.set_boolean ("RAW Bayer", "pixelShiftGreen", raw.bayersensor.pixelShiftGreen );
|
||||
}
|
||||
|
||||
if (!pedited || pedited->raw.bayersensor.pixelShiftBlur) {
|
||||
keyFile.set_boolean ("RAW Bayer", "pixelShiftBlur", raw.bayersensor.pixelShiftBlur );
|
||||
}
|
||||
|
||||
if (!pedited || pedited->raw.bayersensor.pixelShiftSmooth) {
|
||||
keyFile.set_double ("RAW Bayer", "pixelShiftSmoothFactor", raw.bayersensor.pixelShiftSmoothFactor );
|
||||
}
|
||||
|
||||
if (!pedited || pedited->raw.bayersensor.pixelShiftExp0) {
|
||||
keyFile.set_boolean ("RAW Bayer", "pixelShiftExp0", raw.bayersensor.pixelShiftExp0 );
|
||||
}
|
||||
|
||||
if (!pedited || pedited->raw.bayersensor.pixelShiftLmmse) {
|
||||
keyFile.set_boolean ("RAW Bayer", "pixelShiftLmmse", raw.bayersensor.pixelShiftLmmse );
|
||||
}
|
||||
|
||||
if (!pedited || pedited->raw.bayersensor.pixelShiftEqualBright) {
|
||||
keyFile.set_boolean ("RAW Bayer", "pixelShiftEqualBright", raw.bayersensor.pixelShiftEqualBright );
|
||||
}
|
||||
|
||||
if (!pedited || pedited->raw.bayersensor.pixelShiftNonGreenCross) {
|
||||
keyFile.set_boolean ("RAW Bayer", "pixelShiftNonGreenCross", raw.bayersensor.pixelShiftNonGreenCross );
|
||||
}
|
||||
|
||||
if (!pedited || pedited->raw.bayersensor.pixelShiftNonGreenCross2) {
|
||||
keyFile.set_boolean ("RAW Bayer", "pixelShiftNonGreenCross2", raw.bayersensor.pixelShiftNonGreenCross2 );
|
||||
}
|
||||
|
||||
if (!pedited || pedited->raw.bayersensor.pixelShiftNonGreenAmaze) {
|
||||
keyFile.set_boolean ("RAW Bayer", "pixelShiftNonGreenAmaze", raw.bayersensor.pixelShiftNonGreenAmaze );
|
||||
}
|
||||
|
||||
if (!pedited || pedited->raw.xtranssensor.method) {
|
||||
keyFile.set_string ("RAW X-Trans", "Method", raw.xtranssensor.method );
|
||||
@ -7334,6 +7487,14 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited)
|
||||
}
|
||||
}
|
||||
|
||||
if (keyFile.has_key ("RAW Bayer", "ImageNum")) {
|
||||
raw.bayersensor.imageNum = keyFile.get_integer ("RAW Bayer", "ImageNum") - 1;
|
||||
|
||||
if (pedited) {
|
||||
pedited->raw.bayersensor.imageNum = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (keyFile.has_key ("RAW Bayer", "CcSteps")) {
|
||||
raw.bayersensor.ccSteps = keyFile.get_integer ("RAW Bayer", "CcSteps");
|
||||
|
||||
@ -7422,7 +7583,237 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited)
|
||||
}
|
||||
}
|
||||
|
||||
//if (keyFile.has_key ("RAW Bayer", "ALLEnhance")) { raw.bayersensor.all_enhance = keyFile.get_boolean("RAW Bayer", "ALLEnhance"); if (pedited) pedited->raw.bayersensor.allEnhance = true; }
|
||||
if (keyFile.has_key ("RAW Bayer", "PixelShiftMotion")) {
|
||||
raw.bayersensor.pixelShiftMotion = keyFile.get_integer("RAW Bayer", "PixelShiftMotion");
|
||||
|
||||
if (pedited) {
|
||||
pedited->raw.bayersensor.pixelShiftMotion = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (keyFile.has_key ("RAW Bayer", "PixelShiftMotionCorrection")) {
|
||||
raw.bayersensor.pixelShiftMotionCorrection = (RAWParams::BayerSensor::ePSMotionCorrection)keyFile.get_integer("RAW Bayer", "PixelShiftMotionCorrection");
|
||||
|
||||
if (pedited) {
|
||||
pedited->raw.bayersensor.pixelShiftMotionCorrection = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (keyFile.has_key ("RAW Bayer", "PixelShiftMotionCorrectionMethod")) {
|
||||
raw.bayersensor.pixelShiftMotionCorrectionMethod = (RAWParams::BayerSensor::ePSMotionCorrectionMethod)keyFile.get_integer("RAW Bayer", "PixelShiftMotionCorrectionMethod");
|
||||
|
||||
if (pedited) {
|
||||
pedited->raw.bayersensor.pixelShiftMotionCorrectionMethod = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (keyFile.has_key ("RAW Bayer", "pixelShiftStddevFactorGreen")) {
|
||||
raw.bayersensor.pixelShiftStddevFactorGreen = keyFile.get_double("RAW Bayer", "pixelShiftStddevFactorGreen");
|
||||
|
||||
if (pedited) {
|
||||
pedited->raw.bayersensor.pixelShiftStddevFactorGreen = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (keyFile.has_key ("RAW Bayer", "pixelShiftStddevFactorRed")) {
|
||||
raw.bayersensor.pixelShiftStddevFactorRed = keyFile.get_double("RAW Bayer", "pixelShiftStddevFactorRed");
|
||||
|
||||
if (pedited) {
|
||||
pedited->raw.bayersensor.pixelShiftStddevFactorRed = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (keyFile.has_key ("RAW Bayer", "pixelShiftStddevFactorBlue")) {
|
||||
raw.bayersensor.pixelShiftStddevFactorBlue = keyFile.get_double("RAW Bayer", "pixelShiftStddevFactorBlue");
|
||||
|
||||
if (pedited) {
|
||||
pedited->raw.bayersensor.pixelShiftStddevFactorBlue = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (keyFile.has_key ("RAW Bayer", "PixelShiftEperIso")) {
|
||||
raw.bayersensor.pixelShiftEperIso = keyFile.get_double("RAW Bayer", "PixelShiftEperIso");
|
||||
|
||||
if (pedited) {
|
||||
pedited->raw.bayersensor.pixelShiftEperIso = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (keyFile.has_key ("RAW Bayer", "PixelShiftNreadIso")) {
|
||||
raw.bayersensor.pixelShiftNreadIso = keyFile.get_double("RAW Bayer", "PixelShiftNreadIso");
|
||||
|
||||
if (pedited) {
|
||||
pedited->raw.bayersensor.pixelShiftNreadIso = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (keyFile.has_key ("RAW Bayer", "PixelShiftPrnu")) {
|
||||
raw.bayersensor.pixelShiftPrnu = keyFile.get_double("RAW Bayer", "PixelShiftPrnu");
|
||||
|
||||
if (pedited) {
|
||||
pedited->raw.bayersensor.pixelShiftPrnu = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (keyFile.has_key ("RAW Bayer", "PixelShiftSigma")) {
|
||||
raw.bayersensor.pixelShiftSigma = keyFile.get_double("RAW Bayer", "PixelShiftSigma");
|
||||
|
||||
if (pedited) {
|
||||
pedited->raw.bayersensor.pixelShiftSigma = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (keyFile.has_key ("RAW Bayer", "PixelShiftSum")) {
|
||||
raw.bayersensor.pixelShiftSum = keyFile.get_double("RAW Bayer", "PixelShiftSum");
|
||||
|
||||
if (pedited) {
|
||||
pedited->raw.bayersensor.pixelShiftSum = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (keyFile.has_key ("RAW Bayer", "PixelShiftRedBlueWeight")) {
|
||||
raw.bayersensor.pixelShiftRedBlueWeight = keyFile.get_double("RAW Bayer", "PixelShiftRedBlueWeight");
|
||||
|
||||
if (pedited) {
|
||||
pedited->raw.bayersensor.pixelShiftRedBlueWeight = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (keyFile.has_key ("RAW Bayer", "PixelShiftShowMotion")) {
|
||||
raw.bayersensor.pixelshiftShowMotion = keyFile.get_boolean("RAW Bayer", "PixelShiftShowMotion");
|
||||
|
||||
if (pedited) {
|
||||
pedited->raw.bayersensor.pixelshiftShowMotion = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (keyFile.has_key ("RAW Bayer", "PixelShiftShowMotionMaskOnly")) {
|
||||
raw.bayersensor.pixelshiftShowMotionMaskOnly = keyFile.get_boolean("RAW Bayer", "PixelShiftShowMotionMaskOnly");
|
||||
|
||||
if (pedited) {
|
||||
pedited->raw.bayersensor.pixelshiftShowMotionMaskOnly = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (keyFile.has_key ("RAW Bayer", "pixelShiftAutomatic")) {
|
||||
raw.bayersensor.pixelShiftAutomatic = keyFile.get_boolean("RAW Bayer", "pixelShiftAutomatic");
|
||||
|
||||
if (pedited) {
|
||||
pedited->raw.bayersensor.pixelShiftAutomatic = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (keyFile.has_key ("RAW Bayer", "pixelShiftNonGreenHorizontal")) {
|
||||
raw.bayersensor.pixelShiftNonGreenHorizontal = keyFile.get_boolean("RAW Bayer", "pixelShiftNonGreenHorizontal");
|
||||
|
||||
if (pedited) {
|
||||
pedited->raw.bayersensor.pixelShiftNonGreenHorizontal = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (keyFile.has_key ("RAW Bayer", "pixelShiftNonGreenVertical")) {
|
||||
raw.bayersensor.pixelShiftNonGreenVertical = keyFile.get_boolean("RAW Bayer", "pixelShiftNonGreenVertical");
|
||||
|
||||
if (pedited) {
|
||||
pedited->raw.bayersensor.pixelShiftNonGreenVertical = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (keyFile.has_key ("RAW Bayer", "pixelShiftHoleFill")) {
|
||||
raw.bayersensor.pixelShiftHoleFill = keyFile.get_boolean("RAW Bayer", "pixelShiftHoleFill");
|
||||
|
||||
if (pedited) {
|
||||
pedited->raw.bayersensor.pixelShiftHoleFill = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (keyFile.has_key ("RAW Bayer", "pixelShiftMedian")) {
|
||||
raw.bayersensor.pixelShiftMedian = keyFile.get_boolean("RAW Bayer", "pixelShiftMedian");
|
||||
|
||||
if (pedited) {
|
||||
pedited->raw.bayersensor.pixelShiftMedian = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (keyFile.has_key ("RAW Bayer", "pixelShiftMedian3")) {
|
||||
raw.bayersensor.pixelShiftMedian3 = keyFile.get_boolean("RAW Bayer", "pixelShiftMedian3");
|
||||
|
||||
if (pedited) {
|
||||
pedited->raw.bayersensor.pixelShiftMedian3 = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (keyFile.has_key ("RAW Bayer", "pixelShiftGreen")) {
|
||||
raw.bayersensor.pixelShiftGreen = keyFile.get_boolean("RAW Bayer", "pixelShiftGreen");
|
||||
|
||||
if (pedited) {
|
||||
pedited->raw.bayersensor.pixelShiftGreen = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (keyFile.has_key ("RAW Bayer", "pixelShiftBlur")) {
|
||||
raw.bayersensor.pixelShiftBlur = keyFile.get_boolean("RAW Bayer", "pixelShiftBlur");
|
||||
|
||||
if (pedited) {
|
||||
pedited->raw.bayersensor.pixelShiftBlur = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (keyFile.has_key ("RAW Bayer", "pixelShiftSmoothFactor")) {
|
||||
raw.bayersensor.pixelShiftSmoothFactor = keyFile.get_double("RAW Bayer", "pixelShiftSmoothFactor");
|
||||
|
||||
if (pedited) {
|
||||
pedited->raw.bayersensor.pixelShiftSmooth = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (keyFile.has_key ("RAW Bayer", "pixelShiftExp0")) {
|
||||
raw.bayersensor.pixelShiftExp0 = keyFile.get_boolean("RAW Bayer", "pixelShiftExp0");
|
||||
|
||||
if (pedited) {
|
||||
pedited->raw.bayersensor.pixelShiftExp0 = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (keyFile.has_key ("RAW Bayer", "pixelShiftLmmse")) {
|
||||
raw.bayersensor.pixelShiftLmmse = keyFile.get_boolean("RAW Bayer", "pixelShiftLmmse");
|
||||
|
||||
if (pedited) {
|
||||
pedited->raw.bayersensor.pixelShiftLmmse = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (keyFile.has_key ("RAW Bayer", "pixelShiftEqualBright")) {
|
||||
raw.bayersensor.pixelShiftEqualBright = keyFile.get_boolean("RAW Bayer", "pixelShiftEqualBright");
|
||||
|
||||
if (pedited) {
|
||||
pedited->raw.bayersensor.pixelShiftEqualBright = true;
|
||||
}
|
||||
}
|
||||
|
||||
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", "pixelShiftNonGreenCross2")) {
|
||||
raw.bayersensor.pixelShiftNonGreenCross2 = keyFile.get_boolean("RAW Bayer", "pixelShiftNonGreenCross2");
|
||||
|
||||
if (pedited) {
|
||||
pedited->raw.bayersensor.pixelShiftNonGreenCross2 = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (keyFile.has_key ("RAW Bayer", "pixelShiftNonGreenAmaze")) {
|
||||
raw.bayersensor.pixelShiftNonGreenAmaze = keyFile.get_boolean("RAW Bayer", "pixelShiftNonGreenAmaze");
|
||||
|
||||
if (pedited) {
|
||||
pedited->raw.bayersensor.pixelShiftNonGreenAmaze = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// load X-Trans sensors' raw settings
|
||||
@ -7850,6 +8241,7 @@ bool ProcParams::operator== (const ProcParams& other)
|
||||
&& resize.width == other.resize.width
|
||||
&& resize.height == other.resize.height
|
||||
&& raw.bayersensor.method == other.raw.bayersensor.method
|
||||
&& raw.bayersensor.imageNum == other.raw.bayersensor.imageNum
|
||||
&& raw.bayersensor.ccSteps == other.raw.bayersensor.ccSteps
|
||||
&& raw.bayersensor.black0 == other.raw.bayersensor.black0
|
||||
&& raw.bayersensor.black1 == other.raw.bayersensor.black1
|
||||
@ -7858,8 +8250,38 @@ bool ProcParams::operator== (const ProcParams& other)
|
||||
&& raw.bayersensor.twogreen == other.raw.bayersensor.twogreen
|
||||
&& raw.bayersensor.greenthresh == other.raw.bayersensor.greenthresh
|
||||
&& raw.bayersensor.linenoise == other.raw.bayersensor.linenoise
|
||||
&& raw.bayersensor.dcb_enhance == other.raw.bayersensor.dcb_enhance
|
||||
&& raw.bayersensor.dcb_iterations == other.raw.bayersensor.dcb_iterations
|
||||
&& raw.bayersensor.lmmse_iterations == other.raw.bayersensor.lmmse_iterations
|
||||
&& raw.bayersensor.pixelShiftMotion == other.raw.bayersensor.pixelShiftMotion
|
||||
&& raw.bayersensor.pixelShiftMotionCorrection == other.raw.bayersensor.pixelShiftMotionCorrection
|
||||
&& raw.bayersensor.pixelShiftMotionCorrectionMethod == other.raw.bayersensor.pixelShiftMotionCorrectionMethod
|
||||
&& raw.bayersensor.pixelShiftStddevFactorGreen == other.raw.bayersensor.pixelShiftStddevFactorGreen
|
||||
&& raw.bayersensor.pixelShiftStddevFactorRed == other.raw.bayersensor.pixelShiftStddevFactorRed
|
||||
&& raw.bayersensor.pixelShiftStddevFactorBlue == other.raw.bayersensor.pixelShiftStddevFactorBlue
|
||||
&& raw.bayersensor.pixelShiftEperIso == other.raw.bayersensor.pixelShiftEperIso
|
||||
&& raw.bayersensor.pixelShiftNreadIso == other.raw.bayersensor.pixelShiftNreadIso
|
||||
&& raw.bayersensor.pixelShiftPrnu == other.raw.bayersensor.pixelShiftPrnu
|
||||
&& raw.bayersensor.pixelShiftSigma == other.raw.bayersensor.pixelShiftSigma
|
||||
&& raw.bayersensor.pixelShiftSum == other.raw.bayersensor.pixelShiftSum
|
||||
&& raw.bayersensor.pixelShiftRedBlueWeight == other.raw.bayersensor.pixelShiftRedBlueWeight
|
||||
&& raw.bayersensor.pixelshiftShowMotion == other.raw.bayersensor.pixelshiftShowMotion
|
||||
&& raw.bayersensor.pixelshiftShowMotionMaskOnly == other.raw.bayersensor.pixelshiftShowMotionMaskOnly
|
||||
&& raw.bayersensor.pixelShiftAutomatic == other.raw.bayersensor.pixelShiftAutomatic
|
||||
&& raw.bayersensor.pixelShiftNonGreenHorizontal == other.raw.bayersensor.pixelShiftNonGreenHorizontal
|
||||
&& raw.bayersensor.pixelShiftNonGreenVertical == other.raw.bayersensor.pixelShiftNonGreenVertical
|
||||
&& raw.bayersensor.pixelShiftHoleFill == other.raw.bayersensor.pixelShiftHoleFill
|
||||
&& raw.bayersensor.pixelShiftMedian == other.raw.bayersensor.pixelShiftMedian
|
||||
&& raw.bayersensor.pixelShiftMedian3 == other.raw.bayersensor.pixelShiftMedian3
|
||||
&& raw.bayersensor.pixelShiftGreen == other.raw.bayersensor.pixelShiftGreen
|
||||
&& raw.bayersensor.pixelShiftBlur == other.raw.bayersensor.pixelShiftBlur
|
||||
&& raw.bayersensor.pixelShiftSmoothFactor == other.raw.bayersensor.pixelShiftSmoothFactor
|
||||
&& raw.bayersensor.pixelShiftExp0 == other.raw.bayersensor.pixelShiftExp0
|
||||
&& raw.bayersensor.pixelShiftLmmse == other.raw.bayersensor.pixelShiftLmmse
|
||||
&& raw.bayersensor.pixelShiftEqualBright == other.raw.bayersensor.pixelShiftEqualBright
|
||||
&& raw.bayersensor.pixelShiftNonGreenCross == other.raw.bayersensor.pixelShiftNonGreenCross
|
||||
&& raw.bayersensor.pixelShiftNonGreenCross2 == other.raw.bayersensor.pixelShiftNonGreenCross2
|
||||
&& raw.bayersensor.pixelShiftNonGreenAmaze == other.raw.bayersensor.pixelShiftNonGreenAmaze
|
||||
&& raw.bayersensor.dcb_enhance == other.raw.bayersensor.dcb_enhance
|
||||
&& raw.xtranssensor.method == other.raw.xtranssensor.method
|
||||
&& raw.xtranssensor.ccSteps == other.raw.xtranssensor.ccSteps
|
||||
&& raw.xtranssensor.blackred == other.raw.xtranssensor.blackred
|
||||
|
@ -1186,12 +1186,19 @@ public:
|
||||
public:
|
||||
//enum eMethod{ eahd,hphd,vng4,dcb,amaze,ahd,IGV_noise,fast,
|
||||
//numMethods }; // This MUST be the last enum
|
||||
enum eMethod { amaze, igv, lmmse, eahd, hphd, vng4, dcb, ahd, fast, mono, none,
|
||||
enum eMethod { amaze, igv, lmmse, eahd, hphd, vng4, dcb, ahd, fast, mono, none, pixelshift,
|
||||
numMethods
|
||||
}; // This MUST be the last enum
|
||||
enum ePSMotionCorrection {
|
||||
Grid1x1, Grid1x2, Grid3x3, Grid5x5, Grid7x7, Grid3x3New
|
||||
};
|
||||
enum ePSMotionCorrectionMethod {
|
||||
Off, Automatic, Custom
|
||||
};
|
||||
static const char *methodstring[numMethods];
|
||||
|
||||
Glib::ustring method;
|
||||
int imageNum;
|
||||
int ccSteps;
|
||||
double black0;
|
||||
double black1;
|
||||
@ -1202,8 +1209,40 @@ public:
|
||||
int greenthresh;
|
||||
int dcb_iterations;
|
||||
int lmmse_iterations;
|
||||
int pixelShiftMotion;
|
||||
ePSMotionCorrection pixelShiftMotionCorrection;
|
||||
ePSMotionCorrectionMethod pixelShiftMotionCorrectionMethod;
|
||||
double pixelShiftStddevFactorGreen;
|
||||
double pixelShiftStddevFactorRed;
|
||||
double pixelShiftStddevFactorBlue;
|
||||
double pixelShiftEperIso;
|
||||
double pixelShiftNreadIso;
|
||||
double pixelShiftPrnu;
|
||||
double pixelShiftSigma;
|
||||
double pixelShiftSum;
|
||||
double pixelShiftRedBlueWeight;
|
||||
bool pixelshiftShowMotion;
|
||||
bool pixelshiftShowMotionMaskOnly;
|
||||
bool pixelShiftAutomatic;
|
||||
bool pixelShiftNonGreenHorizontal;
|
||||
bool pixelShiftNonGreenVertical;
|
||||
bool pixelShiftHoleFill;
|
||||
bool pixelShiftMedian;
|
||||
bool pixelShiftMedian3;
|
||||
bool pixelShiftGreen;
|
||||
bool pixelShiftBlur;
|
||||
double pixelShiftSmoothFactor;
|
||||
bool pixelShiftExp0;
|
||||
bool pixelShiftLmmse;
|
||||
bool pixelShiftEqualBright;
|
||||
bool pixelShiftNonGreenCross;
|
||||
bool pixelShiftNonGreenCross2;
|
||||
bool pixelShiftNonGreenAmaze;
|
||||
bool dcb_enhance;
|
||||
//bool all_enhance;
|
||||
|
||||
void setPixelShiftDefaults();
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -400,7 +400,7 @@ skip_block:
|
||||
}
|
||||
}
|
||||
|
||||
int RawImage::loadRaw (bool loadData, bool closeFile, ProgressListener *plistener, double progressRange)
|
||||
int RawImage::loadRaw (bool loadData, unsigned int imageNum, bool closeFile, ProgressListener *plistener, double progressRange)
|
||||
{
|
||||
ifname = filename.c_str();
|
||||
image = nullptr;
|
||||
@ -424,7 +424,12 @@ int RawImage::loadRaw (bool loadData, bool closeFile, ProgressListener *plistene
|
||||
raw_image = nullptr;
|
||||
|
||||
//***************** Read ALL raw file info
|
||||
identify ();
|
||||
// set the number of the frame to extract. If the number is larger then number of existing frames - 1, dcraw will handle that correctly
|
||||
|
||||
shot_select = imageNum;
|
||||
identify();
|
||||
// in case dcraw didn't handle the above mentioned case...
|
||||
shot_select = std::min(shot_select, std::max(is_raw, 1u) - 1);
|
||||
|
||||
if (!is_raw) {
|
||||
fclose(ifp);
|
||||
@ -660,7 +665,7 @@ int RawImage::loadRaw (bool loadData, bool closeFile, ProgressListener *plistene
|
||||
return 0;
|
||||
}
|
||||
|
||||
float** RawImage::compress_image()
|
||||
float** RawImage::compress_image(int frameNum)
|
||||
{
|
||||
if( !image ) {
|
||||
return nullptr;
|
||||
@ -668,11 +673,12 @@ float** RawImage::compress_image()
|
||||
|
||||
if (isBayer() || isXtrans()) {
|
||||
if (!allocation) {
|
||||
allocation = new float[height * width];
|
||||
// shift the beginning of all frames but the first by 32 floats to avoid cache miss conflicts on CPUs which have <= 4-way associative L1-Cache
|
||||
allocation = new float[height * width + frameNum * 32];
|
||||
data = new float*[height];
|
||||
|
||||
for (int i = 0; i < height; i++) {
|
||||
data[i] = allocation + i * width;
|
||||
data[i] = allocation + i * width + frameNum * 32;
|
||||
}
|
||||
}
|
||||
} else if (colors == 1) {
|
||||
|
@ -106,7 +106,7 @@ public:
|
||||
explicit RawImage( const Glib::ustring &name );
|
||||
~RawImage();
|
||||
|
||||
int loadRaw (bool loadData = true, bool closeFile = true, ProgressListener *plistener = nullptr, double progressRange = 1.0);
|
||||
int loadRaw (bool loadData, unsigned int imageNum = 0, bool closeFile = true, ProgressListener *plistener = nullptr, double progressRange = 1.0);
|
||||
void get_colorsCoeff( float* pre_mul_, float* scale_mul_, float* cblack_, bool forceAutoWB );
|
||||
void set_prefilters()
|
||||
{
|
||||
@ -119,9 +119,10 @@ public:
|
||||
{
|
||||
return image;
|
||||
}
|
||||
float** compress_image(); // revert to compressed pixels format and release image data
|
||||
float** compress_image(int frameNum); // revert to compressed pixels format and release image data
|
||||
float** data; // holds pixel values, data[i][j] corresponds to the ith row and jth column
|
||||
unsigned prefilters; // original filters saved ( used for 4 color processing )
|
||||
unsigned int getFrameCount() const { return is_raw; }
|
||||
protected:
|
||||
Glib::ustring filename; // complete filename
|
||||
int rotate_deg; // 0,90,180,270 degree of rotation: info taken by dcraw from exif
|
||||
|
@ -37,7 +37,7 @@
|
||||
#include <omp.h>
|
||||
#endif
|
||||
#include "opthelper.h"
|
||||
//#define BENCHMARK
|
||||
#define BENCHMARK
|
||||
#include "StopWatch.h"
|
||||
#define clipretinex( val, minv, maxv ) (( val = (val < minv ? minv : val ) ) > maxv ? maxv : val )
|
||||
#undef CLIPD
|
||||
@ -475,8 +475,12 @@ RawImageSource::~RawImageSource ()
|
||||
|
||||
delete idata;
|
||||
|
||||
if (ri) {
|
||||
delete ri;
|
||||
for(size_t i = 0; i < numFrames; ++i) {
|
||||
delete riFrames[i];
|
||||
}
|
||||
|
||||
for(size_t i = 0; i < numFrames - 1; ++i) {
|
||||
delete rawDataBuffer[i];
|
||||
}
|
||||
|
||||
flushRGB();
|
||||
@ -913,7 +917,7 @@ void RawImageSource::convertColorSpace(Imagefloat* image, const ColorManagementP
|
||||
/* interpolateBadPixelsBayer: correct raw pixels looking at the bitmap
|
||||
* takes into consideration if there are multiple bad pixels in the neighbourhood
|
||||
*/
|
||||
int RawImageSource::interpolateBadPixelsBayer( PixelsMap &bitmapBads )
|
||||
int RawImageSource::interpolateBadPixelsBayer( PixelsMap &bitmapBads, array2D<float> &rawData )
|
||||
{
|
||||
static const float eps = 1.f;
|
||||
int counter = 0;
|
||||
@ -1494,7 +1498,7 @@ void RawImageSource::vflip (Imagefloat* image)
|
||||
|
||||
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
int RawImageSource::load (const Glib::ustring &fname, bool batch)
|
||||
int RawImageSource::load (const Glib::ustring &fname, int imageNum, bool batch)
|
||||
{
|
||||
|
||||
MyTime t1, t2;
|
||||
@ -1505,15 +1509,50 @@ int RawImageSource::load (const Glib::ustring &fname, bool batch)
|
||||
plistener->setProgressStr ("Decoding...");
|
||||
plistener->setProgress (0.0);
|
||||
}
|
||||
|
||||
ri = new RawImage(fname);
|
||||
int errCode = ri->loadRaw (true, true, plistener, 0.8);
|
||||
int errCode = ri->loadRaw (false, 0, false);
|
||||
|
||||
if (errCode) {
|
||||
return errCode;
|
||||
}
|
||||
numFrames = ri->getFrameCount();
|
||||
|
||||
ri->compress_image();
|
||||
errCode = 0;
|
||||
#ifdef _OPENMP
|
||||
#pragma omp parallel if(numFrames > 1)
|
||||
#endif
|
||||
{
|
||||
int errCodeThr = 0;
|
||||
#ifdef _OPENMP
|
||||
#pragma omp for nowait
|
||||
#endif
|
||||
for(unsigned int i = 0; i < numFrames; ++i) {
|
||||
if(i == 0) {
|
||||
riFrames[i] = ri;
|
||||
errCodeThr = riFrames[i]->loadRaw (true, i, true, plistener, 0.8);
|
||||
} else {
|
||||
riFrames[i] = new RawImage(fname);
|
||||
errCodeThr = riFrames[i]->loadRaw (true, i);
|
||||
}
|
||||
riFrames[i]->compress_image(i);
|
||||
}
|
||||
#ifdef _OPENMP
|
||||
#pragma omp critical
|
||||
#endif
|
||||
{
|
||||
errCode = errCodeThr ? errCodeThr : errCode;
|
||||
}
|
||||
|
||||
}
|
||||
if(errCode) {
|
||||
return errCode;
|
||||
}
|
||||
|
||||
if(numFrames > 1 ) { // this disables multi frame support for Fuji S5 until I found a solution to handle different dimensions
|
||||
if(riFrames[0]->get_width() != riFrames[1]->get_width() || riFrames[0]->get_height() != riFrames[1]->get_height()) {
|
||||
numFrames = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (plistener) {
|
||||
plistener->setProgress (0.9);
|
||||
@ -1626,8 +1665,10 @@ int RawImageSource::load (const Glib::ustring &fname, bool batch)
|
||||
initialGain = 1.0 / min(pre_mul[0], pre_mul[1], pre_mul[2]);
|
||||
}*/
|
||||
|
||||
for(unsigned int i = 0;i < numFrames; ++i) {
|
||||
riFrames[i]->set_prefilters();
|
||||
}
|
||||
|
||||
ri->set_prefilters();
|
||||
|
||||
//Load complete Exif informations
|
||||
RawMetaDataLocation rml;
|
||||
@ -1719,7 +1760,24 @@ void RawImageSource::preprocess (const RAWParams &raw, const LensProfParams &le
|
||||
printf( "Flat Field Correction:%s\n", rif->get_filename().c_str());
|
||||
}
|
||||
|
||||
copyOriginalPixels(raw, ri, rid, rif);
|
||||
if(numFrames == 4) {
|
||||
int bufferNumber = 0;
|
||||
for(int i=0; i<4; ++i) {
|
||||
if(i==currFrame) {
|
||||
copyOriginalPixels(raw, ri, rid, rif, rawData);
|
||||
rawDataFrames[i] = &rawData;
|
||||
} else {
|
||||
if(!rawDataBuffer[bufferNumber]) {
|
||||
rawDataBuffer[bufferNumber] = new array2D<float>;
|
||||
}
|
||||
rawDataFrames[i] = rawDataBuffer[bufferNumber];
|
||||
++bufferNumber;
|
||||
copyOriginalPixels(raw, riFrames[i], rid, rif, *rawDataFrames[i]);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
copyOriginalPixels(raw, ri, rid, rif, rawData);
|
||||
}
|
||||
//FLATFIELD end
|
||||
|
||||
|
||||
@ -1759,8 +1817,13 @@ void RawImageSource::preprocess (const RAWParams &raw, const LensProfParams &le
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
scaleColors( 0, 0, W, H, raw); //+ + raw parameters for black level(raw.blackxx)
|
||||
if(numFrames == 4) {
|
||||
for(int i=0; i<4; ++i) {
|
||||
scaleColors( 0, 0, W, H, raw, *rawDataFrames[i]);
|
||||
}
|
||||
} else {
|
||||
scaleColors( 0, 0, W, H, raw, rawData); //+ + raw parameters for black level(raw.blackxx)
|
||||
}
|
||||
|
||||
// Correct vignetting of lens profile
|
||||
if (!hasFlatField && lensProf.useVign) {
|
||||
@ -1770,13 +1833,25 @@ void RawImageSource::preprocess (const RAWParams &raw, const LensProfParams &le
|
||||
LCPMapper map(pLCPProf, max(idata->getFocalLen(), 1.0), idata->getFocalLen35mm(), idata->getFocusDist(), idata->getFNumber(), true, false, W, H, coarse, -1);
|
||||
|
||||
if (ri->getSensorType() == ST_BAYER || ri->getSensorType() == ST_FUJI_XTRANS || ri->get_colors() == 1) {
|
||||
|
||||
if(numFrames == 4) {
|
||||
for(int i = 0; i < 4; ++i) {
|
||||
#ifdef _OPENMP
|
||||
#pragma omp parallel for schedule(dynamic,16)
|
||||
#pragma omp parallel for schedule(dynamic,16)
|
||||
#endif
|
||||
|
||||
for (int y = 0; y < H; y++) {
|
||||
map.processVignetteLine(W, y, rawData[y]);
|
||||
for (int y = 0; y < H; y++) {
|
||||
map.processVignetteLine(W, y, (*rawDataFrames[i])[y]);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
#ifdef _OPENMP
|
||||
#pragma omp parallel for schedule(dynamic,16)
|
||||
#endif
|
||||
|
||||
for (int y = 0; y < H; y++) {
|
||||
map.processVignetteLine(W, y, rawData[y]);
|
||||
}
|
||||
}
|
||||
} else if(ri->get_colors() == 3) {
|
||||
#ifdef _OPENMP
|
||||
@ -1854,13 +1929,25 @@ void RawImageSource::preprocess (const RAWParams &raw, const LensProfParams &le
|
||||
plistener->setProgress (0.0);
|
||||
}
|
||||
|
||||
green_equilibrate(0.01 * (raw.bayersensor.greenthresh));
|
||||
if(numFrames == 4) {
|
||||
for(int i = 0; i < 4; ++i) {
|
||||
green_equilibrate(0.01 * (raw.bayersensor.greenthresh), *rawDataFrames[i]);
|
||||
}
|
||||
} else {
|
||||
green_equilibrate(0.01 * (raw.bayersensor.greenthresh), rawData);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if( totBP ) {
|
||||
if ( ri->getSensorType() == ST_BAYER ) {
|
||||
interpolateBadPixelsBayer( *bitmapBads );
|
||||
if(numFrames == 4) {
|
||||
for(int i = 0; i < 4; ++i) {
|
||||
interpolateBadPixelsBayer( *bitmapBads, *rawDataFrames[i] );
|
||||
}
|
||||
} else {
|
||||
interpolateBadPixelsBayer( *bitmapBads, rawData );
|
||||
}
|
||||
} else if ( ri->getSensorType() == ST_FUJI_XTRANS ) {
|
||||
interpolateBadPixelsXtrans( *bitmapBads );
|
||||
} else {
|
||||
@ -1882,12 +1969,23 @@ void RawImageSource::preprocess (const RAWParams &raw, const LensProfParams &le
|
||||
plistener->setProgressStr ("CA Auto Correction...");
|
||||
plistener->setProgress (0.0);
|
||||
}
|
||||
|
||||
CA_correct_RT(raw.cared, raw.cablue, 10.0 - raw.caautostrength);
|
||||
if(numFrames == 4 && raw.bayersensor.method == RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::pixelshift]) {
|
||||
for(int i=0; i<4; ++i) {
|
||||
CA_correct_RT(raw.cared, raw.cablue, 10.0 - raw.caautostrength, *rawDataFrames[i]);
|
||||
}
|
||||
} else {
|
||||
CA_correct_RT(raw.cared, raw.cablue, 10.0 - raw.caautostrength, rawData);
|
||||
}
|
||||
}
|
||||
|
||||
if ( raw.expos != 1 ) {
|
||||
processRawWhitepoint(raw.expos, raw.preser);
|
||||
if(numFrames == 4) {
|
||||
for(int i = 0; i < 4; ++i) {
|
||||
processRawWhitepoint(raw.expos, raw.preser, *rawDataFrames[i]);
|
||||
}
|
||||
} else {
|
||||
processRawWhitepoint(raw.expos, raw.preser, rawData);
|
||||
}
|
||||
}
|
||||
|
||||
if(prepareDenoise && dirpyrdenoiseExpComp == INFINITY) {
|
||||
@ -1926,7 +2024,142 @@ void RawImageSource::demosaic(const RAWParams &raw)
|
||||
} else if (raw.bayersensor.method == RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::ahd] ) {
|
||||
ahd_demosaic (0, 0, W, H);
|
||||
} else if (raw.bayersensor.method == RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::amaze] ) {
|
||||
amaze_demosaic_RT (0, 0, W, H);
|
||||
amaze_demosaic_RT (0, 0, W, H, rawData, red, green, blue);
|
||||
} else if (raw.bayersensor.method == RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::pixelshift] ) {
|
||||
if(numFrames != 4) { // fallback for non pixelshift files
|
||||
amaze_demosaic_RT (0, 0, W, H, rawData, red, green, blue);
|
||||
} else {
|
||||
RAWParams::BayerSensor bayerParams = raw.bayersensor;
|
||||
if(bayerParams.pixelShiftMotionCorrectionMethod == RAWParams::BayerSensor::Automatic) {
|
||||
bool pixelShiftEqualBright = bayerParams.pixelShiftEqualBright;
|
||||
bayerParams.setPixelShiftDefaults();
|
||||
bayerParams.pixelShiftEqualBright = pixelShiftEqualBright;
|
||||
} else if(bayerParams.pixelShiftMotionCorrectionMethod == RAWParams::BayerSensor::Off) {
|
||||
bayerParams.pixelShiftMotion = 0;
|
||||
bayerParams.pixelShiftAutomatic = false;
|
||||
bayerParams.pixelshiftShowMotion = false;
|
||||
}
|
||||
if(!bayerParams.pixelshiftShowMotion || bayerParams.pixelShiftNonGreenAmaze || bayerParams.pixelShiftNonGreenCross2 || (bayerParams.pixelShiftBlur && bayerParams.pixelShiftSmoothFactor > 0.0)) {
|
||||
if((bayerParams.pixelShiftMotion > 0 || bayerParams.pixelShiftAutomatic) && numFrames == 4) {
|
||||
if(bayerParams.pixelShiftMedian) { // We need the amaze demosaiced frames for motion correction
|
||||
#ifdef PIXELSHIFTDEV
|
||||
if(!bayerParams.pixelShiftMedian3) {
|
||||
#endif
|
||||
if(bayerParams.pixelShiftLmmse) {
|
||||
lmmse_interpolate_omp(W, H, *(rawDataFrames[0]), red, green, blue, raw.bayersensor.lmmse_iterations);
|
||||
} else {
|
||||
amaze_demosaic_RT (0, 0, W, H, *(rawDataFrames[0]), red, green, blue);
|
||||
}
|
||||
multi_array2D<float,3> redTmp(W,H);
|
||||
multi_array2D<float,3> greenTmp(W,H);
|
||||
multi_array2D<float,3> blueTmp(W,H);
|
||||
for(int i=0;i<3;i++) {
|
||||
if(bayerParams.pixelShiftLmmse) {
|
||||
lmmse_interpolate_omp(W, H, *(rawDataFrames[i+1]), redTmp[i], greenTmp[i], blueTmp[i], raw.bayersensor.lmmse_iterations);
|
||||
} else {
|
||||
amaze_demosaic_RT (0, 0, W, H, *(rawDataFrames[i+1]), redTmp[i], greenTmp[i], blueTmp[i]);
|
||||
}
|
||||
}
|
||||
#pragma omp parallel for schedule(dynamic,16)
|
||||
for(int i=border;i<H-border;i++) {
|
||||
for(int j=border;j<W-border;j++) {
|
||||
red[i][j] = median(red[i][j],redTmp[0][i+1][j],redTmp[1][i+1][j+1],redTmp[2][i][j+1]);
|
||||
}
|
||||
for(int j=border;j<W-border;j++) {
|
||||
green[i][j] = median(green[i][j],greenTmp[0][i+1][j],greenTmp[1][i+1][j+1],greenTmp[2][i][j+1]);
|
||||
}
|
||||
for(int j=border;j<W-border;j++) {
|
||||
blue[i][j] = median(blue[i][j],blueTmp[0][i+1][j],blueTmp[1][i+1][j+1],blueTmp[2][i][j+1]);
|
||||
}
|
||||
}
|
||||
#ifdef PIXELSHIFTDEV
|
||||
} else {
|
||||
multi_array2D<float,3> redTmp(W,H);
|
||||
multi_array2D<float,3> greenTmp(W,H);
|
||||
multi_array2D<float,3> blueTmp(W,H);
|
||||
for(int i=0, frameIndex = 0;i<4;++i) {
|
||||
if(i != currFrame) {
|
||||
if(bayerParams.pixelShiftLmmse) {
|
||||
lmmse_interpolate_omp(W, H, *(rawDataFrames[i]), redTmp[frameIndex], greenTmp[frameIndex], blueTmp[frameIndex], raw.bayersensor.lmmse_iterations);
|
||||
} else {
|
||||
amaze_demosaic_RT (0, 0, W, H, *(rawDataFrames[i]), redTmp[frameIndex], greenTmp[frameIndex], blueTmp[frameIndex]);
|
||||
}
|
||||
++frameIndex;
|
||||
}
|
||||
}
|
||||
unsigned int offsX0 = 0, offsY0 = 0;
|
||||
unsigned int offsX1 = 0, offsY1 = 0;
|
||||
unsigned int offsX2 = 0, offsY2 = 0;
|
||||
|
||||
// We have to adjust the offsets for the selected subframe we exclude from median
|
||||
switch (currFrame) {
|
||||
case 0:
|
||||
offsY0 = 1;
|
||||
offsX0 = 0;
|
||||
offsY1 = 1;
|
||||
offsX1 = 1;
|
||||
offsY2 = 0;
|
||||
offsX2 = 1;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
offsY0 = 0;
|
||||
offsX0 = 0;
|
||||
offsY1 = 1;
|
||||
offsX1 = 1;
|
||||
offsY2 = 0;
|
||||
offsX2 = 1;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
offsY0 = 0;
|
||||
offsX0 = 0;
|
||||
offsY1 = 1;
|
||||
offsX1 = 0;
|
||||
offsY2 = 0;
|
||||
offsX2 = 1;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
offsY0 = 0;
|
||||
offsX0 = 0;
|
||||
offsY1 = 1;
|
||||
offsX1 = 0;
|
||||
offsY2 = 1;
|
||||
offsX2 = 1;
|
||||
}
|
||||
|
||||
#pragma omp parallel for schedule(dynamic,16)
|
||||
for(int i=border;i<H-border;i++) {
|
||||
for(int j=border;j<W-border;j++) {
|
||||
red[i][j] = median(redTmp[0][i+offsY0][j+offsX0],redTmp[1][i+offsY1][j+offsX1],redTmp[2][i+offsY2][j+offsX2]);
|
||||
}
|
||||
for(int j=border;j<W-border;j++) {
|
||||
green[i][j] = median(greenTmp[0][i+offsY0][j+offsX0],greenTmp[1][i+offsY1][j+offsX1],greenTmp[2][i+offsY2][j+offsX2]);
|
||||
}
|
||||
for(int j=border;j<W-border;j++) {
|
||||
blue[i][j] = median(blueTmp[0][i+offsY0][j+offsX0],blueTmp[1][i+offsY1][j+offsX1],blueTmp[2][i+offsY2][j+offsX2]);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
if(bayerParams.pixelShiftLmmse) {
|
||||
lmmse_interpolate_omp(W, H, rawData, red, green, blue, raw.bayersensor.lmmse_iterations);
|
||||
} else {
|
||||
amaze_demosaic_RT (0, 0, W, H, rawData, red, green, blue); // for non pixelshift files use amaze if pixelshift is selected. We need it also for motion correction
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if(bayerParams.pixelShiftLmmse) {
|
||||
lmmse_interpolate_omp(W, H, rawData, red, green, blue, raw.bayersensor.lmmse_iterations);
|
||||
} else {
|
||||
amaze_demosaic_RT (0, 0, W, H, rawData, red, green, blue); // for non pixelshift files use amaze if pixelshift is selected. We need it also for motion correction
|
||||
}
|
||||
}
|
||||
}
|
||||
pixelshift(0, 0, W, H, bayerParams, currFrame, ri->get_model(), raw.expos);
|
||||
}
|
||||
} else if (raw.bayersensor.method == RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::dcb] ) {
|
||||
dcb_demosaic(raw.bayersensor.dcb_iterations, raw.bayersensor.dcb_enhance);
|
||||
} else if (raw.bayersensor.method == RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::eahd]) {
|
||||
@ -1934,7 +2167,7 @@ void RawImageSource::demosaic(const RAWParams &raw)
|
||||
} else if (raw.bayersensor.method == RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::igv]) {
|
||||
igv_interpolate(W, H);
|
||||
} else if (raw.bayersensor.method == RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::lmmse]) {
|
||||
lmmse_interpolate_omp(W, H, raw.bayersensor.lmmse_iterations);
|
||||
lmmse_interpolate_omp(W, H, rawData, red, green, blue, raw.bayersensor.lmmse_iterations);
|
||||
} else if (raw.bayersensor.method == RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::fast] ) {
|
||||
fast_demosaic (0, 0, W, H);
|
||||
} else if (raw.bayersensor.method == RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::mono] ) {
|
||||
@ -2973,7 +3206,7 @@ void RawImageSource::processFlatField(const RAWParams &raw, RawImage *riFlatFile
|
||||
/* Copy original pixel data and
|
||||
* subtract dark frame (if present) from current image and apply flat field correction (if present)
|
||||
*/
|
||||
void RawImageSource::copyOriginalPixels(const RAWParams &raw, RawImage *src, RawImage *riDark, RawImage *riFlatFile )
|
||||
void RawImageSource::copyOriginalPixels(const RAWParams &raw, RawImage *src, RawImage *riDark, RawImage *riFlatFile, array2D<float> &rawData )
|
||||
{
|
||||
// TODO: Change type of black[] to float to avoid conversions
|
||||
unsigned short black[4] = {
|
||||
@ -3304,7 +3537,7 @@ SSEFUNCTION void RawImageSource::cfaboxblur(RawImage *riFlatFile, float* cfablur
|
||||
|
||||
|
||||
// Scale original pixels into the range 0 65535 using black offsets and multipliers
|
||||
void RawImageSource::scaleColors(int winx, int winy, int winw, int winh, const RAWParams &raw)
|
||||
void RawImageSource::scaleColors(int winx, int winy, int winw, int winh, const RAWParams &raw, array2D<float> &rawData)
|
||||
{
|
||||
chmax[0] = chmax[1] = chmax[2] = chmax[3] = 0; //channel maxima
|
||||
float black_lev[4] = {0.f};//black level
|
||||
@ -5235,6 +5468,36 @@ void RawImageSource::init ()
|
||||
}
|
||||
}
|
||||
|
||||
void RawImageSource::getRawValues(int x, int y, int rotate, int &R, int &G, int &B)
|
||||
{
|
||||
int xnew = x + border;
|
||||
int ynew = y + border;
|
||||
rotate += ri->get_rotateDegree();
|
||||
rotate %= 360;
|
||||
if (rotate == 90) {
|
||||
std::swap(xnew,ynew);
|
||||
ynew = H - 1 - ynew;
|
||||
} else if (rotate == 180) {
|
||||
xnew = W - 1 - xnew;
|
||||
ynew = H - 1 - ynew;
|
||||
} else if (rotate == 270) {
|
||||
std::swap(xnew,ynew);
|
||||
ynew = H - 1 - ynew;
|
||||
xnew = W - 1 - xnew;
|
||||
ynew = H - 1 - ynew;
|
||||
}
|
||||
|
||||
int c = ri->getSensorType() == ST_FUJI_XTRANS ? ri->XTRANSFC(ynew,xnew) : ri->FC(ynew,xnew);
|
||||
int val = round(rawData[ynew][xnew] / scale_mul[c]);
|
||||
if(c == 0) {
|
||||
R = val; G = 0; B = 0;
|
||||
} else if(c == 2) {
|
||||
R = 0; G = 0; B = val;
|
||||
} else {
|
||||
R = 0; G = val; B = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void RawImageSource::cleanup ()
|
||||
{
|
||||
delete phaseOneIccCurve;
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include "curves.h"
|
||||
#include "color.h"
|
||||
#include "iimage.h"
|
||||
|
||||
#include <iostream>
|
||||
#define HR_SCALE 2
|
||||
|
||||
namespace rtengine
|
||||
@ -71,6 +71,9 @@ protected:
|
||||
bool rgbSourceModified;
|
||||
|
||||
RawImage* ri; // Copy of raw pixels, NOT corrected for initial gain, blackpoint etc.
|
||||
RawImage* riFrames[4] = {nullptr};
|
||||
unsigned int currFrame = 0;
|
||||
unsigned int numFrames = 0;
|
||||
|
||||
// to accelerate CIELAB conversion:
|
||||
double lc00, lc01, lc02, lc10, lc11, lc12, lc20, lc21, lc22;
|
||||
@ -78,6 +81,8 @@ protected:
|
||||
int threshold;
|
||||
|
||||
array2D<float> rawData; // holds preprocessed pixel values, rowData[i][j] corresponds to the ith row and jth column
|
||||
array2D<float> *rawDataFrames[4] = {nullptr};
|
||||
array2D<float> *rawDataBuffer[3] = {nullptr};
|
||||
|
||||
// the interpolated green plane:
|
||||
array2D<float> green;
|
||||
@ -107,7 +112,7 @@ public:
|
||||
RawImageSource ();
|
||||
~RawImageSource ();
|
||||
|
||||
int load (const Glib::ustring &fname, bool batch = false);
|
||||
int load (const Glib::ustring &fname, int imageNum = 0, bool batch = false);
|
||||
void preprocess (const RAWParams &raw, const LensProfParams &lensProf, const CoarseTransformParams& coarse, bool prepareDenoise = true);
|
||||
void demosaic (const RAWParams &raw);
|
||||
void retinex (ColorManagementParams cmp, RetinexParams deh, ToneCurveParams Tc, LUTf & cdcurve, LUTf & mapcurve, const RetinextransmissionCurve & dehatransmissionCurve, const RetinexgaintransmissionCurve & dehagaintransmissionCurve, multi_array2D<float, 4> &conversionBuffer, bool dehacontlutili, bool mapcontlutili, bool useHsl, float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax, LUTu &histLRETI);
|
||||
@ -125,9 +130,9 @@ public:
|
||||
}
|
||||
|
||||
void processFlatField(const RAWParams &raw, RawImage *riFlatFile, unsigned short black[4]);
|
||||
void copyOriginalPixels(const RAWParams &raw, RawImage *ri, RawImage *riDark, RawImage *riFlatFile );
|
||||
void copyOriginalPixels(const RAWParams &raw, RawImage *ri, RawImage *riDark, RawImage *riFlatFile, array2D<float> &rawData );
|
||||
void cfaboxblur (RawImage *riFlatFile, float* cfablur, int boxH, int boxW);
|
||||
void scaleColors (int winx, int winy, int winw, int winh, const RAWParams &raw); // raw for cblack
|
||||
void scaleColors (int winx, int winy, int winw, int winh, const RAWParams &raw, array2D<float> &rawData); // raw for cblack
|
||||
|
||||
void getImage (const ColorTemp &ctemp, int tran, Imagefloat* image, const PreviewProps &pp, const ToneCurveParams &hrp, const ColorManagementParams &cmp, const RAWParams &raw);
|
||||
eSensorType getSensorType () const
|
||||
@ -195,7 +200,10 @@ public:
|
||||
static void HLRecovery_blend (float* rin, float* gin, float* bin, int width, float maxval, float* hlmax);
|
||||
static void init ();
|
||||
static void cleanup ();
|
||||
|
||||
void setCurrentFrame(unsigned int frameNum) {
|
||||
currFrame = std::min(numFrames - 1, frameNum);
|
||||
ri = riFrames[currFrame];
|
||||
}
|
||||
protected:
|
||||
typedef unsigned short ushort;
|
||||
void processFalseColorCorrection (Imagefloat* i, const int steps);
|
||||
@ -208,18 +216,18 @@ protected:
|
||||
inline void interpolate_row_rb (float* ar, float* ab, float* pg, float* cg, float* ng, int i);
|
||||
inline void interpolate_row_rb_mul_pp (float* ar, float* ab, float* pg, float* cg, float* ng, int i, float r_mul, float g_mul, float b_mul, int x1, int width, int skip);
|
||||
|
||||
void CA_correct_RT (const double cared, const double cablue, const double caautostrength);
|
||||
void CA_correct_RT (const double cared, const double cablue, const double caautostrength, array2D<float> &rawData);
|
||||
void ddct8x8s(int isgn, float a[8][8]);
|
||||
void processRawWhitepoint (float expos, float preser); // exposure before interpolation
|
||||
void processRawWhitepoint (float expos, float preser, array2D<float> &rawData); // exposure before interpolation
|
||||
|
||||
int interpolateBadPixelsBayer( PixelsMap &bitmapBads );
|
||||
int interpolateBadPixelsBayer( PixelsMap &bitmapBads, array2D<float> &rawData );
|
||||
int interpolateBadPixelsNColours( PixelsMap &bitmapBads, const int colours );
|
||||
int interpolateBadPixelsXtrans( PixelsMap &bitmapBads );
|
||||
int findHotDeadPixels( PixelsMap &bpMap, float thresh, bool findHotPixels, bool findDeadPixels );
|
||||
|
||||
void cfa_linedn (float linenoiselevel);//Emil's line denoise
|
||||
|
||||
void green_equilibrate (float greenthresh);//Emil's green equilibration
|
||||
void green_equilibrate (float greenthresh, array2D<float> &rawData);//Emil's green equilibration
|
||||
|
||||
void nodemosaic(bool bw);
|
||||
void eahd_demosaic();
|
||||
@ -228,8 +236,8 @@ protected:
|
||||
void ppg_demosaic();
|
||||
void jdl_interpolate_omp();
|
||||
void igv_interpolate(int winw, int winh);
|
||||
void lmmse_interpolate_omp(int winw, int winh, int iterations);
|
||||
void amaze_demosaic_RT(int winx, int winy, int winw, int winh);//Emil's code for AMaZE
|
||||
void lmmse_interpolate_omp(int winw, int winh, array2D<float> &rawData, array2D<float> &red, array2D<float> &green, array2D<float> &blue, int iterations);
|
||||
void amaze_demosaic_RT(int winx, int winy, int winw, int winh, array2D<float> &rawData, array2D<float> &red, array2D<float> &green, array2D<float> &blue);//Emil's code for AMaZE
|
||||
void fast_demosaic(int winx, int winy, int winw, int winh );//Emil's code for fast demosaicing
|
||||
void dcb_demosaic(int iterations, bool dcb_enhance);
|
||||
void ahd_demosaic(int winx, int winy, int winw, int winh);
|
||||
@ -253,8 +261,10 @@ 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, const RAWParams::BayerSensor &bayerParams, unsigned int frame, const std::string &model, float rawWpCorrection);
|
||||
void hflip (Imagefloat* im);
|
||||
void vflip (Imagefloat* im);
|
||||
void getRawValues(int x, int y, int rotate, int &R, int &G, int &B);
|
||||
|
||||
};
|
||||
}
|
||||
|
@ -470,7 +470,37 @@ int refreshmap[rtengine::NUMOFEVENTS] = {
|
||||
RETINEX, // EvRetinexgaintransmission
|
||||
RETINEX, // EvLskal
|
||||
OUTPUTPROFILE, // EvOBPCompens
|
||||
ALLNORAW // EvWBtempBias
|
||||
ALLNORAW, // EvWBtempBias
|
||||
DARKFRAME, // EvRawImageNum
|
||||
DEMOSAIC, // EvPixelShiftMotion
|
||||
DEMOSAIC, // EvPixelShiftMotionCorrection
|
||||
DEMOSAIC, // EvPixelShiftStddevFactorGreen
|
||||
DEMOSAIC, // EvPixelShiftEperIso
|
||||
DEMOSAIC, // EvPixelShiftNreadIso
|
||||
DEMOSAIC, // EvPixelShiftPrnu
|
||||
DEMOSAIC, // EvPixelshiftShowMotion
|
||||
DEMOSAIC, // EvPixelshiftShowMotionMaskOnly
|
||||
DEMOSAIC, // EvPixelShiftAutomatic
|
||||
DEMOSAIC, // EvPixelShiftNonGreenHorizontal
|
||||
DEMOSAIC, // EvPixelShiftNonGreenVertical
|
||||
DEMOSAIC, // EvPixelShiftNonGreenCross
|
||||
DEMOSAIC, // EvPixelShiftStddevFactorRed
|
||||
DEMOSAIC, // EvPixelShiftStddevFactorBlue
|
||||
DEMOSAIC, // EvPixelShiftNonGreenCross2
|
||||
DEMOSAIC, // EvPixelShiftNonGreenAmaze
|
||||
DEMOSAIC, // EvPixelShiftGreen
|
||||
DEMOSAIC, // EvPixelShiftRedBlueWeight
|
||||
DEMOSAIC, // EvPixelShiftBlur
|
||||
DEMOSAIC, // EvPixelShiftSigma
|
||||
DEMOSAIC, // EvPixelShiftSum
|
||||
DEMOSAIC, // EvPixelShiftExp0
|
||||
DEMOSAIC, // EvPixelShiftHoleFill
|
||||
DEMOSAIC, // EvPixelShiftMedian
|
||||
DEMOSAIC, // EvPixelShiftMedian3
|
||||
DEMOSAIC, // EvPixelShiftMotionMethod
|
||||
DEMOSAIC, // EvPixelShiftSmooth
|
||||
DEMOSAIC, // EvPixelShiftLmmse
|
||||
DEMOSAIC // EvPixelShiftEqualBright
|
||||
|
||||
};
|
||||
|
||||
|
@ -176,7 +176,8 @@ Thumbnail* Thumbnail::loadFromImage (const Glib::ustring& fname, int &w, int &h,
|
||||
Thumbnail* Thumbnail::loadQuickFromRaw (const Glib::ustring& fname, RawMetaDataLocation& rml, int &w, int &h, int fixwh, bool rotate, bool inspectorMode)
|
||||
{
|
||||
RawImage *ri = new RawImage(fname);
|
||||
int r = ri->loadRaw(false, false);
|
||||
unsigned int imageNum = 0;
|
||||
int r = ri->loadRaw(false, imageNum, false);
|
||||
|
||||
if( r ) {
|
||||
delete ri;
|
||||
@ -290,7 +291,9 @@ RawMetaDataLocation Thumbnail::loadMetaDataFromRaw (const Glib::ustring& fname)
|
||||
rml.ciffLength = -1;
|
||||
|
||||
RawImage ri(fname);
|
||||
int r = ri.loadRaw(false);
|
||||
unsigned int imageNum = 0;
|
||||
|
||||
int r = ri.loadRaw(false, imageNum);
|
||||
|
||||
if( !r ) {
|
||||
rml.exifBase = ri.get_exifBase();
|
||||
@ -301,10 +304,12 @@ RawMetaDataLocation Thumbnail::loadMetaDataFromRaw (const Glib::ustring& fname)
|
||||
return rml;
|
||||
}
|
||||
|
||||
Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocation& rml, int &w, int &h, int fixwh, double wbEq, bool rotate)
|
||||
Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocation& rml, int &w, int &h, int fixwh, double wbEq, bool rotate, int imageNum)
|
||||
{
|
||||
RawImage *ri = new RawImage (fname);
|
||||
int r = ri->loadRaw(1, 0);
|
||||
unsigned int tempImageNum = 0;
|
||||
|
||||
int r = ri->loadRaw(1, tempImageNum, 0);
|
||||
|
||||
if( r ) {
|
||||
delete ri;
|
||||
|
@ -78,7 +78,7 @@ public:
|
||||
void getDimensions (int& w, int& h, double& scaleFac);
|
||||
|
||||
static Thumbnail* loadQuickFromRaw (const Glib::ustring& fname, rtengine::RawMetaDataLocation& rml, int &w, int &h, int fixwh, bool rotate, bool inspectorMode = false);
|
||||
static Thumbnail* loadFromRaw (const Glib::ustring& fname, RawMetaDataLocation& rml, int &w, int &h, int fixwh, double wbEq, bool rotate);
|
||||
static Thumbnail* loadFromRaw (const Glib::ustring& fname, RawMetaDataLocation& rml, int &w, int &h, int fixwh, double wbEq, bool rotate, int imageNum);
|
||||
static Thumbnail* loadFromImage (const Glib::ustring& fname, int &w, int &h, int fixwh, double wbEq, bool inspectorMode = false);
|
||||
static RawMetaDataLocation loadMetaDataFromRaw (const Glib::ustring& fname);
|
||||
|
||||
|
@ -102,6 +102,7 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p
|
||||
ImProcFunctions ipf (¶ms, true);
|
||||
|
||||
PreviewProps pp (0, 0, fw, fh, 1);
|
||||
imgsrc->setCurrentFrame(params.raw.bayersensor.imageNum);
|
||||
imgsrc->preprocess( params.raw, params.lensProf, params.coarse, params.dirpyrDenoise.enabled);
|
||||
|
||||
if (params.toneCurve.autoexp) {// this enabled HLRecovery
|
||||
|
@ -102,7 +102,7 @@ void StdImageSource::getSampleFormat (const Glib::ustring &fname, IIOSampleForma
|
||||
* and RT's image data type (Image8, Image16 and Imagefloat), then it will
|
||||
* load the image into it
|
||||
*/
|
||||
int StdImageSource::load (const Glib::ustring &fname, bool batch)
|
||||
int StdImageSource::load (const Glib::ustring &fname, int imageNum, bool batch)
|
||||
{
|
||||
|
||||
fileName = fname;
|
||||
|
@ -42,7 +42,7 @@ public:
|
||||
StdImageSource ();
|
||||
~StdImageSource ();
|
||||
|
||||
int load (const Glib::ustring &fname, bool batch = false);
|
||||
int load (const Glib::ustring &fname, int imageNum = 0, bool batch = false);
|
||||
void getImage (const ColorTemp &ctemp, int tran, Imagefloat* image, const PreviewProps &pp, const ToneCurveParams &hrp, const ColorManagementParams &cmp, const RAWParams &raw);
|
||||
ColorTemp getWB () const
|
||||
{
|
||||
@ -95,6 +95,11 @@ public:
|
||||
{
|
||||
return rgbSourceModified;
|
||||
}
|
||||
void setCurrentFrame(unsigned int frameNum) {}
|
||||
|
||||
void getRawValues(int x, int y, int rotate, int &R, int &G, int &B) { R = G = B = 0;}
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
#endif
|
||||
|
@ -42,6 +42,7 @@ public:
|
||||
choices[3] = "TIFF";
|
||||
choices[4] = "RAW";
|
||||
choices[5] = "Premium";
|
||||
choices[6] = "RAW (HDR enabled)";
|
||||
choices[7] = "RAW (pixel shift enabled)";
|
||||
choices[65535] = "n/a";
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -31,19 +31,48 @@ class BayerProcess : public ToolParamBlock, public AdjusterListener, public Fold
|
||||
protected:
|
||||
|
||||
MyComboBoxText* method;
|
||||
Gtk::HBox *imageNumberBox;
|
||||
MyComboBoxText* imageNumber;
|
||||
Adjuster* ccSteps;
|
||||
Gtk::VBox *dcbOptions;
|
||||
Adjuster* dcbIterations;
|
||||
Gtk::CheckButton* dcbEnhance;
|
||||
//Gtk::VBox *allOptions;
|
||||
//Gtk::CheckButton* allEnhance;
|
||||
MyCheckButton* dcbEnhance;
|
||||
Gtk::VBox *lmmseOptions;
|
||||
Adjuster* lmmseIterations;
|
||||
|
||||
bool lastDCBen;
|
||||
int oldSelection;
|
||||
//bool lastALLen;
|
||||
sigc::connection methodconn, dcbEnhconn; //,allEnhconn;
|
||||
Gtk::VBox *pixelShiftFrame;
|
||||
Gtk::VBox *pixelShiftOptions;
|
||||
MyComboBoxText* pixelShiftMotionMethod;
|
||||
MyCheckButton* pixelShiftShowMotion;
|
||||
MyCheckButton* pixelShiftShowMotionMaskOnly;
|
||||
MyCheckButton* pixelShiftNonGreenCross;
|
||||
MyCheckButton* pixelShiftGreen;
|
||||
MyCheckButton* pixelShiftBlur;
|
||||
MyCheckButton* pixelShiftHoleFill;
|
||||
MyCheckButton* pixelShiftMedian;
|
||||
MyCheckButton* pixelShiftLmmse;
|
||||
MyCheckButton* pixelShiftEqualBright;
|
||||
Adjuster* pixelShiftSmooth;
|
||||
Adjuster* pixelShiftEperIso;
|
||||
Adjuster* pixelShiftSigma;
|
||||
#ifdef PIXELSHIFTDEV
|
||||
Adjuster* pixelShiftSum;
|
||||
Adjuster* pixelShiftMotion;
|
||||
MyComboBoxText* pixelShiftMotionCorrection;
|
||||
MyCheckButton* pixelShiftAutomatic;
|
||||
MyCheckButton* pixelShiftNonGreenHorizontal;
|
||||
MyCheckButton* pixelShiftNonGreenVertical;
|
||||
MyCheckButton* pixelShiftNonGreenCross2;
|
||||
MyCheckButton* pixelShiftNonGreenAmaze;
|
||||
MyCheckButton* pixelShiftExp0;
|
||||
MyCheckButton* pixelShiftMedian3;
|
||||
Adjuster* pixelShiftStddevFactorGreen;
|
||||
Adjuster* pixelShiftStddevFactorRed;
|
||||
Adjuster* pixelShiftStddevFactorBlue;
|
||||
Adjuster* pixelShiftNreadIso;
|
||||
Adjuster* pixelShiftPrnu;
|
||||
Adjuster* pixelShiftRedBlueWeight;
|
||||
#endif
|
||||
int oldMethod;
|
||||
public:
|
||||
|
||||
BayerProcess ();
|
||||
@ -54,9 +83,29 @@ public:
|
||||
void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr);
|
||||
|
||||
void methodChanged ();
|
||||
void imageNumberChanged ();
|
||||
void adjusterChanged (Adjuster* a, double newval);
|
||||
void dcbEnhanceChanged();
|
||||
//void allEnhanceChanged();
|
||||
void pixelShiftShowMotionChanged();
|
||||
void pixelShiftShowMotionMaskOnlyChanged();
|
||||
void pixelShiftHoleFillChanged();
|
||||
void pixelShiftMedianChanged();
|
||||
void pixelShiftMedian3Changed();
|
||||
void pixelShiftGreenChanged();
|
||||
void pixelShiftBlurChanged();
|
||||
void pixelShiftLmmseChanged();
|
||||
void pixelShiftEqualBrightChanged();
|
||||
void pixelShiftNonGreenCrossChanged();
|
||||
void pixelShiftMotionMethodChanged();
|
||||
#ifdef PIXELSHIFTDEV
|
||||
void psMotionCorrectionChanged ();
|
||||
void pixelShiftAutomaticChanged();
|
||||
void pixelShiftNonGreenHorizontalChanged();
|
||||
void pixelShiftNonGreenVerticalChanged();
|
||||
void pixelShiftExp0Changed();
|
||||
void pixelShiftNonGreenCross2Changed();
|
||||
void pixelShiftNonGreenAmazeChanged();
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -61,9 +61,10 @@ ZoomStep zoomSteps[] = {
|
||||
{"500%", 5.0, 5000},
|
||||
{"600%", 6.0, 6000},
|
||||
{"700%", 7.0, 7000},
|
||||
{"800%", 8.0, 8000}
|
||||
{"800%", 8.0, 8000},
|
||||
{"1600%", 16.0, 16000}
|
||||
};
|
||||
#define MAXZOOMSTEPS 20
|
||||
#define MAXZOOMSTEPS 21
|
||||
#define ZOOM11INDEX 13
|
||||
|
||||
CropWindow::CropWindow (ImageArea* parent, bool isLowUpdatePriority_, bool isDetailWindow)
|
||||
@ -1034,9 +1035,21 @@ void CropWindow::pointerMoved (int bstate, int x, int y)
|
||||
int imheight = cropHandler.cropPixbuf->get_height();
|
||||
guint8* pix = cropHandler.cropPixbuftrue->get_pixels() + vy * cropHandler.cropPixbuf->get_rowstride() + vx * 3;
|
||||
|
||||
int rval = pix[0];
|
||||
int gval = pix[1];
|
||||
int bval = pix[2];
|
||||
if (vx < imwidth && vy < imheight) {
|
||||
rtengine::StagedImageProcessor* ipc = iarea->getImProcCoordinator();
|
||||
if(ipc) {
|
||||
procparams::ProcParams params;
|
||||
ipc->getParams(¶ms);
|
||||
if(params.raw.bayersensor.method == RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::none] || params.raw.xtranssensor.method == RAWParams::XTransSensor::methodstring[RAWParams::XTransSensor::none]) {
|
||||
ImageSource *isrc = static_cast<ImageSource*>(ipc->getInitialImage());
|
||||
isrc->getRawValues(mx, my, params.coarse.rotate, rval, gval, bval);
|
||||
}
|
||||
}
|
||||
// pmlistener->pointerMoved (true, cropHandler.colorParams.working, mx, my, pix[0], pix[1], pix[2]);
|
||||
pmlistener->pointerMoved (true, cropHandler.colorParams.output, cropHandler.colorParams.working, mx, my, pix[0], pix[1], pix[2]);
|
||||
pmlistener->pointerMoved (true, cropHandler.colorParams.output, cropHandler.colorParams.working, mx, my, rval, gval, bval);
|
||||
|
||||
if (pmhlistener)
|
||||
// pmhlistener->pointerMoved (true, cropHandler.colorParams.working, mx, my, pix[0], pix[1], pix[2]);
|
||||
|
@ -290,6 +290,24 @@ public:
|
||||
MyScrolledWindow();
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief subclass of Gtk::CheckButton in order to handle the last active state
|
||||
*/
|
||||
class MyCheckButton : public Gtk::CheckButton
|
||||
{
|
||||
|
||||
bool lastActive = false;
|
||||
sigc::connection myConnection;
|
||||
public:
|
||||
using CheckButton::CheckButton;
|
||||
void setLastActive() {lastActive = get_active();};
|
||||
void setLastActive(bool active) {lastActive = active;};
|
||||
bool getLastActive() {return lastActive;};
|
||||
void connect(const sigc::connection &connection) {myConnection = connection;};
|
||||
void block(bool blocked) {myConnection.block(blocked);};
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @brief subclass of Gtk::ComboBox in order to handle the scrollwheel
|
||||
*/
|
||||
@ -313,6 +331,7 @@ public:
|
||||
class MyComboBoxText : public Gtk::ComboBoxText
|
||||
{
|
||||
int naturalWidth, minimumWidth;
|
||||
sigc::connection myConnection;
|
||||
|
||||
bool on_scroll_event (GdkEventScroll* event);
|
||||
void get_preferred_width_vfunc (int &minimum_width, int &natural_width) const;
|
||||
@ -322,6 +341,8 @@ public:
|
||||
MyComboBoxText (bool has_entry = false);
|
||||
|
||||
void setPreferredWidth (int minimum_width, int natural_width);
|
||||
void connect(const sigc::connection &connection) {myConnection = connection;};
|
||||
void block(bool blocked) {myConnection.block(blocked);};
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -360,6 +360,7 @@ void ParamsEdited::set (bool v)
|
||||
icm.gampos = v;
|
||||
icm.slpos = v;
|
||||
raw.bayersensor.method = v;
|
||||
raw.bayersensor.imageNum = v;
|
||||
raw.bayersensor.ccSteps = v;
|
||||
raw.bayersensor.exBlack0 = v;
|
||||
raw.bayersensor.exBlack1 = v;
|
||||
@ -370,6 +371,35 @@ void ParamsEdited::set (bool v)
|
||||
raw.bayersensor.dcbEnhance = v;
|
||||
//raw.bayersensor.allEnhance = v;
|
||||
raw.bayersensor.lmmseIterations = v;
|
||||
raw.bayersensor.pixelShiftMotion = v;
|
||||
raw.bayersensor.pixelShiftMotionCorrection = v;
|
||||
raw.bayersensor.pixelShiftMotionCorrectionMethod = v;
|
||||
raw.bayersensor.pixelShiftStddevFactorGreen = v;
|
||||
raw.bayersensor.pixelShiftStddevFactorRed = v;
|
||||
raw.bayersensor.pixelShiftStddevFactorBlue = v;
|
||||
raw.bayersensor.pixelShiftEperIso = v;
|
||||
raw.bayersensor.pixelShiftNreadIso = v;
|
||||
raw.bayersensor.pixelShiftPrnu = v;
|
||||
raw.bayersensor.pixelShiftSigma = v;
|
||||
raw.bayersensor.pixelShiftSum = v;
|
||||
raw.bayersensor.pixelShiftRedBlueWeight = v;
|
||||
raw.bayersensor.pixelshiftShowMotion = v;
|
||||
raw.bayersensor.pixelshiftShowMotionMaskOnly = v;
|
||||
raw.bayersensor.pixelShiftAutomatic = v;
|
||||
raw.bayersensor.pixelShiftNonGreenHorizontal = v;
|
||||
raw.bayersensor.pixelShiftNonGreenVertical = v;
|
||||
raw.bayersensor.pixelShiftHoleFill = v;
|
||||
raw.bayersensor.pixelShiftMedian = v;
|
||||
raw.bayersensor.pixelShiftMedian3 = v;
|
||||
raw.bayersensor.pixelShiftGreen = v;
|
||||
raw.bayersensor.pixelShiftBlur = v;
|
||||
raw.bayersensor.pixelShiftSmooth = v;
|
||||
raw.bayersensor.pixelShiftExp0 = v;
|
||||
raw.bayersensor.pixelShiftLmmse = v;
|
||||
raw.bayersensor.pixelShiftEqualBright = v;
|
||||
raw.bayersensor.pixelShiftNonGreenCross = v;
|
||||
raw.bayersensor.pixelShiftNonGreenCross2 = v;
|
||||
raw.bayersensor.pixelShiftNonGreenAmaze = v;
|
||||
raw.bayersensor.greenEq = v;
|
||||
raw.bayersensor.linenoise = v;
|
||||
raw.xtranssensor.method = v;
|
||||
@ -856,6 +886,7 @@ void ParamsEdited::initFrom (const std::vector<rtengine::procparams::ProcParams>
|
||||
icm.gampos = icm.gampos && p.icm.gampos == other.icm.gampos;
|
||||
icm.slpos = icm.slpos && p.icm.slpos == other.icm.slpos;
|
||||
raw.bayersensor.method = raw.bayersensor.method && p.raw.bayersensor.method == other.raw.bayersensor.method;
|
||||
raw.bayersensor.imageNum = raw.bayersensor.imageNum && p.raw.bayersensor.imageNum == other.raw.bayersensor.imageNum;
|
||||
raw.bayersensor.ccSteps = raw.bayersensor.ccSteps && p.raw.bayersensor.ccSteps == other.raw.bayersensor.ccSteps;
|
||||
raw.bayersensor.exBlack0 = raw.bayersensor.exBlack0 && p.raw.bayersensor.black0 == other.raw.bayersensor.black0;
|
||||
raw.bayersensor.exBlack1 = raw.bayersensor.exBlack1 && p.raw.bayersensor.black1 == other.raw.bayersensor.black1;
|
||||
@ -866,6 +897,35 @@ void ParamsEdited::initFrom (const std::vector<rtengine::procparams::ProcParams>
|
||||
raw.bayersensor.dcbEnhance = raw.bayersensor.dcbEnhance && p.raw.bayersensor.dcb_enhance == other.raw.bayersensor.dcb_enhance;
|
||||
//raw.bayersensor.allEnhance = raw.bayersensor.allEnhance && p.raw.bayersensor.all_enhance == other.raw.bayersensor.all_enhance;
|
||||
raw.bayersensor.lmmseIterations = raw.bayersensor.lmmseIterations && p.raw.bayersensor.lmmse_iterations == other.raw.bayersensor.lmmse_iterations;
|
||||
raw.bayersensor.pixelShiftMotion = raw.bayersensor.pixelShiftMotion && p.raw.bayersensor.pixelShiftMotion == other.raw.bayersensor.pixelShiftMotion;
|
||||
raw.bayersensor.pixelShiftMotionCorrection = raw.bayersensor.pixelShiftMotionCorrection && p.raw.bayersensor.pixelShiftMotionCorrection == other.raw.bayersensor.pixelShiftMotionCorrection;
|
||||
raw.bayersensor.pixelShiftMotionCorrectionMethod = raw.bayersensor.pixelShiftMotionCorrectionMethod && p.raw.bayersensor.pixelShiftMotionCorrectionMethod == other.raw.bayersensor.pixelShiftMotionCorrectionMethod;
|
||||
raw.bayersensor.pixelShiftStddevFactorGreen = raw.bayersensor.pixelShiftStddevFactorGreen && p.raw.bayersensor.pixelShiftStddevFactorGreen == other.raw.bayersensor.pixelShiftStddevFactorGreen;
|
||||
raw.bayersensor.pixelShiftStddevFactorRed = raw.bayersensor.pixelShiftStddevFactorRed && p.raw.bayersensor.pixelShiftStddevFactorRed == other.raw.bayersensor.pixelShiftStddevFactorRed;
|
||||
raw.bayersensor.pixelShiftStddevFactorBlue = raw.bayersensor.pixelShiftStddevFactorBlue && p.raw.bayersensor.pixelShiftStddevFactorBlue == other.raw.bayersensor.pixelShiftStddevFactorBlue;
|
||||
raw.bayersensor.pixelShiftEperIso = raw.bayersensor.pixelShiftEperIso && p.raw.bayersensor.pixelShiftEperIso == other.raw.bayersensor.pixelShiftEperIso;
|
||||
raw.bayersensor.pixelShiftNreadIso = raw.bayersensor.pixelShiftNreadIso && p.raw.bayersensor.pixelShiftNreadIso == other.raw.bayersensor.pixelShiftNreadIso;
|
||||
raw.bayersensor.pixelShiftPrnu = raw.bayersensor.pixelShiftPrnu && p.raw.bayersensor.pixelShiftPrnu == other.raw.bayersensor.pixelShiftPrnu;
|
||||
raw.bayersensor.pixelShiftSigma = raw.bayersensor.pixelShiftSigma && p.raw.bayersensor.pixelShiftSigma == other.raw.bayersensor.pixelShiftSigma;
|
||||
raw.bayersensor.pixelShiftSum = raw.bayersensor.pixelShiftSum && p.raw.bayersensor.pixelShiftSum == other.raw.bayersensor.pixelShiftSum;
|
||||
raw.bayersensor.pixelShiftRedBlueWeight = raw.bayersensor.pixelShiftRedBlueWeight && p.raw.bayersensor.pixelShiftRedBlueWeight == other.raw.bayersensor.pixelShiftRedBlueWeight;
|
||||
raw.bayersensor.pixelshiftShowMotion = raw.bayersensor.pixelshiftShowMotion && p.raw.bayersensor.pixelshiftShowMotion == other.raw.bayersensor.pixelshiftShowMotion;
|
||||
raw.bayersensor.pixelshiftShowMotionMaskOnly = raw.bayersensor.pixelshiftShowMotionMaskOnly && p.raw.bayersensor.pixelshiftShowMotionMaskOnly == other.raw.bayersensor.pixelshiftShowMotionMaskOnly;
|
||||
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.pixelShiftHoleFill = raw.bayersensor.pixelShiftHoleFill && p.raw.bayersensor.pixelShiftHoleFill == other.raw.bayersensor.pixelShiftHoleFill;
|
||||
raw.bayersensor.pixelShiftMedian = raw.bayersensor.pixelShiftMedian && p.raw.bayersensor.pixelShiftMedian == other.raw.bayersensor.pixelShiftMedian;
|
||||
raw.bayersensor.pixelShiftMedian3 = raw.bayersensor.pixelShiftMedian3 && p.raw.bayersensor.pixelShiftMedian3 == other.raw.bayersensor.pixelShiftMedian3;
|
||||
raw.bayersensor.pixelShiftGreen = raw.bayersensor.pixelShiftGreen && p.raw.bayersensor.pixelShiftGreen == other.raw.bayersensor.pixelShiftGreen;
|
||||
raw.bayersensor.pixelShiftBlur = raw.bayersensor.pixelShiftBlur && p.raw.bayersensor.pixelShiftBlur == other.raw.bayersensor.pixelShiftBlur;
|
||||
raw.bayersensor.pixelShiftSmooth = raw.bayersensor.pixelShiftSmooth && p.raw.bayersensor.pixelShiftSmoothFactor == other.raw.bayersensor.pixelShiftSmoothFactor;
|
||||
raw.bayersensor.pixelShiftExp0 = raw.bayersensor.pixelShiftExp0 && p.raw.bayersensor.pixelShiftExp0 == other.raw.bayersensor.pixelShiftExp0;
|
||||
raw.bayersensor.pixelShiftLmmse = raw.bayersensor.pixelShiftLmmse && p.raw.bayersensor.pixelShiftLmmse == other.raw.bayersensor.pixelShiftLmmse;
|
||||
raw.bayersensor.pixelShiftEqualBright = raw.bayersensor.pixelShiftEqualBright && p.raw.bayersensor.pixelShiftEqualBright == other.raw.bayersensor.pixelShiftEqualBright;
|
||||
raw.bayersensor.pixelShiftNonGreenCross = raw.bayersensor.pixelShiftNonGreenCross && p.raw.bayersensor.pixelShiftNonGreenCross == other.raw.bayersensor.pixelShiftNonGreenCross;
|
||||
raw.bayersensor.pixelShiftNonGreenCross2 = raw.bayersensor.pixelShiftNonGreenCross2 && p.raw.bayersensor.pixelShiftNonGreenCross2 == other.raw.bayersensor.pixelShiftNonGreenCross2;
|
||||
raw.bayersensor.pixelShiftNonGreenAmaze = raw.bayersensor.pixelShiftNonGreenAmaze && p.raw.bayersensor.pixelShiftNonGreenAmaze == other.raw.bayersensor.pixelShiftNonGreenAmaze;
|
||||
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;
|
||||
@ -2242,6 +2302,10 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten
|
||||
toEdit.raw.bayersensor.method = mods.raw.bayersensor.method;
|
||||
}
|
||||
|
||||
if (raw.bayersensor.imageNum) {
|
||||
toEdit.raw.bayersensor.imageNum = mods.raw.bayersensor.imageNum;
|
||||
}
|
||||
|
||||
if (raw.bayersensor.ccSteps) {
|
||||
toEdit.raw.bayersensor.ccSteps = mods.raw.bayersensor.ccSteps;
|
||||
}
|
||||
@ -2278,7 +2342,122 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten
|
||||
toEdit.raw.bayersensor.lmmse_iterations = mods.raw.bayersensor.lmmse_iterations;
|
||||
}
|
||||
|
||||
//if (raw.bayersensor.allEnhance) toEdit.raw.bayersensor.all_enhance = mods.raw.bayersensor.all_enhance;
|
||||
if (raw.bayersensor.pixelShiftMotion) {
|
||||
toEdit.raw.bayersensor.pixelShiftMotion = mods.raw.bayersensor.pixelShiftMotion;
|
||||
}
|
||||
|
||||
if (raw.bayersensor.pixelShiftMotionCorrection) {
|
||||
toEdit.raw.bayersensor.pixelShiftMotionCorrection = mods.raw.bayersensor.pixelShiftMotionCorrection;
|
||||
}
|
||||
|
||||
if (raw.bayersensor.pixelShiftMotionCorrectionMethod) {
|
||||
toEdit.raw.bayersensor.pixelShiftMotionCorrectionMethod = mods.raw.bayersensor.pixelShiftMotionCorrectionMethod;
|
||||
}
|
||||
|
||||
if (raw.bayersensor.pixelShiftStddevFactorGreen) {
|
||||
toEdit.raw.bayersensor.pixelShiftStddevFactorGreen = mods.raw.bayersensor.pixelShiftStddevFactorGreen;
|
||||
}
|
||||
|
||||
if (raw.bayersensor.pixelShiftStddevFactorRed) {
|
||||
toEdit.raw.bayersensor.pixelShiftStddevFactorRed = mods.raw.bayersensor.pixelShiftStddevFactorRed;
|
||||
}
|
||||
|
||||
if (raw.bayersensor.pixelShiftStddevFactorBlue) {
|
||||
toEdit.raw.bayersensor.pixelShiftStddevFactorBlue = mods.raw.bayersensor.pixelShiftStddevFactorBlue;
|
||||
}
|
||||
|
||||
if (raw.bayersensor.pixelShiftEperIso) {
|
||||
toEdit.raw.bayersensor.pixelShiftEperIso = mods.raw.bayersensor.pixelShiftEperIso;
|
||||
}
|
||||
|
||||
if (raw.bayersensor.pixelShiftNreadIso) {
|
||||
toEdit.raw.bayersensor.pixelShiftNreadIso = mods.raw.bayersensor.pixelShiftNreadIso;
|
||||
}
|
||||
|
||||
if (raw.bayersensor.pixelShiftPrnu) {
|
||||
toEdit.raw.bayersensor.pixelShiftPrnu = mods.raw.bayersensor.pixelShiftPrnu;
|
||||
}
|
||||
|
||||
if (raw.bayersensor.pixelShiftSigma) {
|
||||
toEdit.raw.bayersensor.pixelShiftSigma = mods.raw.bayersensor.pixelShiftSigma;
|
||||
}
|
||||
|
||||
if (raw.bayersensor.pixelShiftSum) {
|
||||
toEdit.raw.bayersensor.pixelShiftSum = mods.raw.bayersensor.pixelShiftSum;
|
||||
}
|
||||
|
||||
if (raw.bayersensor.pixelShiftRedBlueWeight) {
|
||||
toEdit.raw.bayersensor.pixelShiftRedBlueWeight = mods.raw.bayersensor.pixelShiftRedBlueWeight;
|
||||
}
|
||||
|
||||
if (raw.bayersensor.pixelshiftShowMotion) {
|
||||
toEdit.raw.bayersensor.pixelshiftShowMotion = mods.raw.bayersensor.pixelshiftShowMotion;
|
||||
}
|
||||
|
||||
if (raw.bayersensor.pixelshiftShowMotionMaskOnly) {
|
||||
toEdit.raw.bayersensor.pixelshiftShowMotionMaskOnly = mods.raw.bayersensor.pixelshiftShowMotionMaskOnly;
|
||||
}
|
||||
|
||||
if (raw.bayersensor.pixelShiftAutomatic) {
|
||||
toEdit.raw.bayersensor.pixelShiftAutomatic = mods.raw.bayersensor.pixelShiftAutomatic;
|
||||
}
|
||||
|
||||
if (raw.bayersensor.pixelShiftNonGreenHorizontal) {
|
||||
toEdit.raw.bayersensor.pixelShiftNonGreenHorizontal = mods.raw.bayersensor.pixelShiftNonGreenHorizontal;
|
||||
}
|
||||
|
||||
if (raw.bayersensor.pixelShiftNonGreenVertical) {
|
||||
toEdit.raw.bayersensor.pixelShiftNonGreenVertical = mods.raw.bayersensor.pixelShiftNonGreenVertical;
|
||||
}
|
||||
|
||||
if (raw.bayersensor.pixelShiftHoleFill) {
|
||||
toEdit.raw.bayersensor.pixelShiftHoleFill = mods.raw.bayersensor.pixelShiftHoleFill;
|
||||
}
|
||||
|
||||
if (raw.bayersensor.pixelShiftMedian) {
|
||||
toEdit.raw.bayersensor.pixelShiftMedian = mods.raw.bayersensor.pixelShiftMedian;
|
||||
}
|
||||
|
||||
if (raw.bayersensor.pixelShiftMedian3) {
|
||||
toEdit.raw.bayersensor.pixelShiftMedian3 = mods.raw.bayersensor.pixelShiftMedian3;
|
||||
}
|
||||
|
||||
if (raw.bayersensor.pixelShiftGreen) {
|
||||
toEdit.raw.bayersensor.pixelShiftGreen = mods.raw.bayersensor.pixelShiftGreen;
|
||||
}
|
||||
|
||||
if (raw.bayersensor.pixelShiftBlur) {
|
||||
toEdit.raw.bayersensor.pixelShiftBlur = mods.raw.bayersensor.pixelShiftBlur;
|
||||
}
|
||||
|
||||
if (raw.bayersensor.pixelShiftSmooth) {
|
||||
toEdit.raw.bayersensor.pixelShiftSmoothFactor = mods.raw.bayersensor.pixelShiftSmoothFactor;
|
||||
}
|
||||
|
||||
if (raw.bayersensor.pixelShiftExp0) {
|
||||
toEdit.raw.bayersensor.pixelShiftExp0 = mods.raw.bayersensor.pixelShiftExp0;
|
||||
}
|
||||
|
||||
if (raw.bayersensor.pixelShiftLmmse) {
|
||||
toEdit.raw.bayersensor.pixelShiftLmmse = mods.raw.bayersensor.pixelShiftLmmse;
|
||||
}
|
||||
|
||||
if (raw.bayersensor.pixelShiftEqualBright) {
|
||||
toEdit.raw.bayersensor.pixelShiftEqualBright = mods.raw.bayersensor.pixelShiftEqualBright;
|
||||
}
|
||||
|
||||
if (raw.bayersensor.pixelShiftNonGreenCross) {
|
||||
toEdit.raw.bayersensor.pixelShiftNonGreenCross = mods.raw.bayersensor.pixelShiftNonGreenCross;
|
||||
}
|
||||
|
||||
if (raw.bayersensor.pixelShiftNonGreenCross2) {
|
||||
toEdit.raw.bayersensor.pixelShiftNonGreenCross2 = mods.raw.bayersensor.pixelShiftNonGreenCross2;
|
||||
}
|
||||
|
||||
if (raw.bayersensor.pixelShiftNonGreenAmaze) {
|
||||
toEdit.raw.bayersensor.pixelShiftNonGreenAmaze = mods.raw.bayersensor.pixelShiftNonGreenAmaze;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
@ -2788,7 +2967,10 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten
|
||||
|
||||
bool RAWParamsEdited::BayerSensor::isUnchanged() const
|
||||
{
|
||||
return method && dcbIterations && dcbEnhance && lmmseIterations/*&& allEnhance*/ && greenEq
|
||||
return method && imageNum && dcbIterations && dcbEnhance && lmmseIterations/*&& allEnhance*/ && greenEq
|
||||
&& pixelShiftMotion && pixelShiftMotionCorrection && pixelShiftMotionCorrectionMethod && pixelShiftStddevFactorGreen && pixelShiftStddevFactorRed && pixelShiftStddevFactorBlue && pixelShiftEperIso
|
||||
&& pixelShiftNreadIso && pixelShiftPrnu && pixelShiftSigma && pixelShiftSum && pixelShiftRedBlueWeight && pixelshiftShowMotion && pixelshiftShowMotionMaskOnly
|
||||
&& pixelShiftAutomatic && pixelShiftNonGreenHorizontal && pixelShiftNonGreenVertical && pixelShiftHoleFill && pixelShiftMedian && pixelShiftMedian3 && pixelShiftNonGreenCross && pixelShiftNonGreenCross2 && pixelShiftNonGreenAmaze && pixelShiftGreen && pixelShiftBlur && pixelShiftSmooth && pixelShiftExp0 && pixelShiftLmmse && pixelShiftEqualBright
|
||||
&& linenoise && exBlack0 && exBlack1 && exBlack2 && exBlack3 && exTwoGreen;
|
||||
}
|
||||
|
||||
|
@ -682,6 +682,7 @@ public:
|
||||
|
||||
public:
|
||||
bool method;
|
||||
bool imageNum;
|
||||
bool ccSteps;
|
||||
bool exBlack0;
|
||||
bool exBlack1;
|
||||
@ -691,6 +692,36 @@ public:
|
||||
bool dcbIterations;
|
||||
bool dcbEnhance;
|
||||
bool lmmseIterations;
|
||||
bool pixelShiftMotion;
|
||||
bool pixelShiftMotionCorrection;
|
||||
bool pixelShiftMotionCorrectionMethod;
|
||||
bool pixelShiftStddevFactorGreen;
|
||||
bool pixelShiftStddevFactorRed;
|
||||
bool pixelShiftStddevFactorBlue;
|
||||
bool pixelShiftEperIso;
|
||||
bool pixelShiftNreadIso;
|
||||
bool pixelShiftPrnu;
|
||||
bool pixelShiftSigma;
|
||||
bool pixelShiftSum;
|
||||
bool pixelShiftRedBlueWeight;
|
||||
bool pixelshiftShowMotion;
|
||||
bool pixelshiftShowMotionMaskOnly;
|
||||
bool pixelShiftAutomatic;
|
||||
bool pixelShiftNonGreenHorizontal;
|
||||
bool pixelShiftNonGreenVertical;
|
||||
bool pixelShiftHoleFill;
|
||||
bool pixelShiftMedian;
|
||||
bool pixelShiftMedian3;
|
||||
bool pixelShiftGreen;
|
||||
bool pixelShiftBlur;
|
||||
bool pixelShiftSmooth;
|
||||
bool pixelShiftExp0;
|
||||
bool pixelShiftLmmse;
|
||||
bool pixelShiftEqualBright;
|
||||
bool pixelShiftNonGreenCross;
|
||||
bool pixelShiftNonGreenCross2;
|
||||
bool pixelShiftNonGreenAmaze;
|
||||
|
||||
//bool allEnhance;
|
||||
bool greenEq;
|
||||
bool linenoise;
|
||||
|
@ -111,6 +111,7 @@ PartialPasteDlg::PartialPasteDlg (const Glib::ustring &title, Gtk::Window* paren
|
||||
raw_linenoise = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_PREPROCESS_LINEDENOISE")));
|
||||
raw_greenthresh = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_PREPROCESS_GREENEQUIL")));
|
||||
raw_method = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_RAW_DMETHOD")));
|
||||
raw_imagenum = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_RAW_IMAGENUM")));
|
||||
raw_ccSteps = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_RAW_FALSECOLOR")));
|
||||
raw_dcb_iterations = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_RAW_DCBITERATIONS")));
|
||||
raw_dcb_enhance = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_RAW_DCBENHANCE")));
|
||||
@ -200,6 +201,7 @@ PartialPasteDlg::PartialPasteDlg (const Glib::ustring &title, Gtk::Window* paren
|
||||
vboxes[6]->pack_start (*raw, Gtk::PACK_SHRINK, 2);
|
||||
vboxes[6]->pack_start (*hseps[6], Gtk::PACK_SHRINK, 2);
|
||||
vboxes[6]->pack_start (*raw_method, Gtk::PACK_SHRINK, 2);
|
||||
vboxes[6]->pack_start (*raw_imagenum, Gtk::PACK_SHRINK, 2);
|
||||
vboxes[6]->pack_start (*raw_ccSteps, Gtk::PACK_SHRINK, 2);
|
||||
vboxes[6]->pack_start (*raw_dcb_iterations, Gtk::PACK_SHRINK, 2);
|
||||
vboxes[6]->pack_start (*raw_dcb_enhance, Gtk::PACK_SHRINK, 2);
|
||||
@ -338,7 +340,8 @@ PartialPasteDlg::PartialPasteDlg (const Glib::ustring &title, Gtk::Window* paren
|
||||
exifchConn = exifch->signal_toggled().connect (sigc::bind (sigc::mem_fun(*meta, &Gtk::CheckButton::set_inconsistent), true));
|
||||
iptcConn = iptc->signal_toggled().connect (sigc::bind (sigc::mem_fun(*meta, &Gtk::CheckButton::set_inconsistent), true));
|
||||
|
||||
raw_methodConn = raw_method->signal_toggled().connect (sigc::bind (sigc::mem_fun(*raw, &Gtk::CheckButton::set_inconsistent), true));
|
||||
raw_methodConn = raw_method->signal_toggled().connect (sigc::bind (sigc::mem_fun(*raw, &Gtk::CheckButton::set_inconsistent), true));
|
||||
raw_imagenumConn = raw_imagenum->signal_toggled().connect (sigc::bind (sigc::mem_fun(*raw, &Gtk::CheckButton::set_inconsistent), true));
|
||||
raw_ccStepsConn = raw_ccSteps->signal_toggled().connect (sigc::bind (sigc::mem_fun(*raw, &Gtk::CheckButton::set_inconsistent), true));
|
||||
raw_dcb_iterationsConn = raw_dcb_iterations->signal_toggled().connect (sigc::bind (sigc::mem_fun(*raw, &Gtk::CheckButton::set_inconsistent), true));
|
||||
raw_dcb_enhanceConn = raw_dcb_enhance->signal_toggled().connect (sigc::bind (sigc::mem_fun(*raw, &Gtk::CheckButton::set_inconsistent), true));
|
||||
@ -418,6 +421,7 @@ void PartialPasteDlg::rawToggled ()
|
||||
{
|
||||
|
||||
raw_methodConn.block (true);
|
||||
raw_imagenumConn.block (true);
|
||||
raw_ccStepsConn.block (true);
|
||||
raw_dcb_iterationsConn.block (true);
|
||||
raw_dcb_enhanceConn.block (true);
|
||||
@ -444,6 +448,7 @@ void PartialPasteDlg::rawToggled ()
|
||||
raw->set_inconsistent (false);
|
||||
|
||||
raw_method->set_active (raw->get_active ());
|
||||
raw_imagenum->set_active (raw->get_active ());
|
||||
raw_ccSteps->set_active (raw->get_active ());
|
||||
raw_dcb_iterations->set_active (raw->get_active ());
|
||||
raw_dcb_enhance->set_active (raw->get_active ());
|
||||
@ -468,6 +473,7 @@ void PartialPasteDlg::rawToggled ()
|
||||
ff_ClipControl->set_active (raw->get_active ());
|
||||
|
||||
raw_methodConn.block (false);
|
||||
raw_imagenumConn.block (false);
|
||||
raw_ccStepsConn.block (false);
|
||||
raw_dcb_iterationsConn.block (false);
|
||||
raw_dcb_enhanceConn.block (false);
|
||||
@ -847,6 +853,10 @@ void PartialPasteDlg::applyPaste (rtengine::procparams::ProcParams* dstPP, Param
|
||||
filterPE.raw.xtranssensor.method = falsePE.raw.xtranssensor.method;
|
||||
}
|
||||
|
||||
if (!raw_imagenum->get_active ()) {
|
||||
filterPE.raw.bayersensor.imageNum = falsePE.raw.bayersensor.imageNum;
|
||||
}
|
||||
|
||||
if (!raw_ccSteps->get_active ()) {
|
||||
filterPE.raw.bayersensor.ccSteps = falsePE.raw.bayersensor.ccSteps;
|
||||
filterPE.raw.xtranssensor.ccSteps = falsePE.raw.xtranssensor.ccSteps;
|
||||
|
@ -107,6 +107,7 @@ public:
|
||||
Gtk::CheckButton* raw_linenoise;
|
||||
Gtk::CheckButton* raw_greenthresh;
|
||||
Gtk::CheckButton* raw_method;
|
||||
Gtk::CheckButton* raw_imagenum;
|
||||
Gtk::CheckButton* raw_ccSteps;
|
||||
Gtk::CheckButton* raw_dcb_iterations;
|
||||
Gtk::CheckButton* raw_dcb_enhance;
|
||||
@ -129,7 +130,7 @@ public:
|
||||
sigc::connection coarserotConn, finerotConn, cropConn, resizeConn, prsharpeningConn, perspectiveConn, commonTransConn;
|
||||
sigc::connection exifchConn, iptcConn, icmConn;
|
||||
sigc::connection df_fileConn, df_AutoSelectConn, ff_fileConn, ff_AutoSelectConn, ff_BlurRadiusConn, ff_BlurTypeConn, ff_ClipControlConn;
|
||||
sigc::connection raw_caredConn, raw_cablueConn, raw_ca_autocorrectConn, raw_hotpix_filtConn, raw_deadpix_filtConn, raw_linenoiseConn, raw_greenthreshConn, raw_ccStepsConn, raw_methodConn, raw_dcb_iterationsConn, raw_lmmse_iterationsConn, raw_dcb_enhanceConn, raw_exposConn, raw_preserConn, raw_blackConn;
|
||||
sigc::connection raw_caredConn, raw_cablueConn, raw_ca_autocorrectConn, raw_hotpix_filtConn, raw_deadpix_filtConn, raw_linenoiseConn, raw_greenthreshConn, raw_ccStepsConn, raw_methodConn, raw_imagenumConn, raw_dcb_iterationsConn, raw_lmmse_iterationsConn, raw_dcb_enhanceConn, raw_exposConn, raw_preserConn, raw_blackConn;
|
||||
|
||||
public:
|
||||
PartialPasteDlg (const Glib::ustring &title, Gtk::Window* parent);
|
||||
|
@ -138,7 +138,7 @@ void Thumbnail::_generateThumbnailImage ()
|
||||
|
||||
if ( tpp == nullptr ) {
|
||||
quick = false;
|
||||
tpp = rtengine::Thumbnail::loadFromRaw (fname, ri, tw, th, 1, pparams.wb.equal, TRUE);
|
||||
tpp = rtengine::Thumbnail::loadFromRaw (fname, ri, tw, th, 1, pparams.wb.equal, TRUE, pparams.raw.bayersensor.imageNum);
|
||||
}
|
||||
|
||||
if (tpp) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user