How To Install opencv-contrib on AlmaLinux 8

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

Introduction

In this tutorial we learn how to install opencv-contrib on AlmaLinux 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.

We can use yum or dnf to install opencv-contrib on AlmaLinux 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 AlmaLinux 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

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

sudo dnf -y install opencv-contrib

Install opencv-contrib on AlmaLinux 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

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

sudo yum -y install opencv-contrib

How To Uninstall opencv-contrib on AlmaLinux 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 AlmaLinux 8 using yum and dnf.