How To Install opencv.x86_64 on Amazon Linux 2

In this tutorial we learn how to install opencv.x86_64 in Amazon Linux 2. opencv.x86_64 is Collection of algorithms for computer vision

Introduction

In this tutorial we learn how to install opencv.x86_64 on Amazon Linux 2.

What is opencv.x86_64

OpenCV means Intel® Open Source Computer Vision Library. It is a collection of C functions and a few C++ classes that implement some popular Image Processing and Computer Vision algorithms.

We can use yum to install opencv.x86_64 on Amazon Linux 2. In this tutorial we discuss both methods but you only need to choose one of method to install opencv.x86_64.

Install opencv.x86_64 on Amazon Linux 2 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

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

sudo yum -y install opencv.x86_64

How To Uninstall opencv.x86_64 on Amazon Linux 2

To uninstall only the opencv.x86_64 package we can use the following command:

sudo yum remove opencv.x86_64

opencv.x86_64 Package Contents on Amazon Linux 2

/usr/bin/opencv_createsamples
/usr/bin/opencv_haartraining
/usr/bin/opencv_performance
/usr/bin/opencv_traincascade
/usr/lib64/libopencv_calib3d.so.2.4
/usr/lib64/libopencv_calib3d.so.2.4.5
/usr/lib64/libopencv_contrib.so.2.4
/usr/lib64/libopencv_contrib.so.2.4.5
/usr/lib64/libopencv_features2d.so.2.4
/usr/lib64/libopencv_features2d.so.2.4.5
/usr/lib64/libopencv_highgui.so.2.4
/usr/lib64/libopencv_highgui.so.2.4.5
/usr/lib64/libopencv_legacy.so.2.4
/usr/lib64/libopencv_legacy.so.2.4.5
/usr/lib64/libopencv_objdetect.so.2.4
/usr/lib64/libopencv_objdetect.so.2.4.5
/usr/lib64/libopencv_stitching.so.2.4
/usr/lib64/libopencv_stitching.so.2.4.5
/usr/lib64/libopencv_superres.so.2.4
/usr/lib64/libopencv_superres.so.2.4.5
/usr/lib64/libopencv_ts.so.2.4
/usr/lib64/libopencv_ts.so.2.4.5
/usr/lib64/libopencv_videostab.so.2.4
/usr/lib64/libopencv_videostab.so.2.4.5
/usr/share/OpenCV
/usr/share/OpenCV/haarcascades
/usr/share/OpenCV/haarcascades/haarcascade_eye.xml
/usr/share/OpenCV/haarcascades/haarcascade_eye_tree_eyeglasses.xml
/usr/share/OpenCV/haarcascades/haarcascade_frontalface_alt.xml
/usr/share/OpenCV/haarcascades/haarcascade_frontalface_alt2.xml
/usr/share/OpenCV/haarcascades/haarcascade_frontalface_alt_tree.xml
/usr/share/OpenCV/haarcascades/haarcascade_frontalface_default.xml
/usr/share/OpenCV/haarcascades/haarcascade_fullbody.xml
/usr/share/OpenCV/haarcascades/haarcascade_lefteye_2splits.xml
/usr/share/OpenCV/haarcascades/haarcascade_lowerbody.xml
/usr/share/OpenCV/haarcascades/haarcascade_mcs_eyepair_big.xml
/usr/share/OpenCV/haarcascades/haarcascade_mcs_eyepair_small.xml
/usr/share/OpenCV/haarcascades/haarcascade_mcs_leftear.xml
/usr/share/OpenCV/haarcascades/haarcascade_mcs_lefteye.xml
/usr/share/OpenCV/haarcascades/haarcascade_mcs_mouth.xml
/usr/share/OpenCV/haarcascades/haarcascade_mcs_nose.xml
/usr/share/OpenCV/haarcascades/haarcascade_mcs_rightear.xml
/usr/share/OpenCV/haarcascades/haarcascade_mcs_righteye.xml
/usr/share/OpenCV/haarcascades/haarcascade_mcs_upperbody.xml
/usr/share/OpenCV/haarcascades/haarcascade_profileface.xml
/usr/share/OpenCV/haarcascades/haarcascade_righteye_2splits.xml
/usr/share/OpenCV/haarcascades/haarcascade_smile.xml
/usr/share/OpenCV/haarcascades/haarcascade_upperbody.xml
/usr/share/OpenCV/lbpcascades
/usr/share/OpenCV/lbpcascades/lbpcascade_frontalface.xml
/usr/share/OpenCV/lbpcascades/lbpcascade_profileface.xml
/usr/share/OpenCV/lbpcascades/lbpcascade_silverware.xml
/usr/share/doc/opencv-2.4.5
/usr/share/doc/opencv-2.4.5/license.txt

References

Summary

In this tutorial we learn how to install opencv.x86_64 on Amazon Linux 2 using yum.