Is there an established procedure for programmatically creating a Cycles material to match a physical one? I've started building a procedure for systematically generating a Cycles material and it has evolved into a involved process; So, I wanted to query the community before putting too much effort into it.

My procedure involves taking two photos of a planar surface at two different angles using a flash (and no other external light) and derive a "hardness" value for each color band as well as a surface normal/bump map and a normalized image map.  The procedure is entirely programmatic and I use Python/Numpy/SciPy and PIL to output the property values automatically given two image files.

Googling doesn't find me much but it might be that my Blender vocabulary is not advanced enough.  I only just started using Blender but am fairly knowledgeable in the physics of radiant energy.
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.