ubuntu16.04.5_64编译opencv3.4.0 执行facedetect ../data/lena.jpg 出现错误,出现error: (-2: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 function ‘cvNamedWindow’
错误,明明已经先安装了
sudo apt-get install libgtk2.0-dev
还是提示以上错误,经过反复试验,
在cmake时加入-D WITH_GTK = ON -D WITH_GTK_2_X =ON选项,在执行facedetect ../data/lena.jpg,终于出现如下图了。表示成功。