• Contact
  • Contact Us
  • Disclamer
  • Home 1
  • Home 2
  • Home 3
  • Privacy Policy
Friday, May 9, 2025
How VPS - How to use/setup VPS
  • Login
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
How VPS - How to use/setup VPS
No Result
View All Result
Home Operating System CentOS

How to Install OpenCV on CentOS 7

How VPS by How VPS
October 1, 2019
in CentOS
0
0
SHARES
49
VIEWS
Share on FacebookShare on Twitter

Contents

  1. Prerequisites
  2. Step 1: Install dependencies for OpenCV
  3. Step 2: Download the OpenCV 3.3.0 archive
  4. Step 3: Compile and install OpenCV 3.3.0
  5. Step 4: Configure required variables
  6. Step 5 (optional): Run tests
  7. Want to contribute?


OpenCV, also known as Open Source Computer Vision Library, is an open source cross-platform computer vision algorithm library. Nowadays, OpenCV is being widely used in all kind of visual processing areas, such as facial recognition, gesture recognition, human-computer interaction, Object identification, motion tracking, etc.

OpenCV can be deployed on various platforms, including Windows, Linux, Android, iOS, etc. In this article, I will show you how to compile and install OpenCV 3.3.0, the latest stable release of OpenCV at the time I wrote this article, on the CentOS 7 x64 operating system.

Prerequisites

  • A Vultr CentOS 7 x64 server instance.
  • Logging in as root.
  • The server instance has been updated to the latest stable status.

Step 1: Install dependencies for OpenCV

Use the following commands to install all required dependencies for compiling OpenCV:

yum groupinstall "Development Tools" -y
yum install cmake gcc gtk2-devel numpy pkconfig -y

Step 2: Download the OpenCV 3.3.0 archive

Download and uncompress OpenCV 3.3.0 archive as below:

cd
wget https://github.com/opencv/opencv/archive/3.3.0.zip
unzip 3.3.0.zip

Step 3: Compile and install OpenCV 3.3.0

Use the following commands to compile and install OpenCV, and compiled OpenCV files will be saved in the /usr/local directory.

cd opencv-3.3.0
mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=DEBUG -D CMAKE_INSTALL_PREFIX=/usr/local ..
make
make install

Step 4: Configure required variables

In addtion to compiling and installing files, you need to specify path info for pkgconfig and OpenCV:

export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig/
echo '/usr/local/lib/' >> /etc/ld.so.conf.d/opencv.conf
ldconfig

Step 5 (optional): Run tests

To test your OpenCV installation, you can download extra test data from OpenCV extra repository:

cd
git clone https://github.com/opencv/opencv_extra.git
export OPENCV_TEST_DATA_PATH=/root/opencv_extra/testdata

In the cmake build directory, you will find several test executables named in the same kind of format opencv_test_*. Run any one you are interested in to perform a test. For example:

cd /root/opencv-3.3.0/build/bin
ls
./opencv_test_photo

This concludes the tutorial. Thanks for reading.

Want to contribute?

You could earn up to $300 by adding new articles

Submit your article
Suggest an update
Request an article
Previous Post

Installing Plex Media Server on CentOS 7

Next Post

How To Install Just Cause 2 (JC2-MP) Server on CentOS 7

Next Post

How To Install Just Cause 2 (JC2-MP) Server on CentOS 7

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

No Result
View All Result

Recent Post

Install Imagemagick on CentOS
CentOS

Install Imagemagick on CentOS

by How VPS
June 28, 2023
0

This is how I installed Imagemagick on a vanilla CentOS server Start off by installing the prerequisites yum install php-pear...

Read more
how to Check phpinfo

How to Check phpinfo of Hosting or VPS?

June 28, 2023
Failed to download metadata for repo 'appstream' on Centos 8

How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

February 25, 2022
How to Fix MySQL Error "Plugin 'InnoDB' registration as a STORAGE ENGINE failed"?

How to Fix MySQL Error “Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed”?

November 17, 2020
How to optimize Mysql or MariaDB

How to optimize Mysql or MariaDB

November 3, 2020

Recent News

  • Install Imagemagick on CentOS
  • How to Check phpinfo of Hosting or VPS?
  • How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

Category

  • Arch
  • Authentication
  • Backups
  • BSD
  • Centmin Mod
  • CentOS
  • Control Panels
  • CoreOS
  • CWP
  • Debian
  • Directadmin
  • Encryption
  • Fedora
  • Firewalls
  • Hocvps Script
  • Hosting providers
  • Kloxo-MR
  • Linux
  • Mitigations
  • Operating System
  • Plesk
  • Reviews
  • Securing VPS/Servers
  • Security Patches
  • SSL Certificates
  • Uncategorized
  • Upgrading
  • VPS/Servers management guides
  • Vulnerability Detection
  • Web servers software
  • Webhosting Control Panel
  • About
  • Advertise
  • Careers
  • Contact

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In
Thabet