An image analysis procedure was developed for bacterial cells after staining with the DNA-intercalating dye 4'-6-diamidino-2-phenylindole (DAPI), and after in situ hybridization with Cy3-labeled, rRNA-targeted oligonucleotide probes. DAPI- and Cy3-images were captured separately from the same scenery with a cooled digital video camera with three CCD chips for the basic colors red (R), green (G) and blue (B). Using the appropriate filter sets, images of DAPI-stained cells were captured with the red channel shut down, while Cy3-stained cells were captured with the green and blue channels shut down. DAPI images and Cy3 images were subsequently merged to produce virtual color (RGB)-images. Processing of all color channels allowed to specifically enumerate DAPI-stained and hybridized bacteria, to measure their cell sizes, to subsequently calculate their biovolumes and to estimate their biomass. Using this procedure, significant differences were detected in bacterial populations in food resources, digestive tract and cast of the earthworm L. terrestris L. In leaves, bacteria were on average ten times more abundant and two times larger than in soil. In the digestive tract of L. terrestris, however, numbers and volumes of bacteria were comparable to those in soil indicating the disruption of cells originating from leaves before arriving in the foregut. Passage through the digestive tract of L. terrestris significantly reduced bacterial populations belonging to the alpha-, beta- and gamma-subdivisions of Proteobacteria. While these populations did not recover during incubation of cast, populations of the delta-subdivision of Proteobacteria and the Cytophaga-Flavobacterium cluster of the CFB phylum increased in cast. These results suggest a large impact of passage through the digestive tract of L. terrestris on bacterial community structure and demonstrate the usefulness of our image analysis procedure for the determination of cell sizes and biovolumes and thus biomass of specific bacterial populations in different terrestrial habitats.