April 2020
Intermediate to advanced
438 pages
12h 2m
English
In this recipe, we shall use the Lena grayscale image for reconstruction with dictionary learning. Let's start by importing the required libraries and the relevant modules:
from skimage.io import imreadfrom skimage.color import rgb2grayfrom sklearn.decomposition import MiniBatchDictionaryLearningfrom sklearn.feature_extraction.image import extract_patches_2dfrom sklearn.feature_extraction.image import reconstruct_from_patches_2dimport numpy as npimport matplotlib.pylab as pltfrom time import time
Read now
Unlock full access