Opencv Cheatsheet



opencv-python package does not support cuda and atlas.So in this post, i’ll compile opencv 4.1.0 for Ubuntu 18.04, with Cuda, Atlas, python

Requirement

  • OS : Ubuntu 18.04
  • Opencv version : 4.1.0
  • Cuda : 10.1
  • Python : 3.6, Anaconda

Procedure

Install Dependencies

Download source

Filter image in-place with a 3x3 high-pass kernel (preserve negative responses by shifting the result by 128): filter2D(image, image, image.depth, (Mat (3,3). OpenCV provides a real-time optimized Computer Vision library, tools, and hardware. It also supports model execution for Machine Learning (ML) and Artificial Intelligence (AI).

Download opencv’s source code from opencv’s homepage . And opencv contribution modules’ source code from github. I’ll use the 4.1.0 version and put at the following location

Compiling

Opencv Cheatsheet
  • Create yor custom python environment
  • Compiling

Opencv Cheat Sheet C++

  • Or compile with both python2 and python 3
Cheatsheet
  • How to change build’s options
Cheatsheet

If you find that the above command line is hard to read, please use cmake-gui . It is the most convinient method.

  • Link python into current miniconda environment
Cheatsheet
  • Checking

BuildInformation is as follow

List of bugs

There are some bugs that is occured during the compiling

Opencv c++ cheat sheet
  • fatal error: nvcuvid.h: No such file or directory

Opencv Cheat Sheet

  • messing between python2 and python3

Opencv Python Cheat Sheet

End