Watermarking techniques are primarily used for copyright protection. In this paper, we propose a digital watermarking scheme, which is based on neural network, cryptography, and image processing techniques. Our scheme can achieve the following two goals. The first is that illegal users do not know the location of an embedded watermark in the image. The second is that a legal user can retrieve the embedded watermark from an altered (filtering, lossy compression, and scaling) image. The security and robustness of the proposed scheme are improved using neural network technology.