Analyzing paper-based election ballots requires finding all marks added to the base ballot. The position, size, shape, rotation and shade of these marks are not known a priori. Scanned ballot images have additional differences from the base ballot due to scanner noise. Different image processing techniques are evaluated to see under what conditions they are able to detect what sorts of marks. Basing mark detection on the difference of raw images was found to be much more sensitive to the mark darkness. Converting the raw images to foreground and background and then removing the form produced better results.
Barney Smith, Elisa H.; Nagy, George; and Lopresti, Daniel. (2009). "Mark Detection from Scanned Ballots". Proceedings of SPIE, 72470P. http://dx.doi.org/10.1117/12.806468