Change didide getrgbloc 10 to 9 - suppress 3 spectral datas

This commit is contained in:
Desmis 2020-03-06 08:53:39 +01:00
parent e63320eec9
commit f6c5bf0a0b
3 changed files with 13 additions and 11 deletions

View File

@ -2408,6 +2408,7 @@ const double ColorTemp::Colorlab_n80_26_spect[97] = {
-0.2047, -0.205, -0.2069, -0.208, -0.2099, -0.21, -0.2115, -0.21, -0.2106, -0.209, -0.2086, -0.2047, -0.205, -0.2069, -0.208, -0.2099, -0.21, -0.2115, -0.21, -0.2106, -0.209, -0.2086,
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0
}; };
/*
//0,1767000 0,2207000 0,3142000 0,5269000 0,7018000 0,7605000 0,7580000 0,7366000 0,7182000 0,6929000 0,6661000 0,6542000 //0,1767000 0,2207000 0,3142000 0,5269000 0,7018000 0,7605000 0,7580000 0,7366000 0,7182000 0,6929000 0,6661000 0,6542000
//0,6420000 0,6085000 0,5752000 0,5728000 0,5723000 0,5318000 0,4982000 0,5226000 0,5670000 0,5929000 0,5977000 0,5975000 //0,6420000 0,6085000 0,5752000 0,5728000 0,5723000 0,5318000 0,4982000 0,5226000 0,5670000 0,5929000 0,5977000 0,5975000
//0,6002000 0,6065000 0,6177000 0,6352000 0,6526000 0,6623000 0,6633000 0,6593000 0,6517000 0,6479000 0,6607000 0,6908000 //0,6002000 0,6065000 0,6177000 0,6352000 0,6526000 0,6623000 0,6633000 0,6593000 0,6517000 0,6479000 0,6607000 0,6908000
@ -2442,7 +2443,7 @@ const double ColorTemp::JDC468_greyf26_156_spect[97] = {
0.2579, 0.26, 0.2653, 0.27, 0.2765, 0.28, 0.2941, 0.30, 0.3126, 0.32, 0.3230, 0.323, 0.3238, 0.32, 0.3189, 0.31, 0.3091, 0.302, 0.3043, 0.31, 0.3200, 0.34, 0.3579, 0.2579, 0.26, 0.2653, 0.27, 0.2765, 0.28, 0.2941, 0.30, 0.3126, 0.32, 0.3230, 0.323, 0.3238, 0.32, 0.3189, 0.31, 0.3091, 0.302, 0.3043, 0.31, 0.3200, 0.34, 0.3579,
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0
}; };
*/
/* /*
* Name: XYZtoCorColorTemp.c * Name: XYZtoCorColorTemp.c
@ -3484,8 +3485,8 @@ void ColorTemp::tempxy(bool separated, int repref, float **Tx, float **Ty, float
J570_NeuQ1_spect, J570_NeuS7_spect, J570_NeuQ1_spect, J570_NeuS7_spect,
J570_NeuV10_spect, J570_NeuW18_spect, J570_NeuZ14_spect, //189 J570_NeuV10_spect, J570_NeuW18_spect, J570_NeuZ14_spect, //189
J570_NeuC18_spect, J570_NeuD17_spect, J570_NeuJ11_spect, J570_NeuL4_spect, Colorlab_n72_n2_spect, J570_NeuC18_spect, J570_NeuD17_spect, J570_NeuJ11_spect, J570_NeuL4_spect, Colorlab_n72_n2_spect,
Colorlab_10_n70_spect, Colorlab_n33_n70_spect, Colorlab_n8_n74_spect, Colorlab_19_n69_spect, Colorlab_n80_10_spect, Colorlab_n80_26_spect, Colorlab_10_n70_spect, Colorlab_n33_n70_spect, Colorlab_n8_n74_spect, Colorlab_19_n69_spect, Colorlab_n80_10_spect, Colorlab_n80_26_spect
JDC468_greyc14_66_spect, JDC468_greym13_325_spect, JDC468_greyf26_156_spect /*JDC468_greyc14_66_spect, JDC468_greym13_325_spect, JDC468_greyf26_156_spect*/
}; };

View File

@ -367,10 +367,11 @@ public:
static const double Colorlab_19_n69_spect[97]; static const double Colorlab_19_n69_spect[97];
static const double Colorlab_n80_10_spect[97]; static const double Colorlab_n80_10_spect[97];
static const double Colorlab_n80_26_spect[97]; static const double Colorlab_n80_26_spect[97];
/*
static const double JDC468_greyc14_66_spect[97]; static const double JDC468_greyc14_66_spect[97];
static const double JDC468_greym13_325_spect[97]; static const double JDC468_greym13_325_spect[97];
static const double JDC468_greyf26_156_spect[97]; static const double JDC468_greyf26_156_spect[97];
*/
static void spectrum_to_xyz_daylight (double _m1, double _m2, double &x, double &y, double &z); static void spectrum_to_xyz_daylight (double _m1, double _m2, double &x, double &y, double &z);
static void spectrum_to_xyz_blackbody (double _temp, double &x, double &y, double &z); static void spectrum_to_xyz_blackbody (double _temp, double &x, double &y, double &z);
static void spectrum_to_xyz_preset (const double* spec_intens, double &x, double &y, double &z); static void spectrum_to_xyz_preset (const double* spec_intens, double &x, double &y, double &z);

View File

@ -4764,7 +4764,7 @@ void RawImageSource::ItcWB(bool extra, double &tempref, double &greenref, double
{12001., 0.960440, 1.601019} {12001., 0.960440, 1.601019}
}; };
const int N_t = sizeof(Txyz) / sizeof(Txyz[0]); //number of temperature White point const int N_t = sizeof(Txyz) / sizeof(Txyz[0]); //number of temperature White point
constexpr int Nc = 203 + 1;//200 number of reference spectral colors, I think it is enough to retrieve good values constexpr int Nc = 200 + 1;//200 number of reference spectral colors, I think it is enough to retrieve good values
array2D<float> Tx(N_t, Nc); array2D<float> Tx(N_t, Nc);
array2D<float> Ty(N_t, Nc); array2D<float> Ty(N_t, Nc);
array2D<float> Tz(N_t, Nc); array2D<float> Tz(N_t, Nc);
@ -5299,8 +5299,8 @@ void RawImageSource::getrgbloc(int begx, int begy, int yEn, int xEn, int cx, int
{ {
// BENCHFUN // BENCHFUN
//used by auto WB local to calculate red, green, blue in local region //used by auto WB local to calculate red, green, blue in local region
const int bfw = W / 10 + ((W % 10) > 0 ? 1 : 0);//10 arbitrary value ; perhaps 4 or 5 or 20 const int bfw = W / 9 + ((W % 9) > 0 ? 1 : 0);//10 arbitrary value ; perhaps 4 or 5 or 20
const int bfh = H / 10 + ((H % 10) > 0 ? 1 : 0); const int bfh = H / 9 + ((H % 9) > 0 ? 1 : 0);
if (! greenloc) { if (! greenloc) {
greenloc(bfw, bfh); greenloc(bfw, bfh);
@ -5350,9 +5350,9 @@ void RawImageSource::getrgbloc(int begx, int begy, int yEn, int xEn, int cx, int
#pragma omp parallel for #pragma omp parallel for
#endif #endif
for (int i = 0; i < bfh; ++i) { for (int i = 0; i < bfh; ++i) {
const int ii = i * 10; const int ii = i * 9;
if (ii < H) { if (ii < H) {
for (int j = 0, jj = 0; jj < W; ++j, jj += 10) { for (int j = 0, jj = 0; j < bfw; ++j, jj += 9) {
redloc[i][j] = red[ii][jj] * multip; redloc[i][j] = red[ii][jj] * multip;
greenloc[i][j] = green[ii][jj] * multip; greenloc[i][j] = green[ii][jj] * multip;
blueloc[i][j] = blue[ii][jj] * multip; blueloc[i][j] = blue[ii][jj] * multip;
@ -5552,8 +5552,8 @@ void RawImageSource::getAutoWBMultipliersitc(double & tempref, double & greenref
if (wbpar.method == "autitcgreen") { if (wbpar.method == "autitcgreen") {
bool twotimes = false; bool twotimes = false;
const int bfw = W / 10 + ((W % 10) > 0 ? 1 : 0);// 10 arbitrary value ; perhaps 4 or 5 or 20 const int bfw = W / 9 + ((W % 9) > 0 ? 1 : 0);// 10 arbitrary value ; perhaps 4 or 5 or 20
const int bfh = H / 10 + ((H % 10) > 0 ? 1 : 0); const int bfh = H / 9 + ((H % 9) > 0 ? 1 : 0);
WBauto(tempref, greenref, redloc, greenloc, blueloc, bfw, bfh, avg_rm, avg_gm, avg_bm, tempitc, greenitc, studgood, twotimes, wbpar, begx, begy, yEn, xEn, cx, cy, cmp, raw); WBauto(tempref, greenref, redloc, greenloc, blueloc, bfw, bfh, avg_rm, avg_gm, avg_bm, tempitc, greenitc, studgood, twotimes, wbpar, begx, begy, yEn, xEn, cx, cy, cmp, raw);
} }