Udpated SVM input to sample images from a regular grid and generate a codebook