@@ -60,6 +60,7 @@ static void PrintUsage(const char* exePath)
60
60
#ifdef ZXING_EXPERIMENTAL_API
61
61
<< " -symbol Print the detected symbol (if available)\n "
62
62
<< " -json Print a complete JSON formated serialization\n "
63
+ << " -denoise Use extra denoiseing (closing operation)\n "
63
64
#endif
64
65
<< " -bytes Write (only) the bytes content of the symbol(s) to stdout\n "
65
66
<< " -pngout <file name>\n "
@@ -76,23 +77,20 @@ static void PrintUsage(const char* exePath)
76
77
77
78
static bool ParseOptions (int argc, char * argv[], ReaderOptions& options, CLI& cli)
78
79
{
79
- #ifdef ZXING_EXPERIMENTAL_API
80
- options.setTryDenoise (true );
81
- #endif
82
-
83
80
for (int i = 1 ; i < argc; ++i) {
84
81
auto is = [&](const char * str) { return strlen (argv[i]) > 1 && strncmp (argv[i], str, strlen (argv[i])) == 0 ; };
85
82
if (is (" -fast" )) {
86
83
options.setTryHarder (false );
87
- #ifdef ZXING_EXPERIMENTAL_API
88
- options.setTryDenoise (false );
89
- #endif
90
84
} else if (is (" -norotate" )) {
91
85
options.setTryRotate (false );
92
86
} else if (is (" -noinvert" )) {
93
87
options.setTryInvert (false );
94
88
} else if (is (" -noscale" )) {
95
89
options.setTryDownscale (false );
90
+ #ifdef ZXING_EXPERIMENTAL_API
91
+ } else if (is (" -denoise" )) {
92
+ options.setTryDenoise (true );
93
+ #endif
96
94
} else if (is (" -single" )) {
97
95
options.setMaxNumberOfSymbols (1 );
98
96
} else if (is (" -ispure" )) {
0 commit comments