A decimal point (or thousands separator) is recognized by its small size
relative to the digits of the display. It must be counted in the number
of digits to recognize despite being no real digit.
Bumped version number to 2.11.0 as this is a new feature.
All calls to this function have been replaced by calls to make_mono()
with the appropriate luminance type (minimum, red, green, or blue).
This way --foreground / --background work with the commands
{r,g,b,rgb}_threshold as expected.
Problem was "shear" setting background pixels using the specified
--background color, but rgb_threshold() always using the default colors
(foreground black, background white), ognoring the options.
Added a formerly failing test case to the regression tests:
Lauro-LEDs-digits-fore_back
Build on recent Ubuntu systems would fail, because the --as-needed linker
option (enabled by default on these systems) needs a special argument
order for ld to work correctly.
(see http://www.gentoo.org/proj/en/qa/asneeded.xml)
Use LDLIBS instead of LDFLAGS to list needed libraries. See GNU Make docs
and http://www.roland-illig.de/articles/article-1.html for rationale.
Bumped version number to 2.9.8, so I can tell the users having build
problems to upgrade to this version.
This fixes the following compilation error:
cc -Wall -W -Wextra -pedantic -Werror -pedantic-errors -O6 -c -o ssocr.o ssocr.c
ssocr.c: In function ‘main’:
ssocr.c:963:21: error: variable ‘d_width’ set but not used [-Werror=unused-but-set-variable]
cc1: all warnings being treated as errors
make: *** [ssocr.o] Error 1
The compiler is right, the value of d_width is never used, the variable is
not useful and can be removed.
My regression tests all pass. :-)
GCC on Ubuntu 11.04 64-bit produces the following error:
ssocr-2.9.5$ make
cc -Wall -W -Wextra -pedantic -Werror -pedantic-errors -O6 -c -o
ssocr.o ssocr.c
cc1: warnings being treated as errors
ssocr.c: In function ‘main’:
ssocr.c:57:11: error: ‘count’ may be used uninitialized in this function
make: *** [ssocr.o] Error 1
This was reported by Bruce Dudek <bd4465@comcast.net>.
If no input could be read from STDIN a spuriour error message might have
been created by this error.
Bumped the version number to 2.9.6 to reflect the bugfix.
Waiting for Bruce to tell me if I may add his name and email address to the
released THANKS file (the checked in version does contain it both).
the third "third" too short.
This error was detected with a digit "four" of 15 pixels height with a three
pixels thick middle segment.
Since integers are used for computation this is still not very exact and may
still be off by one, at least in some corner cases.
The regression tests now contain the problematic image and pass completely.
below vertical segmentation.
Before this the recognition of a "one" used the image height instead of
the digit height. This kind of worked because for all practical purposes
the image was cropped to leave just the digits.
The debug output of digit coordinates was flawed the same way.
Since now the real height/width ratio is used to recognize a "one" the
empirically determined default value had to be adjusted as well. Using this
value my regression tests are all passed.
Up to glibc 2.06 mkstemp() created files with permission 0666. Later versions
use 0600. POSIX does not specify file permissions for mkstemp, therefore
umask() with mode=077 is called just before calling mkstemp().