In this work, we present a new direct approach to automatic fabric inspection based on an optical acquisition system and an artificial neural network (ANN) to analyze the acquired data. Defect detection and classification are based both on gray levels and 3D range profile data of the sample. These patterns are simultaneously fed into a feed-forward neural network without further transformation. The ANN is trained to classify three different categories: normal fabric, defect with a marked 3D component, and defect with no 3D component. The good classification rate obtained shows that the double set of patterns acquired basically includes relevant information on the textile sample. Since no further transformation of the data is needed before classification, the response of this system can be very fast and thus suitable for on-line monitoring of fabric defects at a high inspection rate.Defect detection and classification is a key requirement of quality control and assessment in many industrial productions, particularly in the textile industry. Visual evaluations by human vision can be subjective and inefficient, and therefore in some cases not very reliable.An industrial need for objective, automatic evaluation methods has emerged in the last years. Systems based on artificial neural networks (ANN) [7,20] have proven to be powerful tools for many different recognition and classification tasks [3,6,9,16]. In several recent works, the ANN approach has been used to classify textile samples into specific categories [1,5,15,19], to model pressure drops through fabrics [2], and to inspect fabric defects [4. 8, 13. 17, 18]. In the latter case, an optical image of the defective area is acquired, and the data are further processed to extract specific features, which are then transmitted to the ANN for classification. This feature-extraction step is necessary to improve the performance of the ANN classifier, where training with the raw optical data would be rather inefficient and would negatively affect the classification rate. However, the basic use and application of such ANN classifiers should be real-time monitoring of fabrics, where the overall system response should be as fast as possible, in order to process a large number of samples in a short time.The response of a trained ANN is usually immediate, while the feature extraction step could be rather complex and slow down the overall classification. We test the possibility of defect detection and classification with an ANN working on raw optical data; this direct analysis is made possible by the characteristics of the image acquisition system, based on a combination of sophisticated optical sensors and digital processors mounted on the camera, which allow fast. simultaneous acquisition of different optical parameters from the sample. In particular we consider the gray levels and 3D range profile data as input parameters. The latter contain three-dimensional profiles of the sample, which yield a great deal of information related to weaving characteristics along the direc...