Converting a pictorial representation of a directed graph to a adjacency matrix
See

Christopher Auer, Christian Bachmaier, Franz-Josef Brandenburg, Andreas Gleißner, Josef Reislhuber:
Optical Graph Recognition.
Graph Drawing 2012, pp. 529-540
http://dx.doi.org/10.1007/978-3-642-36763-2_47