Commit Graph
157 Commits
Author SHA1 Message Date
Erik Auerswald adba20dfd9 .gitignore the generated HTML man page 2016-07-31 18:56:37 +02:00
Erik Auerswald a4ebe476a8 improve man page formatting
Option and command parameters shall be printed in bold face. This was
missing for W and H from the dynamic_threshold description.
2016-07-31 17:27:07 +02:00
Erik Auerswald 43580917c6 improve man page regarding dynamic_threshold usage
The dynamic_threshold command interacts in suprising ways with the
default threshold adjustment used by SSOCR. The --absolute-threshold
option usually helps. Mention this in the man page.
2016-07-31 17:23:00 +02:00
Erik Auerswald e375983109 added .o files to .gitignore 2016-04-26 21:44:05 +02:00
Erik Auerswald 6b5a3199de Windows might need .exe extension for binary, mention in INSTALL 2015-03-11 10:00:39 +00:00
Erik Auerswald 5e6f113cdb Change one_ratio default to 3, to make regression tests pass. 2015-02-23 19:20:27 +00:00
Erik Auerswald 55a982e253 use a float for one_ratio comparison, and bump copyright year 2015-02-23 15:52:56 +00:00
Erik Auerswald d0438b0704 Allow --minus-ratio=1
This is needed for one of my regression tests. Because checking the input
to --minus-ratio did not work before 2.16.1, this worked before.
2014-10-29 12:17:52 +00:00
Erik Auerswald b931ce6209 bumped overlooked copyright year 2014-10-27 17:07:14 +00:00
Erik Auerswald cfd6cfd5ea added Steve Meyer to THANKS for reporting the bug fixerd in r145 2014-10-27 15:30:21 +00:00
Erik Auerswald 842cae99e2 bumped version number and copyright year 2014-10-27 09:45:23 +00:00
Erik Auerswald c74bd46a72 imroved debug output for one ratio 2014-10-27 09:36:39 +00:00
Erik Auerswald bbfc6f9184 fix sanity check for option -m, --minus-ratio 2014-10-27 09:35:46 +00:00
Erik Auerswald 04afa48720 Added imlib2-config as explicit requirement to INSTALL. 2014-04-03 11:20:30 +00:00
Erik Auerswald 83f424343f Added -lm to LDLIBS.
The ssocr code itself uses math.h and thus libm. This library has been
linked to via recursive linking or the requirements of Imlib2 before
this commit. According to a report from Arne Wichmann this does not work
in all environments. While I do not know the exact circumstances under
which this problem occurs, adding -lm to the linker step is correct,
because ssocr uses it. It is incorrect to rely on Imlib2 to pull this in.
2014-03-16 17:31:35 +00:00
Erik Auerswald 9865a9ea41 Added new command 'mirror' and bumped version to 2.16.0.
This command enables recognition of Critiano Fontana's images.
2013-12-29 05:29:51 +00:00
Erik Auerswald e09b230ebe Check for existence of rotation value before printing info about using it. 2013-12-29 04:19:29 +00:00
Erik Auerswald 9bc2098079 Fixed GPLv3 file. 2013-12-27 01:45:09 +00:00
Erik Auerswald a8d0c97522 Added Cristiano Fontana <[email protected]> to AUTHORS. 2013-12-27 01:41:50 +00:00
Erik Auerswald 77c1c3b2c9 Bumped version number to 2.15.0 2013-12-27 01:41:07 +00:00
Erik Auerswald 2618998b12 Improved debug output when looking for '1', '.', and '-'. 2013-12-22 15:29:45 +00:00
Erik Auerswald bc7b131cb8 Cosmetics: line length shall be <= 80, no TABs for indentation. 2013-12-22 15:13:33 +00:00
Erik Auerswald 85ea454382 Use variable name 'd' instead of 'i' when iterating over digits. 2013-12-22 15:07:24 +00:00
Erik Auerswald 6b998fc3b3 Followup to Cristiano's patch:
- fix crash with zero height "digits"
- add Cristiano to THANKS
- add new option to man page
2013-12-22 14:57:57 +00:00
Erik Auerswald 6175a6fd6b Added patch from Cristiano Fontana <[email protected]> to recognize
a minus ('-') sign.

The patch fixes a comment typo as well.

After applying this patch, ssocr will crash if it finds a "digit" with
zero height. This will be fixed in the next commit.
2013-12-22 14:35:17 +00:00
Erik Auerswald c48efcdb1e Fixed a comment. 2013-12-22 00:34:05 +00:00
Erik Auerswald d7f57f9dea Fixed spelling in one comment. 2013-12-22 00:24:30 +00:00
Erik Auerswald 8d0cfb60e9 Added Russell Currie <[email protected]> to THANKS file.
"Thanks, I'm happy for you to add me (Russell Currie <[email protected]>)."
Russel reported the floating point exception (division by zero) error
with zero width digits, and even provided patches fixing this.
2013-09-02 19:41:26 +00:00
Erik Auerswald c398203845 Avoid division by zero during recognition of "one" and "decimal point".
Do not divide by digit width or height if it is zero, just skip this
digit during special case recognition of a "one" or a "decimal point".

Currently, the scan line detection will see the following if digit width
or height is zero:
 _
|
|

This results in printing an underscore ('_') character for a not
recognized digit.

Bump version number to 2.14.1 for this bug fix.
2013-09-02 13:47:00 +00:00
Erik Auerswald 04215888a4 Avoid division by zero in debug output.
Do not divide by digit width or height if it is zero, print "NaN" instead
of the ratio normally printed. This concerns debugging output only,
something equivalent is needed for the actual recognition algorithm
as well.
2013-09-02 13:30:46 +00:00
Erik Auerswald 939bb8fab6 Added Tim Fardell <[email protected]> to the THANKS file for
reporting an alternative way to display the digit 9.

He wrote: "yes, please feel free to add me to the THANKS file :-)"
2013-08-05 16:05:26 +00:00
Erik Auerswald 2fbd82e27e Add alternate version of 9 digit (lower horizontal segment not set).
Reported by Tim Fardell.

Bump version number to 2.14.0 for this new feature.
2013-08-04 12:22:44 +00:00
Erik Auerswald 81903f0837 Whitespace cleanup: expanded tabs to 8 spaces. 2013-07-19 21:43:56 +00:00
Erik Auerswald b64af1afe9 Improved debugging output to track down a floating point exception.
The exception happens because an image with height 0 is detected.
2013-07-19 21:42:50 +00:00
Erik Auerswald 971b37308c Fixed dynamic_threshold (broken since "the beginning")
and bumped version number to 2.13.4.

As a result my regression tests using the _broken_ dynamic_threshold fail:

testing images in first2...FAILED
testing images in neu...FAILED
testing images in pics-2005-11-12...FAILED
testing images in schlechte_bilder...FAILED
testing images in new_token_2008-11-07...FAILED
testing images in calc_dyn_thresh...FAILED

But at least I do understand now why dynamic_threshold did not work as I had
expected...I just did not see the error until today.
2013-05-19 19:58:27 +00:00
Erik Auerswald 170f50477e THANKS: added Alan Bates (his email address is already publicly available
on his University's web presence).
2013-01-11 12:02:14 +00:00
Erik Auerswald 558c06f654 INSTALL: added link to ssocr website 2013-01-11 11:20:22 +00:00
Erik Auerswald 961f15dd3f Tweaked heuristic to recognize a decimal point.
Improved related debugging output as well.
2013-01-11 11:03:56 +00:00
Erik Auerswald 5a4e0ef5e0 Added some more Mac OS X compatibility stuff:
- use optimization level -O3, which is supported by both gcc and clang
- removed a set of unnecessary parenthesis
- added info about 'brew' on Mac OS X to INSTALL file

bumped version number to 2.13.3
2013-01-11 10:26:57 +00:00
Erik Auerswald 350a8f6b57 Bumped version number to 2.13.2 2013-01-11 05:38:08 +00:00
Erik Auerswald d540340fbd Fixed verbose message when writing image file to disk:
previous, wrong message:  using debug format for png image
current, correct message: using png format for debug image
2013-01-11 05:37:29 +00:00
Erik Auerswald 03434efeae Check for errors when loading or saving an image with Imlib2.
This relies on the definition of enum _imlib_load_error in Imlib2.h
and might break on different versions of Imlib2, but should be better
than the total lack of error reporting before.

Developed with Imlib2 version 1.4.5 from Debian/Sid:

$ dpkg -l libimlib2-dev
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-=================================
ii  libimlib2-dev  1.4.5-1      i386         Imlib2 development files
2013-01-11 05:30:21 +00:00
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