Bayesian estimators often use a prior probability model, which is difficult to infer from noisy measurements. For additive Gaussian noise, however, the Bayesian least-squares estimator can be constructed directly from the logarithmic derivative of the noisy data distribution. We develop a local, adaptive approximation of this estimator, and use simulations to illustrate its behavior on various distributions. Despite its generality, the estimator performs well in denoising photographic images, compared with fitting a parametric prior.