scribo binarization sauvola: passing k
I believe I have found 2 bugs in how the binarization CLIs for Sauvola's method pass on the given values for the k
parameter:
For sauvola-ms-fg
(implemented in sauvola_ms_fg.cc and sauvola_ms.hh), the problem is that --all-k
is always ignored, because the defaults --k2 0.2 --k3 0.3 --k4 0.5
take precedence. (In the opt_desc
table, they all have defaults, which the option_parser
cannot distinguish from is_set()
.)
For sauvola-ms-split
(implemented in sauvola_ms_split.cc and sauvola_ms_split.hh), the problem is that all k parameters (--all-k
/ --k2
/ --k3
/ --k4
) are always ignored, because the (4-valued) sauvola_ms_split
implementation does not keep the settings (as in the other implementations), but delegates to the (5-valued) sauvola_ms_split
with an all-k default, which in turn delegates to the (7-valued) sauvola_ms_split
with that value.