1

我正在尝试从 GoBot Go Lang OpenCV运行 OpenCV 测试应用程序。我试图运行该页面中给出的示例代码,但得到的只是一个错误:

2016/06/10 20:15:26 Initializing Robot cameraBot ...
2016/06/10 20:15:26 Initializing devices...
2016/06/10 20:15:26 Initializing device window ...
2016/06/10 20:15:26 Initializing device camera ...
2016/06/10 20:15:26 Starting Robot cameraBot ...
2016/06/10 20:15:26 Starting connections...
2016/06/10 20:15:26 Starting devices...
2016/06/10 20:15:26 Starting device window...
/usr/share/themes/Yuyo-Dark/gtk-2.0/Apps/libreoffice.rc:40: Unable to    locate image file in pixmap_path: "Entry/entry-border-bg-solid.png"
/usr/share/themes/Yuyo-Dark/gtk-2.0/Apps/libreoffice.rc:43: Background     image options specified without filename
/usr/share/themes/Yuyo-Dark/gtk-2.0/Apps/libreoffice.rc:49: Unable to   locate image file in pixmap_path: "Entry/entry-border-active-bg-solid.png"
/usr/share/themes/Yuyo-Dark/gtk-2.0/Apps/libreoffice.rc:52: Background   image options specified without filename
init done 
opengl support available 
2016/06/10 20:15:26 Starting device camera...
HIGHGUI ERROR: V4L/V4L2: VIDIOC_S_CROP
2016/06/10 20:15:26 Starting work...

我究竟做错了什么?我之前已经安装并运行过 C++ OpenCV

4

1 回答 1

1

跟进评论;我给了 gobot 另一个示例opencv_face_detect,它对我有用。尽管您发布的示例链接似乎有问题/已过时。

这是在 OS X 10.11.5 和 go1.6.2 darwin/amd64 上。

这是我做的步骤;

  • 安装opencv;

    brew tap homebrew/science && brew install opencv

  • 安装gobot和go-opencv;

    去获取 github.com/hybridgroup/gobot && 去获取 github.com/lazywei/go-opencv

  • 运行位于“github.com/hybridgroup/gobot/examples”的 face_detect 示例,不要忘记微笑!

    去运行 opencv_face_detect.go

在此处输入图像描述

于 2016-06-11T20:22:55.727 回答