The goal is to create a solution for automatically analyzing image of the AXIOM Beta PCBs we produce in various stages of assembly/production.
Very often the method is to compare areas of a known good reference image to an unknown PCB and report areas with differences (where match is below threshold).
Images are typically scanned with a flatbed scanner where physical DPI is known or photographed where exact camera distance is unknown but PCB dimensions are known.
A first step to preprocess an image for further matching analysis is properly aligning the PCB (rotation/scaling).
PCBs typically have so called fiducials (optical markers) with known location on the PCBs (these coordinates are supplied):