首页 > 编程知识 正文

opencv配置python,opencv配置环境变量

时间:2023-05-04 15:13:51 阅读:12090 作者:4564

icannotseemtoconfigureopencvtolinktoanon--/usr/libsetoffmpeglibraries。

myld _ library _ pathcontainsadirectlinktothefolderforthecustominstalloffmpeg :

LD _ library _ path=/path to/ffmpeg-0.10.2/lib

Additionally,I've configured pkgconfig as:

pkg _ config _ path=/same path to/ffmpeg-0.10.2/lib/pkgconfig /

withincmakehowevericannotfindanysettingforpathtoffmpeg-eitherinbasicorcustom.theonlysettingrelatedtoffmpegappearstobewith

icanbuildopencvbutitseemstolinktothesystemlibrariesforlibavcodec-thiscausesaconflictasthesystemlibrariesareversion.52 and thth re.53.linkinganapponamachinewithoutthesamesystemlibrariesseemstonotlinktomycustominstallofopenc v

iamnotsureifmyproblemiswithbuildingandlinkingtothewrongversionoffmpegorifissomethingwithmyenvironmentafterbuilding (

I am building on Linux,Redhat 6,OpenCV 2.3.1。

解决方案

Something like

导出LD _ library _ path=/ffmpeg _ install _ path/lib /

export pkg _ config _ path=$ pkg _ config _ path :/ffmpeg _ install _ path/lib/pkgconfig

导出pkg _ config _ libdir=$ pkg _ config _ libdir :/ffmpeg _ install _ path/lib /

should work.atleastitworksforopencv 2.4.xon myubuntu。

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。