In this paper, problems and solutions for the automatic recognition of miscellaneous materials, especially bulk materials are discussed. The fact that many materials, especially natural materials, have a strong phenotypic variability resulting in high intra-class and low inter-class variability of the calculated features poses a complex recognition problem. The recognition of components of a wheat sample or the classification of mineral aggregates serves as an example to demonstrate different aspects in segmentation, feature extraction, classifier design and complexity assessment. We present a technique for the segmentation of highly overlapping and touching objects into single object images, a proposal for feature selection and classifier parameter optimization, as well as a method to visualise the complexity of a highdimensional recognition problem in a three-dimensional space. Every step of the pattern recognition process needs to be optimized carefully with special attention to the risk of overfitting. Modern processors and the application of field-programmable gate arrays as well as the outsourcing of processing steps to the graphic processing unit speed up the calculation and make real-time computation possible also for highly complex recognition problems such as the quality assurance of bulk materials.