In this paper a probabilistic technique for compensation of intensity loss in the confocal microscopy images is presented. Confocal microscopy images are modeled as a mixture of two Gaussians, one representing the background and another corresponding to the foreground. Images are segmented into foreground and background by applying Expectation Maximization (EM) algorithm to the mixture. Final intensity compensation is carried out by scaling and shifting the original intensities with help of parameters estimated for the foreground. Since foreground is separated to calculate the compensation parameters, the method is effective even when image structure changes from frame to frame. As Intensity Decay Function (IDF) is not used, complexity associated with estimation of IDF parameters is eliminated. Also, images can be compensated out of order as only information from the reference image is required for compensation of any image. These properties make our method an ideal tool for intensity compensation of confocal microscopy images which can suffer intensity loss due to absorption/scatteing of light as well as photobleaching and can change structure from optical/temporal section to section due to change in the depth of specimen or due to a living specimen. The proposed method was tested with number of image stacks and results for one of the stacks are presented here to demonstrate the effectiveness of the method.