An automatic optical printed circuit board inspection machine will be described which provides considerable improvements on existing methods of PCB inspection and testing. The machine can detect breaks, nicks, shorts, pinholes, inadequate track clearances, inadequate track widths and holes which are undersized, oversized, missing or not concentric with the pad. It can be used in a non‐comparison mode to detect small defects in boards or photographic negatives, and can also be used in a comparison mode to provide a complete functional test of a board similar to that provided by a bed‐of‐nails tester, but with improved detection of marginal faults. The board is optically scanned and the resulting large amounts of data are reduced by special hardware and software techniques which allow rapid throughput and virtually eliminate ‘false alarms’ caused by lettering, logos, dust specks etc. which do not affect the functionality of the board. This technique differs considerably from the ‘Feature recognition’ and the ‘Comparison’ techniques at present employed in automatic optical PCB inspection. Operation of the machine is very simple as the board does not need to be accurately positioned, and a simple ‘good/bad’ indication is provided as well as more detailed defect location information.