1

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

Jishnu U Nair
  • 512
  • 5
  • 12
  • 29
  • 1
    Apart from missing image file warnings, the only problem I see here is your HIGHGUI ERROR log. Have you seen at [this](http://stackoverflow.com/questions/16287488/runtime-opencv-highgui-error-highgui-error-v4l-v4l2-vidioc-s-crop-opencv-c)? – Kerem Jun 11 '16 at 01:59
  • Thanks , I fixed that part, could you tell me what are those images missing?? – Jishnu U Nair Jun 11 '16 at 19:08
  • Hard to tell, looks like a gtk bug affecting multiple users. What OS are you on? I will try and run your example. – Kerem Jun 11 '16 at 19:27
  • There seems to be more to it than your ambiguous warnings. [gobot/platforms/opencv](https://github.com/hybridgroup/gobot/platforms/opencv) gives me a 404. But [hellocv.go here](https://github.com/hybridgroup/go-opencv/blob/master/samples/hellocv.go) works for me on OSX after installing opencv using brew. They obviously haven't updated the docs, if you don't have a specific use for gobot take a look at [hybridgroup/go-opencv](https://github.com/hybridgroup/go-opencv). – Kerem Jun 11 '16 at 19:58

1 Answers1

1

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

Kerem
  • 2,867
  • 24
  • 35
  • Thanks, I m using Ubuntu, but this is the output I got /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 – Jishnu U Nair Jun 11 '16 at 20:33
  • can you please try removing and reinstalling the "yuyo-gtk-theme package" with `sudo apt-get remove --purge yuyo-gtk-theme && sudo apt-get install yuyo-gtk-theme`? – Kerem Jun 11 '16 at 20:35
  • source with identical logs:http://askubuntu.com/a/694793/200350 I guess that should do it. – Kerem Jun 11 '16 at 20:44
  • Tried all reinstalling the package the mate-env-core, still the same error. – Jishnu U Nair Jun 11 '16 at 21:04
  • 1
    Obviously something is wrong with your packages but why not try this on another machine, a friend's pc perhaps? If go is already set up, it literally takes a few commands to run the example. I can't relate your issue to either gobot or opencv. Maybe as a last resort, try installing gimp as some people reported it helped fix the issue, probably because it fixes the gtk during installation. – Kerem Jun 11 '16 at 21:43