A compact and noncontact sensor using the self-mixing interference inside a semiconductor laser is designed to classify moving surfaces. An artificial neural network is employed for the data processing. The results indicate more than 92% correct classification for eight different surfaces of different materials, different manufacturing methods and different surface roughnesses. The accuracy of the system is restricted by the localized irregularities on the surface and the mechanical instabilities of the carrying stage over which the surfaces are placed. © 2001 Society of Photo-Optical Instrumentation Engineers.