So now we begin a two team chapter, which is line sickle and blood detection.
So let's open this up.
I actually already have it opens with the twice.
And what we're going to take a look at is something called half lines, which is an other underrated
method used to fine lines in images.
So let's firstly load our images.
And Library that is already.
OK, so now let's begin with a line, hopefully in the section.
So what is the halfling method?
Well, basically the Huthi method takes a binary edge map as an input and attempts to locate edges,
places, straight lines.
So the idea of and transform is that every edge point in the edge map is transformed to all the possible
lines that could pass through that point.
So that's how we actually use this line here.
Actually, I mean this take this two stars out there.
So we use this function as it happens, every function to fine lines.
So to do this, we actually have to pass a minor sized image into lanes.
So we use of edges to get that finalized image.
And then we just said the threshold here, what threshold is 240, which is a number of points on the
line that we're going to look for.
And we just use to the accuracy which is here, which is a predefined value.
We don't really have to change this constant value here, even though it's not hardcoded.
You can experiment with different values if you want to.
And then this gives us two lines here and delicate each region lanes no lines of basically lines and
angles, so we kind of have to extract all of the lines separately from here.
That's how we get it.
So I wouldn't go through this code in too much detail because it could get a bit lengthy.
However, if you are so inclined, you can actually go through it.
It would be a good exercise for you to actually understand what's happening here.
So now let's plot lines.
Remember, we need to get a start and end with X.
That's what we're doing here.
So let's plot this and we get these lines across to people here so you can see this cynical image here.
It actually captures pretty much all the lines and maybe some actual ones.
Actually, you can see it here.
So this is pretty good.
So what about probabilistic HOV lanes?
Now, a half transform is considered probabilistic if it uses random sampling of the edge points.
Now, the reason why probabilistic HOV lanes was developed is because this HOV lane HOV lanes algorithm,
even though it works quite well, can become very computationally expensive.
So now, in order to reduce the ultimate complexity of that function, HOV lanes P, which is short,
the probability from the probabilistic was developed.
So let's take a look and run this one.
See what the outcome looks like now, however, you can see it's not as good.
You can tweak a lot of these parameters here.
So if you wanted to get the bigger minimum lanes or have different voting weights as well as you can
actually change some of these accuracy's and some of these parameters here, and you can see you can
get different lines here.
So let's take a look at circle detection.
So I've also developed an algorithm for signal detection.
So let's take a look and see how it's used.
So that's done a little immature, and I won't go into too much detail yet for this Huffines function
in this experiment with the code first.
And then we'll take a look and see how does this run?
So what we do again, we just take the color image grayscale.
It runs a medium blue on it and then run the hospitals on it.
And we just set these parameters here.
Those parameters are brilliant values and edge detection and the accumulator threshold for the half
gradient.
So a lower value allows more cycles or more false positives, potentially to be detected.
And then we have a minimum radius and maximum radius of two circles.
We can do the gradient value for the edge.
You can use an edge detection.
This is a tons of configurable options and half circles as well.
So let's run this.
And there we go.
So this is a nice, clean circular image here.
You can try one would like bottle caps or streets, circular street signs or whatever you want to put
it has circled coins, perhaps.
And see how it works.
So we get some nice good circles here.
So now let's move on to blob detection.
So what is a blob?
A blob is defined as an interesting area or basically a group or segment of pixels that are interesting
in an image, an interesting meaning that they probably have some sort of uniform of consistency across
different blobs so that it can actually detect different blobs in images.
So it's basically a way to stay algorithmically, go through an image and find interesting areas.
Yeah.
So if you look at these flowers, I believe they're daffodils.
We can take a look.
We can run simple but effective, create the object here and then get two key points out from the image.
And then this those key points here.
Now, key points are actually quite an interesting feature.
Algorithms like sift and serve, which are key point feature detectors often used to be often using
computer vision for less so now.
So we don't deal with them in discourse.
However, if you do want tutorial on those things, I can create one.
So let's take a look at two blobs now.
You can see the interesting here is a picture is a center of the flower in these images, which is quite
interesting and quite cool.
So that concludes line circle and blob detection.
We're now going to move on to something circles lapses and then finding Waldo using template matching.
So that's an interesting chapter.
So, okay, we'll see you in the next next section.
Thank you.