Hi and welcome to your 15 to open TV chapter, which is called Finding Corners.
So go ahead and open this notebook and you can see the score up to the top.
Firstly, let's load all images and libraries and everything.
The function?
So let's go down to this sufficiently.
What is a corner?
Because I mean, intuitively, you know a corner.
What a corner is an image.
I mean, you should.
However, I'll explain to you a bit.
Corner is essentially it's it's a local point.
Remember, it's corner to corner point, whose local neighbourhood stands in two dominant and different
edged directions, which means that it's basically the threshold point for a big change in the image.
And in other words, a corner can be interpreted as a junction which have two edges where edges is such
a sudden change in the image brightness.
Corners are important features and an image, and generally a team pinned to it as an interesting point,
and this is an important line is that they're invariant to translations and rotation and illumination,
which means that they're very good key points.
So one of the best quality detectors, which is Harris Quinn Interactive, which was developed in 1998.
You can read the paper here.
It's a quite a quite a good algorithm.
I'm not going to go through the entire algorithm.
I'm just going to go through how to use the algorithm in open TV, but it works quite well.
So you can see the actually output of this chessboard pattern here.
It actually gets all the corners fairly well.
And I've used this for two point extraction and other images, and they generally generally works very,
very well.
You don't really have much issues with this.
And even with these default parameters, it works quite well.
So let's take a look at the function.
If this is the function here key to coin a house and all of those, it takes a grayscale image as the
input and we use the block size.
It's a neighborhood that we're going to use to consider neighbourhood as pixels around each area.
So then to give it a sliding window, a type size we're looking at and then we look at aperture size,
which is what we use it or we use to calculate a sort of derivative.
And then there's the key, which is the Harris detector.
It's a free parameter in this equation, which I'm not entirely sure what it controls.
Maybe you can experiment and see for yourself or read the paper and see if you can figure it out.
And actually, this this algorithm was about in 1980, not 1938.
That's my my table.
So let's just correct that.
So let's run this code and you can see the outputs of this, and it looks looks quite good.
So there's a little corner detection algorithm, which is called good for just the traffic, which is
quite explicit.
And what it is gives us good features and also it also gives us good corners.
Perhaps I haven't used this much in practice, but this is the output here.
It's quite simple again, and you have the best configuration parameters.
It tells us how much corners we want to look at.
What's a quality level?
Quality levels is basically how strict, how on strict we want to be with what a corner is, how we
define a corner essentially, and the minimum distance between returned corners.
So let's run this block of code here and you can see we take the output outputs of basically x y points
and we can just draw rectangles around those points.
So we just go ten pixels above 10 pixels wide and destroy these little rectangles around here.
So those are two very interesting corner detection methods in open TV.
You may have to use it or not for your applications, depending on what it is, but it's very good to
know this.
So that concludes, most of all, a simple, open TV work.
These are all image manipulations, not all of them.
They're actually quite a few more.
But these are the most useful ones.
I find that actually as a beginner practitioner, the ones you need to know are all here in this first
15 chapters.
And now we're going to move on to a bit more advanced settings, which is fierce and eye detection and
a bunch of other algorithms here.
So stay tuned, and we'll be doing a lot more fun and cool stuff with computer vision and open TV.
Thank you.