Discrete Cosine Transform (DCT) is also regarded as Fourier Transform because it is closely associated with it. It is responsible for the transformation of image from one domain to the other, that is from spatial to frequency. During image compression each pixel values of the image is reduced. DCT is a lossy image compression technique wherein we cannot recover the exact older data. This results in major quality reduction of the image due to its high compression rate. DCT has strong energy compaction where very low frequency component of a signal stores huge amounts of information and other frequencies have comparatively small data of at most 2 to 3 bits.
A dataset of 5 benign and malignant images is taken as example and their corresponding cosine transformed images can be seen as given.
A paper titled "Machine Learning based Identification of Melanoma Skin Cancer using Fractional Coefficients of Cosine Transformed Dermoscopy Images", has been published in the International Journal of Advanced Science and Technology, Volume. 29, No. 5.
Paper Link: http://sersc.org/journals/index.php/IJAST/article/view/9765