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 compile and install CentOS OpenCV in LINUX system

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

Share

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

CentOS OpenCV how to compile and install in LINUX system, many novices are not very clear about this, in order to help you solve this problem, the following small series will explain in detail for everyone, there are people who need this can learn, I hope you can gain something.

How to compile CentOS OpenCV under Linux? (OS) (Linux) (CentOS) (Image Processing) (C/C++)

Abstract

CentOS OpenCV is a C/C++ open source Computer Vision shared library, as long as it is installed directly on Windows, but it needs to be compiled manually on Linux. This article is my compilation experience in CentOS 5.1.

Introduction

Step 1:

Go to SourceForge.net : Open Computer Vision Library and download opencv-1.0.0.tar.gz for Linux.

Step 2:

Unpack opencv-1.0.0.tar.gz

[root@localhost ~]# tar -zxvf opencv-1.0.0.tar.gz

Step 3:

Go to opencv directory

[root@localhost ~]# cd opencv-1.0.0

Step 4:

Detect the operating environment and configure OpenCV to be installed in/usr/local/opencv

[root@localhost opencv-1.0.0]# ./ configure --prefix=/usr/local/opencv

Step 5:

Compile CentOS OpenCV

[root@localhost opencv-1.0.0]# make

Step 6:

Install CentOS OpenCV

[root@localhost opencv-1.0.0]# make install

Step 7:

Update Dynamic Link Library

[root@localhost opencv-1.0.0]# vi /etc/ld.so.conf

join

include ld.so.conf.d/*.conf

/usr/local/opencv/lib

Archived and executed

[root@localhost opencv-1.0.0]# ldconfig

Step 8:

Testing CentOS OpenCV for successful installation

[root@localhost opencv-1.0.0]# cd samples/c

[root@localhost c]# gcc -I/usr/local/opencv/include/opencv -L/usr/local/opencv/lib -lhighgui -lstdc++ drawing.c -o drawing

[root@localhost c]# ./ drawing

execution result

See Also

How to compile libdecodeqr in VC8? (C/C++) (VC++) (Image Processing)

How to compile libdecodeqr under Linux? (OS) (Linux) (CenOS) (Image Processing) (C/C++)

Reference

SourceForge.net : Open Computer Vision Library

Did reading the above help you? If you still want to have further understanding of related knowledge or read more related articles, please pay attention to the industry information channel, thank you for your support.

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

Servers

Wechat

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

12
Report