• Ubuntu中Qt5.7.0的安装及opencv2.4.13配置


    去官网下载qt-opensource-linux-x64-5.7.0.run,到“下载”目录

    Ctrl+Alt+T打开终端

    cd /home/jv/下载
    sudo mv qt-opensource-linux-x64-5.7.0.run /opt
    cd /opt   个人习惯把软件安装到opt文件夹中
    sudo chmod +x qt-opensource-linux-x64-5.7.0.run
    sudo ./qt-opensource-linux-x64-5.7.0.run

    弹出熟悉的GUI,默认安装即可

    【图标放到左侧任务栏】

    1.进入这个文件夹

    /usr/share/applications

    2.找到安装QT图标

    3.直接拖到侧边菜单栏,就行了

    【配置opencv】

    sudo apt install qt-sdk
    sudo apt install cmake
    sudo apt install build-essential libgtk2.0-dev libjpeg-dev libtiff4-dev libjasper-dev libopenexr-dev cmake python-dev python-numpy python-tk libtbb-dev libeigen2-dev yasm libfaac-dev libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev libvorbis-dev libxvidcore-dev libx264-dev libqt4-dev libqt4-opengl-dev sphinx-common texlive-latex-extra libv4l-dev libdc1394-22-dev libavcodec-dev libavformat-dev libswscale-dev

    解压下载的opencv压缩包(我的在下载目录),解压后放到opt文件夹(否则make过程容易出错),然后在opencv目录下新建Release文件夹
    cd /home/jv/下载
    unzip opencv-2.4.13.zip
    sudo mv /home/jv/下载/opencv-2.4.13 /opt
    cd opencv-2.4.13/
    sudo mkdir Release
    cd Release

    cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -D BUILD_NEW_PYTHON_SUPPORT=ON -D WITH_V4L=ON -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D BUILD_EXAMPLES=ON -D WITH_QT=ON -D WITH_GTK=ON -D WITH_OPENGL=ON ..

    make
    sudo make install

    将opencv加入系统环境变量

    sudo gedit /etc/ld.so.conf
    在下一行加入
    /usr/loacal/lib
    保存,关闭
    sudo ldconfig

    sudo gedit /etc/bash.bashrc
    末尾加入
    PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig
    export PKG_CONFIG_PATH
    保存,关闭
    source /etc/bash.bashrc

    opt目录中的opencv文件夹可以删除,节省空间

    sudo rm -r /opt/opencv-2.4.13/

    完成!!!

  • 相关阅读:
    使用@ConditionalOnProperty注解
    Java注解Annotation与自定义注解详解
    Windows下使用service.bat安装tomcat服务, 启动停止tomcat服务
    Tomcat启动异常 java.net.BindException: Cannot assign requested address: JVM_Bind
    tomcat部署应用仅需ip和port访问
    dwr.jar简介
    Hibernate3 jar包的作用[转]
    org.springframework.orm.hibernate3.LocalSessionFactoryBean
    <iframe>和<frame>区别
    ServletActionContext.getRequest().getSession() 和 ActionContext.getContext().getSession()
  • 原文地址:https://www.cnblogs.com/xixixing/p/6130049.html
Copyright © 2020-2023  润新知