2014-07-24 07:38:46 +08:00
|
|
|
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 {
|
|
|
|
return &cv.IplImage{}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *testCapture) GrabFrame() bool {
|
|
|
|
return true
|
|
|
|
}
|
2014-07-24 07:54:39 +08:00
|
|
|
|
|
|
|
type window interface {
|
|
|
|
ShowImage(*cv.IplImage)
|
|
|
|
}
|
|
|
|
|
|
|
|
type testWindow struct{}
|
|
|
|
|
|
|
|
func (w *testWindow) ShowImage(i *cv.IplImage) { return }
|