Tuesday 1 April 2014

Data Glitch

The past few days, readings have been sparse. The OCR program was crashing out, and I didn't have time to see why.


I finally got a look a few moments ago and immediately noticed why: one of the elements of the OCR program is the ability to define 'validation mappings' for each character. In other words, this combination of elements lit up equals character X. I had originally allocated for 12 validation mappings per character; but recently I realized that the OCR program could actually do error-corrections: if a certain pixel is added to or removed from certain characters, a distinctive pattern appears. So why not harness that and make the OCR progra much more fault-tolerant. Well, it turned out that in adding the additional mappings, I overshot the limit of 12. Easy fix; five minutes.


The lesson to be learned here? Always allocate amply for your data needs.