From 33424e7e1dffdf379fc20f58fb9c491b4c76f59a Mon Sep 17 00:00:00 2001 From: Emil Martinec Date: Tue, 8 May 2012 15:33:21 -0500 Subject: [PATCH] Minor bugfix for AutoExposure --- rtengine/improcfun.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index 4bdc4e68e..2d93a79b1 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -678,7 +678,7 @@ fclose(f);*/ median++; count += histogram[median]; } - if (median==0) {//probably the image is a blackframe + if (median==0 || ave<1) {//probably the image is a blackframe expcomp=0; black=0; bright=0; @@ -775,7 +775,6 @@ fclose(f);*/ shc <<= histcompr; //prevent division by 0 - if (ave<1) return; if (lodev==0) lodev=1; //compute exposure compensation as geometric mean of the amount that