E2M: an energy-efficient middleware for computer vision applications on autonomous mobile robots