Skip to content

Commit

Permalink
Autoconf changes for 2.01
Browse files Browse the repository at this point in the history
git-svn-id: https://tesseract-ocr.googlecode.com/svn/trunk@110 d0cd1f9f-072b-0410-8dd7-cf729c803f20
  • Loading branch information
theraysmith committed Aug 30, 2007
1 parent 2f19f0c commit b60c606
Show file tree
Hide file tree
Showing 13 changed files with 76 additions and 34 deletions.
9 changes: 9 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,12 @@ July 02 2007 - V2.00
Added UNLV regression test capability.
Fixed problems with copyright and registered symbols.
Fixed extern "C" declarations problem.
August 27 2007 - V2.01
Fixed UTF8 input problems with box file reader.
Fixed various infinite loops and crashes in dawg code.
Removed include of config_auto.h from host.h.
Added automatic wctype encoding to unicharset_extractor.
Fixed dawg table too full error.
Removed svn files from tarball.
Added new functions to tessdll.
Increased maximum utf8 string in a classification result to 8.
2 changes: 2 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ dist-hook:
# added using EXTRA_DIST. $(distdir)/tessdata would in
# theory suffice.
rm -rf `find $(distdir) -name CVS`
rm -rf `find $(distdir) -name .svn`
rm -rf `find $(distdir) -name .deps`
# Also remove extra files not needed in a distribution
rm -rf `find $(distdir) -name configure.ac`
rm -rf `find $(distdir) -name acinclude.m4`
Expand Down
10 changes: 10 additions & 0 deletions ReleaseNotes
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
Tesseract release notes August 27 2007 - V2.01
Fixed UTF8 input problems with box file reader.
Fixed various infinite loops and crashes in dawg code.
Removed include of config_auto.h from host.h.
Added automatic wctype encoding to unicharset_extractor.
Fixed dawg table too full error.
Removed svn files from tarball.
Added new functions to tessdll.
Increased maximum utf8 string in a classification result to 8.

Tesseract release notes July 17, 2007 - V2.00

First release of the International version.
Expand Down
21 changes: 17 additions & 4 deletions ccmain/tessedit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,21 @@
#include "danerror.h"
#include "globals.h"

/*
** Include automatically generated configuration file if running autoconf
*/
#ifdef HAVE_CONFIG_H
#include "config_auto.h"
// Includes libtiff if HAVE_LIBTIFF is defined
#ifdef HAVE_LIBTIFF
#include "tiffio.h"
#endif
#endif

#ifdef GOOGLE3
#include "third_party/tiff/tiffio.h"
#endif

//extern "C" {
#include "callnet.h" //phils nn stuff
//}
Expand All @@ -68,8 +83,6 @@ EXTERN BOOL_EVAR (tessedit_write_vars, FALSE, "Write all vars to file");
EXTERN BOOL_VAR (tessedit_tweaking_tess_vars, FALSE,
"Fiddle tess config values");

EXTERN INT_VAR (tweak_ReliableConfigThreshold, 2, "Tess VAR");

EXTERN double_VAR (tweak_garbage, 1.5, "Tess VAR");
EXTERN double_VAR (tweak_ok_word, 1.25, "Tess VAR");
EXTERN double_VAR (tweak_good_word, 1.1, "Tess VAR");
Expand All @@ -82,6 +95,7 @@ EXTERN double_VAR (tweak_NonDictCertainty, -2.5, "Tess VAR");
EXTERN double_VAR (tweak_RejectCertaintyOffset, 1.0, "Tess VAR");
EXTERN double_VAR (tweak_GoodAdaptiveMatch, 0.125, "Tess VAR");
EXTERN double_VAR (tweak_GreatAdaptiveMatch, 0.10, "Tess VAR");
EXTERN INT_VAR (tweak_ReliableConfigThreshold, 2, "Tess VAR");
EXTERN INT_VAR (tweak_AdaptProtoThresh, 230, "Tess VAR");
EXTERN INT_VAR (tweak_AdaptFeatureThresh, 230, "Tess VAR");
EXTERN INT_VAR (tweak_min_outline_points, 6, "Tess VAR");
Expand Down Expand Up @@ -142,8 +156,6 @@ int init_tesseract(const char *arg0,

start_recog(configfile, textbase);

ReliableConfigThreshold = tweak_ReliableConfigThreshold;

set_tess_tweak_vars();

if (tessedit_use_nn) //phils nn stuff
Expand Down Expand Up @@ -333,6 +345,7 @@ void set_tess_tweak_vars() {
RejectCertaintyOffset = tweak_RejectCertaintyOffset;
GoodAdaptiveMatch = tweak_GoodAdaptiveMatch;
GreatAdaptiveMatch = tweak_GreatAdaptiveMatch;
ReliableConfigThreshold = tweak_ReliableConfigThreshold;
AdaptProtoThresh = tweak_AdaptProtoThresh;
AdaptFeatureThresh = tweak_AdaptFeatureThresh;
min_outline_points = tweak_min_outline_points;
Expand Down
13 changes: 0 additions & 13 deletions ccmain/tessedit.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,6 @@
#include "pgedit.h"
#include "notdll.h"

// Includes libtiff if HAVE_LIBTIFF is defined
#ifdef HAVE_LIBTIFF
#ifdef GOOGLE3
#include "third_party/tiff/tiffio.h"
#else
#include "tiffio.h"
#endif
#endif

//progress monitor
extern ETEXT_DESC *global_monitor;

Expand All @@ -46,10 +37,6 @@ int init_tesseract(const char *arg0,
void recognize_page(STRING& image_name);
void end_tesseract();

#ifdef _TIFFIO_
void read_tiff_image(TIFF* tif, IMAGE* image);
#endif

//handle for "MODES"
void extend_menu(RADIO_MENU *modes_menu,
INT16 modes_id_base, //mode cmd ids offset
Expand Down
19 changes: 19 additions & 0 deletions ccmain/tesseractmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,25 @@
#include "tfacep.h"
#include "callnet.h"

/*
** Include automatically generated configuration file if running autoconf
*/
#ifdef HAVE_CONFIG_H
#include "config_auto.h"
// Includes libtiff if HAVE_LIBTIFF is defined
#ifdef HAVE_LIBTIFF
#include "tiffio.h"
#endif
#endif

#ifdef GOOGLE3
#include "third_party/tiff/tiffio.h"
#endif

#ifdef _TIFFIO_
void read_tiff_image(TIFF* tif, IMAGE* image);
#endif

#define VARDIR "configs/" /*variables files */
//config under api
#define API_CONFIG "configs/api_config"
Expand Down
4 changes: 2 additions & 2 deletions ccutil/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ include_HEADERS = \
nwmain.h ocrclass.h ocrshell.h platform.h secname.h serialis.h \
stderr.h strngs.h tessclas.h tprintf.h varable.h \
mfcpch.cpp scanutils.cpp scanutils.h unichar.h \
unicharmap.h unicharset.h
unicharmap.h unicharset.h boxread.h

lib_LIBRARIES = libtesseract_ccutil.a
libtesseract_ccutil_a_SOURCES = \
basedir.cpp bits16.cpp clst.cpp debugwin.cpp elst.cpp \
elst2.cpp errcode.cpp globaloc.cpp hashfn.cpp mainblk.cpp \
memblk.cpp memry.cpp ocrshell.cpp serialis.cpp strngs.cpp \
tprintf.cpp varable.cpp unichar.cpp tessopt.cpp \
unicharmap.cpp unicharset.cpp
unicharmap.cpp unicharset.cpp boxread.cpp
11 changes: 0 additions & 11 deletions ccutil/host.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,6 @@
#ifndef __HOST__
#define __HOST__

/*
** Include automatically generated configuration file if running autoconf
*/
#ifdef HAVE_CONFIG_H
#include "config_auto.h"
#if defined(MOTOROLA_BYTE_ORDER) || defined(WORDS_BIGENDIAN)
#define __MOTO__ // Big-endian.
#endif
#endif


/******************************************************************************
** IMPORTANT!!! **
** **
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# ----------------------------------------

AC_PREREQ(2.50)
AC_INIT(tesseract, 2.00, theraysmith@gmail.com)
AC_INIT(tesseract, 2.01, theraysmith@gmail.com)
AC_REVISION($Id: configure.ac,v 1.4 2007/02/02 22:38:17 theraysmith Exp $)
AC_CONFIG_AUX_DIR(config)
AC_CONFIG_SRCDIR(ccmain/tesseractmain.cpp)
Expand Down
11 changes: 11 additions & 0 deletions image/imgtiff.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,17 @@
#else
#include <unistd.h>
#endif

/*
** Include automatically generated configuration file if running autoconf
*/
#ifdef HAVE_CONFIG_H
#include "config_auto.h"
#if defined(MOTOROLA_BYTE_ORDER) || defined(WORDS_BIGENDIAN)
#define __MOTO__ // Big-endian.
#endif
#endif

#include "fileerr.h"
#include "imgerrs.h"
#include "img.h"
Expand Down
3 changes: 2 additions & 1 deletion makemoredists
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ ver=`ls -1rt *[0-9].tar.gz |tail -1`
ver=${ver%.tar.gz}
for l in eng deu fra ita spa nld
do
tar chozf $ver.$l.tar.gz tessdata/$l.*
chmod 644 tessdata/$l.*
tar --group root --owner root -chozf $ver.$l.tar.gz tessdata/$l.*
done
tar chozf $ver.exe.tar.gz $winlist
4 changes: 2 additions & 2 deletions tessdata/configs/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
datadir = @datadir@/tessdata/configs
data_DATA = inter makebox box.train unlv
EXTRA_DIST = inter makebox box.train unlv
data_DATA = inter makebox box.train unlv api_config
EXTRA_DIST = inter makebox box.train unlv api_config
1 change: 1 addition & 0 deletions tessdata/configs/api_config
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tessedit_zero_rejection T

0 comments on commit b60c606

Please sign in to comment.