主要报错是
opencv\modules\highgui\src\window.cpp:651: error: (-2:Unspecified error) The function is not implemented. Rebuild the libra
ry with Windows, GTK+ 2.x or Cocoa support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function 'cvShowImage'
本人 ros-melodic默认python2.7
重新安装opencv
pip uninstall opencv-python
pip uninstall opencv-contrib-python
pip install opencv-contrib-python==3.3.0.10
pip install opencv-python==3.3.0.10