Implemented 2D DCT for training set images