Quality inspection is the checking of manufactured parts to see that they are made to their exact size and without defects. In a factory it is done in two ways. A few parts from each batch are measured precisely in a laboratory. And every item on the line is inspected by cameras and testers.
The reason for two ways is speed against precision. A laboratory machine, a coordinate measuring machine (CMM), can measure a size to a few thousandths of a millimetre, but it takes minutes for one part. A camera on the line, called machine vision, takes a fraction of a second and so can check every item, but it is less exact. A third check, leak testing, tests that a valve, pump or battery case holds pressure.
All three checks depend on the idea of engineering tolerance. Every dimension of a part has an allowed range. For example, a hole may be 10.00 mm wide, plus or minus 0.02 mm. A part within the range passes, and a part outside it is rejected.
Inspection takes place at three points. Incoming inspection checks parts that were bought from suppliers. In-process inspection checks a part between two machining steps, so that a machine that has drifted is corrected early. Final inspection checks the finished product before it is shipped. The earlier a fault is found, the cheaper it is. A bad part found at the first machine costs only the metal. The same part found by a customer costs a recall.
The cameras use computer vision to see defects. The results of all the checks are saved against the part's batch, so that a faulty part can be traced back. This is traceability.
Quality inspection sits next to the production line, but its records go to the MES and to the quality management system.