OpenCV

sharpen

728x90
import cv2
import numpy as np

img = cv2.imread('data/images/mountain.jpeg',1)




sharpen = np.array(
    [
        [0,-1,0],
        [-1,5,-1],
        [0,-1,0]
    ] , dtype = 'int'
)

result=cv2.filter2D(img,-1,sharpen)

cv2.imshow('ori',img)
cv2.imshow('sharp',result)
cv2.waitKey(0)
cv2.destroyAllWindows()

728x90

'OpenCV' 카테고리의 다른 글

find contures  (0) 2021.04.20
Canny  (0) 2021.04.20
laplacian  (0) 2021.04.20
sobel  (0) 2021.04.20
bilateral Filter  (0) 2021.04.20