Film negative processing: first usable version. Only supports bayer raw files, thumbnails don't work
Added performance improvements suggested by heckflosse. Lowered median sampling step from 7 to 5 since calculation is now much faster. Added support for Fuji X-Trans raw files. Applied SSE2 patch provided by @heckflosse, improves performance in main processing loop. Moved film negative processing stuff in its own compilation unit. Code cleanup: removed redundant omp directives. Added check for dead pixels, going above threshold after inversion. ST_BAYER only for now. Reverted leftover hack in cropwindow.cc
This commit is contained in:
@@ -92,6 +92,7 @@ ToolPanelCoordinator::ToolPanelCoordinator (bool batch) : ipc (nullptr), favorit
|
||||
bayerrawexposure = Gtk::manage (new BayerRAWExposure ());
|
||||
xtransrawexposure = Gtk::manage (new XTransRAWExposure ());
|
||||
fattal = Gtk::manage (new FattalToneMapping ());
|
||||
filmNegative = Gtk::manage (new FilmNegative ());
|
||||
|
||||
// So Demosaic, Line noise filter, Green Equilibration, Ca-Correction (garder le nom de section identique!) and Black-Level will be moved in a "Bayer sensor" tool,
|
||||
// and a separate Demosaic and Black Level tool will be created in an "X-Trans sensor" tool
|
||||
@@ -154,6 +155,7 @@ ToolPanelCoordinator::ToolPanelCoordinator (bool batch) : ipc (nullptr), favorit
|
||||
addfavoritePanel (rawPanel, preprocess);
|
||||
addfavoritePanel (rawPanel, darkframe);
|
||||
addfavoritePanel (rawPanel, flatfield);
|
||||
addfavoritePanel (rawPanel, filmNegative);
|
||||
|
||||
int favoriteCount = 0;
|
||||
for(auto it = favorites.begin(); it != favorites.end(); ++it) {
|
||||
@@ -255,6 +257,7 @@ ToolPanelCoordinator::ToolPanelCoordinator (bool batch) : ipc (nullptr), favorit
|
||||
distortion->setLensGeomListener (this);
|
||||
crop->setCropPanelListener (this);
|
||||
icm->setICMPanelListener (this);
|
||||
filmNegative->setFilmNegProvider (this);
|
||||
|
||||
toolBar = new ToolBar ();
|
||||
toolBar->setToolBarListener (this);
|
||||
@@ -305,6 +308,7 @@ void ToolPanelCoordinator::imageTypeChanged (bool isRaw, bool isBayer, bool isXt
|
||||
sensorbayer->FoldableToolPanel::show();
|
||||
preprocess->FoldableToolPanel::show();
|
||||
flatfield->FoldableToolPanel::show();
|
||||
filmNegative->FoldableToolPanel::show();
|
||||
retinex->FoldableToolPanel::setGrayedOut(false);
|
||||
|
||||
return false;
|
||||
@@ -320,6 +324,7 @@ void ToolPanelCoordinator::imageTypeChanged (bool isRaw, bool isBayer, bool isXt
|
||||
sensorbayer->FoldableToolPanel::hide();
|
||||
preprocess->FoldableToolPanel::show();
|
||||
flatfield->FoldableToolPanel::show();
|
||||
filmNegative->FoldableToolPanel::show();
|
||||
retinex->FoldableToolPanel::setGrayedOut(false);
|
||||
|
||||
return false;
|
||||
@@ -335,6 +340,7 @@ void ToolPanelCoordinator::imageTypeChanged (bool isRaw, bool isBayer, bool isXt
|
||||
sensorxtrans->FoldableToolPanel::hide();
|
||||
preprocess->FoldableToolPanel::hide();
|
||||
flatfield->FoldableToolPanel::show();
|
||||
filmNegative->FoldableToolPanel::hide();
|
||||
retinex->FoldableToolPanel::setGrayedOut(false);
|
||||
|
||||
return false;
|
||||
@@ -349,6 +355,7 @@ void ToolPanelCoordinator::imageTypeChanged (bool isRaw, bool isBayer, bool isXt
|
||||
sensorxtrans->FoldableToolPanel::hide();
|
||||
preprocess->FoldableToolPanel::hide();
|
||||
flatfield->FoldableToolPanel::hide();
|
||||
filmNegative->FoldableToolPanel::hide();
|
||||
retinex->FoldableToolPanel::setGrayedOut(false);
|
||||
|
||||
return false;
|
||||
@@ -360,6 +367,7 @@ void ToolPanelCoordinator::imageTypeChanged (bool isRaw, bool isBayer, bool isXt
|
||||
[this]() -> bool
|
||||
{
|
||||
rawPanelSW->set_sensitive(false);
|
||||
filmNegative->FoldableToolPanel::hide();
|
||||
retinex->FoldableToolPanel::setGrayedOut(true);
|
||||
|
||||
return false;
|
||||
@@ -476,7 +484,7 @@ void ToolPanelCoordinator::profileChange(
|
||||
lParams[1] = *mergedParams;
|
||||
pe.initFrom (lParams);
|
||||
|
||||
filterRawRefresh = pe.raw.isUnchanged() && pe.lensProf.isUnchanged() && pe.retinex.isUnchanged();
|
||||
filterRawRefresh = pe.raw.isUnchanged() && pe.lensProf.isUnchanged() && pe.retinex.isUnchanged() && pe.filmNegative.isUnchanged();
|
||||
}
|
||||
|
||||
*params = *mergedParams;
|
||||
@@ -1014,3 +1022,11 @@ void ToolPanelCoordinator::setEditProvider (EditDataProvider *provider)
|
||||
toolPanels.at (i)->setEditProvider (provider);
|
||||
}
|
||||
}
|
||||
|
||||
bool ToolPanelCoordinator::getFilmNegativeExponents(rtengine::Coord spotA, rtengine::Coord spotB, float* newExps)
|
||||
{
|
||||
if(!ipc)
|
||||
return false;
|
||||
|
||||
return ipc->getFilmNegativeExponents(spotA.x, spotA.y, spotB.x, spotB.y, newExps);
|
||||
}
|
||||
|
Reference in New Issue
Block a user