A Computer Vision System for Terrain Recognition and Object Detection Tasks in Mining and Construction Environments