The understanding of the complexity of outdoor environments is an essential issue for the development of efficient processes of autonomous mobility, especially in areas with uneven illumination and without a well-defined road. In this context, the detection of ground and obstacles plays a relevant role in giving the first impressions of the external surroundings to a machine. Furthermore, it can guide independent movements and decisions. In this study, we introduce a segmentation method that detects ground and non-ground points of complex scenes under different exposures to illumination, textures, and shading. We prepared a dataset with images collected from some environments in which trees are prominent obstacles. The proposed method uses contrast templates, statistical measures, and morphological operators to reach the ground segmentation. Experiments showed satisfactory results in which trees were well detected and the ground was efficiently segmented with the maintenance of the structure of the image.