Afrikaans
Akan
Albanian
Amharic
Arabic
Armenian
Azerbaijani
Basque
Belarusian
Bemba
Bengali
Bihari
Bosnian
Breton
Bulgarian
Cambodian
Catalan
Cebuano
Cherokee
Chichewa
Chinese (Simplified)
Chinese (Traditional)
Corsican
Croatian
Czech
Danish
Dutch
English
Esperanto
Estonian
Ewe
Faroese
Filipino
Finnish
French
Frisian
Ga
Galician
Georgian
German
Greek
Guarani
Gujarati
Haitian Creole
Hausa
Hawaiian
Hebrew
Hindi
Hmong
Hungarian
Icelandic
Igbo
Indonesian
Interlingua
Irish
Italian
Japanese
Javanese
Kannada
Kazakh
Kinyarwanda
Kirundi
Kongo
Korean
Krio (Sierra Leone)
Kurdish
Kurdish (Soranî)
Kyrgyz
Laothian
Latin
Latvian
Lingala
Lithuanian
Lozi
Luganda
Luo
Luxembourgish
Macedonian
Malagasy
Malay
Malayalam
Maltese
Maori
Marathi
Mauritian Creole
Moldavian
Mongolian
Myanmar (Burmese)
Montenegrin
Nepali
Nigerian Pidgin
Northern Sotho
Norwegian
Norwegian (Nynorsk)
Occitan
Oriya
Oromo
Pashto
Persian
Polish
Portuguese (Brazil)
Portuguese (Portugal)
Punjabi
Quechua
Romanian
Romansh
Runyakitara
Russian
Samoan
Scots Gaelic
Serbian
Serbo-Croatian
Sesotho
Setswana
Seychellois Creole
Shona
Sindhi
Sinhalese
Slovak
Slovenian
Somali
Spanish
Spanish (Latin American)
Sundanese
Swahili
Swedish
Tajik
Tamil
Tatar
Telugu
Thai
Tigrinya
Tonga
Tshiluba
Tumbuka
Turkish
Turkmen
Twi
Uighur
Ukrainian
Urdu
Uzbek
Welsh
Wolof
Xhosa
Yiddish
Yoruba
Zulu
1
Hello and welcome to this new tutorial.
2
So in the previous tutorial we started to define our detect function which takes as input the grade
3
that is the black and white image.
4
And that same original image which is frame and we started to get the faces to apples which are not
5
only the coordinates of the upper left corner of the rectangle that will detect the face but also the
6
width and the height of these rectangles.
7
So we got this things to detect Montell method.
8
And now we're going to start a full loop that will iterate through these faces and for each of these
9
faces we're going to draw a rectangle and we will detect some eyes.
10
So let's start this for loop four and we're going to iterate through the faces and as we said faces
11
are tables of four elements x and y which are the coordinates of the upper left corner of the rectangle
12
detecting the face w which will be the width of the rectangle and H which will be the height of this
13
rectangle.
14
So for X Y W and H N then obviously faces because spaces contains exactly the Stupples of x y w an edge.
15
So that's it that's the beginning of the follow up.
16
And now we are ready to enter inside the loop to say what we want to do at each step.
17
That is for each faces.
18
So the first thing we want to do very simply is to draw the rectangle.
19
And actually this is very simple that's why we're using Open City.
20
We have a function for this which is the rectangle function very simply.
21
So what we need to do what we simply need to do is take C-v to our opens the module then do that and
22
then this rectangle function and this rectangle function takes several arguments.
23
The first one is frame of course you know we want to specify on which image we want to draw the rectangle.
24
Our ISO frame is our first argument and then we need to input several more arguments.
25
The second one is the coordinates of the upper left corner of the rectangle and that we have it because
26
that's exactly X and Y.
27
So that second argument is exactly the couple of these coordinates x and y.
28
So that's the second argument.
29
Then the third argument is going to be the couple of coordinates of the lower right corner of the rectangle.
30
And that we can get it by taking x plus w and y s h because W is the with and h is the height.
31
So that gives us exactly the coordinates of the lower right corner of the rectangle.
32
Then we need to pick a color for the rectangle.
33
So that's going to be exactly our next argument.
34
And you know to specify a color we need to use RGV code 255 0 0 and then for the X we'll pick a different
35
color we'll pick for example green to zero here to Phi Phi here and 0.
36
But anyway that's the fourth argument for the color.
37
And then we need to put one last argument which is not very important bresh is going to be the thickness
38
of the edges of the rectangles.
39
So we're going to pick two is just in order to have some nice rectangles and that's very important that
40
just for the form but two is a good choice.
41
You will get some nice rectangles for the faces.
42
All right so congratulations.
43
We actually detected the faces draw the rectangles.
44
Now we're going to do the same for the eyes.
45
But as we said in the previous tutorial or tutorials before.
46
Well we're going to do that in the referential of the face to save some computation time.
47
So we will take care of these eyes in the next toils.
48
And until then and joy can be division.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.