The Two-photon Confocal Microscopy (TCM) is a new technology which is useful in nondestructive analysis of tissue. However its cell experiment images are excessive and difficult for machine processing since the low resolution and lots of noise. Thus nowadays such a work is mainly done manually and costs a lot of time and effort. This paper proposes a cell segmentation algorithm for this situation by the local-threshold 2D-tophat which is based on the tophat combined with the OTSU and Mathematic Morphology. The proposed method uses the cell region gradient information to do the cell segmentation which uses a local-dynamic threshold instead of a static one and uses the 2D information only to minimize the influences caused by the background and also the algorithm complexity. This method has been applied to experiment and is proved that the true-positive ratio (TPR) can be kept above 85% and false-positive ratio (FPR)+miss-positive ratio(MPR) can be kept under 20% when compared with the original tophat method that the TPR is about 80% and FPR+MPR above 20%.