Why do you add this assert? We may have vocabulary of not CV_32F type.