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

Specific example of MySQL multi-table query

1. Use the SELECT clause to query multiple tables...

25 advanced uses of JS array reduce that you must know

Preface Reduce is one of the new conventional arr...

MySQL 5.7.27 installation and configuration method graphic tutorial

The installation tutorial of MySQL 5.7.27 is reco...

How to build svn server in linux

1: Install SVN yum install -y subversion 2. Creat...

Detailed explanation of Vue3's responsive principle

Table of contents Review of Vue2 responsive princ...

Solution to MySQL startup successfully but not listening to the port

Problem Description MySQL is started successfully...

One-click installation of MySQL 5.7 and password policy modification method

1. One-click installation of Mysql script [root@u...

Implementation of vue-nuxt login authentication

Table of contents introduce Link start Continue t...

Detailed explanation of JavaScript upload file limit parameter case

Project scenario: 1. Upload file restrictions Fun...

How to choose between MySQL CHAR and VARCHAR

Table of contents VARCHAR and CHAR Types Conclusi...

Basic usage of JS date control My97DatePicker

My97DatePicker is a very flexible and easy-to-use...

Share 13 excellent web wireframe design and production tools

When you start working on a project, it’s importa...

Six inheritance methods in JS and their advantages and disadvantages

Table of contents Preface Prototype chain inherit...

A complete record of a Mysql deadlock troubleshooting process

Preface The database deadlocks I encountered befo...