这里真的很烦人的问题。在 Linux Mint 操作系统上。每隔一段时间,我在运行 OpenCV 代码时会收到此错误:
HIGHGUI ERROR: V4L/V4L2: VIDIOC_S_CROP
OpenCV 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 cvNamedWindow, file /home/ravi/Desktop/opencv/OpenCV-2.1.0/src/highgui/window.cpp, line 180
terminate called after throwing an instance of 'cv::Exception'
what(): /home/ravi/Desktop/opencv/OpenCV-2.1.0/src/highgui/window.cpp:180: error: (-2) 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
我发现解决此问题的方法是执行以下操作:
cd OpenCV/
cd build/
cmake ..
make
sudo make install
sudo ldconfig
<restart computer>
然后我会回来,再次开始运行我的 OpenCV 代码,一切都会好的。但是几个小时后,或者可能在打开/关闭cpu之间,我会回到同样的愚蠢错误!
有谁知道这里发生了什么以及如何防止这种情况发生?真是令人沮丧。