Gobot OpenCV 失败

Gobot OpenCV fails

我正在尝试 运行 来自 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 之前

跟进评论;我给了 gobot 另一个样本 opencv_face_detect,它对我有用。尽管您发布的示例 link 似乎是 faulty/outdated.

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

这是我执行的步骤;

  • 安装opencv;

    brew tap homebrew/science && brew install opencv

  • 安装gobot和go-opencv;

    go get github.com/hybridgroup/gobot && go get github.com/lazywei/go-opencv

  • 运行 face_detect 示例位于 "github.com/hybridgroup/gobot/examples",别忘了微笑!

    go run opencv_face_detect.go