Is there an established procedure for programmatically creating a Cycles material to match a physical one?
CrazyBump comes very close.  Just open a photograph and it'll make a pretty good guess at the bump/normal map as well as the specularity map and occlusion map.  There is some manual tuning available, but the initial guess is quite good.