How it works...
The decomposition.PCA() function from scikit-learn was used to instantiate a PCA object. The fit_transform() function was first used to project the images to a lower dimension (from 4096 to 50 dimensions), and then the inverse_transform() function was used to reconstruct the images from the lower-dimensional representations.
The fft2() function of scipy.fftpack was used to transform an image from the spatial to the frequency domain by forcing all the high-frequency basis vectors to be zero (except the lowest thirty basis vectors) and then the image was reconstructed with ifft2().
Finally, the pywt.Wavelet('haar') function was used to instantiate a Haar wavelet object. The pywt.wavedec2() function was used to get all the wavelet ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access