1. A computer implemented method for encoding a digital image, comprising: dividing an image into one or more image kernels, each kernel having a plurality of pixels; measuring the intensity of each pixel in a kernel; creating a vector comprising the measured intensities for each pixel in the kernel; storing the vector in a vocabulary comprising a plurality of vectors; creating an index for the vector; adding the index to a vector index file comprising a plurality of indices corresponding to the plurality of vectors in the vocabulary.