赞
踩
[compiler]sudo apt-get install build-essential
[required] sudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
[optional] sudo apt-get install python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev
标签:sudo apt-get install libgtk2.0-dev出现以下问题:
The following packages have unmet dependencies:
libgtk2.0-dev : Depends: libglib2.0-dev (>= 2.27.3) but it is not going to be installed
Depends: libgdk-pixbuf2.0-dev (>= 2.21.0) but it is not going to be installed
Depends: libpango1.0-dev (>= 1.20) but it is not going to be installed
Depends: libatk1.0-dev (>= 1.29.2) but it is not going to be installed
Depends: libcairo2-dev (>= 1.6.4-6.1) but it is not going to be installed
解决方法[1]:
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install libgtk2.0-dev
unzip opencv-3.2.0.zip
cd /opencv-3.2.0
mkdir release
cd release
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ..
1)test.py文件[2]
# -*- coding: utf-8 -*-
"""
Created on Tue Dec 31 19:16:05 2013
@author: duan
"""
import numpy as np
import cv2
# Load an color image in grayscale
img = cv2.imread('figure_1-1.png',1)
cv2.imshow('image',img)
cv2.waitKey(0)
cv2.destroyAllWindows()
2)在终端运行test.py
python test.py
3)运行结果:
4)安装成功!
1.Unable to insall libgtk2.0-dev on ubuntu 12.04
2.Getting Started with Images
3.Installation in LinuxUbuntu Ubuntu
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。