1. A computer-implemented method for image processing, comprising: receiving an image dataset having image data for a plurality of images and a group dataset having group information for each of the plurality of images; transforming the image dataset into a sparse vector by applying sparse coding and using the group information; dividing each of dimensions of the sparse vector into multiple groups with a matrix, the matrix being generated such that the matrix takes on a higher value when samples in a same group from among the multiple groups have same non-zero dimensions above a threshold amount of time and takes on a lower value compared to the higher value when the samples in the same group lack the same non-zero coefficients above the threshold amount of time; and transforming the sparse vector into a summation vector using the multiple groups.