Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

finding saddle points in 3d heightmap

Given a 3d heightmap (from a laser scanner), how do I find the saddle points?

I.e. given something like this:

height profile

I am looking for all points where the curvature is positive in one direction and negative in the other.

(These directions should not need to be aligned with the X and Y axis. I know how to check whether the curvature in X direction has the opposite sign as the curvature in Y direction, but that does not cover all cases. To make matters worse, the resolution in X is different from the resolution in Y)

enter image description here

Ideally I am looking for an algorithm that can tolerate some amount of noise and only mark "significant" saddle points.

like image 429
HugoRune Avatar asked Aug 08 '12 16:08

HugoRune


People also ask

How do you calculate saddle points?

Method of Finding of Saddle PointsDetermine the critical points (a, b) such that the partial derivatives fx(a, b) = fy(a, b) = 0. Discard those points for which any of the partial derivatives does not exist. Calculate the discriminant D = fxx(a, b) fyy (a, b) – [fxy(a, b)]2 for each critical point.

Can gradient descent escape saddle points?

Although gradient descent (GD) almost always escapes saddle points asymptotically [Lee et al., 2016], this paper shows that even with fairly natural random initialization schemes and non-pathological functions, GD can be significantly slowed down by saddle points, taking exponential time to escape.

What is saddle point in operation research?

Definition (Saddle point). In a zero-sum matrix game, an outcome is a saddle point if the outcome is a minimum in its row and maximum in its column.

Are saddle points critical points?

Examples. In a two-player zero sum game defined on a continuous space, the equilibrium point is a saddle point. For a second-order linear autonomous system, a critical point is a saddle point if the characteristic equation has one positive and one negative real eigenvalue.


2 Answers

I've been exploring a similar problem for a computational topology class and have had some success with the method outlined below.

First you will need a comparison function that will evaluate the height at two input points and will return < or > (not equal) for any input. One way to do this is that if the points are equal height you use some position-based or random index to find the greater point. You can think of this as adding an infinitesimal perturbation to the height.

Now, for each point, you will compare the height at all the surrounding neighbors (there will be 8 neighbors on a 2D rectangular grid). The lower link for a point will be the set of all neighbors for which the height is less than the point.

If all the neighboring values are in the lower link, you are at a local maximum. If none of the points are in the lower link you are at a local minimum. Otherwise, if the lower link is a single connected set, you are at a regular point on a slope. But if the lower link is two unconnected sets, you are at a saddle.

In 2D you can construct a list of the 8 neighboring point in cyclic order around the point you are checking. You assign a value of +/-1 for each neighbor depending on your comparison function. You can then step through that list (remember to compare the two end points) and count how many times the sign changes to determine the number of connected components in the lower link.

Determining which saddles are "important" is a more difficult analysis. You may wish to look at this: http://www.cs.jhu.edu/~misha/ReadingSeminar/Papers/Gyulassy08.pdf for some guidance.

-Michael

like image 122
Michael Homel Avatar answered Sep 25 '22 16:09

Michael Homel


(From a guess at the maths rather than practical experience)

Fit a quadratic to the surface in a small patch around each candidate point, e.g. with least squares. How big the patch is is one way of controlling noise, and you might gain by weighting points depending on their distance from the candidate point. In matrix notation, you can represent the quadratic as x'Ax + b'x + c, where A is symmetric.

The quadratic will have zero gradient at x = (A^-1)b/2. If this not within the patch, discard it.

If A has both +ve and -ve eigenvalues you have a saddle point at x. Since A is only 2x2 and so has at most two eigenvalues, you can ignore the case when it as a zero eigenvalue and so you couldn't invert it at the previous stage.

like image 34
mcdowella Avatar answered Sep 25 '22 16:09

mcdowella