Fix error with caputre and window interfaces
This commit is contained in:
parent
386042575f
commit
e4811ad1cb
|
@ -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
|
||||
|
|
|
@ -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 }
|
||||
|
|
|
@ -7,6 +7,10 @@ import (
|
|||
|
||||
var _ gobot.Driver = (*WindowDriver)(nil)
|
||||
|
||||
type window interface {
|
||||
ShowImage(*cv.IplImage)
|
||||
}
|
||||
|
||||
type WindowDriver struct {
|
||||
name string
|
||||
window window
|
||||
|
|
Loading…
Reference in New Issue