Thresholding is a simple but effective technique for image segmentation. In this paper, a novel method is presented to address the problem of image segmentation for uneven lighting images that is based on dynamic size of window. In pyramid approach (window merging), segmentation accuracy depends on the initial size selection. The proposed method is based on the concept of window growing approach, in which after selecting the initial window, selection criterion is tested. If a sub-image or window does not satisfies the selection criterion, instead of merging with neighboring window (pyramid approach), window is incremented by small value. This process is repeated until it satisfies the given selection criterion. Thereafter segment the window by thresholding method. In the proposed method, initial size of window is computed at run time, which is based on image statistics. This method provides superior image segmentation over existing thresholding methods for images that are degraded, uneven illumination and suffer from the problem like shadow.