Hey, everyone, welcome back.
And this lesson, we will see one more project that is realtime feed detection.
What are we going to do is that what are the phase detection we did in the previous lecture?
This is the phase detection applied only to the static images.
Now, let's see how to apply these to our videos.
All right.
So here you can do whatever you want.
I'm going to do is that I'm going to access my webcam and let's see my face detection here.
OK, so in order to do that, what we will do is let's start writing the code cap equal to and which
is why Civita dot video capture of zero, just mentioning my index to zero since I already posted the
necessary settings like Cascara.
Classify what we will do.
It is always a good practice to import it again now.
So once we imported this Schatzker classifier and also make sure that you're running this face detection
to run to all the codes are online, then we start building our WI loop and building our application.
So while true.
Now, here we know that we have the two arguments that is written and framed and which is actually equal
to have not read and since I know like written is basically either true or false means, if the video
captured is proper, then we'll get through.
Otherwise it is false.
So in that case, what I will do is that a threat equal to equal to falls.
If the as far as then I just want to break the loop.
Otherwise what we will do is that this time we are going to do the phase detection.
I just need to apply this function that is phase detection, because in this function we have the greyscale
and also we have the phase detection and everything is there.
So what I'm going to do here is that let me apply this function, which is phase detection and this
is my image, and detect a call to phase detection and input.
For that, he's become my frame.
Now, the next step, he is going to be displaying the image so we know how to display that Civita,
not Amesville.
And this is my real time phase detection.
And what I'm going to do here is that an image that is input for this is phase image detector.
Now let me mention the weight civita dart weight gain and said that delay to one and equal to equal
to all our D.
You can provide whatever the input argument you want, you can give that I generally like a so that's
why I'm giving a if at all.
You want to give what of the letter you want.
You can give that the meaning of Fabien's means.
If I press a then my window is going to be closed.
Now if at all use a press aide then I need to break the loop.
And finally cabbed or release.
And Civita Dot destroy all windows.
All right, now let's execute the.
Here we go.
This is me again, and you can see that my program can able to detect my face and it is really good
and accurate.
Awesome, right?
So this is how we can able to do the phase detection project cool, right?
I will see you in the next lecture.
More on this and underlain happy learning.