<p>Breaking up text into individual characters is not as easy as it sounds at first. You can try to find some rules and manipulate the image by that, but there will be just too many exceptions. For example you can try to find disjoint marks, but the fourth one in your image, <strong><em>0715</em></strong> has it's "5" broken up into three pieces, and the 9<sup>th</sup> one, <strong><em>17.00</em></strong> has the two zeros overlapping.</p>

<p>You are very lucky with the horizontal lines - at least it's easy to separate different entries. But you have to come up with a lot of ideas related to semi-fixed character width, a "soft" disjointness rule, etc.</p>

<p>I did a project like that two years ago and we ended up using an external open source library called <a href="https://github.com/tesseract-ocr/tesseract" rel="nofollow noreferrer">Tesseract</a>. Here's <a href="https://arxiv.org/ftp/arxiv/papers/1003/1003.5898.pdf" rel="nofollow noreferrer">this article</a> of <strong><em>Roman</em></strong> numerals recognition with it, up to about 90% accuracy. You might also want to look into the <a href="http://lipitk.sourceforge.net/lipi-toolkit.htm" rel="nofollow noreferrer">Lipi Toolkit</a>, but I have no experience with that.</p>

<p>You might also want to consider to just train a network to recognize the four digits at once. So the input would be the whole field with the four handwritten digits and the output would be the four numbers. And let the network sort out where the characters are. If you have enough training data, that's probably the easiest approach.</p>

<p><strong>EDIT:</strong>
Inspired by @Link's answer, I just came up with this idea, you can give it a try. Once you extracted the area between the two lines, trim the image to get rid of white space all around. Then make an educated guess about how big the characters are. Use maybe the height of the area? Then create a sliding window over the image, and run the recognition all the way. There will most likely be four peaks which would correspond to the four digits.</p>
Splitting up digits in images
<p>I've gotten access to a lot of reports which are filled out by hand. One of the columns in the report contains a timestamp, which I would like to attempt to identify without going through each report manually.</p>

<p>I am playing with the idea of splitting the times, e.g. 00:30, into four digits, and running these through a classifier trained on MNIST to identify the actual timestamps.</p>

<p>When I manually extract the four digits in Photoshop and run these through an MNIST classifier, it works perfectly. But so far I haven't been able to figure out how to programatically split the number sequences into single digits. I tried to use different types of countour finding in OpenCV, but it didn't work very reliably.</p>

<p>Any suggestions?</p>

<p>I've <a href="https://i.stack.imgur.com/CpAyE.jpg" rel="nofollow noreferrer">added a screenshot</a> of some of the relevant columns in the reports.</p>