Installing ROpenCVLite
should go smoothly on all major operating systems (Mac, Windows, “Ubuntu-like” Linux). There are a few steps to follow before installing the package itself in order to install all the necessary external (i.e. non-R) dependencies for OpenCV
.
All installation steps are described below.
Before installing ROpenCVLite
, you will need to install the latest versions of CMake
and Rtools
.
Download CMake
for Windows at https://cmake.org/download/.
Download the latest “recommended” version of Rtools
at https://cran.r-project.org/bin/windows/Rtools/.
In both cases, make sure to tell the installer to add CMake
and Rtools
to your “PATH”.
Before installing ROpenCVLite
, you will need to install the latest version of CMake
. Hereafter are 3 options to do this on Mac.
Download installer from cmake.org
Go to https://cmake.org/download/. Scroll down until you reach the “Latest Release” section. Download the installer for Mac OS X (.dmg file). Once the download is complete, double-click on the installer and accept the license agreement. Drag and drop the Cmake
app into the Applications
folder.
To make Cmake
accessible to R
, open a terminal and type:
sudo "/Applications/CMake.app/Contents/bin/cmake-gui" --install
It will ask for your administrator password.
Homebrew:
MacPorts:
Before installing ROpenCVLite
, you will need to install the latest version of CMake
. Hereafter are two options to do this on Linux.
Download installer from cmake.org
Download CMake
for Linux at https://cmake.org/download/. However it is recommended that you install it using your distribution’s package management system.
Use you distribution’s package management system
Ubuntu:
[TODO: add more Linux install commands]
ROpenCVLite
You can install ROpenCVLite
from CRAN as follows:
Or you can install the latest latest development version (not necessarily tested) as follows:
This will not install OpenCV
yet. You will be asked whether you want to install it the first time you load the package.
This step can take some time. Go make yourself a cup of coffee or two while ROpenCVLite
downloads, compiles and installs OpenCV
on your system.
In addition, you can also request the (re)installation of OpenCV
at any time as follows: