A method of processing substrate materials, such as mushroom compost, for growing mushrooms. A surface of an amount of substrate material is imaged, e.g., using spectral imaging techniques, to obtain imaging data and a qualitative parameter of the substrate material, such as the degree of mycelial colonization or colonization by contaminant fungi, such as green mould, is determined on basis of the imaging data.