http://omr-ai.sourceforge.net/ described how to use MySQL and PHP for OMR. The PHP scripts were very much dependent on scanned page size and resolution.
I have written the OMR page format and PHP scripts which are more flexible in nature. This script used horizontal and vertical guides to identify area to be analysed for MCQ answer checking and also identify and correct tilt. It is tailor made for A4 page size, but resolution can be varied with little impect on results.
The answer page...