April 2020
Intermediate to advanced
438 pages
12h 2m
English
Perform the following steps to convert an RGB color image into a grayscale image using the Lab color space and scikit-image library functions:
im = imread('images/flowers.png')im1 = rgb2lab(im)
im1[...,1] = im1[...,2] = 0
im1 = lab2rgb(im1)
plt.figure(figsize=(20,10))plt.subplot(121), plt.imshow(im), plt.axis('off'), plt.title('Original ...Read now
Unlock full access