OpenCV 3.2 released comes with tons of improvements and bug fixes. Its is an open source computer vision and machine learning software library, built to provide a common infrastructure for computer vision applications and to accelerate the use of machine perception in the commercial products. Before we look at how to install OpenCV on Ubuntu, let’s review changes in latest release:
- sinusoidal patterns for structured light and phase unwrapping module
- DIS optical flow (excellent dense optical flow algorithm that is both significantly better and significantly faster than Farneback’s algorithm – our baseline), and learning-based color constancy algorithms implementation
- CNN based tracking algorithm (GOTURN)
- PCAFlow as well as Global Patch Collider algorithms implementation
- Multi-language Tutorials in Python, C++ and Java
- New camera model as well as parallel processing for stitching pipeline
- Optimizations as well as improvements of dnn module
- Base64 and JSON support for file storage. Use names like “myfilestorage.xml?base64” when writing file storage to store big chunks of numerical data in base64-encoded form.
- tiny_dnn improvements and integration
- Quantization and semantic saliency detection with tiny_dnn
- Word-spotting CNN based algorithm
- Greatly improved and accelerated dnn module in opencv_contrib:
- Many new layers, including deconvolution, LSTM etc.
- Support for semantic segmentation and SSD networks with samples.
- TensorFlow importer + sample that runs Inception net by Google.
- More image formats and camera backends supported
- Interactive camera calibration app
- Multiple algorithms implemented in opencv_contrib
- Supported latest OSes, including Ubuntu 16.04 LTS as well as OSX 10.12
- Lot’s of optimizations for IA and ARM archs using parallelism, vector instructions and new OpenCL kernels.
- Can now use vendor-provided OpenVX and LAPACK/BLAS (including Intel MKL, Apple’s Accelerate, OpenBLAS and Atlas) hence improving acceleration
How to install Opencv 3.2 on Ubuntu 16.04
Note: This would take sometime to complete, so be patient.
sudo apt-get -y install libopencv-dev build-essential cmake git libgtk2.0-dev pkg-config python-dev python-numpy libdc1394-22 libdc1394-22-dev libjpeg-dev libpng12-dev libjasper-dev libavcodec-dev libavformat-dev libswscale-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libv4l-dev libtbb-dev libqt4-dev libfaac-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev libvorbis-dev libxvidcore-dev x264 v4l-utils unzip mkdir opencv cd opencv wget https://github.com/Itseez/opencv/archive/3.2.0.zip -O opencv-3.2.0.zip unzip opencv-3.2.0.zip cd opencv-3.2.0 mkdir build cd build cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -D WITH_V4L=ON -D WITH_QT=ON -D WITH_OPENGL=ON .. make -j $(nproc) sudo make install sudo /bin/bash -c 'echo "/usr/local/lib" > /etc/ld.so.conf.d/opencv.conf' sudo ldconfig
- Reboot your machine and run following command to check installed version
pkg-config --modversion opencv
How to uninstall it from Ubuntu 16.04
sudo apt-get remove opencv