Call setBorder() before demosaic
This commit is contained in:
parent
e7010e6a4d
commit
f55d89e576
@ -230,6 +230,13 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall)
|
||||
printf ("Demosaic X-Trans image with using method: %s\n", rp.xtranssensor.method.c_str());
|
||||
}
|
||||
}
|
||||
if(imgsrc->getSensorType() == ST_BAYER) {
|
||||
if(params.raw.bayersensor.method!= RAWParams::BayerSensor::getMethodString(RAWParams::BayerSensor::Method::PIXELSHIFT)) {
|
||||
imgsrc->setBorder(params.raw.bayersensor.border);
|
||||
} else {
|
||||
imgsrc->setBorder(4);
|
||||
}
|
||||
}
|
||||
bool autoContrast = false;
|
||||
double contrastThreshold = 0.f;
|
||||
imgsrc->demosaic (rp, autoContrast, contrastThreshold); //enabled demosaic
|
||||
@ -243,10 +250,6 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall)
|
||||
highDetailRawComputed = false;
|
||||
}
|
||||
|
||||
if(imgsrc->getSensorType() == ST_BAYER && params.raw.bayersensor.method != RAWParams::BayerSensor::getMethodString(RAWParams::BayerSensor::Method::PIXELSHIFT)) {
|
||||
imgsrc->setBorder(params.raw.bayersensor.border);
|
||||
}
|
||||
|
||||
if (params.retinex.enabled) {
|
||||
lhist16RETI (32768);
|
||||
lhist16RETI.clear();
|
||||
|
@ -203,12 +203,16 @@ private:
|
||||
if (pl) {
|
||||
pl->setProgress (0.20);
|
||||
}
|
||||
if(imgsrc->getSensorType() == ST_BAYER) {
|
||||
if(params.raw.bayersensor.method!= RAWParams::BayerSensor::getMethodString(RAWParams::BayerSensor::Method::PIXELSHIFT)) {
|
||||
imgsrc->setBorder(params.raw.bayersensor.border);
|
||||
} else {
|
||||
imgsrc->setBorder(4);
|
||||
}
|
||||
}
|
||||
double contrastThresholdDummy;
|
||||
imgsrc->demosaic (params.raw, false, contrastThresholdDummy);
|
||||
|
||||
if(imgsrc->getSensorType() == ST_BAYER && params.raw.bayersensor.method != RAWParams::BayerSensor::getMethodString(RAWParams::BayerSensor::Method::PIXELSHIFT)) {
|
||||
imgsrc->setBorder(params.raw.bayersensor.border);
|
||||
}
|
||||
|
||||
if (pl) {
|
||||
pl->setProgress (0.30);
|
||||
|
Loading…
x
Reference in New Issue
Block a user