Drawing blood and injecting drugs are common medical procedures, for which accurate identification of veins is needed to avoid causing unnecessary pain. In this paper, we propose a low-cost system for the detection of veins. The system emits near-infrared radiation from four light-emitting diodes (LEDs), with a charge-coupled device (CCD) camera located in the middle of the LEDs. The camera captures an image of the palm of the hand. A series of digital image-processing techniques, ranging from image enhancement and increased contrast to isolation using a threshold limit based on statistical properties, are applied to effectively isolate the veins from the rest of the image.