Fix error with caputre and window interfaces

This commit is contained in:
Adrian Zankich 2014-12-22 14:24:06 -08:00
parent 386042575f
commit e4811ad1cb
3 changed files with 9 additions and 9 deletions

View File

@ -11,6 +11,11 @@ import (
var _ gobot.Driver = (*CameraDriver)(nil)
type capture interface {
RetrieveFrame(int) *cv.IplImage
GrabFrame() bool
}
type CameraDriver struct {
name string
camera capture

View File

@ -2,11 +2,6 @@ package opencv
import cv "github.com/hybridgroup/go-opencv/opencv"
type capture interface {
RetrieveFrame(int) *cv.IplImage
GrabFrame() bool
}
type testCapture struct{}
func (c *testCapture) RetrieveFrame(i int) *cv.IplImage {
@ -17,10 +12,6 @@ func (c *testCapture) GrabFrame() bool {
return true
}
type window interface {
ShowImage(*cv.IplImage)
}
type testWindow struct{}
func (w *testWindow) ShowImage(i *cv.IplImage) { return }

View File

@ -7,6 +7,10 @@ import (
var _ gobot.Driver = (*WindowDriver)(nil)
type window interface {
ShowImage(*cv.IplImage)
}
type WindowDriver struct {
name string
window window