#smooth sharp unsharp import cv2 import numpy as np image = cv2.imread("elephant2.jpeg") gray_image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) smoothed_image = cv2.GaussianBlur(gray_image, (5, 5), 0) sharpening_kernel = np.array([[0, -1, 0], [-1, 5, -1], [0, -1, 0]]) sharpened_image = cv2.filter2D(gray_image, -1, sharpening_kernel) blurred_image = cv2.GaussianBlur(gray_image, (5, 5), 0) unsharp_image = cv2.addWeighted(gray_image, 1.5, blurred_image, -0.5, 0) cv2.imshow("Original Image", gray_image) cv2.imshow("Smoothed Image (Gaussian Blur)", smoothed_image) cv2.imshow("Sharpened Image", sharpened_image) cv2.imshow("Unsharp Masking", unsharp_image) cv2.waitKey(0) cv2.destroyAllWindows()