Solution for installing opencv 3.2.0 in Ubuntu 18.04

Solution for installing opencv 3.2.0 in Ubuntu 18.04

Download opencv.zip

Install the dependencies ahead of time.

Update the download source first. Using the 17.04 source can solve the problem of not finding libjasper.dev in 18.04.

ref
https://stackoverflow.com/questions/43484357/opencv-in-ubuntu-17-04
libjasper-dev cannot be installed errorE: unable to locate libjasper-dev

Workaround

sudo add-apt-repository "deb http://security.ubuntu.com/ubuntu xenial-security main"
sudo apt update
sudo apt install libjasper1 libjasper-dev

Error:

-- Checking for module 'gstreamer-base-1.0'
-- No package 'gstreamer-base-1.0' found
-- Checking for module 'gstreamer-video-1.0'
-- No package 'gstreamer-video-1.0' found
-- Checking for module 'gstreamer-app-1.0'
-- No package 'gstreamer-app-1.0' found
-- Checking for module 'gstreamer-riff-1.0'
-- No package 'gstreamer-riff-1.0' found
-- Checking for module 'gstreamer-pbutils-1.0'
-- No package 'gstreamer-pbutils-1.0' found
-- Checking for module 'gstreamer-base-0.10'
-- No package 'gstreamer-base-0.10' found
-- Checking for module 'gstreamer-video-0.10'
-- No package 'gstreamer-video-0.10' found
-- Checking for module 'gstreamer-app-0.10'
-- No package 'gstreamer-app-0.10' found
-- Checking for module 'gstreamer-riff-0.10'
-- No package 'gstreamer-riff-0.10' found
-- Checking for module 'gstreamer-pbutils-0.10'
-- No package 'gstreamer-pbutils-0.10' found

Workaround

ref
https://stackoverflow.com/questions/37678324/compiling-opencv-with-gstreamer-cmake-not-finding-gstreamer

Install

sudo apt install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev

Report an error

--CUDA detected: 9.0
-- CUDA NVCC target flags: -gencode;arch=compute_20,code=sm_20;-gencode;arch=compute_30,code=sm_30;-gencode;arch=compute_35,code=sm_35;-gencode;arch=compute_37,code=sm_37;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_52,code=sm_52;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_61,code=sm_61;-D_FORCE_INLINES
-- Could not find OpenBLAS lib. Turning OpenBLAS_FOUND off
-- Could NOT find Atlas (missing: Atlas_CLAPACK_INCLUDE_DIR Atlas_CBLAS_LIBRARY Atlas_BLAS_LIBRARY Atlas_LAPACK_LIBRARY)
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Could NOT find JNI (missing: JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH)
-- VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory, or to VTK install subdirectory with VTKConfig.cmake file

Summarize

The above is the solution for installing opencv 3.2.0 on Ubuntu 18.04 introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!

You may also be interested in:
  • Install MySQL 5.7 on Ubuntu 18.04
  • How to install MySQL on Ubuntu 18.04 (linux)
  • A simple tutorial on installing Sogou Pinyin in Ubuntu 18.04
  • Installation of Ubuntu 18.04 reports: failed to load ldlinux.c32 and its solution steps

<<:  How to reset the initial value of the auto-increment column in the MySQL table

>>:  How to use vue-bootstrap-datetimepicker date plugin in vue-cli 3

Recommend

Tutorial on installing MySQL database and using Navicat for MySQL

MySQL is a relational database management system ...

Method of building redis cluster based on docker

Download the redis image docker pull yyyyttttwwww...

Several techniques for playing sounds with CSS

CSS is the realm of style, layout, and presentati...

How to use axios request in Vue project

Table of contents 1. Installation 2. There is no ...

How to deploy Oracle using Docker on Mac

How to deploy Oracle using Docker on Mac First in...

XHTML tutorial, a brief introduction to the basics of XHTML

<br />This article will briefly introduce yo...

How to support full Unicode in MySQL/MariaDB

Table of contents Introduction to utf8mb4 UTF8 by...

How to purchase and install Alibaba Cloud servers

1. Purchase a server In the example, the server p...

Vue v-model related knowledge summary

​v-model is a Vue directive that provides two-way...

Navicat multiple ways to modify MySQL database password

Method 1: Use the SET PASSWORD command First log ...

Grid systems in web design

Formation of the grid system In 1692, the newly c...

Implementation code for infinite scrolling with n container elements

Scenario How to correctly render lists up to 1000...

JavaScript prototype and prototype chain details

Table of contents 1. prototype (explicit prototyp...