Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Makefile for batch OCR
CONVERT = convert
IMFLAGS = -verbose -colorspace gray -median 3x3 -resize 300% -blur 10
TESSERACT = tesseract
RM = rm
SRCS = $(wildcard *.pbm)
INTERMEDIATES = ${SRCS:.pbm=.tiff}
RESULTS = ${SRCS:.pbm=.txt}
.PHONY: all
all: $(RESULTS)
%.tiff: %.pbm
%.txt: %.tiff
$(TESSERACT) $< $(basename $@) -l deu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment