(Original) how to compile opencv in Linux? (OS) (Linux) (centos) (Image Processing) (C/C ++)

Source: Internet
Author: User

Abstract
Opencv is a C/C ++ Computer Vision (Computer Vision) function, which can be directly installed on Windows, but in Linux, You need to manually renew your subscription. This article shows my experience in centos 5.1.

Introduction
Step 1:
Go to sourceforge.net: opencv-1.0.0.tar.gz in linuxlinuxunder Open Computer Vision library.

Step 2:
Unzip opencv-1.0.0.tar.gz

[ Root @ localhost ~ ] # Tar-zxvf opencv- 1.0.0 .Tar.gz

Step 3:
Go to the opencv Project

[ Root @ localhost ~ ] # CD opencv- 1.0.0

Step 4:
In the tutorial environment, set opencv security under/usr/local/opencv

[ Root @ localhost opencv-1.0.0 ] #./Configure -- prefix = /Usr/local/opencv

Step 5:
Zookeeper opencv

[ Root @ localhost opencv-1.0.0 ] # Make

Step 6:
Installing opencv

[ Root @ localhost opencv-1.0.0 ] # Make install

Step 7:
Update Dynamic Route results

[ Root @ localhost opencv-1.0.0 ] # Vi/etc/lD. So. conf

Join

Include lD. So. conf. d/*. conf
/Usr/local/opencv/lib

Stored rows

[ Root @ localhost opencv-1.0.0 ] # Ldconfig

Step 8:
Installing opencv is successful

[ 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

Results

See also
(Original) How does one implement libdecodeqr in vc8? (C/C ++) (VC ++) (Image Processing)
(Original) How does one implement libdecodeqr in Linux? (OS) (Linux) (cenos) (Image Processing) (C/C ++)

Reference
Sourceforge.net: Open Computer Vision Library
Yan Rui, Yu Shiqi 2006, opencv tutorial, Beijing Aerospace University Press
Chee, haha, working in the security center opencv
Install opencv in Linux-2 of OT's learning documents

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.