Functional maps obtained by various technologies, including optical imaging techniques, f-MRI, PET, and others, may be contaminated with biological artifacts such as vascular patterns or large patches of parenchyma. These artifacts originate mostly from changes in the microcirculation that result from either activity-dependent changes in volume or from oximetric changes that do not co-localize with neuronal activity per se. Standard methods do not always suffice to reduce such artifacts, in which case conspicuous spatial artifacts mask details of the underlying activity patterns. Here we propose a simple algorithm that efficiently removes spatial biological artifacts contaminating high-resolution functional maps. We validated this procedure by applying it to cortical maps resulting from optical imaging, based either on voltage-sensitive dye signals or on intrinsic signals. To remove vascular spatial patterns we first constructed a template of typical artifacts (vascular/cardiac pulsation/vasomotion), using principle components derived from baseline information obtained in the absence of stimulation. Next, we modified this template by means of local similarity minimization (LSM), achieved by measuring neighborhood similarity between contaminated data and the artifact template and then abolishing the similarity. LSM thus removed spatial patterns originating from the cortical vasculature components, including large fields of capillary parenchyma, helping to unveil details of neuronal activity patterns that were otherwise masked by these vascular artifacts. Examples obtained from our imaging experiments with anaesthetized cats and behaving monkeys showed that the LSM method is both general and reproducible, and is often superior to other available procedures.