Add a small HOWTO about OCR.

Inspired from http://info.iet.unipi.it/~luigi/FreeBSD/dx5050.html

Use REVISION and new DEPENDS.
This commit is contained in:
ajacoutot 2010-07-17 08:13:01 +00:00
parent 8c457a49a9
commit b214e28324
3 changed files with 24 additions and 6 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.4 2009/08/24 07:12:40 ajacoutot Exp $
# $OpenBSD: Makefile,v 1.5 2010/07/17 08:13:01 ajacoutot Exp $
COMMENT-main= OCR Engine developed at HP Labs
COMMENT-de= German language data for tesseract
@ -12,6 +12,7 @@ DISTNAME= tesseract-2.04
CATEGORIES= graphics textproc
PKGNAME-main= ${DISTNAME}
REVISION-main= 0
PKGNAME-de= tesseract-de-2.00
PKGNAME-es= tesseract-es-2.00
PKGNAME-fr= tesseract-fr-2.00
@ -40,10 +41,10 @@ PERMIT_DISTFILES_FTP= Yes
MULTI_PACKAGES= -main -de -es -fr -it -nl -pt
WANTLIB-main= c jpeg m pthread stdc++ z
WANTLIB-main= c jpeg m pthread stdc++ z tiff png
LIB_DEPENDS-main= tiff::graphics/tiff \
png.>=7::graphics/png
LIB_DEPENDS-main= ::graphics/tiff \
::graphics/png
RUN_DEPENDS-de= ::${BASE_PKGPATH}
RUN_DEPENDS-es= ::${BASE_PKGPATH}
@ -73,7 +74,8 @@ post-install:
chown -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/share
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/tesseract
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/tesseract
${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/tesseract
${INSTALL_DATA} ${WRKSRC}/README ${FILESDIR}/README.OpenBSD \
${PREFIX}/share/doc/tesseract
${INSTALL_DATA} ${WRKSRC}/{eurotext.tif,phototest.tif} \
${PREFIX}/share/examples/tesseract

View File

@ -0,0 +1,15 @@
$OpenBSD: README.OpenBSD,v 1.1 2010/07/17 08:13:01 ajacoutot Exp $
OCR with tesseract under OpenBSD
================================
Here's a quick HOWTO about optical character recognition using:
scanimage(1) -- from the sane-backends package
unpaper -- from the unpaper package
convert(1) -- from the ImageMagick package
tesseract
$ scanimage --mode gray --resolution 300 > scan.pnm
$ unpaper -b 0.5 -w 0.8 -l single scan.pnm scan1.pnm
$ convert scan1.pnm scan.tif
$ tesseract scan.tif scan.txt

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST-main,v 1.2 2009/08/24 07:12:40 ajacoutot Exp $
@comment $OpenBSD: PLIST-main,v 1.3 2010/07/17 08:13:01 ajacoutot Exp $
@bin bin/cntraining
@bin bin/mftraining
@bin bin/tesseract
@ -272,6 +272,7 @@ lib/libtesseract_viewer.a
lib/libtesseract_wordrec.a
share/doc/tesseract/
share/doc/tesseract/README
share/doc/tesseract/README.OpenBSD
share/examples/tesseract/
share/examples/tesseract/eurotext.tif
share/examples/tesseract/phototest.tif