27 #include <mln/core/image/image2d.hh>
28 #include <mln/value/int_u8.hh>
29 #include <mln/io/magick/all.hh>
30 #include <mln/data/transform.hh>
31 #include <mln/fun/v2v/rgb_to_luma.hh>
33 #include <scribo/binarization/wolf.hh>
34 #include <scribo/debug/option_parser.hh>
35 #include <scribo/debug/logger.hh>
39 {
"input.*",
"An image." },
40 {
"output.pbm",
"A binary image." },
57 {
"debug-prefix",
"Enable debug image outputs. Prefix image name with that "
58 "given prefix.",
"<prefix>", 0, 1, 0 },
59 {
"k",
"Wolf's formulae parameter",
"<value>", 0, 1,
"0.34" },
60 {
"verbose",
"Enable verbose mode (mute, time, low, medium, full)",
61 "<mode>", scribo::debug::check_verbose_mode, 1,
"mute" },
62 {
"win-size",
"Window size",
"<size>", 0, 1,
"101" },
68 int main(
int argc,
char *argv[])
74 if (!options.parse(argc, argv))
78 if (options.is_set(
"debug-prefix"))
86 unsigned w = atoi(options.opt_value(
"win-size").c_str());
87 double k = atof(options.opt_value(
"k").c_str());