I've got values of a function of two variables at integer points inside a rectangle, that is, a rectangular table $f(i,j)$, $1\leqslant i\leqslant m$, $1\leqslant j\leqslant n$. The function is very nearly convex, there are just a few points $(i,j)$ (less than 1%) where convexity fails just slightly. There is (afaik) more or less unique way to change these values (or maybe very few neighboring ones too) to obtain a convex function $\tilde f\leqslant f$ which would agree with $f$ almost everywhere.
The only way to do it that I found is to invoke
ConvexHullMesh on the array of 3D points $(i,j,f(i,j))$ (that is, on the graph of $f$) and then extract relevant part from its
FullForm. Is there a less hacky way to do what I want?