While AOI seems quite common for professional manufacturers, at least according to the Wikipedia Page about it, I could not find any open projects doing it. Is anyone aware of open hard- or software for AOI?
These might help you get started
https://www.apertus.org/diy-flying-probe-AOI
http://www.eevblog.com/forum/reviews/are-there-any-diy-automated-optical-inspection-(aio)-solutions-available/
https://code.google.com/archive/p/pcb-inspector/