A Hierarchical Approach for Traffic Sign Recognition Based on Shape Detection and Image Classification