In this paper, a digital watermarking algorithm for copyright protection based on the concept of embed digital watermark and modifying frequency coefficients in discrete wavelet transform (DWT) domain is presented. We embed the watermark into the detail wavelet coefficients of the original image with the use of a key. This key is randomly generated and is used to select the exact locations in the wavelet domain in which to embed the watermark. The corresponding watermark detection algorithm is presented. A new metric that measure the objective quality of the image based on the detected watermark bit is introduced, which the original unmarked image is not required for watermark extraction. The performance of the proposed watermarking algorithm is robust to variety of signal distortions, such a JPEG, image cropping, geometric transformations and noises. Key words: discrete wavelet transforms, watermarking, image distortions, copyright protection, e-security.