The distribution of cells in stained tissue sections provides information that may be analyzed by means of morphometric computation. We developed an algorithm for automated analysis for the purpose of answering questions pertaining to the relative densities of wandering cells in the vicinity of comparatively immobile tissue structures such as vessels or tumors. As an example, we present the analysis of distribution of CD56-positive cells and of CXCR3-positive cells (relative densities of peri-vascular versus non-vascular cell populations) in relation to the endothelium of capillaries and venules of human parietal decidua tissue of first trimester pregnancy. In addition, the distribution of CD56-positive cells (mostly uterine NK cells) in relation to spiral arteries is analyzed. The image analysis is based on microphotographs of two-color immunohistological stainings. Discrete distances (10-50 µm) from the fixed structures were chosen for the purpose of defining the extent of neighborhood areas. For the sake of better comparison of cell distributions at different overall cell densities a model of random distribution of "cells" in relation to neighborhood areas and rest decidua of a specific sample was built. In the chosen instances, we found increased perivascular density of CD56-positive cells and of CXCR3-positive cells. In contrast, no accumulation of CD56-positive cells was found in the neighborhood of spiral arteries.