We propose an automatic system for diatom localization and identification with a modular structure. The main contribution of this work is to provide a complete automatic system for the analysis of phytoplanktonic samples in brightfield microscopy. The overall procedure consists in two parts: first, frame gathering at low magnification and second, further analysis at higher magnification. At low magnification the goal is to obtain a panoramic overview of the full sample by tiling each frame. Subsequent processing steps will provide the localization and size of each particle in each frame for further analysis. The localization method based on image fusion techniques provides more robust and accurate particle detection than other methods reported in the literature. From the size information we obtain a useful cue about the objective to use. At higher magnification we developed new autofocusing techniques providing a fast and accurate focused image. Because particles present a volumetric structure, we propose the use of multifocus fusion techniques for merging in a single plane the focused parts from neighbouring the best focused image. Then we applied a particle selection analysis to reduce the number of images to analyze, i.e. to discriminate diatoms from debris . This is the most challenging step , due to large variability of shapes, diatom fragmentation, particle overpopulation and diatom hiding. The latter is not described in the present paper and will be the subject for a forthcoming publication. Finally, for diatom identification we use the scale transform technique and a cepstrum-based cross-correlation technique.