This paper presents a new stochastic approach which can be applied with di erent watermark techniques. The approach is based on the computation of a Noise Visibility Function NVF that characterizes the local image properties, identifying textured and edge regions where the mark should be more strongly embedded. We present precise formulas for the NVF which enable a fast computation during the watermark encoding and decoding process. In order to determine the optimal NVF, we rst consider the watermark as noise. Using a classical MAP image denoising approach, we show how to estimate the "noise". This leads to a general formulation for a texture masking function, that allows us to determine the optimal watermark locations and strength for the watermark embedding stage. We examine two such NVFs, based on either a non-stationary Gaussian model of the image, or a stationary Generalized Gaussian model. We show that the problem of the watermark estimation is equivalent to image den...