Low-Cost Computer Vision System for People and Vehicles Detection and Counting in Smart Cities