The residual image is analyzed to determine a constraint which regularizes the ill-posed least squares image restoration problem. The energy in the residual image is constrained at a level which depends on the noise statistics, image degradation, and restoration method. This constraint is applied individually to different image subregions, to find different regularizations appropriate in each subregion. This defines a spatially variant restoration method, even for a spatially invariant image degradation. Least squares image restoration methods using this constraint are applied to an artificial image which has been degraded by simulated long-exposure atmospheric turbulence and random noise. Quantitative analysis of the restored image shows significant improvement with this constraint, in comparison to the usual constraint on residual energy which depends only on noise statistics.