ubuntu 16.4 opencv configuration environment

ubuntu 16.4 environment is first installed opencv, from the official website to download the source files, cmake to compile and install directly. Program reads image data is not a problem.

但是在imshow时,会出现下面问题:
OpenCV(3.4.1) Error: Unspecified error (The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script) in cvShowImage

Solution Obviously, you need to install libgtk2.0-dev and pkg-config, and then re-cmake.
Opencv header files default installation location of / usr / local / include so first of all you want to delete opencv in the directory / eoencv2 folder

sudo rm -r / usr / local / include / opencv / usr / local / include / opencv2
Next, install the two libraries mentioned above:
the sudo APT-GET libgtk2.0 the install the sudo APT-dev-GET-config the install PKG
below cmake use, not repeated. make make install to complete the installation
finally use the command
pkg-config --modversion opencv
view the version installed opencv

Reference Site https://www.cnblogs.com/emouse/archive/2013/02/22/2922940.html @
       https://blog.csdn.net/qiaoji6073/article/details/76572801

Guess you like

Origin www.cnblogs.com/alehua/p/11093887.html