How can I get the uncertainties for peaks on an image?
One way is to simply model each peak with a Gaussian, with mean $\mu_i$ and variance $\sigma_i$. In fact what you mean by uncertainty corresponds to the variance. You can iteratively fit Gaussians using e.g. EM-algorithm. In MATLAB you could easily do this with built-in fitting functions: https://www.mathworks.com/help/curvefit/gaussian.html

Alternatively, you could use the mean-shift algorithm to find the modes in the data, from which you could extract the probabilities:
http://de.mathworks.com/matlabcentral/fileexchange/39079-mean-shift-for-finding-modes

And finally, we might want to think of the uncertainty as the steepness of the maximum. In that regard, the magnitude of the first derivative would give us how strong the peak is. Then, a first order derivative, or a curvature filter can characterize the uncertainty. This is also doable in MATLAB with simple finite difference approximation schemes.