1
00:00:00,900 --> 00:00:08,940
In this lesson we will be installing open CV library open CV is that open source computer vision library

2
00:00:09,270 --> 00:00:11,130
provided by Intel.

3
00:00:11,130 --> 00:00:16,780
In this course we will be using the open CV library for face recognition.

4
00:00:16,830 --> 00:00:22,180
We will set the drone camera to track a person based on this face recognition.

5
00:00:22,200 --> 00:00:30,720
Now let's get started installing open your web browser and go to HD TTP as Colin slash slash open CV

6
00:00:30,810 --> 00:00:31,920
dot org.

7
00:00:31,920 --> 00:00:36,030
Here you will find the document on open CV.

8
00:00:36,030 --> 00:00:42,180
The document might be a bit complicated so I want you to click on the tutorial link on the right side

9
00:00:42,180 --> 00:00:52,650
of the screen click on introduction to open CV scroll down a bit to find installation in Windows link

10
00:00:54,390 --> 00:01:00,720
click on the link to the page that says installation by using the pre-built libraries.

11
00:01:00,720 --> 00:01:08,820
Now click on the link that says Page on source forge in this page you will see a green button to download

12
00:01:08,820 --> 00:01:11,910
the latest version and this page.

13
00:01:11,940 --> 00:01:20,200
You may find the older version but we'll be downloading the open CV for point zero point zero.

14
00:01:20,420 --> 00:01:24,180
You may find a even more newer version of the library.

15
00:01:24,560 --> 00:01:31,900
You may install that version but I want you to know that there may be some differences let's hit the

16
00:01:31,900 --> 00:01:34,150
download button to start the process.

17
00:01:35,770 --> 00:01:41,700
This may take some time so I will skip the process here we've completed the download.

18
00:01:41,770 --> 00:01:45,310
Click on the tab below to launch the installer.

19
00:01:45,310 --> 00:01:47,050
Let's close this window.

20
00:01:47,050 --> 00:01:53,380
Let's extract the folder by hitting the extract button let's skip the process to the end.

21
00:01:55,170 --> 00:02:00,640
Once you've completed extracting the file the files will be in your download file.

22
00:02:00,690 --> 00:02:03,620
Here you will find the open CV folder.

23
00:02:03,750 --> 00:02:11,190
Right click on the file and choose cut we'll move the file onto the C drive double click on the C drive

24
00:02:11,280 --> 00:02:15,890
and paste the folder remember where we put the file.

25
00:02:16,310 --> 00:02:18,810
It's directly under the C drive.

26
00:02:18,830 --> 00:02:29,380
Now let's go into the file go into the build folder that go into that time 64 folder next.

27
00:02:29,450 --> 00:02:34,560
Go into V.C. 15 folder and go to the bin file.

28
00:02:35,940 --> 00:02:39,030
This will be the open CV file path.

29
00:02:39,030 --> 00:02:44,270
Copy the path so we can set the environment variable.

30
00:02:44,330 --> 00:02:55,820
Now go to the start menu and go to Windows system scroll down to go to the control panel choose system

31
00:02:55,820 --> 00:03:00,950
and security click on system.

32
00:03:00,950 --> 00:03:08,360
Once you reach this screen click on advanced system settings in this window you will see the environment

33
00:03:08,360 --> 00:03:15,620
variables button click on the button depending on your Windows version the location of this button may

34
00:03:15,620 --> 00:03:16,880
differ.

35
00:03:16,880 --> 00:03:22,460
If you can't find the location make sure you do your searching based on the version of your windows

36
00:03:23,900 --> 00:03:24,950
click on this button.

37
00:03:26,460 --> 00:03:31,420
On the middle of the window you will see System variables in the list.

38
00:03:31,440 --> 00:03:34,090
Scroll down to find the variable path.

39
00:03:34,170 --> 00:03:35,400
Once you find the path.

40
00:03:35,490 --> 00:03:37,470
Click on the edit button.

41
00:03:37,650 --> 00:03:39,110
Choose New.

42
00:03:39,540 --> 00:03:43,370
Here we will paste the path we copied earlier.

43
00:03:43,560 --> 00:03:51,550
We just completed setting the open CV under the C drive and set the path to the environment variable.

44
00:03:51,570 --> 00:03:53,050
Now go on click on.

45
00:03:53,070 --> 00:03:53,740
OK.

46
00:03:54,860 --> 00:03:58,680
We've finished installing the open CV.

47
00:03:58,800 --> 00:04:07,460
We want to use the open CV on Python so we will install the library using Pip go to the start menu and

48
00:04:07,460 --> 00:04:18,040
launch the command prompt type pip install open CV either in Python hit enter to run the command and

49
00:04:18,040 --> 00:04:20,410
then installation process will begin.

50
00:04:20,410 --> 00:04:22,900
Here we've finished installing.

51
00:04:23,090 --> 00:04:27,080
Now we want to check if we can access the open CV with Python.

52
00:04:27,320 --> 00:04:32,780
Let's launch this shell by typing python and hit enter.

53
00:04:32,790 --> 00:04:41,370
Now we type in import CV 2 and hit return if you don't see any errors.

54
00:04:41,380 --> 00:04:48,920
This means that open CV has been successfully installed lets close the command prompt window.

55
00:04:48,920 --> 00:04:55,610
Now I want to take the time to also install f f MPEG which we'll be using in the course.

56
00:04:55,610 --> 00:05:05,720
Open your web browser and go to HD TTP s call on slash slash w w w dot f f MPEG dot org.

57
00:05:07,480 --> 00:05:13,500
With this software we will be able to record videos or stream videos for Mac users.

58
00:05:13,510 --> 00:05:18,560
The f f MPEG will automatically be installed when you install the open CV.

59
00:05:18,780 --> 00:05:21,790
But for Windows we need to separately install it.

60
00:05:21,790 --> 00:05:23,100
Click on the download button.

61
00:05:24,210 --> 00:05:30,290
Then click on the windows icon and choose Windows build.

62
00:05:30,390 --> 00:05:39,640
Once you get to this page choose version four point one point one then choose the architecture.

63
00:05:39,730 --> 00:05:42,780
In my case I will be choosing the 64 bit.

64
00:05:42,880 --> 00:05:47,050
Now we can hit the download build button to start the process.

65
00:05:47,170 --> 00:05:48,970
Now lets close this window.

66
00:05:48,970 --> 00:05:50,830
We need to unzip the file.

67
00:05:50,830 --> 00:05:55,300
I have the file downloaded in my downloads folder.

68
00:05:55,300 --> 00:06:02,690
Here you can see the f f MPEG four point one point one we'll go back to the upper folder and right click

69
00:06:02,690 --> 00:06:06,860
on the f f ed Peg folder and choose extract all.

70
00:06:07,910 --> 00:06:11,020
Let's extract the file under the f f MPEG folder.

71
00:06:12,840 --> 00:06:17,000
On the top you can see the extract folder.

72
00:06:17,340 --> 00:06:20,360
We are going to move the folder to the C drive.

73
00:06:20,910 --> 00:06:29,860
But before we make the move let's change the folder name to a simple f f MPEG now drag the folder directly

74
00:06:29,860 --> 00:06:30,760
to the C drive.

75
00:06:31,930 --> 00:06:39,240
Let's open the C drive and you will see the F of MPEG folder go into the folder.

76
00:06:39,580 --> 00:06:41,590
Now go into the bin folder.

77
00:06:41,710 --> 00:06:44,340
Here you see the f f MPEG inside.

78
00:06:44,440 --> 00:06:49,650
We need to set this path to the environment variable so copy the path.

79
00:06:49,810 --> 00:06:55,000
Once again go to the start menu and go to Windows system.

80
00:06:55,060 --> 00:07:05,550
Scroll down to go to the control panel choose system and security and click on system once you reach

81
00:07:05,550 --> 00:07:12,020
this screen click on advanced system settings in this window you will see the environment variables

82
00:07:12,030 --> 00:07:21,240
button click on this button on the middle of the window you will see System variables in the list.

83
00:07:21,240 --> 00:07:24,290
Scroll down to find the variable path.

84
00:07:24,780 --> 00:07:28,400
Once you find the path click on the edit button.

85
00:07:28,410 --> 00:07:34,200
Choose New here we will paste the path we copied earlier.

86
00:07:34,200 --> 00:07:39,960
If you can't find where to edit the environment variables make sure you google search based on your

87
00:07:39,960 --> 00:07:41,750
windows version.

88
00:07:41,760 --> 00:07:47,700
Now let's launch the command prompt type in f f MPEG and hit enter.

89
00:07:47,700 --> 00:07:49,660
If you are able to run the process.

90
00:07:49,740 --> 00:07:52,800
This means you have successfully installed the software.

91
00:07:53,010 --> 00:07:55,770
We've finished installing all the tools we need.

92
00:07:55,860 --> 00:07:58,620
Now we are ready to go onto the actual programming.
