300x250
| def sharpen(image): kernel = np.array([[-1, -1, -1], [-1, 9, -1], [-1, -1, -1]]) sharpened_image = cv2.filter2D(image, -1, kernel) return sharpened_image |
kernel의 element 정보
| [[-1, -1, -1], [-1, 9, -1], [-1, -1, -1]] |
[[-1, -1, -1], |
[[0, -1, 0], |

Unsharp Image
| def unsharpen(image): clone = copy.copy(image) gaus_blur = cv2.GaussianBlur(clone, (0, 0), 3.0) unsharp_image = cv2.addWeighted(clone, 1.5, gaus_blur, -0.5, 0, clone) return unsharp_image |

300x250
'Image Processing' 카테고리의 다른 글
| OPENCV PYTHON RGB 값에서 HSV 값으로 변환 (0) | 2021.02.02 |
|---|---|
| Image Flip (Horizontal/Vertical) (0) | 2020.10.14 |
| Image Brightness and Contrast 변경 (0) | 2020.10.14 |
| image gamma 값 조정 (gamma correction) (0) | 2020.10.14 |
| Image Blur/Smoothing/Gaussian Blur/Median Blur/Bilateral Filter/Motion Blur (0) | 2020.10.13 |