Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install OpenCV on Linux system

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

Editor to share with you how to install OpenCV Linux system, I believe that most people do not know much about it, so share this article for your reference, I hope you will learn a lot after reading this article, let's go to understand it!

OpenCV can carry out human-computer interaction, object recognition, image segmentation, face recognition, motion recognition, motion tracking, robot and other fields of a very powerful software, so how to install OpenCV in the Linux system?

About OpenCV: OpenCV is an open source computer vision and machine learning software library based on BBSD written in C++.

It can run on multiple operating systems such as Linux, windows, etc.

At the same time, it provides the interface of python, Ruby, MATLAB and other languages.

1. Remove the previously installed ffmpeg and x264 sudo apt-get-qq remove ffmpeg x264 libx264-dev2. Install dependency a. Install the compiler tool sudo apt-get install build-essentialb. Install cmake, git, pkg-config and other auxiliary tools sudo apt-get install cmake git pkg-config libgtk2.0-dev libavcodec-dev libavformat-dev libswscale-dev qt5-defaultc. Install the associated library sudo apt-get install python-dev python-opencv python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev3. Download and extract OpenCV wget-O OpenCV-$version.zip http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/$version/opencv-"$version".zip/download unzip OpenCV-$version.zip cd opencv-$version4. Compile the source code and build OpenCV mkdir build cd build cmake-D CMAKE_BUILD_TYPE=RELEASE-D CMAKE_INSTALL_PREFIX=/usr/local-D WITH_TBB=ON-D BUILD_NEW_PYTHON_SUPPORT=ON-D WITH_V4L=ON-D INSTALL_C_EXAMPLES=ON-D INSTALL_C_EXAMPLES=ON-D INSTALL_PYTHON_EXAMPLES=ON-D BUILD_EXAMPLES=ON-D WITH_QT=ON-D WITH_OPENGL=ON. Make-j4 sudo make install sudo sh-c 'echo "/ usr/local/lib" > / etc/ld.so.conf.d/opencv.conf' sudo ldconfig Note: when building a cmake environment, ippicv_linux_20151201.tgz often fails to download. You can go directly to the 3rdparty/ippicv/downloads/linux-808b791 a6eac9ed78d32a7666804320e directory and download ippicv directly, as shown below:

Wget https://raw.githubusercontent.com/Itseez/opencv_3rdparty/81a676001ca8075ada498583e4166079e5744668/ippicv/i above is all the content of this article "how to install OpenCV on Linux system". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report