1
0
mirror of https://github.com/hybridgroup/gobot.git synced 2025-05-04 22:17:39 +08:00
deadprogram 31131780d4 opencv: Switchover to use GoCV and OpenCV 3.3
Signed-off-by: deadprogram <ron@hybridgroup.com>
2017-10-05 17:05:10 +02:00

19 lines
429 B
Go

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