Spot white balance sometimes failes, fixes #4589
This commit is contained in:
parent
d03907bcf8
commit
9889f878aa
@ -5212,7 +5212,7 @@ ColorTemp RawImageSource::getSpotWB (std::vector<Coord2D> &red, std::vector<Coor
|
||||
gloc /= std::max(1, gnbrs);
|
||||
bloc /= std::max(1, bnbrs);
|
||||
|
||||
if (rloc * initialGain < 64000. && gloc * initialGain < 64000. && bloc * initialGain < 64000.) {
|
||||
if (rloc < clmax[0] && gloc < clmax[1] && bloc < clmax[2]) {
|
||||
reds += rloc;
|
||||
greens += gloc;
|
||||
blues += bloc;
|
||||
@ -5248,7 +5248,7 @@ ColorTemp RawImageSource::getSpotWB (std::vector<Coord2D> &red, std::vector<Coor
|
||||
gloc /= std::max(gnbrs, 1);
|
||||
bloc /= std::max(bnbrs, 1);
|
||||
|
||||
if (rloc * initialGain < 64000. && gloc * initialGain < 64000. && bloc * initialGain < 64000.) {
|
||||
if (rloc < clmax[0] && gloc < clmax[1] && bloc < clmax[2]) {
|
||||
reds += rloc;
|
||||
greens += gloc;
|
||||
blues += bloc;
|
||||
@ -5284,7 +5284,7 @@ ColorTemp RawImageSource::getSpotWB (std::vector<Coord2D> &red, std::vector<Coor
|
||||
gloc /= std::max(gnbrs, 1);
|
||||
bloc /= std::max(bnbrs, 1);
|
||||
|
||||
if (rloc * initialGain < 64000. && gloc * initialGain < 64000. && bloc * initialGain < 64000.) {
|
||||
if (rloc < clmax[0] && gloc < clmax[1] && bloc < clmax[2]) {
|
||||
reds += rloc;
|
||||
greens += gloc;
|
||||
blues += bloc;
|
||||
|
Loading…
x
Reference in New Issue
Block a user