dongsou4301
dongsou4301
2016-06-10 18:34

Gobot OpenCV失败

已采纳

I'm trying to run OpenCV test application from GoBot Go Lang OpenCV . I tried to run the example code given in that page and all I get is an error:

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...

What am I doing wrong? I have installed and run C++ OpenCV before

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

1条回答

  • dqyuipw44576 dqyuipw44576 5年前

    Following up on comments; I gave gobot another go for the sample opencv_face_detect and it works for me. Although the example link you posted seems to be faulty/outdated.

    This is on OS X 10.11.5 and go1.6.2 darwin/amd64.

    Here are the steps I did;

    • Install opencv;

      brew tap homebrew/science && brew install opencv

    • Install gobot and go-opencv;

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

    • Run the face_detect example located at "github.com/hybridgroup/gobot/examples" and don't forget to smile!

      go run opencv_face_detect.go

    enter image description here

    点赞 评论 复制链接分享

为你推荐