Time-lapse fluorescence microscopy is an essential technique for quantifying various characteristics of cellular processes, i.e. cell survival, migration, and differentiation. To perform high-throughput quantification of cellular processes, nuclei segmentation and tracking should be performed in an automated manner. Nevertheless, nuclei segmentation and tracking are challenging tasks due to embedded noise, intensity inhomogeneity, shape variation as well as a weak boundary of nuclei. Several nuclei segmentation approaches have been reported in the literature. However, most of them require fine-tuning of many parameters. Furthermore, they can only be applied to particular models or acquisition systems. As a result, there is a crucial need for a generic method to segment noisy and densely packed nuclei in microscopy images. In this paper, we present a sparse representation method for denoising of microscopy images. The proposed method works properly in the context of most challenging cases. In addition, it provides a denoised image and simultaneously the potential locations of nuclei. To evaluate the performance of the proposed method, we tested our method on two datasets from cell tracking challenge. Across all datasets, the proposed method achieved satisfactory results with 96.96% recall for C.elegans dataset. Besides, in Drosophila dataset, our method achieved very high recall (99.3%).