The Math
Let g(z) be the discrete inverse response function
For each pixel site i in each image j, want:
Solve the over-determined linear system:
fitting term
smoothness term