Commit Graph
115 Commits
Author SHA1 Message Date
Erik Auerswald 3357afec00 Makefile: use imlib2-config --libs for LDLIBS.
This should improve compatibility for systems with Imlib2 installed
in non-standard places, e.g. Mac OS X.

On Debian GNU/Linux this results in some warnings when building a .deb:

dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/ssocr/usr/bin/ssocr was not linked against libdl.so.2 (it uses none of the library's symbols)
dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/ssocr/usr/bin/ssocr was not linked against libz.so.1 (it uses none of the library's symbols)
dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/ssocr/usr/bin/ssocr was not linked against libX11.so.6 (it uses none of the library's symbols)
dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/ssocr/usr/bin/ssocr was not linked against libfreetype.so.6 (it uses none of the library's symbols)
dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/ssocr/usr/bin/ssocr was not linked against libXext.so.6 (it uses none of the library's symbols)

I'm ignoring this. Special local adaptations like this have no place in
a general build system. A dedicated Debian package might apply a local patch
to strip these dependencies. This could result in a non-working ssocr as
at least libdl is actually needed by Imlib2 to load images.
2013-01-11 04:23:07 +00:00
Erik Auerswald d51eb5494d Replaced 'date -I' by 'date +%Y-%m-%d' to improve portability.
FreeBSD and Mac OS X don't know 'date -I', but do know 'date +%F' with
'%F' equivalent to '%Y-%m-%d'. POSIX knows neither '-I' nor '%F', but
just '%Y-%m-%d', so use the latter.

Problem reported by Alan Bates <[email protected]>.
2013-01-11 04:03:45 +00:00
Erik Auerswald 7d0914bc2e svn:ignore generated file debian/changelog 2013-01-10 09:18:04 +00:00
Erik Auerswald 66953f5330 Added ssocr-?.??.? and *.tmp to svn:ignore. 2013-01-10 09:15:32 +00:00
Erik Auerswald d710fe151c Bumped version number to 2.13.1 for .deb build fix. 2013-01-10 09:06:28 +00:00
Erik Auerswald 16bcc37f78 Bumped copyright years to 2004-2013. 2013-01-08 16:56:37 +00:00
Erik Auerswald 35b5389b63 Makefile: add dependency on Makefile for basic components.
This way changing somethin in the Makefile, e.g. LDFLAGS, results
in a rebuild without the need for a previous 'make clean'.
2013-01-08 16:52:43 +00:00
Erik Auerswald 62b881988d Makefile: debian/rules needs to be executable. 2013-01-08 16:28:51 +00:00
Erik Auerswald a0a6adb809 Makefile: do not set execute permission on files in tar archive. 2012-11-11 20:16:49 +00:00
Erik Auerswald 73d7d697c2 Added auto-detection of number of digits in seven segment display.
Instead of specifying the excat number of digits in the display, use
--digits -1 to have ssocr auto-detect the number of digits. When this
is used, ssocr cannot check if the correct number of digits has been
recognized.

Bumped version number to 2.13.0 to indicate a new feature.
2012-11-04 17:24:21 +00:00
Erik Auerswald cb107ace5b Don't accept -d, --digits 0, as this would result in writing to
unallocated memory.
2012-11-04 16:36:43 +00:00
Erik Auerswald f95d723da7 Moved allocation of memory for seven segment digits after image
processing stage.
2012-11-04 16:31:58 +00:00
Erik Auerswald 7141e50e77 Removed useless double initialization of digits[] array. 2012-11-04 16:26:00 +00:00
Erik Auerswald e5b601ca2d Bumped version number to 2.12.0. 2012-11-03 23:44:28 +00:00
Erik Auerswald 7db35c103f Added two comments (see diff). 2012-11-03 23:24:01 +00:00
Erik Auerswald e0cad46f58 Added recognition of hex digits A, b, C, c, d, E, F. 2012-11-03 23:15:47 +00:00
Erik Auerswald a3b51a8705 Added Carlos A. Neves to THANKS file for suggesting recognition of a
decimal point between seven segment digits.
2012-11-03 23:00:19 +00:00
Erik Auerswald c9261c2fea Added recognition of decimal points.
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.
2012-11-03 18:37:44 +00:00
Erik Auerswald cd8a75a3bd Use '_' instead of '.' as a first step towards recognizing the decimal
point (or decimal comma, depending on locale) of, e.g., a scale.
2012-11-03 17:54:28 +00:00
Erik Auerswald f43e3e2aaa Added _FORTIFY_SOURCE checks (affects just strcat() currently). 2012-07-15 18:11:35 +00:00
Erik Auerswald 1d8e788e93 Removed function rgb_threshold() from imgproc.[ch].
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
2012-07-13 17:03:43 +00:00
Erik Auerswald fbd00e8c96 Removed left-over debugging output. 2012-07-13 16:15:53 +00:00
Erik Auerswald dc70232167 Use extern global variables for ssocr_foreground / ssocr_background. 2012-07-13 16:14:57 +00:00
Erik Auerswald 3cc50515b3 Added ASCII art output of recognized segments to debug info. 2012-07-12 19:38:40 +00:00
Erik Auerswald 460d1bb540 Made "alternate seven" define more concise. 2012-07-12 18:27:51 +00:00
Erik Auerswald f66d25f978 Bumped version number to 2.10.0.
The new feature in this version is the INSTALL file.
I'm releasing this version in a moment.
2012-07-10 17:48:56 +00:00
Erik Auerswald 4caf2faf18 Added INSTALL file, installed to documentation directory. 2012-07-10 17:43:50 +00:00
Erik Auerswald f9c962219c Bumped version number to 2.9.9 [and released it]. 2012-06-10 20:04:06 +00:00
Erik Auerswald 9041d7d41b Fixed off-by-one error in shear operation.
One pixel per line was left unchanged.
2012-06-10 17:07:17 +00:00
Erik Auerswald 5a06da1133 Build fix for Ubuntu 11.10 and newer.
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.
2012-05-15 17:47:42 +00:00
Erik Auerswald c81562116d Bump version number to 2.9.7 (already released). 2012-05-15 17:25:52 +00:00
Erik Auerswald 5c6fab5617 Removed unused variable d_width from ssocr.c (spotted by GCC).
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. :-)
2012-02-17 20:55:42 +00:00
Erik Auerswald 4051038571 Added Jörg Mayer to the THANKS file. 2012-02-16 14:43:24 +00:00
Erik Auerswald a45d5cd5d8 Bump copyright to 2004-2010,2012. 2012-02-16 08:58:31 +00:00
Erik Auerswald 19d4ffc45f Fixed an unitialized variable error:
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 <[email protected]>.

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).
2012-02-15 15:51:49 +00:00
Erik Auerswald dcf38657ab Added archives and temporary directory to svn:ignore list. 2010-06-08 19:16:47 +00:00
Erik Auerswald 51933261bf Added ATUTHORS, COPYING and THANKS files to .tar.bz2 and .deb archives.
Bumped version number to 2.9.5.
2010-06-08 19:13:51 +00:00
Erik Auerswald 5bd1f54b5d Updated copyright statement. 2010-06-08 11:59:09 +00:00
Erik Auerswald 147e71b685 Bumped version number to 2.9.4. 2010-06-08 10:51:32 +00:00
Erik Auerswald f96121c7ba Added THANKS file to honour contributors. 2010-06-08 10:40:17 +00:00
Erik Auerswald 39ed406c47 Added alternate form of digit seven.
Reported and code provided by Francesco Iovine <[email protected]>.
2010-06-08 10:35:35 +00:00
Erik Auerswald 628ffb803e Fixed typo (direcotory -> directory). 2010-03-18 11:16:43 +00:00
Erik Auerswald 12a5408733 Bump version number to 2.9.3 (and make bugfix release). 2009-09-07 15:26:20 +00:00
Erik Auerswald 4166a962e2 Ignore generated manual page ssocr.1. 2009-09-06 16:18:52 +00:00
Erik Auerswald 26366b45a7 Correct off-by-one error in vertical scanline. The first "third" was too long,
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.
2009-09-06 16:14:10 +00:00
Erik Auerswald ac06b833c3 Move recognition of digit "one" and debug output with digit coordinates
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.
2009-09-06 15:57:44 +00:00
Erik Auerswald 175e05a29b Correction of .PHONY entry in Makefile. 2009-08-17 11:57:48 +00:00
Erik Auerswald 11a7c54f6b Bump version number to 2.9.2 2009-08-15 14:10:37 +00:00
Erik Auerswald cba330b81f Correct a comment (copy&paste error). 2009-08-11 09:42:08 +00:00
Erik Auerswald 3be6d19137 Document use of - as output filename. 2009-08-11 08:33:35 +00:00