I have a sampled function sruface
$$ z = f(x, y) $$
represented as a grayscale raster image. How to find the upper convex hull of that surface. That is I am looking for the minimal
$$ g(x, y) $$
such that
$$ g(x, y) \geq f(x, y), \text{Eigenvalues}(\text{Hessian}(g)) < 0 $$
It is possible to convert the image into a 3d mesh, and then use qhull or similar, but that would result in too much overhead.