IN a preprocessing step you could do a connected component analysis (
https://en.wikipedia.org/wiki/Connected_component_labeling)
and then filter out all blobs that have an aspect ratio larger than, say, 20 to 1 or something like that. That should be quite efficient if the
lines are not skewed. Since Tesseract already uses leptonica you probably also want to use that library to find the connected components
(see conncomp.c)
.