I want to automatically divide an image of ancient handwritten text by lines (and by words in future).
IMHO with the image shown that would be so hard to do 100% perfectly. My answer is to give you alternate idea's.
Idea 1: Make your own version of ReCaptcha (to put on your very own pron site) - and make it a fun game.. "Like cut out a word (edges should all be white space - with some tolerance for overlapping chars on above and below lines)."
Idea 2: This was a game we played as kids, the wire of a coat hanger was all bent in waves and connected to a buzzer and you had to navigate a wand with a ring in the end with the wire through it, across one side to the other without making the buzzer go off. Perhaps you could adapt this idea and make a mobile game where people trace out the lines without touching black text (with tolerance for overlapping chars)... when they can do a line they get points and get to new levels where you give them harder images..
Idea 3: Research how google/recaptcha got around it
Idea 4: Get the SDK for photoshop and master the functionality of it Extract Edges tool
Idea 5: Stretch the image heaps on the Y Axis which should help, apply the algorithm, then reduce the location measurements and apply them on the normal sized image.