|
@ -72,16 +72,16 @@ public: |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if(n > 100) { |
|
|
|
|
|
const double average = cumulative / (double)n; |
|
|
const double average = cumulative / (double)(width*height); |
|
|
power[i] = -2.5/log(average/(double)max_int[i]); |
|
|
power[i] = -2.5/log(average/(double)max_int[i]); |
|
|
if(power[i] < 0) |
|
|
if(power[i] < 0) { |
|
|
power[i] = 1; |
|
|
|
|
|
} else { |
|
|
|
|
|
power[i] = 1; |
|
|
power[i] = 1; |
|
|
|
|
|
LogInfo("negative power\n"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if(n <= width) { |
|
|
|
|
|
|
|
|
if(n < width) { |
|
|
LogInfo("not enough data\n"); |
|
|
LogInfo("not enough data\n"); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|