-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
19 lines (17 loc) · 898 Bytes
/
main.py
File metadata and controls
19 lines (17 loc) · 898 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import cv2 as cv
from unsharpmask import unsharp_mask
from ygrayscale import y_grayscale
def main():
color_image = cv.imread('images/lalandiz.jpg')
sharpened_color_image = unsharp_mask(color_image)
more_sharpened_color_image = unsharp_mask(color_image, amount=2)
grayscale_image = y_grayscale(color_image)
sharpened_grayscale_image = unsharp_mask(grayscale_image)
more_sharpened_grayscale_image = unsharp_mask(grayscale_image, amount=2)
cv.imwrite('images/lalandiz.sharpened.jpg', sharpened_color_image)
cv.imwrite('images/lalandiz.sharpened.more.jpg', more_sharpened_color_image)
cv.imwrite('images/lalandiz.grayscale.jpg', grayscale_image)
cv.imwrite('images/lalandiz.grayscale.sharpened.jpg', sharpened_grayscale_image)
cv.imwrite('images/lalandiz.grayscale.sharpened.more.jpg', more_sharpened_grayscale_image)
if __name__ == '__main__':
main()