added a reusable 1D meanshift class