I will demonstrate the easiest way to install OpenCV3 (C++ and Python) on Ubuntu 16.04.3 using an installation script. After installation, I will show you how to create a OpenCV project with a Makefile.
To install OpenCV, follow the instructions below:
Step 1: Download the installation script install-opencv.sh and copy it to your Desktop.
Step 2: Open the terminal screen, navigate to Desktop and run bash install-opencv.sh.
To create an OpenCV project, follow the instructions below:
Step 1: Create a OpenCV “hello_world” project folder. Download the hello_world_opencv.cpp file and copy it to the “hello_world” folder.
Step 2: Download the OpenCV project Makefile and copy it to the “hello_world” folder. (Note: you will have to modify the name of the source file in Makefile from “HelloWorld.cpp” to “hello_world_opencv.cpp”)
Step 3: Open the terminal screen, navigate to “hello_world” folder and run make to compile the project. Next run ./HelloWorld to run the project.