Under a more realistic experimental setup, the performance of the existing gait recognition approaches would drop drastically. Because pedestrians are mostly under different and unknown covariate conditions. Thus, the influence caused by changes of clothing and carrying on profile of pedestrians is the main obstacle of gait recognition. In this paper, we propose a new Gait Energy Image based on mask processing (MP-GEI) to reduce the influence of covariate conditions. Firstly, we calculate the Gait Energy Image (GEI) and its synthetic average template which includes the various features of 124 subjects under different covariate conditions from five views (54°, 72°, 90°, 108°, 126°). Secondly, we propose Gait Entropy Image (GEnI) and calculate its synthetic average template (T-GEnI). Thirdly, we calculate the mask representing the dynamic feature areas in T-GEnI by setting the threshold. Finally, we use parts of the mask to remove the irrelevant gait information in GEI. In this work, we explore the performance of MP-GEI with two models based on convolution neural network (CNN), and experiments are carried out on the CASIA Dataset B. Our results demonstrate that the proposed approach achieves better correct classification rate compared with GEI when pedestrians are under different and unknown covariate conditions. In addition, using the pre-trained VGG-16 model to extract deep features for recognition is more effective than fine-tuning the pre-trained VGG-16 model.