Automatic detection, traceability and quality control of products are becoming increasingly important tasks across all stages of production. These trends are aided by inexpensive cameras and high-performance computers, which enable the use of image processing technology in more areas than ever before. Image processing has several advantages over visual inspection by humans, especially for quality control purposes. Optical inspection based on image processing can be carried out in a highly repeatable and deterministic manner. Measurements of parts down to the micrometer range, which are almost impossible to perform for humans, can be implemented easily.