Handle flat field images with different black levels than raw image

For bayer images handle flat field images with different black levels
than the raw image.
This commit is contained in:
Simone Gotti
2024-03-14 10:50:03 +01:00
parent 7751019b6e
commit 2aea26b5f3
3 changed files with 30 additions and 10 deletions

View File

@@ -145,6 +145,7 @@ void ffInfo::updateRawImage()
int H = ri->get_height();
int W = ri->get_width();
ri->compress_image(0);
ri->set_prefilters();
int rSize = W * ((ri->getSensorType() == ST_BAYER || ri->getSensorType() == ST_FUJI_XTRANS || ri->get_colors() == 1) ? 1 : 3);
acc_t **acc = new acc_t*[H];
@@ -165,6 +166,7 @@ void ffInfo::updateRawImage()
if( !temp->loadRaw(true)) {
temp->compress_image(0); //\ TODO would be better working on original, because is temporary
temp->set_prefilters();
nFiles++;
if( ri->getSensorType() == ST_BAYER || ri->getSensorType() == ST_FUJI_XTRANS || ri->get_colors() == 1 ) {
@@ -204,6 +206,7 @@ void ffInfo::updateRawImage()
ri = nullptr;
} else {
ri->compress_image(0);
ri->set_prefilters();
}
}