Fixes issue #60
This commit is contained in:
parent
ed833132d5
commit
26d2402655
1 changed files with 1 additions and 1 deletions
|
@ -216,7 +216,7 @@ static uint8_t otsu(const struct quirc *q)
|
|||
const double m2 = ((double)sum - sumB) / q2;
|
||||
const double m1m2 = m1 - m2;
|
||||
const double variance = m1m2 * m1m2 * q1 * q2;
|
||||
if (variance > max) {
|
||||
if (variance >= max) {
|
||||
threshold = i;
|
||||
max = variance;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue