March 2018
Beginner to intermediate
306 pages
9h 54m
English
You need to complete the following steps:
import cv2import numpy as npimport matplotlib.pyplot as plt
img = cv2.imread('../data/Lena.png')
noise = 30 * np.random.randn(*img.shape)img = np.uint8(np.clip(img + noise, 0, 255))
denoised_nlm = cv2.fastNlMeansDenoisingColored(img, None, 10)
plt.figure(0, figsize=(10,6))plt.subplot(121)plt.axis('off')plt.title('original')plt.imshow(img[:,:,[2,1,0]])plt.subplot(122)plt.axis('off')plt.title('denoised')plt.imshow(denoised_nlm[:,:,[2,1,0]])plt.show()