File size: 2,729 Bytes
17e2002
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
108
1
00:00:01,030 --> 00:00:07,000
So let's quickly discuss sharpening sharpening as you imagine is the opposite of blurring and it actually

2
00:00:07,000 --> 00:00:12,310
strengthens strengthens and emphasizes the edges image as you can see in this example of sharpening

3
00:00:12,310 --> 00:00:12,740
here.

4
00:00:13,000 --> 00:00:15,040
The edges here are normal.

5
00:00:15,070 --> 00:00:20,050
What you would see with your own eyes however in this image all the edges here are much more pronounced

6
00:00:20,220 --> 00:00:22,110
physical horizontal.

7
00:00:22,240 --> 00:00:24,670
Are all the rooftops everywhere.

8
00:00:24,670 --> 00:00:26,170
So Templeman sharpening.

9
00:00:26,170 --> 00:00:32,940
We actually have to change our kernel and actually use the CV to filter to the function.

10
00:00:33,030 --> 00:00:35,850
So kernel for sharpening actually looks quite different here.

11
00:00:35,920 --> 00:00:42,730
However as you can tell it still seems to one that we we normalize our image other ways if it didn't

12
00:00:42,730 --> 00:00:48,410
normalize to one your image would be brighter or darker respectively.

13
00:00:48,490 --> 00:00:51,320
So let's run this simple sharpening example in our code.

14
00:00:51,550 --> 00:00:57,400
So again we look at image and then we create or sharpening Clennell says he saw before we have minus

15
00:00:57,400 --> 00:01:02,660
ones and all rows here and columns except indeed directions where we have nine.

16
00:01:02,700 --> 00:01:07,270
So if you would have some other elements in this matrix you'd actually get one which is exactly what

17
00:01:07,270 --> 00:01:07,860
we wanted.

18
00:01:07,960 --> 00:01:16,130
Which means it's normalized and to run or implement a sharpening function we use C-v to fill the 2d

19
00:01:16,760 --> 00:01:18,030
implemented shopping effect.

20
00:01:18,040 --> 00:01:23,400
So we take the shopping kernel and the input image we run it and we get a shop and image here.

21
00:01:23,440 --> 00:01:24,290
So let's take a look

22
00:01:29,450 --> 00:01:30,350
and there we go.

23
00:01:30,350 --> 00:01:34,330
This is our original image and this is a much sharper image.

24
00:01:34,340 --> 00:01:40,050
And as you can see just like the images we saw on the slide all the edges are much more pronounced.

25
00:01:40,190 --> 00:01:42,950
So it looks a bit artificial but you can play around with it couldn't.

26
00:01:43,040 --> 00:01:48,350
Metrics and trying it when shopping matrics They always to actually get a much nicer looking sharpening

27
00:01:48,440 --> 00:01:49,600
sharpened image here.