1
00:00:00,090 --> 00:00:04,650
So now we begin a two team chapter, which is line sickle and blood detection.

2
00:00:05,070 --> 00:00:06,090
So let's open this up.

3
00:00:06,420 --> 00:00:09,030
I actually already have it opens with the twice.

4
00:00:09,780 --> 00:00:15,810
And what we're going to take a look at is something called half lines, which is an other underrated

5
00:00:15,930 --> 00:00:18,910
method used to fine lines in images.

6
00:00:18,960 --> 00:00:21,240
So let's firstly load our images.

7
00:00:23,570 --> 00:00:27,500
And Library that is already.

8
00:00:31,580 --> 00:00:34,430
OK, so now let's begin with a line, hopefully in the section.

9
00:00:35,210 --> 00:00:37,040
So what is the halfling method?

10
00:00:37,340 --> 00:00:43,580
Well, basically the Huthi method takes a binary edge map as an input and attempts to locate edges,

11
00:00:43,580 --> 00:00:44,870
places, straight lines.

12
00:00:45,200 --> 00:00:51,410
So the idea of and transform is that every edge point in the edge map is transformed to all the possible

13
00:00:51,410 --> 00:00:53,090
lines that could pass through that point.

14
00:00:53,630 --> 00:00:56,570
So that's how we actually use this line here.

15
00:00:56,850 --> 00:01:01,410
Actually, I mean this take this two stars out there.

16
00:01:01,460 --> 00:01:05,150
So we use this function as it happens, every function to fine lines.

17
00:01:05,540 --> 00:01:11,550
So to do this, we actually have to pass a minor sized image into lanes.

18
00:01:11,960 --> 00:01:14,540
So we use of edges to get that finalized image.

19
00:01:15,170 --> 00:01:19,640
And then we just said the threshold here, what threshold is 240, which is a number of points on the

20
00:01:19,640 --> 00:01:21,410
line that we're going to look for.

21
00:01:21,980 --> 00:01:26,480
And we just use to the accuracy which is here, which is a predefined value.

22
00:01:26,480 --> 00:01:30,140
We don't really have to change this constant value here, even though it's not hardcoded.

23
00:01:30,800 --> 00:01:33,440
You can experiment with different values if you want to.

24
00:01:33,980 --> 00:01:40,580
And then this gives us two lines here and delicate each region lanes no lines of basically lines and

25
00:01:40,580 --> 00:01:44,810
angles, so we kind of have to extract all of the lines separately from here.

26
00:01:44,840 --> 00:01:45,680
That's how we get it.

27
00:01:46,190 --> 00:01:49,850
So I wouldn't go through this code in too much detail because it could get a bit lengthy.

28
00:01:50,330 --> 00:01:52,970
However, if you are so inclined, you can actually go through it.

29
00:01:53,300 --> 00:01:56,570
It would be a good exercise for you to actually understand what's happening here.

30
00:01:57,350 --> 00:01:58,580
So now let's plot lines.

31
00:01:58,580 --> 00:02:00,990
Remember, we need to get a start and end with X.

32
00:02:01,010 --> 00:02:01,970
That's what we're doing here.

33
00:02:02,810 --> 00:02:11,450
So let's plot this and we get these lines across to people here so you can see this cynical image here.

34
00:02:11,960 --> 00:02:16,010
It actually captures pretty much all the lines and maybe some actual ones.

35
00:02:16,100 --> 00:02:17,240
Actually, you can see it here.

36
00:02:17,930 --> 00:02:18,890
So this is pretty good.

37
00:02:19,100 --> 00:02:21,320
So what about probabilistic HOV lanes?

38
00:02:21,710 --> 00:02:26,930
Now, a half transform is considered probabilistic if it uses random sampling of the edge points.

39
00:02:27,320 --> 00:02:33,440
Now, the reason why probabilistic HOV lanes was developed is because this HOV lane HOV lanes algorithm,

40
00:02:33,500 --> 00:02:37,780
even though it works quite well, can become very computationally expensive.

41
00:02:37,790 --> 00:02:44,450
So now, in order to reduce the ultimate complexity of that function, HOV lanes P, which is short,

42
00:02:44,450 --> 00:02:47,750
the probability from the probabilistic was developed.

43
00:02:48,020 --> 00:02:49,640
So let's take a look and run this one.

44
00:02:49,970 --> 00:02:53,960
See what the outcome looks like now, however, you can see it's not as good.

45
00:02:54,350 --> 00:02:56,360
You can tweak a lot of these parameters here.

46
00:02:56,720 --> 00:03:03,110
So if you wanted to get the bigger minimum lanes or have different voting weights as well as you can

47
00:03:03,110 --> 00:03:08,390
actually change some of these accuracy's and some of these parameters here, and you can see you can

48
00:03:08,390 --> 00:03:09,710
get different lines here.

49
00:03:10,310 --> 00:03:12,620
So let's take a look at circle detection.

50
00:03:12,620 --> 00:03:17,440
So I've also developed an algorithm for signal detection.

51
00:03:17,480 --> 00:03:19,520
So let's take a look and see how it's used.

52
00:03:19,940 --> 00:03:26,630
So that's done a little immature, and I won't go into too much detail yet for this Huffines function

53
00:03:26,630 --> 00:03:28,370
in this experiment with the code first.

54
00:03:28,970 --> 00:03:30,800
And then we'll take a look and see how does this run?

55
00:03:31,460 --> 00:03:36,560
So what we do again, we just take the color image grayscale.

56
00:03:36,560 --> 00:03:42,050
It runs a medium blue on it and then run the hospitals on it.

57
00:03:42,440 --> 00:03:44,060
And we just set these parameters here.

58
00:03:44,510 --> 00:03:50,870
Those parameters are brilliant values and edge detection and the accumulator threshold for the half

59
00:03:50,870 --> 00:03:51,330
gradient.

60
00:03:52,280 --> 00:03:57,500
So a lower value allows more cycles or more false positives, potentially to be detected.

61
00:03:57,590 --> 00:04:00,470
And then we have a minimum radius and maximum radius of two circles.

62
00:04:01,100 --> 00:04:03,530
We can do the gradient value for the edge.

63
00:04:03,710 --> 00:04:05,090
You can use an edge detection.

64
00:04:06,110 --> 00:04:10,070
This is a tons of configurable options and half circles as well.

65
00:04:10,550 --> 00:04:11,510
So let's run this.

66
00:04:14,430 --> 00:04:15,160
And there we go.

67
00:04:15,230 --> 00:04:17,460
So this is a nice, clean circular image here.

68
00:04:17,880 --> 00:04:24,440
You can try one would like bottle caps or streets, circular street signs or whatever you want to put

69
00:04:24,450 --> 00:04:26,190
it has circled coins, perhaps.

70
00:04:26,820 --> 00:04:27,880
And see how it works.

71
00:04:27,900 --> 00:04:29,970
So we get some nice good circles here.

72
00:04:30,570 --> 00:04:32,850
So now let's move on to blob detection.

73
00:04:33,120 --> 00:04:34,260
So what is a blob?

74
00:04:34,860 --> 00:04:40,590
A blob is defined as an interesting area or basically a group or segment of pixels that are interesting

75
00:04:40,980 --> 00:04:48,540
in an image, an interesting meaning that they probably have some sort of uniform of consistency across

76
00:04:48,540 --> 00:04:51,960
different blobs so that it can actually detect different blobs in images.

77
00:04:52,470 --> 00:04:58,010
So it's basically a way to stay algorithmically, go through an image and find interesting areas.

78
00:04:58,020 --> 00:04:58,230
Yeah.

79
00:04:58,230 --> 00:05:01,470
So if you look at these flowers, I believe they're daffodils.

80
00:05:02,100 --> 00:05:02,900
We can take a look.

81
00:05:02,910 --> 00:05:08,520
We can run simple but effective, create the object here and then get two key points out from the image.

82
00:05:08,760 --> 00:05:10,530
And then this those key points here.

83
00:05:11,220 --> 00:05:13,820
Now, key points are actually quite an interesting feature.

84
00:05:14,490 --> 00:05:20,430
Algorithms like sift and serve, which are key point feature detectors often used to be often using

85
00:05:20,430 --> 00:05:22,110
computer vision for less so now.

86
00:05:22,530 --> 00:05:24,150
So we don't deal with them in discourse.

87
00:05:24,180 --> 00:05:27,900
However, if you do want tutorial on those things, I can create one.

88
00:05:28,890 --> 00:05:30,420
So let's take a look at two blobs now.

89
00:05:32,610 --> 00:05:38,190
You can see the interesting here is a picture is a center of the flower in these images, which is quite

90
00:05:38,190 --> 00:05:39,270
interesting and quite cool.

91
00:05:39,930 --> 00:05:42,840
So that concludes line circle and blob detection.

92
00:05:43,290 --> 00:05:50,180
We're now going to move on to something circles lapses and then finding Waldo using template matching.

93
00:05:50,190 --> 00:05:51,480
So that's an interesting chapter.

94
00:05:51,710 --> 00:05:55,950
So, okay, we'll see you in the next next section.

95
00:05:56,520 --> 00:05:56,910
Thank you.
