1
00:00:00,210 --> 00:00:05,880
So now let's begin section eight, where we take a look at convolutions blurring and sharpening images.

2
00:00:06,300 --> 00:00:11,610
So you already have this open, so just double click and open it yourself and nose move up to the top.

3
00:00:12,150 --> 00:00:18,210
So the first thing we're going to do is just basically load off our libraries and download images again

4
00:00:18,840 --> 00:00:20,070
and a list.

5
00:00:20,370 --> 00:00:21,480
I'll discuss the lesson.

6
00:00:21,510 --> 00:00:25,050
So what we're going to do, we're going to look at what convolutional operations are.

7
00:00:25,560 --> 00:00:30,150
And then we're going to apply blurring the noise thing and sharpening to our images.

8
00:00:30,750 --> 00:00:37,830
So firstly, convolutions are basically an operation where we actually composition is basically a mathematical

9
00:00:37,830 --> 00:00:43,530
operation performed on two functions that produces a tiered function, which is typically a modified

10
00:00:43,530 --> 00:00:45,930
version of one of the original functions.

11
00:00:46,320 --> 00:00:49,170
So that's a bit of a mouthful, but basically what we're doing here.

12
00:00:49,500 --> 00:00:51,430
We're just getting an output image.

13
00:00:51,450 --> 00:00:58,650
We're basically we're creating a kernel kernel basically is what we call what we're calling a tree by

14
00:00:58,650 --> 00:01:05,850
tree matrix of 1s here, and we just divide it by nine so that we can actually scale it back down by

15
00:01:06,240 --> 00:01:07,350
a factor of one of the nine.

16
00:01:08,040 --> 00:01:13,530
And what we do now is I'll explain this to you after lattices and actually so we don't affect the brightness

17
00:01:13,530 --> 00:01:15,420
of the image just so you know.

18
00:01:16,080 --> 00:01:23,190
So whatever factor, whatever how, however, many added elements are in this matrix attribute, you

19
00:01:23,190 --> 00:01:24,210
would have nine elements.

20
00:01:24,690 --> 00:01:25,620
You divide it by nine.

21
00:01:25,830 --> 00:01:27,660
That's a way to keep the brightness consistent.

22
00:01:28,200 --> 00:01:34,830
So what we do know, we actually use this function called see v2.0 filter to involve the kernel with

23
00:01:34,830 --> 00:01:35,340
an image.

24
00:01:35,790 --> 00:01:41,580
So controlling basically is an operation here where we just operate on the image with this function

25
00:01:42,060 --> 00:01:44,220
and we get the output, which is a split image.

26
00:01:44,520 --> 00:01:50,430
And what I'm going to show you now is with different sized kernels, the larger the kernel of the more

27
00:01:50,430 --> 00:01:50,820
blue.

28
00:01:51,270 --> 00:01:54,090
So let's run this function, the more blue we apply.

29
00:01:54,090 --> 00:01:54,540
I should see.

30
00:01:55,350 --> 00:01:57,810
So you can see the tree by tree blue.

31
00:01:58,170 --> 00:01:59,850
It's not that that much.

32
00:01:59,850 --> 00:02:02,820
I mean, it is blue blurrier than the original, but not significantly so.

33
00:02:03,510 --> 00:02:08,070
However, when you use a seven by seven kill, you can see it's actually quite a lot more very than

34
00:02:08,070 --> 00:02:10,290
this one and committed the original.

35
00:02:10,590 --> 00:02:12,000
So that's good.

36
00:02:12,600 --> 00:02:13,920
So let's take a look at No.

37
00:02:14,190 --> 00:02:14,560
Some.

38
00:02:14,970 --> 00:02:18,870
So that was that was a convolutional way of actually applying a blur.

39
00:02:19,290 --> 00:02:24,270
However, let's actually look at some of the built in the three methods that open.

40
00:02:24,270 --> 00:02:30,690
CBS Serpent TV has this function called CDK2 Dark Blue, which is actually averaging done by involving

41
00:02:30,690 --> 00:02:35,550
the image was a normalized box filter, and you can read about it a bit more if you want to get a deeper

42
00:02:35,550 --> 00:02:37,180
understanding online.

43
00:02:37,230 --> 00:02:42,120
And the open TV documentation on Wikipedia has good entries sometimes for these things.

44
00:02:43,320 --> 00:02:47,610
So we're going to apply to Blue with a five by five kernel here.

45
00:02:48,570 --> 00:02:53,940
What we're going to do now is going to apply Gaussian Blue Ocean Blue and into medium blue.

46
00:02:54,000 --> 00:02:54,680
So it's run.

47
00:02:54,690 --> 00:02:57,780
All of these have all of these are going to be done at five by five kernels.

48
00:02:58,680 --> 00:03:06,690
So you can see averaging, which is a standard blue Gaussian blue and media medium blurring which looks,

49
00:03:06,690 --> 00:03:07,890
which looks pretty good as well.

50
00:03:08,700 --> 00:03:13,410
You don't actually see a huge difference in these blurring methods unless you actually inspect up close,

51
00:03:13,410 --> 00:03:14,670
which you wouldn't be doing here.

52
00:03:15,780 --> 00:03:18,510
So now let's take a look at this bilateral filter.

53
00:03:19,020 --> 00:03:20,090
What is this function?

54
00:03:20,100 --> 00:03:23,400
Will this function is actually a noise removal function in open TV?

55
00:03:24,180 --> 00:03:28,050
These are these are the parameters of ticks, and we're going to go through all of this in detail.

56
00:03:28,470 --> 00:03:31,200
We're just going to use some of the default parameters here.

57
00:03:31,320 --> 00:03:34,980
Well, for properties, these are properties that actually produce some fairly good results.

58
00:03:35,580 --> 00:03:38,010
We're going to use nine foot diameter.

59
00:03:38,880 --> 00:03:40,650
That's each Pixel neighborhood we're looking at.

60
00:03:41,190 --> 00:03:45,750
We're going to use Sigma Color 75 and Sigma Space 75 as well.

61
00:03:46,320 --> 00:03:48,660
So let's take a look and see how this works.

62
00:03:51,010 --> 00:03:56,470
And you can see we took the original image and we applied our bilateral filter, and it gives us this

63
00:03:56,470 --> 00:03:58,390
output here, which is pretty cool.

64
00:04:00,040 --> 00:04:03,860
It's not really that useful when depending on the application, if you want to do.

65
00:04:04,330 --> 00:04:06,760
But it's a good implementation of noise removal.

66
00:04:07,540 --> 00:04:10,030
So now let's look at some more noise removal functions.

67
00:04:10,030 --> 00:04:10,990
So these are fast.

68
00:04:10,990 --> 00:04:12,360
And I mean, it's not.

69
00:04:12,370 --> 00:04:18,050
The noisy colored multi-colored is the different algorithms for different purposes.

70
00:04:18,070 --> 00:04:19,810
So let's take a look at the colored one.

71
00:04:20,410 --> 00:04:26,560
So we look at original image and then we applied this year, and this is our original image here, and

72
00:04:26,560 --> 00:04:28,690
we're going to apply the first thing to it.

73
00:04:32,790 --> 00:04:40,110
And you can see it actually looks roughly similar, maybe I should have used that image with more noise,

74
00:04:40,110 --> 00:04:46,620
but you can definitely see that it actually looks a bit more a bit more like artificially enhanced.

75
00:04:46,620 --> 00:04:51,420
Like you can see, it doesn't have as much like this looks a lot cleaner than this one.

76
00:04:51,780 --> 00:04:57,060
The edges lives are a little bit smoother, so it does clean it up technically a bit, but maybe it

77
00:04:57,060 --> 00:04:58,320
looks a bit too artificial.

78
00:04:58,950 --> 00:05:02,850
So what about sharpening or sharpening is applied very similarly to blurring.

79
00:05:03,240 --> 00:05:09,980
You can use the seams quietude of filter image filter 2D to involve it with a sharpening matrix here.

80
00:05:10,030 --> 00:05:13,310
This is what a sharpening matrix looks like is nine in the middle.

81
00:05:13,320 --> 00:05:20,580
That's the value for the number of number of elements in this matrix, and we have minus one all around.

82
00:05:21,060 --> 00:05:25,680
And surprisingly, by doing this what you do, you get a much more sharpened image.

83
00:05:26,850 --> 00:05:32,460
Sharpening images basically means you're enhancing the edges a bit more cities.

84
00:05:32,820 --> 00:05:43,860
Everything looks a bit more highly HDR type effect where everything looks a bit more like a little more

85
00:05:43,860 --> 00:05:44,490
visible.

86
00:05:44,500 --> 00:05:48,540
Or I'm not sure what it would want to says, but you can see it.

87
00:05:48,930 --> 00:05:52,800
A picture is worth a thousand words, so you can see what the difference was something which only makes

88
00:05:52,800 --> 00:05:52,940
it.

89
00:05:53,670 --> 00:05:55,530
So that's it for this lesson.

90
00:05:56,010 --> 00:06:02,790
I hope you enjoyed it, and it's going to move on to the ninth lesson, which is troubling by the issued

91
00:06:02,850 --> 00:06:03,870
an adaptive threshold.

92
00:06:04,230 --> 00:06:04,680
Thank you.
