1
0
mirror of https://github.com/hybridgroup/gobot.git synced 2025-04-27 13:48:56 +08:00
2016-02-22 00:33:58 -05:00

19 lines
461 B
Go

package opencv
import (
"path"
"runtime"
"testing"
"github.com/hybridgroup/gobot/gobottest"
cv "github.com/lazywei/go-opencv/opencv"
)
func TestUtils(t *testing.T) {
_, currentfile, _, _ := runtime.Caller(0)
image := cv.LoadImage(path.Join(path.Dir(currentfile), "lena-256x256.jpg"))
rect := DetectFaces("haarcascade_frontalface_alt.xml", image)
gobottest.Refute(t, len(rect), 0)
gobottest.Refute(t, DrawRectangles(image, rect, 0, 0, 0, 0), nil)
}