2016-06-10 107 views
1

我試圖從GoBot Go Lang OpenCV運行OpenCV測試應用程序。我試圖運行該頁面中給出的示例代碼,我得到的只是一個錯誤:Gobot 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之前

+1

除了缺少圖像文件的警告,我在這裏看到的唯一的問題是你的HIGHGUI錯誤日誌。你見過[this](http://stackoverflow.com/questions/16287488/runtime-opencv-highgui-error-highgui-error-v4l-v4l2-vidioc-s-crop-opencv-c)? – mass

+0

謝謝,我修復了那部分,你能告訴我那些圖片丟失了嗎? –

+0

很難說,看起來像一個影響多個用戶的gtk錯誤。你在什麼操作系統上?我會嘗試運行你的例子。 – mass

回答

1

繼續評論;我給了gobot另一個去樣品opencv_face_detect它適用於我。雖然您發佈的示例鏈接似乎是錯誤/過時的。

這是在OS X 10.11.5和go1.6.2達爾文/ 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

  • 運行位於「github.com/hybridgroup/gobot/examples」不要忘記微笑的face_detect例子!

    go run opencv_face_detect.go

enter image description here

+0

謝謝,我使用Ubuntu,但這是我得到的輸出 /usr/share/themes/Yuyo-Dark/gtk-2.0/Apps/libreoffice.rc:40:無法找到pixmap_path中的圖像文件:「 Entry/entry-border-bg-solid.png「 /usr/share/themes/Yuyo-Dark/gtk-2.0/Apps/libreoffice.rc:43:指定不帶文件名的背景圖像選項 /usr/share/themes/Yuyo-Dark/gtk-2.0/Apps/libreoffice.rc:49:無法找到pixmap_path中的圖像文件:「Entry/entry-border-active-bg-solid.png」/ usr/share/themes/Yuyo-Dark /gtk-2.0/Apps/libreoffice.rc:52:指定不帶文件名的背景圖片選項 –

+0

你可以試試用'sudo apt-get remove --purge yuyo-gtk-get remove和重新安裝「yuyo-gtk-theme包」主題&& sudo apt-get install yuyo-gtk-theme'? – mass

+0

來源與相同的日誌:http://askubuntu.com/a/694793/200350我想這應該做到這一點。 – mass