Fix flat field correction for multiframe raw files
This commit is contained in:
parent
6b1e5d6181
commit
7a0d2dddc9
@ -263,7 +263,7 @@ void cfaboxblur(const float* const * riFlatFile, float* cfablur, int boxH, int b
|
|||||||
namespace rtengine
|
namespace rtengine
|
||||||
{
|
{
|
||||||
|
|
||||||
void RawImageSource::processFlatField(const procparams::RAWParams &raw, const RawImage *riFlatFile, const float black[4])
|
void RawImageSource::processFlatField(const procparams::RAWParams &raw, const RawImage *riFlatFile, array2D<float> &rawData, const float black[4])
|
||||||
{
|
{
|
||||||
// BENCHFUN
|
// BENCHFUN
|
||||||
std::unique_ptr<float[]> cfablur(new float[H * W]);
|
std::unique_ptr<float[]> cfablur(new float[H * W]);
|
||||||
|
@ -2495,7 +2495,7 @@ void RawImageSource::copyOriginalPixels(const RAWParams &raw, RawImage *src, Raw
|
|||||||
|
|
||||||
|
|
||||||
if (riFlatFile && W == riFlatFile->get_width() && H == riFlatFile->get_height()) {
|
if (riFlatFile && W == riFlatFile->get_width() && H == riFlatFile->get_height()) {
|
||||||
processFlatField(raw, riFlatFile, black);
|
processFlatField(raw, riFlatFile, rawData, black);
|
||||||
} // flatfield
|
} // flatfield
|
||||||
} else if (ri->get_colors() == 1) {
|
} else if (ri->get_colors() == 1) {
|
||||||
// Monochrome
|
// Monochrome
|
||||||
@ -2517,7 +2517,7 @@ void RawImageSource::copyOriginalPixels(const RAWParams &raw, RawImage *src, Raw
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (riFlatFile && W == riFlatFile->get_width() && H == riFlatFile->get_height()) {
|
if (riFlatFile && W == riFlatFile->get_width() && H == riFlatFile->get_height()) {
|
||||||
processFlatField(raw, riFlatFile, black);
|
processFlatField(raw, riFlatFile, rawData, black);
|
||||||
} // flatfield
|
} // flatfield
|
||||||
} else {
|
} else {
|
||||||
// No bayer pattern
|
// No bayer pattern
|
||||||
|
@ -137,7 +137,7 @@ public:
|
|||||||
return rgbSourceModified; // tracks whether cached rgb output of demosaic has been modified
|
return rgbSourceModified; // tracks whether cached rgb output of demosaic has been modified
|
||||||
}
|
}
|
||||||
|
|
||||||
void processFlatField(const procparams::RAWParams &raw, const RawImage *riFlatFile, const float black[4]);
|
void processFlatField(const procparams::RAWParams &raw, const RawImage *riFlatFile, array2D<float> &rawData, const float black[4]);
|
||||||
void copyOriginalPixels(const procparams::RAWParams &raw, RawImage *ri, RawImage *riDark, RawImage *riFlatFile, array2D<float> &rawData );
|
void copyOriginalPixels(const procparams::RAWParams &raw, RawImage *ri, RawImage *riDark, RawImage *riFlatFile, array2D<float> &rawData );
|
||||||
void scaleColors (int winx, int winy, int winw, int winh, const procparams::RAWParams &raw, array2D<float> &rawData); // raw for cblack
|
void scaleColors (int winx, int winy, int winw, int winh, const procparams::RAWParams &raw, array2D<float> &rawData); // raw for cblack
|
||||||
void WBauto(double &tempref, double &greenref, array2D<float> &redloc, array2D<float> &greenloc, array2D<float> &blueloc, int bfw, int bfh, double &avg_rm, double &avg_gm, double &avg_bm, double &tempitc, double &greenitc, float &studgood, bool &twotimes, const procparams::WBParams & wbpar, int begx, int begy, int yEn, int xEn, int cx, int cy, const procparams::ColorManagementParams &cmp, const procparams::RAWParams &raw) override;
|
void WBauto(double &tempref, double &greenref, array2D<float> &redloc, array2D<float> &greenloc, array2D<float> &blueloc, int bfw, int bfh, double &avg_rm, double &avg_gm, double &avg_bm, double &tempitc, double &greenitc, float &studgood, bool &twotimes, const procparams::WBParams & wbpar, int begx, int begy, int yEn, int xEn, int cx, int cy, const procparams::ColorManagementParams &cmp, const procparams::RAWParams &raw) override;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user