In this paper, image processing techniques are applied to the analysis of near-infrared videos. The goal is to detect human activities in the videos. For detecting human activities, we implement the Gaussian mixture modeling (GMM) to construct background model and to perform foreground detection. Additionally, we pay attention to commonly used sensing lighting equipments used in nighttime environment because of its illumination and shadowing phenomena. Accordingly, a two-mode GMM is proposed which separately constructs background GMM for different lighting conditions and switches GMM modes by event detection. In order to cope with excessive shadowing phenomenon, an efficient way of searching footholds by using scan-lines is proposed to remove human shadows. The proposed approach will provide reasonable bounding boxes information of human regions as detection results which will be very helpful for a nighttime surveillance system.