30 #include <mln/core/image/image2d.hh>
31 #include <mln/value/int_u8.hh>
32 #include <mln/io/magick/all.hh>
33 #include <mln/data/transform.hh>
34 #include <mln/fun/v2v/rgb_to_luma.hh>
35 #include <scribo/binarization/kim.hh>
36 #include <scribo/debug/option_parser.hh>
37 #include <scribo/debug/logger.hh>
42 {
"input.*",
"An image." },
43 {
"output.*",
"A binary image." },
60 {
"debug-prefix",
"Enable debug image outputs. Prefix image name with that "
61 "given prefix.",
"<prefix>", 0, 1, 0 },
62 {
"k",
"Sauvola's formulae parameter",
"<value>", 0, 1,
"0.34" },
63 {
"verbose",
"Enable verbose mode (mute, time, low, medium, full)",
64 "<mode>", scribo::debug::check_verbose_mode, 1,
"mute" },
65 {
"win-size",
"Window size at scale 1",
"<size>", 0, 1,
"101" },
69 int main(
int argc,
char *argv[])
72 using namespace scribo;
76 if (!options.parse(argc, argv))
80 if (options.is_set(
"debug-prefix"))
90 unsigned w_1 = atoi(options.opt_value(
"win-size").c_str());
91 double k = atof(options.opt_value(
"k").c_str());
94 <<
" - k=" << k << std::endl;