Items made of wood with painted surfaces are produced in large volumes. However, painting plain wooden surfaces often gives rise to defects causing a high rate of rejects. Defects, such as cracks, pits or blisters, so far have been detected manually by visual inspection. That technique has drawbacks mainly with respect to time and quality. In addition, manual inspection only allows random samples to be taken, as painting lines are run at relatively high speeds. This means that defective products may escape detection and be delivered to trade. We have developed a system for automatic visual inspection of painted wood surfaces resulting in faster detection of defects, making findings reproducible and, in addition, allowing the defects found to be classified. Reliable pinpointing and specific repair of the causes of defects are possible. For this purpose, a CCD camera is combined with an individually controllable lighting system in a test rig. The light source needs to be varied because some defects can only be detected under a specific incidence of light with shadow casting. A series of images are taken whose single frames show the piece of wood under different angles of illumination. The data gets analyzed by a combination of detection methods. Every single frame is compared to the reference image. In addition, the defects are classified in a second approach. This is based on training the system by means of a learning database containing complete information about defective and non-defective surfaces of various types of wood. The series of images are checked for quality. When a defect occurs, that furniture item can automatically be sorted out on the painting line. The method works reliably even in those cases where the grain is visible through the paint, for instance, with transparent paint coats. The system is currently being developed further into a prototype for industrial use.