Ubuntu14.04安装好opencv3.0.0之后,进行测试:
$./DisplayImage lena.jpg
出现以下问题:
OpenCV Error: Unspecified error (The function is notimplemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. Ifyou are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-runcmake or configure script) in cvNamedWindow, file/home/aborn/software/OpenCV-3.0.0/modules/highgui/src/window.cpp, line …
网上给的解释是: GTK+2.x要先于OpenCV安装(You should remove the current installation of opencv from yoursystem; rebuild your opencv lib after installing gtk dev lib in thecorrect path; and reinstall the compiled opencv lib. )
解决方法:
1.卸载opencv
(1)移除式卸载:apt-getremove 软件名1 软件名2 …;(移除软件包)
(2)清除式卸载:apt-get--purge remove 软件名1 软件名2...;(同时清除配置)
建议选择清除式卸载
(3)卸载不管用的话,直接到opencv解压目录把解压出的opencv包删掉
2.查看没安装的文件,没装的装上
之前安装时的命令:
sudo apt-get install build-essential cmakelibgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
查看方法:
$ dpkg –listfiles cmake(查询系统中属于cmake的文件)
$ dpkg –listfiles libgtk2.0-dev(查询系统中属于libgtk2.0-dev的文件)
$ dpkg –listfiles 其他包名
3.重新安装opencv并进行测试
可参考文章:Ubuntu14.04安装opencv3.0.0:
http://blog.csdn.net/qingyanyichen/article/details/51621982