How To Install opencv-contrib on CentOS 8

In this tutorial we learn how to install opencv-contrib on CentOS 8. opencv-contrib is OpenCV contributed functionality

Introduction

In this tutorial we learn how to install opencv-contrib on CentOS 8.

What is opencv-contrib

This package is intended for development of so-called “extra” modules, contributed functionality. New modules quite often do not have stable API, and they are not well-tested. Thus, they shouldn’t be released as a part of official OpenCV distribution, since the library maintains binary compatibility, and tries to provide decent performance and stability. This package is intended for development of so-called “extra” modules, contributed functionality. New modules quite often do not have stable API, and they are not well-tested. Thus, they shouldn’t be released as a part of official OpenCV distribution, since the library maintains binary compatibility, and tries to provide decent performance and stability.

We can use yum or dnf to install opencv-contrib on CentOS 8. In this tutorial we discuss both methods but you only need to choose one of method to install opencv-contrib.

Install opencv-contrib on CentOS 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache

After updating yum database, We can install opencv-contrib using yum by running the following command:

sudo yum -y install opencv-contrib

Install opencv-contrib on CentOS 8 Using dnf

If you don’t have dnf installed you can install DNF on CentOS 7 first. Update yum database with dnf using the following command.

sudo dnf makecache

After updating yum database, We can install opencv-contrib using dnf by running the following command:

sudo dnf -y install opencv-contrib

How To Uninstall opencv-contrib on CentOS 8

To uninstall only the opencv-contrib package we can use the following command:

sudo dnf remove opencv-contrib

References

Summary

In this tutorial we learn how to install opencv-contrib on CentOS 8 using yum and dnf.