Generic Programming for Computer Vision