python opencv Sharpened
python opencv Sharpened
import cv2 import numpy as np # Load the image img = cv2.imread('20230222100736979.jpg') # Define the sharpening kernel kernel = np.array([[-1,-1,-1],[-1,9,-1],[-1,-1,-1]]) # Apply the kernel to the image sharpened = cv2.filter2D(img, -1, kernel) # Display the original and sharpened images cv2.imshow('Original', img) cv2.imshow('Sharpened', sharpened) cv2.waitKey(0)
####################
QQ 3087438119