fixed bug in threshold filter
This commit is contained in:
parent
e36e8e8a0e
commit
698749a8bc
1 changed files with 3 additions and 3 deletions
|
@ -40,9 +40,9 @@ Result * Threshold::applyInternal(Image *img)
|
|||
}
|
||||
|
||||
if (type == ADAPTIVE_GAUSS)
|
||||
adaptiveThreshold(m, m, 0xff, ADAPTIVE_THRESH_GAUSSIAN_C, method, size, c);
|
||||
adaptiveThreshold(m, m, 0xff, ADAPTIVE_THRESH_GAUSSIAN_C, threshMethod, size, c);
|
||||
else if (type == ADAPTIVE_MEAN)
|
||||
adaptiveThreshold(m, m, 0xff, ADAPTIVE_THRESH_MEAN_C, method, size, c);
|
||||
adaptiveThreshold(m, m, 0xff, ADAPTIVE_THRESH_MEAN_C, threshMethod, size, c);
|
||||
else {
|
||||
int mode;
|
||||
switch (type) {
|
||||
|
@ -51,7 +51,7 @@ Result * Threshold::applyInternal(Image *img)
|
|||
default: mode = 0;
|
||||
}
|
||||
|
||||
double ret = threshold(m, m, value, 0xff, mode | method);
|
||||
double ret = threshold(m, m, value, 0xff, mode | threshMethod);
|
||||
return new DoubleResult("tresh", ret);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue