This contribution presents a wavelet-based algorithm to detect patterns in images. A two-dimensional extension of the DST-II is introduced to construct adapted wavelets using the equation of the tensor product corresponding to the diagonal coefficients in the 2D discrete wavelet transform. A 1D filter was then estimated that meets finite energy conditions, vanished moments, orthogonality, and four new detection conditions. These allow, when performing the 2D transform, for the filter to detect the pattern by taking the diagonal coefficients with values of the normalized similarity measure, defined by Guido, as greater than 0.7, and α=0.1. The positions of these coefficients are used to estimate the position of the pattern in the original image. This strategy has been used successfully to detect artificial patterns and localize mass-like abnormalities in digital mammography images. In the case of the latter, high sensitivity and positive predictive value in detection were achieved but not high specificity or negative predictive value, contrary to what occurred in the 1D strategy. This means that the proposed detection algorithm presents a high number of false negatives, which can be explained by the complexity of detection in these types of images.