—Automatic illicit drug pill matching and retrieval is becoming an important problem due to an increase in the number of tablet type illicit drugs being circulated in our society. We propose an automatic method to match drug pill images based on the imprints appearing on the tablet. This will help identify the source and manufacturer of the illicit drugs. The feature vector extracted from tablet images is based on edge localization and invariant moments. Instead of storing a single template for each pill type, we generate multiple templates during the edge detection process. This circumvents the difficulties during matching due to variations in illumination and viewpoint. Experimental results using a set of real drug pill images (822 illicit drug pill images and 1,294 legal drug pill images) showed 76.74% (93.02%) rankone (rank-20) matching accuracy. Keywords-Pattern recognition systems and applications; Multimedia analysis, indexing, and retrieval