1
0
mirror of https://github.com/hybridgroup/gobot.git synced 2025-04-27 13:48:56 +08:00
deadprogram 5e2ea8c39c opencv: update interface and examples to indicate multipurpose
Signed-off-by: deadprogram <ron@hybridgroup.com>
2017-10-23 11:45:36 +02:00

19 lines
418 B
Go

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