A watermarking algorithm operated in the wavelet transform domain is proposed. For the purpose of security and robustness, we generate a watermark sequence by selectively modifying the middle-frequency parts of images. Meanwhile, we also employ the masking characteristics of the human visual system (HVS) to ensure the watermark invisibility. The watermark data are detected using the embedding position after the wavelet decomposition of the watermarked image. The experimental results show that the proposed scheme is superior to quantization-based methods in terms of transparency, robustness, and computation complexity.