1
0
mirror of https://github.com/hybridgroup/gobot.git synced 2025-05-04 22:17:39 +08:00
deadprogram 953c3254e7 core: use canonical import domain of gobot.io for all code
Signed-off-by: deadprogram <ron@hybridgroup.com>
2016-12-08 13:24:03 +01:00

19 lines
449 B
Go

package opencv
import (
"path"
"runtime"
"testing"
"gobot.io/x/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)
}