Calculating depth image from surface normal images, confused about integration/summation algorithm

708 Views Asked by At

(Originally posted in Stack Overflow, re-posting here since my question's probably a better fit here)

I'm going through Forsyth/Ponce and working through their reading on recreating a depth map from surface normals. The idea is that you do summation of partial derivatives across a path to calculate the shape, as explained in the textbook: enter image description here

enter image description here

In the integration section, it goes over one "path" of calculating the depth map using the surface normal partial derivative matrices. It's been a while since I've done multivariate calculus, so my confusion is on why this specific integration represents one path, and how I can generate other paths with these same partial derivative matrices? I.e., what would another path look like (e.g. would I do a cumulative sum down the first two columns, then sum across all the rows?) Based on the line integral, the surface doesn't depend on the choice of the curve; I'm just not sure what this means in terms of the discrete summation using the partial derivatives.

Any help would be appreciated!