-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexamples.txt
More file actions
107 lines (56 loc) · 2.15 KB
/
examples.txt
File metadata and controls
107 lines (56 loc) · 2.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
############ NOTE: WHEN RUNNING IN PYTHON SHELL, CLOSE IMSHOW WINDOWS USING X IN TOP CORNER AND THEN CONTROL^C TO QUIT ###########
Problem 1 - Light Leak:
$ python3
>>> import cv2
>>> import filters
>>> img = cv2.imread(‘input1.png’, cv2.IMREAD_COLOR)
>>> filters.problem1(img, 0.6, 0.4, ‘white’)
#### problem1(image, darkening coefficient, blending coefficient, light type)
#### darkening coefficient: 0 - 1 (recommended 0.6)
#### blending coefficient: 0 - 1 (recommended 0.4)
#### light type: 'white' or 'rainbow'
Problem 1 - Rainbow Light Leak:
$ python3
>>> import cv2
>>> import filters
>>> img = cv2.imread(‘input1.png’, cv2.IMREAD_COLOR)
>>> filters.problem1(img, 0.6, 0.4, ‘rainbow’)
#### problem1(image, darkening coefficient, blending coefficient, light type)
#### darkening coefficient: 0 - 1 (recommended 0.6)
#### blending coefficient: 0 - 1 (recommended 0.4)
#### light type: 'white' or 'rainbow'
Problem 2 - Grey Pencil Sketch:
$ python3
>>> import cv2
>>> import filters
>>> img = cv2.imread(‘input1.png’, cv2.IMREAD_COLOR)
>>> filters.problem1(img, 0.5, ‘grey’)
#### problem2(image, blending coefficient, pencil type)
#### blending coefficient: 0 - 1 (recommended 0.5)
#### pencil type: 'grey' or 'colour'
Problem 2 - Colour Pencil Sketch:
$python3
>>> import cv2
>>> import filters
>>> img = cv2.imread(‘input1.png’, cv2.IMREAD_COLOR)
>>> filters.problem2(img, 0.5, ‘colour’)
#### problem2(image, blending coefficient, pencil type)
#### blending coefficient: 0 - 1 (recommended 0.5)
#### pencil type: 'grey' or 'colour'
Problem 3 - Beautification:
$python3
>>> import cv2
>>> import filters
>>> img = cv2.imread(‘input1.png’, cv2.IMREAD_COLOR)
>>> filters.problem3(img, 3)
#### problem3(image, blending coefficient)
#### blur region: any positive odd integer (recommended 3 or 5)
Problem 4 - Swirl:
$python3
>>> import cv2
>>> import filters
>>> img = cv2.imread(‘input1.png’, cv2.IMREAD_COLOR)
>>> filters.problem4(img, 0.8, 2)
#### problem4(image, swirl radius, swirl intensity)
#### swirl radius: 0 - 1 (recommended 0.8)
#### swirl intensity: any number (recommend 3)