I'm not well read on the topic so I might be talking out of my ear, but this is the sort of thing I'm anticipating getting more and more powerful over time: http://users.soe.ucsc.edu/~milanfar/talks/milanfar.pdf (jump to page 23 if you want to see demos of the algorithm)
http://www.scriptol.com/programming/graphic-algorithms.php
edit: grammar