I have a matrix with data of a topography, let's say several hills. I want to have information of the angle of each data point to the vertical line. Here are two examples:
- If I consider a place near the foot of the hill that is totally flat, I have a degree of 90° (90° to the vertical line).
- If I am at the steepest point of the hill, I have a lower angle of let's say 50°.
To compute this I guess I have to to connect all the topography data so that (at least) three near pixels form triangle. After that I have to compute the angle(s) of this triangle.
Can I use a existing algorithm?