Non-transitory computer readable storage media containing computer-readable programming instructions which, when read and executed by a computer system, cause the computer system to compute the specular roughness of each point on a surface of an object based on images of the surface of the object, each of the surface of the object while illuminated at a different time by a different illumination pattern, each illumination pattern illuminating the surface from a plurality of different directions and forming an intensity gradient having an order of no more than two.