An error occurred while installing OpenCV in Linux.
Source: Internet
Author: User
An error occurred while installing OpenCV in Linux-general Linux technology-Linux technology and application information. For more information, see. An error occurred while installing OpenCV in Fedora Core 8.
To perform operations on video files, you must enable the with-ffmpeg switch during OpenCV compilation.
Results The video files cannot be read after the installation is successful according to the online document.
Check the configure description of OpenCV and INSTALL file discovery carefully
Libavcodec, etc. from ffmpeg 0.4.9-pre1 or later + headers.
Earlier versions do not work with OpenCV because of different API.
Libavcodec is LGPL software, so to use it with non-GPL software (such as OpenCV)
You need to build and use a _ shared _ library libavcodec. so .*:
Get ffmpeg from ffmpeg.sourceforge.net
./Configure -- enable-shared
Make
Make install
You will have got:/usr/local/lib/libavcodec. so .*
/Usr/local/lib/libavformat. so .*
(/Usr/local/lib/libavutil. so. * for newer versions)
/Usr/local/include/ffmpeg/*. h
However, check/usr/local/include/and find that there is no ffmpeg folder. The cause is found. The latest version of ffmpeg downloaded by svn is used to modify the installation path, so that OpenCV cannot find it. The solution is to manually create the ffmpeg folder in the/usr/local/include/directory, copy the header file of ffmpeg to this folder. Then compile the program according to the previous method.
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